Brand Scroller Frontpage - Display By Feature Id

Hi,



I’m using cs-cart 4.1.x



Is it possible to to display only one feature on brand scroller in frontpage?



The code to be changed is located in themes>templatename>templates>blocks>our_brands.tpl


<br />
        {foreach from=$brands item="brand" name="for_brands"}<br />
<br />
            <div class="jscroll-item"><br />
                {assign var="obj_id" value="scr_`$block.block_id`000`$brand.variant_id`"}<br />
<br />
                {include file="common/image.tpl" assign="object_img" class="grayscale" image_width=$block.properties.thumbnail_width image_height=$block.properties.thumbnail_width images=$brand.image_pair no_ids=true}<br />
                <div class="center"><br />
                    <a href="{"product_features.view?variant_id=`$brand.variant_id`"|fn_url}">{$object_img nofilter}</a><br />
                </div><br />
            </div><br />
<br />
        {/foreach}
```<br />
<br />
after the {foreach} I tried {if $feature_id == "117"} but that doesn't work.Does anyone know how to specify only items from a specific feature id?<br />
<br />
Thanks in advance.

[quote name='everseeker' timestamp='1404308971' post='186814']

Hi,



I'm using cs-cart 4.1.x



Is it possible to to display only one feature on brand scroller in frontpage?



The code to be changed is located in themes>templatename>templates>blocks>our_brands.tpl



{foreach from=$brands item="brand" name="for_brands"}


{assign var="obj_id" value="scr_`$block.block_id`000`$brand.variant_id`"}

{include file="common/image.tpl" assign="object_img" class="grayscale" image_width=$block.properties.thumbnail_width image_height=$block.properties.thumbnail_width images=$brand.image_pair no_ids=true}



{/foreach}




after the {foreach} I tried {if $feature_id == “117”} but that doesn't work.Does anyone know how to specify only items from a specific feature id?



Thanks in advance.

[/quote]



Actually variants of one product feature (!) are displayed in the scroller. If you know ID of the required variant, please use the following code:



{if $brand.variant_id == VARIANT_ID}
...
{/if}





Hope that helps.

Thank you,



but that will retrieve only one single brand (variant). I need to retrieve values where feature_id == FEATURE_ID



I have two features assigned as brands (main brand and product line). They have to be marked as brands to be clickable in the product page.



So i changed it to {if $brand.feature_id == FEATURE_ID} and its working now.



Thank you so much



RESOLVED