Jump to content

Implement product of the moth/week/day


Recommended Posts

I am looking into adding a functionality to the store that lets the merchant make a product part of a second category and have a different design in the product page.

 

Do you think that the approach of adding the product to a second category is even possible within 1.6?

 

If you know another way please share.

Link to comment
Share on other sites

It's certainly possible to have a product in two categories (a main category and a "Product of the day" category), but changing the product page design based on the selected category is more difficult. You can use the category in the cookie to determine whether the customer visited the product from the main category or the "Product of the day" category, though that relies on the customer viewing the "Product of the day" category. If they go straight to the product without going through the "Product of the day" category first, they'll get the default product design.

 

For example, you could use code like the following in product.tpl:

{if $cookie->last_visited_category == 10}
Put "Product of the day design here"
{else}
Put normal product design here
{/if}

Change 10 to the ID of your "Product of the day" category. You can add more if statements if needed.

  • Like 1
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...