Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

changing language labels from global to specific

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 06-02-2017, 10:14 AM
 
madhatter717 madhatter717 is offline
 

Member
  
Join Date: Oct 2016
Posts: 24
 

Default 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
__________________
x-cart business 5.2.14
Reply With Quote
  #2  
Old 06-13-2017, 04:50 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default 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.
__________________
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
Reply With Quote
  #3  
Old 06-13-2017, 06:56 AM
 
madhatter717 madhatter717 is offline
 

Member
  
Join Date: Oct 2016
Posts: 24
 

Default Re: changing language labels from global to specific

Thanks alex,

that was really helpful.
__________________
x-cart business 5.2.14
Reply With Quote

The following user thanks madhatter717 for this useful post:
qualiteam (06-15-2017)
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:36 PM.

   

 
X-Cart forums © 2001-2020