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)
-   -   Calling a .tpl in production description (https://forum.x-cart.com/showthread.php?t=41025)

tqualizerman 07-10-2008 11:57 AM

Calling a .tpl in production description
 
Hey all,

I noticed that its not possible to call a .tpl file from the product description (at least using the usual method used throughout x-cart) but is there a way of doing this?

We have a lot of regular content that spans many products that we'd like to be able to update by modifying a single .TPL as opposed to editing each product.

balinor 07-10-2008 12:06 PM

Re: Calling a .tpl in production description
 
You don't need to call a tpl, just put a language variable in customer/main/product.tpl just under the product description and use {if} statements to determine what products get it.

Or, to make life even easier, just put the content in Extra Fields and then you can easily control what product gets what content.

tqualizerman 07-10-2008 12:18 PM

Re: Calling a .tpl in production description
 
Thanks Balinor,

If I wanted to limit what is displayed depending the name of the category, what might the if statement look like?

balinor 07-10-2008 12:23 PM

Re: Calling a .tpl in production description
 
{if $cat eq "1"}

show this

{elseif $cat eq "2"}

show that

etc

The number is the corresponding number of the category.

tqualizerman 07-10-2008 01:20 PM

Re: Calling a .tpl in production description
 
Thanks again,

It appears x-cart is limiting me to 10 extra fields -- is there a workaround for this?

tqualizerman 07-10-2008 01:21 PM

Re: Calling a .tpl in production description
 
Got it - in the module settings for 'extra fields'


All times are GMT -8. The time now is 11:25 AM.

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