Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Languages in database


betson

Recommended Posts

Considering the no. of products that would be in the store - it would increase no. of queries made to db (remember each page has multiple defines), even if you run the query only once / customer in a session - you would have to store them somewhere to be used repeatedly on the site - thus not advisable ... owing to resource utilization. No other issues other then this - that I could think of...

 

Cheers

Gaurav

Best Regards,
Gaurav

Link to comment
Share on other sites

Considering the no. of products that would be in the store - it would increase no. of queries made to db (remember each page has multiple defines), even if you run the query only once / customer in a session - you would have to store them somewhere to be used repeatedly on the site - thus not advisable ... owing to resource utilization. No other issues other then this - that I could think of...

 

Cheers

Gaurav

 

 

I am facing a problem while doing this. ie for example define('SUB_HEADING_TEXT_5','For any queries regarding the Gift Voucher System, please contact the store

by email at '. STORE_OWNER_EMAIL_ADDRESS . '. Please make sure you give

as much information as possible in the email. ');

 

when i move this to db and fetch from db and displaying... the STORE_OWNER_EMAIL_ADDRESS is displaying as it is instead of the value in configure file. The db fetching for languages is taking place after the application_top.php

 

what will be the problem?

 

regards

Betson

Link to comment
Share on other sites

When you include the language file, the definitions of the constants are made. 'define' is a function of php and interprets the following text, thus replaces the STORE_OWNERS_EMAIL_ADDRESS with the value of the constant.

 

Since you fetch the string from the database, it's just handled as a string and no replacement of the constant takes place. To make it work, you got to use eval(), but there are some things to keep in mind when using it. Check the php manual for further information.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...