X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Unique product.tpl for one product only? (https://forum.x-cart.com/showthread.php?t=24955)

carpeperdiem 09-15-2006 07:37 AM

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

balinor 09-17-2006 02:52 AM

Re: Unique product.tpl for one product only?
 
That should work fine, I've used it in the past with no issues.

carpeperdiem 09-17-2006 06:13 AM

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


All times are GMT -8. The time now is 12:40 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.