Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Variable Name Rate Topic   - - - - -

 
  • Ghiyas
  • Advanced Member
  • Trial users
  • Join Date: 07-Aug 17
  • 129 posts

Posted 01 September 2017 - 10:01 AM #1

On my invoice template, I have a line that to describe the method of payment

 {{__("PAYMENT")}} : {{p.payment}}

This gets displayed as PAYMENT : Phone ordering on the invoice which is fine.

 

However, when I change the code to {{__("PAYMENT METHOD")}} : {{p.payment}} , it displays it as _PAYMENT METHOD: Phone ordering

 

Can anyone advise me what I'm doing wrong? I don't know why it is adding an underscore to the start of the line now, just because I'm adding an extra word? 



 
  • sok777
  • Senior Member
  • Members
  • Join Date: 23-Jun 11
  • 376 posts

Posted 01 September 2017 - 10:25 AM #2

If you want just to change display name from PAYMENT to PAYMENT METHOD you do not need to create extra language variable for that.

 

Just go to Administrtion > Translations

 

in the search field write PAYMENT, find the needed value and change it to PAYMENT METHOD

 

But if you want to create new variable then change to {{__("PAYMENT_METHOD")}} on the invoice, and add extra variable in Administrtion > Translations > Add new variable

 

Variable = PAYMENT_METHOD

 

Value = PAYMENT METHOD



 
  • Ghiyas
  • Advanced Member
  • Trial users
  • Join Date: 07-Aug 17
  • 129 posts

Posted 01 September 2017 - 10:39 AM #3

Creating the new variable worked great, I'll have to remember that in future  8)



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11248 posts

Posted 02 September 2017 - 05:20 AM #4

Any time you see the name prefixed with an underscore character ('_') that means that it is a language variable that doesn't exist and needs to be added or corrected.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.