| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Labels in Product description? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Labels in Product description?
I have 100 products and in their product description I would like to define a text label. I am pretty sure I will modify the value of this text label in the future. Going and changing a word in 100 products is not the best option.
How can I inserted a variable in product description (html)? Just $lbl_ is enough or including it in <?php ... >
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#2
|
|||||||
|
|||||||
Re: Labels in Product description?
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Labels in Product description?
Balinor: I know that link, but it is not what I need.
Let be more specific. I will define in language file a new text label for example "Not applicable". This label I want to insert it in Product long description. If I want to change "Not applicable" to "N/A" I should not go to edit every product which has "Not applicable" word in its description. Maybe I don't know which product has that word. So, any idea?
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#4
|
|||||||
|
|||||||
Re: Labels in Product description?
It is what you need. Create a new language variable and insert it in your product description. Alter the description code as mentioned in that thread so that the language variable works in the product description.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Labels in Product description?
Ok. I will make a try. Thanks.
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#6
|
|||||||||
|
|||||||||
Re: Labels in Product description?
Balinor: I made a tried as you suggested. It is not what I needed.
Let me explain you again. Every product has its own description. It is an html text inserted in a form. In this description (html text) I would like to insert a text label that will be easy to change after. For example: Product long description "This product has 12 [text_label] ... " I will use this text_label in more then 60 product descriptions. If I would like to change the value of text_label I should go to Admin -> Language and change the set up value of the label. I don't understand what you mean to go and change the template. As you may see there is no need to change the template. Only a set up value for a language label. So, I would like to define a text label in Language and add it in product description. How can I do that?
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#7
|
|||||||
|
|||||||
Re: Labels in Product description?
You aren't understanding. That thread I linked is exactly what you need to do. There IS a need to change the product description code in product.tpl so that you can call the newly created smarty language variable, otherwise it will not show the language variable.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Labels in Product description?
Balinor: Sorry for the misunderstanding. Using the "eval var" in tpl product full description worked great. This is a very good tip. Cheers!
__________________
X-Cart Next: Business 5.2 (learning and testing) X-Cart Classic: Gold and Gold Plus 4.7 Lots of Modules and Customizations OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions) You can catch my ideas here: http://ideas.x-cart.com |
|||||||||
#9
|
|||||||
|
|||||||
Re: Labels in Product description?
Maybe I missed something, or maybe it's that I'm on an old version. But in 4.0.17, to get access to $lng variables from product descriptions, I needed to insert the following in include/func.php:
after this code Code:
added the following: Code:
Then I'm able to use any {$lng.xxxxx} in a product full description.
__________________
Gold 4.0.17 On Sale, Smart Search, X-AOM, X-SpecialOffers, XNews, DSEFU, and custom mods/tweaks |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|