Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

? Need COMMON DESCRIPTION TABLE for different languages ?


Pica

Recommended Posts

Hi there...

 

I just uploaded some 14.000 records into my OSC products table. I was

quite happy to be able to do this by phpmyadmin and not by hand !!! :D

 

If I have some 250 categories and subcategories and 4 different languages, this would/will make just 1.000 records in the categories table.

 

BUT... If I have to put the same description for those 14.000 records in the products_description table, for 4 different languages, this would make a 56.000 record table !!!!!!!!! :shock:

 

Seeing I don't mind to have the same description for every language, how and where can I change the code in order to ignore the language_id field in the products_description table?

 

I have other products in line to enter this DB... I guess I'll have more than 20.000 !!!

 

Any ideas on this ? :idea:

 

Thank you all in advance.

 

Paulo.

Link to comment
Share on other sites

are you talking 'categories description' here...? As in the contribution / Ians loaded snapshot?

 

Anyway in all cases the language check gets done in the queries.

It will say ...and language_id = '" . $languages_id . '" ... at a certain point. You could change that to ]...and language_id = 1 ...

Number 1 being your default language.

 

But usually the queries get multiple records from multiple tables in one go so you might have to split them up... or everything retreived within the changed query will be the default language.

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

I was doing some testing when you replied...

 

What I did was to change the " . $languages_id . " string in the product_info.php file and set it to "1" by default.

 

After some checking, this seems to work... Every thing else changes to the appropriate language (messages and buttons to FR, PT, NL) but the description text of the product remains in EN which is my default language.

 

I'll do some more testing but I think this will work as expected.

 

Thanks.

 

Paulo.

Link to comment
Share on other sites

Hummmm....

 

I also need to change shopping_cart.php...

 

Say, what do you think about having a separate table e.g. "description" with two fields products_id and description which would be common for every language?

 

Wouldn't this be easier ? Also for uploading huge tables...

 

On the other hand, this would keep the product_info file and others in its initial structure.

 

Comments?

 

Thx.

Link to comment
Share on other sites

question is more what will be better performance wise with that amount of products.

I don't like the language structure of osCommerce all that much as it gets

bloated quickly and stores several identical values in multiple places...

 

I'd go for the custom approach. Just for speed.

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...