Jump to content
Sign in to follow this  
Pica

? Need COMMON DESCRIPTION TABLE for different languages ?

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.

Share this post


Link to post
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"

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×