Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

product table sanity check. Is there such a thing?


dewed

Recommended Posts

Posted

Long time time lurker, first time posting.

 

The company I work has just reworked their website to use OSCommerce. I was charged with writing a php script to do product inserts from our old style product database, to the 3 OSC product tables, eg; products, products_description and products_to_categories and that apparently worked, on my initial import, anyways. I should probably point out, we're talking over 10,000 products, with another 10-20k left to import.

 

I was hopeing to find a contribution that did a sanity check on every product entry, using each of the 3 tables to check againt..

 

check#1 An entry in 'products' has one corresponding entry in products_description, and at least one entry in 'products_to_categories'

 

check#2 An entry in products_description has a corresponding entry in products, and at least one entry in 'products_to_categories'

 

check#3 An entry in products_to categories has a corresponding entry in products, and 'products_descriptions'

 

I took the liberty of addding a unique index to products.products_model column so I know model numbers can't be duped, but I'm afraid I may have partial entries and no way to sleuth them out.

 

Any ideas on where to find an existing script or, suggestions if I end up writing it myself would be greatly apreciated.

Just call me Dewed ...

Posted

check out the easypopulate contribution. Its ideal for to control large number of products and you could modify it to support additional checking and comparisons for sql tables.

Posted

PS, should probably point out, this will almost certainly need to be a command line script, with this many products to check against, a browser would time out before it finished.

Just call me Dewed ...

Posted
check out the easypopulate contribution. Its ideal for to control large number of products and you could modify it to support additional checking and comparisons for sql tables.

 

Yes I did, scoured every contribution category actually. That one seemed more geared towards verifying product data BEFORE you insert it. I'm doing direct imports from one mysql table to the 3 OSC uses.

 

I guess I could put in the easypopulate contrib, do an export and check that. I was just hoping I could validate the data thats already in the database.

Just call me Dewed ...

Archived

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

×
×
  • Create New...