Jump to content

[SOLVED] Show products in two different ways


Recommended Posts

Hi,

I would like to ensure that, once entered in the category "SHOES" I show the products in pairs.

While entering the category "SOCKS" I want to show products four to four.

Can I connect the two pages to two different productlist.tpl or php?

Thank you.

Link to comment
Share on other sites

make a copy of productslist.tpl and rename shoesproductlist.tpl, make the alterations you need in file and reupload, repeat but rename the file socksproductlist.tpl

open categorys.tpl

and find the include for productlist.tpl

delete this line and add the following

{if $category->id_category == 3}
{include file=$tpl_dir./shoesproduct-list.tpl products=$products}
{elseif $category->id_category == 2}
{include file=$tpl_dir./socksproduct-list.tpl products=$products}
{else}
{include file=$tpl_dir./product-list.tpl products=$products}
{/if}



obiviously you need to find the correct category id for the socks and shoes categorys and change the $category->id_category == 3

to the right digits


regards


Chris

Link to comment
Share on other sites

Thank you Chris!!
It works!
Thank you sooo much!


make a copy of productslist.tpl and rename shoesproductlist.tpl, make the alterations you need in file and reupload, repeat but rename the file socksproductlist.tpl

open categorys.tpl

and find the include for productlist.tpl

delete this line and add the following

{if $category->id_category == 3}
{include file=$tpl_dir./shoesproduct-list.tpl products=$products}
{elseif $category->id_category == 2}
{include file=$tpl_dir./socksproduct-list.tpl products=$products}
{else}
{include file=$tpl_dir./product-list.tpl products=$products}
{/if}



obiviously you need to find the correct category id for the socks and shoes categorys and change the $category->id_category == 3

to the right digits


regards


Chris

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