Jump to content

How can I hide attributes for products on the category page only


Recommended Posts

  • 2 weeks later...

Hey BudgetChic i have figured it out....well im not a proffessional coder or anything, but i did find an option which works great for me, and so far theres no issues with the solution.

 

in your themes folder (mine was defaultbootstrap) you will see a file named product-list-colors.tpl

 

i just commented out the text by using {* text to be commented out here *}

 

i have changed the colours to red to show what i did.

 

<ul class="color_to_pick_list clearfix">
    {*{foreach from=$colors_list item='color'}
        {assign var='img_color_exists' value=file_exists($col_img_dir|cat:$color.id_attribute|cat:'.jpg')}
        <li>
            <a href="{$link->getProductLink($color.id_product, null, null, null, null, null, $color.id_product_attribute)|escape:'html':'UTF-8'}" id="color_{$color.id_product_attribute|intval}" class="color_pick"{if !$img_color_exists && isset($color.color) && $color.color} style="background:{$color.color};"{/if}>
                {if $img_color_exists}
                    <img src="{$img_col_dir}{$color.id_attribute|intval}.jpg" alt="{$color.name|escape:'html':'UTF-8'}" title="{$color.name|escape:'html':'UTF-8'}" width="20" height="20" />
                {/if}
            </a>
        </li>
    {/foreach} *}

 

 

 

Now on the product listing page / catalogue page, it hides the colour icons/attributes, but they are still available on the product page :)

  • Like 4
Link to comment
Share on other sites

Hey BudgetChic i have figured it out....well im not a proffessional coder or anything, but i did find an option which works great for me, and so far theres no issues with the solution.

 

 

Now on the product listing page / catalogue page, it hides the colour icons/attributes, but they are still available on the product page :)

 

Thank you sooooo much!  That did the trick!!!  SOLVED!

Link to comment
Share on other sites

  • 5 months later...
  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...