Jump to content

Katyayan

Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • First Name
    Katyayan
  • Last Name
    Agrawal

Katyayan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I am getting error "Illegal string offset 'name' " in my code below at this line {if $value.name == 'Yes'} - {foreach from=$filters item=filter} {if isset($filter.values)} <!-- my change start --> {assign var='hasYes' value=false} {foreach from=$filter.values item=value} {if $value.name == 'Yes'} {assign var='hasYes' value=true} {break} {/if} {/foreach} <!-- my change end --> Please suggest.
  2. Thanks Simonas. Sorry if I was not clear at the first time above. It is not the incremental search I want. It is exactly same as how it does today in the default Prestashop implementation - In the homepage search field, when user types in something, it auto suggests with a pattern "parent category > product name". I want the auto suggestion with a pattern "location, city, state".
  3. In the homepage of my office rental spaces website, I want to search the products based on location, city and zipcode. When user writes, it should auto suggest with pattern 'location, city, state' e.g 'Chicago downtown, Chicago, Illinois. Below is what, I thought to implement it - 1. Create a new tab in the Product Back Office 2. Add Office Address fields - Address1, Address2, Location, City, State, Country, ZipCode (I need to show the office address on Product Details page as well) 3. Include it in the Search by adding the new fields in $weightArray and SQL request. Please suggest, if approach is correct or I must try something else? How will I get auto suggest pattern 'location, city, state'?
  4. Hi Rockey, Thank a lot for the solution, it worked very well. Big help. With a little change from your suggestion, I can display 'amenities' both on PDP and in Layered Navigation as filters. I used product features such as "Coffee Machine" with only 'Yes', If I don't set the feature for a product, anyways it is not displayed. Changes - # themes/default-bootstrap/product.tpl at line #477 {if $feature.value != 'Yes'} <td>{$feature.value|escape:'html':'UTF-8'}</td> {/if} ---------------------------------------------------------------------------- #themes/default-bootstrap/modules/blocklayered/blocklayered.tpl {foreach from=$filters item=filter} {if isset($filter.values)} <!-- my change start --> {assign var='hasYes' value=false} {foreach from=$filter.values item=value} {if $value.name == 'Yes'} {assign var='hasYes' value=true} {break} {/if} {/foreach} <!-- my change end --> {if isset($filter.slider)} <div class="layered_{$filter.type}" style="display: none;"> {else} <div class="layered_filter"> {/if} <!-- my change start --> {if !$hasYes} <div class="layered_subtitle_heading"> <span class="layered_subtitle">{$filter.name|escape:'html':'UTF-8'}</span> <!--<span class="layered_close"> <a href="#" data-rel="ul_layered_{$filter.type}_{$filter.id_key}"></a> </span>--> </div> {/if} <!-- my change end --> <ul id="ul_layered_{$filter.type}_{$filter.id_key}" class="col-lg-12 layered_filter_ul{if isset($filter.is_color_group) && $filter.is_color_group} color-group{/if}"> {if !isset($filter.slider)} {if $filter.filter_type == 0} {foreach from=$filter.values key=id_value item=value name=fe} <!-- my change start --> {if $hasYes} {if $value.name == 'Yes'} {assign var=$value.name value=$filter.name} <!-- {else} {continue}{$value.name|escape:'html':'UTF-8'} {/if}--> {/if} <!-- my change end --> {if $value.nbr || !$hide_0_values} <li class="nomargin {if $smarty.foreach.fe.index >= $filter.filter_show_limit}hiddable{/if} col-lg-12"> {if isset($filter.is_color_group) && $filter.is_color_group} <input class="color-option {if isset($value.checked) && $value.checked}on{/if} {if !$value.nbr}disable{/if}" type="button" name="layered_{$filter.type_lite}_{$id_value}" data-rel="{$id_value}_{$filter.id_key}" id="layered_id_attribute_group_{$id_value}" {if !$value.nbr}disabled="disabled"{/if} style="background: {if isset($value.color)}{if file_exists($smarty.const._PS_ROOT_DIR_|cat:"/img/co/$id_value.jpg")}url(img/co/{$id_value}.jpg){else}{$value.color}{/if}{else}#CCC{/if};" /> {if isset($value.checked) && $value.checked}<input type="hidden" name="layered_{$filter.type_lite}_{$id_value}" value="{$id_value}" />{/if} {else} <input type="checkbox" class="checkbox" name="layered_{$filter.type_lite}_{$id_value}" id="layered_{$filter.type_lite}{if $id_value || $filter.type == 'quantity'}_{$id_value}{/if}" value="{$id_value}{if $filter.id_key}_{$filter.id_key}{/if}"{if isset($value.checked)} checked="checked"{/if}{if !$value.nbr} disabled="disabled"{/if} /> {/if} <label for="layered_{$filter.type_lite}_{$id_value}"{if !$value.nbr} class="disabled"{else}{if isset($filter.is_color_group) && $filter.is_color_group} name="layered_{$filter.type_lite}_{$id_value}" class="layered_color" data-rel="{$id_value}_{$filter.id_key}"{/if}{/if}> {if !$value.nbr}my change3 {$value.name|escape:'html':'UTF-8'}{if $layered_show_qties}<span> ({$value.nbr})</span>{/if} {else} <a href="{$value.link}"{if $value.rel|trim != ''} data-rel="{$value.rel}"{/if}> <!-- my change start --> {if $hasYes}{$filter.name|escape:'html':'UTF-8'}{else}{$value.name|escape:'html':'UTF-8'}{/if} <!-- my change end -->
  5. Hello All, I am developing an 'Office Space Rental' website using Prestashop. My requirement is - # I need to show all the 'amenities' of a property (e.g coffee m/c, WiFi, Security, Projector etc) on the 'Products Listing' page and 'Product Details' page. One property would have one or more amenities. # These amenities would also be filtering options on the Products Listing page, as facets. Please help how to configure these OOB as I don't find it possible with Product Attribute and Product Features. if not possible, what would be my design and implementation approach. Regards, Katyayan
×
×
  • Create New...