Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help me with my backend please


crxvfr

Recommended Posts

:blush: Hello

 

I'm working with a company that supplies text descriptions for all their products. I write a script in php that parses those files and builds a text file to drop into phpmyadmin sql. Complicated way of saying that I'm trying to populate the databse outside of the software. My script so far will rebuild the following tables off the information in the description text files.

 

CREATE TABLE `products`

CREATE TABLE `products_description`

CREATE TABLE `products_to_categories`

 

Is this idea feasible? I have only to click a button to automate literally hundreds of hours of typing. Am I missing other tables I need to adjust as well?

 

tanks!

Link to comment
Share on other sites

It's perfectly feasible. Just wondering why you bothered doing it in php, though. Wouldn't it have been easier to do it in either Excel or Access using VBA - wouldn't have to mess around with a web interface then.

 

If your products have attributes, you'll also need a way to poulate the attribute tables correctly.

Link to comment
Share on other sites

It's perfectly feasible. Just wondering why you bothered doing it in php, though. Wouldn't it have been easier to do it in either Excel or Access using VBA - wouldn't have to mess around with a web interface then.

 

If your products have attributes, you'll also need a way to poulate the attribute tables correctly.

 

I'm not as familiar with excel and access as I should be and I don't have either of them. To me, writing a script is easier and takes less time than learning to use those tools (for now).

 

The place I'm working with isn't exactly accurate. I dload their info and theres description files for items with no images and images for products with no description file. This way I can check for both files, and if both an item and image file exists it writes a line to the appropriate 'table file' for the item that looks like this:

 

INSERT INTO `products_description` VALUES (24005, 1, '14K gold ruby and diamond ring', '24005 14K gold ruby and diamond ring, (.60 carat TGW, 9 points TDW). ', '', 0);

 

INSERT INTO `products_to_categories` VALUES (24005, 25);

 

INSERT INTO `products` VALUES (24005 , 0, '24005.jpg', '0.0000', '2005-07-09 07:10:24', NULL, NULL, '0.00', 1, 0, 0, 0);

 

When some items don't make it thru the purge for both files, that info is written to an 'error' file and I will have processed every item they have info on with one click. Thousands of items, thousands of lines.

 

Part two of the script will read the lines and query me for the price, category and attributes, adjusting those fields in the file lines. That will be the only data entry I have to input manually. After all that I'll dump the files into sql. Seems like it will work good for me considering what I'm given to work with from the supplier.

 

Another idiocy is that I'm just now learning php and having fun finding out its more like a programming language than it is html. da

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...