Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

multiple languages for manufacturers


trianglehead

Recommended Posts

Hi all

 

Not being very good with mysql or php, I am wondering is there any way to have multiple languages for the manufacturers option?

 

Multiple languages for what? if the brand is Reebok .. then it's Reebok!

 

manufacturers_info is language based.

 

KissMT Dynamic SEO Meta tags will give you language based on page descriptions.

Link to comment
Share on other sites

It's for a real estate site and the 'manufacturers' have been changed to areas. The site is in english and greek thus the need for the ability to switch language for 'area'. Would this be a very complicated affair?

 

Not really add a field manufacturers_name to the table manufacturers_info as this table is language based and not auto incremented. ensure that when a manufacturer is added that it adds the name to both the manufacturers table AND to the manufacturers_info table including a language id for this particular entry .. you will need to modify admin/manufacturers.php to add language options when adding the name.

 

Then when you retrieve the name do so from the manufacturers_info table referencing the language id.

Link to comment
Share on other sites

Not really add a field manufacturers_name to the table manufacturers_info as this table is language based and not auto incremented. ensure that when a manufacturer is added that it adds the name to both the manufacturers table AND to the manufacturers_info table including a language id for this particular entry .. you will need to modify admin/manufacturers.php to add language options when adding the name.

 

Then when you retrieve the name do so from the manufacturers_info table referencing the language id.

 

 

Ha ha, you've really over simplified things there haven't you! Is there any chance you could point me to which line in the manufacturers page to start to look at? I've created the 'manufacturers_name' field in the manufacturers_info table. However, as it stands only the manufacturers table is populated with the new info, with the new field adding two blank records.

 

I'm doing something really wrong aren't I?

Link to comment
Share on other sites

Ha ha, you've really over simplified things there haven't you! Is there any chance you could point me to which line in the manufacturers page to start to look at? I've created the 'manufacturers_name' field in the manufacturers_info table. However, as it stands only the manufacturers table is populated with the new info, with the new field adding two blank records.

 

I'm doing something really wrong aren't I?

 

I'll give you some guidance but I can't do more than that.

case save / case edit

 

In case edit .. you can see an example there already of a language based selection .. just look for ..

 

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

 

and replicate it for your own code.

 

In case save you are capturing the values from the _POST form .. checking the existance of the _POST variables you need then adding them to the database .. the manufacturers_info table is actioned where you see ..

 

tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);

Link to comment
Share on other sites

I'll give you some guidance but I can't do more than that.

case save / case edit

 

In case edit .. you can see an example there already of a language based selection .. just look for ..

 

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

 

and replicate it for your own code.

 

In case save you are capturing the values from the _POST form .. checking the existance of the _POST variables you need then adding them to the database .. the manufacturers_info table is actioned where you see ..

 

tep_db_perform(TABLE_MANUFACTURERS_INFO, $sql_data_array);

 

 

Cheers for that. Was kinda looking in the right place but wasn't too sure. Will have to do a bit of reading to get this sorted.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...