| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
How can I use language variable in Extra Fields? | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
How can I use language variable in Extra Fields?
Hello Folks,
How can I use language variables in Extra Fields? For examply I create an Extra Field for a warranty text. Some variable parts of the text I would like to change faster than doing a SQL using language variables over the database (because I am not sure how the result will be, sometimes I could affect the content). For example in product add page, in the input text box for a specific extra field I will write the text using $lbl_ variable. 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 |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: How can I use language variable in Extra Fields?
Unfortunately it is not possible in the default X-Cart.
But this feature can be custom programmed. You should alter the "modules/Extra_Fields/extra_fields.php" script and replace this code: PHP Code:
PHP Code:
Note: use FTP to edit the PHP scripts. Alternatively you can apply the attached Patch. After the patch is applied you should be able using e.g. "{$lng.lbl_login}" as extra field value.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: How can I use language variable in Extra Fields?
Moving to complete mods forum.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#4
|
|||||||
|
|||||||
Re: How can I use language variable in Extra Fields?
Hi,
works nice, but if I add an extra field to products list - {$product.extra_fields[0].field_value} - I get only the language variable, not the language entry ie. {$lng.lbl_material_vinyl} not "Vinyl". Thank for advance!
__________________
4.1.11 |
|||||||
|
|||
X-Cart forums © 2001-2020
|