View Single Post
  #2  
Old 08-06-2007, 06:46 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Alter product.tpl for one product

At least 2 ways to do this:

1. Buy WebsiteCM's "multiple product page templates" mod (I did)

2. CLONE your product.tpl -- for example, if you have 2 "unique" products -- call them 01_product.tpl and 02_product.tpl

then, in /skin1/customer/home_main.tpl

FIND:
Code:
{elseif $main eq "product"} {include file="customer/main/product.tpl" product=$product}
REPLACE WITH:
Code:
{elseif $main eq "product"} {if $product.categoryid == 1} {include file="customer/main/01_product.tpl" product=$product} {elseif $product.categoryid == 2} {include file="customer/main/02_product.tpl" product=$product} {else} {include file="customer/main/product.tpl" product=$product} {/if}
You may want to adjust the {if $product.categoryid == 1} to something else, if you have more than one product in a category.

If you have more than a few unique product layouts, Jon's mod can be an invaluable time saver. I am happy I am using the mod.

He also has a mod for unique categories. Works great.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote