X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Labels in Product description (https://forum.x-cart.com/showthread.php?t=57707)

ADDISON 01-24-2011 12:26 PM

Labels in Product description
 
Would you like to use labels defined in Languages in your product full description? Something like this: "This shoes are for $lbl.running", and $lbl.running = "Running". Changing the label content you will change in all products this label.

Here is the solution:

find skin/common_files/customer/main/product_details.tpl

replace line 18

Code:

<td class="descr">{$product.fulldescr|default:$product.descr}</td>

with

Code:

<td class="descr">{eval var=$product.fulldescr|default:$product.descr}</td>

Of course you can run an SQL query if you are smart enough ;)

chamberinternet 01-24-2011 12:48 PM

Re: Labels in Product description
 
Thanks for this, but doesnt using 'eval' slow down the execution?

ADDISON 01-24-2011 12:51 PM

Re: Labels in Product description
 
if you don't abuse it, it won't slow you down. you can also make a speed test for your site.

it is up to you what solution you like. SQL or this one.

chamberinternet 01-24-2011 12:52 PM

Re: Labels in Product description
 
No worries.. Thanks.

It's definatley useful though :-)


All times are GMT -8. The time now is 05:00 PM.

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