Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Unique product.tpl for one product only?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-15-2006, 07:37 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Unique product.tpl for one product only?

Can someone please point me in the right direction here?

I had previously purchased WebsiteCM's "mutliple template package" and I got very used to having unique templates for various products... until Jon gets it working with 4.1, I need a workaround...

My goal is for one specific product (which also just happenes to have its own category) - I want to totally re-design product.tpl -- but ONY for this one product.

I tried the following, and it works, but, is there a better way to do this? Is there a better way to call a specific product to its own product.tpl page? Can I accomplish this at the product level, not the category? Is there anything wrong with doing it this way?

This is what I did:

in /skin1/customer/home_main.tpl

{elseif $main eq "product"}
{if $product.categoryid == 1}
{include file="customer/main/special_product.tpl" product=$product}
{else}
{include file="customer/main/product.tpl" product=$product}
{/if}

Is there a better way to do this? Are the downsides to this? Is there a more optimized way?

Thanks!

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #2  
Old 09-17-2006, 02:52 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Unique product.tpl for one product only?

That should work fine, I've used it in the past with no issues.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 09-17-2006, 06:13 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: Unique product.tpl for one product only?

Thanks... it doesn't seem to be dragging me down. For a few products, I don't mind hard coding this. Jon's mod makes it (made it, as I'm in 4.1) so easy though... and you could instantly assign which product template you wanted, on a per-product basis, with a pulldown... but for now, this is working fine -- I just wanted to be sure I wasn't doing something bad that would bite me later on. Jon told me his templates mod will be updated for 4.1 in about 2 weeks. I'll follow up oin this then...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 05:16 AM.

   

 
X-Cart forums © 2001-2020