Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Simple question about deleting other language_id entries in the database


bibleman

Recommended Posts

Hi,

 

I have an English ONLY store. www.ministryhelps.com In it on the admin side I have made English the default and have deleted ALL other language files on the site using FTP.

 

In the database it shows about 9,000 products BUT I only have about 3000 products in my store.

 

What I noticed is in the database I have

3000 "language_id 1" products and

3000 "language_id 2" products

and 3000 "language_id 3" products.

 

So my question is can I safely DELETE all "language_id 2" and "language_id 3" products from the database?  

 

This SAME question would apply to all the TABLES:

 

products

product_descriptions

product_options

 
And any other language_id items I find in the database.
 
Could I do this without causing a problem for the store?
 
Thanks
Leon

I'm having a great Day - hope you are too!

 

Leon

Link to comment
Share on other sites

Just delete the languages from admin->Localization->Languages and the code will remove everything in the database that uses those languages.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Just delete the languages from admin->Localization->Languages and the code will remove everything in the database that uses those languages.

 

@@Jack_mcs

 

Well yes that would work....  BUT

 

This shop is a 2.3.4 that I just recently installed.

 

I manually uploaded all products from another 2.2 shop that I had.

 

I did this AFTER I a had already deleted the languages from the admin>localization/languages,  So the database now has all the language 2 and 3 products still there.

 

So is deleting the manually my only recourse?

I'm having a great Day - hope you are too!

 

Leon

Link to comment
Share on other sites

i would just use sql to delete the products

delete from products_description where language_id =2

will remove all descriptions for language 2

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@bibleman You may be able to add the language back in and then delete it. If that doesn't work, you would need to delete them directly from the database. These are the tables that would need to be cleared. There may be others, depending upon your addons.

 

        categories_description
        products_description
        products_options
        products_options_values
        manufacturers_info 
        orders_status

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@@bibleman You may be able to add the language back in and then delete it. If that doesn't work, you would need to delete them directly from the database. These are the tables that would need to be cleared. There may be others, depending upon your addons.

 

        categories_description

        products_description

        products_options

        products_options_values

        manufacturers_info 

        orders_status

 

Great advice @@Jack_mcs

 

I was doing what @bruyndoncs suggested above (which was working quite well) but seeing your method I decided to try it that way and it proved to be much faster.

 

I added the languages back in through the database language tables "insert" rather than install ALL the files.

 

I labeled them language_id 2, language_id 3, and language_id 4,

 

Then I went back into the admin of Oscommerce/localization/languages (where they now appeared) and deleted them one at a time.

 

In an instant of time all of the "language_id 2, language_id 3, and language_id 4" where deleted from the 6 places you mentioned above.

 

This was a very fast way to take care of this problem.

 

Thanks again for your excellent advice.

 

Leon 

I'm having a great Day - hope you are too!

 

Leon

Link to comment
Share on other sites

good to hear that you can recover this way.

I wasn't sure if the insert into the languages table would cause you more troubles .

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...