X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   changing language labels from global to specific (https://forum.x-cart.com/showthread.php?t=75399)

madhatter717 06-02-2017 10:14 AM

changing language labels from global to specific
 
HI X-cart Team,

How do you add a new label to an existing label without it taking affect globally?

I want to change the label of the "Buy more for less" button to "See volume pricing" but only on specific product pages.

So simply changing the label of the button won't work because it will globally change the name of the button and I want the change to be specific.

is it possible to create a new label and have it overwrite the current label namespace through the language labels in the admin?

any insight and help would be appreciated

thanks

qualiteam 06-13-2017 04:50 AM

Re: changing language labels from global to specific
 
If a label is used in multiple places, editing the label will change the wording on all these pages.

You should look through the source code and change the PHP classes and Twig templates that display the label to make them display a new one.
Luckily, in most cases it is a template file, so you can use the Webmaster mode to locate the template file and tweak its code.
If it is in a PHP script, you will have to create a custom module and "decorate" that PHP class from your module.

madhatter717 06-13-2017 06:56 AM

Re: changing language labels from global to specific
 
Thanks alex,

that was really helpful. :-)


All times are GMT -8. The time now is 02:26 PM.

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