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

Dynamic Language labels - are they possible

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-05-2012, 04:33 AM
 
movilla movilla is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 37
 

Default Dynamic Language labels - are they possible

I am trying to create a tool tip for product options.

My idea is to create a unique label for each product option using the classid value of the product option.

Example:
$lng.lbl_product_class_22
$lng.lbl_product_class_23
$lng.lbl_product_class_24
$lng.lbl_product_class_25

My problem is how do I combine the classid variable {$v.classid} with my prefix for the label; $lng.lbl_product_class_ to end up with the correct label showing.

E.g.

classid = 50

should end up with a label:

$lng.lbl_product_class_50
__________________
4.5.2 gold
Reply With Quote
  #2  
Old 11-05-2012, 06:08 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Dynamic Language labels - are they possible

This might be difficult to do inside a template, but pretty easy to do in PHP. I would look at assigning the language variable right into the $product_options array.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 11-05-2012, 02:06 PM
 
movilla movilla is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 37
 

Default Re: Dynamic Language labels - are they possible

Thanks Mike,

In the end I have created a separate field in the classes table and included the relevant value there.
__________________
4.5.2 gold
Reply With Quote
  #4  
Old 10-15-2013, 11:24 AM
 
Matt W Matt W is offline
 

Newbie
  
Join Date: Jul 2011
Posts: 9
 

Default Re: Dynamic Language labels - are they possible

movilla -

I'm trying to do the same thing, but I'm not a PHP programmer. I have most pieces working except for /modules/Product_Options/product_options.php.

On an existing option, when saving the option group form, it saves to the db, but throws an error. If I try to create a new option group, it errors and does not save. The error is Access Denied, but I'm thinking it is something I did wrong in the product_options.php file.

Would you be able to share that file with me so I can do a diff and see what I may have missed?
Despite my sig, I'm on v 4.5.5.

Thanks. Matt
__________________
x-cart 4.5.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 10:20 PM.

   

 
X-Cart forums © 2001-2020