Jump to content

change background in category


Recommended Posts

hello
I want change background of center_column when i change category.
I made 4 diffrent id of column to change background.

            
{if $smarty.get.id_category == 3 OR $smarty.get.id_category == 17 OR $smarty.get.id_category == 18}

{/if}




its work but only static and only when i'm in category when i open porduct ( in this category) its not working, somebody know how can i do it?

Link to comment
Share on other sites

Try the following instead:



This will allow you to set a different background in the center column for categories 3, 17 and 18. Use #center_column3 for category 3, $center_column17 for category 17, #center_column18 for category 18 and #center_column for all the other categories.


Link to comment
Share on other sites

this what i wrote is mainly category and 2 subcategory.
yes in know but i need change in category and subcategory and in produckt of this cat and sub.
if i open product of this category i want have still this same background what i have in maindly category.

Link to comment
Share on other sites

I've made it so that the background stays the same for both the category and product, assuming the product's default category is that category, by using the following code:

{if $smarty.get.id_category == 3 OR $product->id_category_default == 3}

Link to comment
Share on other sites

its not working in my maindly category, it is id.category = 2 and where im in this category its ok but when i go to subcategory its not working...

     {if $smarty.get.id_category == 2 OR $product->id_category_default == 2} 

           {/if}



i try it with subcategory 11 its ok but in produkt not ;s

      {if $smarty.get.id_category == 11 OR $product->id_category_default == 11} 

           {/if}
Link to comment
Share on other sites

How do you have your categories and products set up? Are your products in multiple categories or just one? If they are in just one category, you will need to set the "Default category" of the product to the category it is in instead of Home for $product->id_category_default to work. If your products are in multiple categories, the method I described won't work. You can try using $cookie->last_visited_category instead:

{if $smarty.get.id_category == 2 OR $cookie->last_visited_category == 2}

Link to comment
Share on other sites

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...