Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can someone double check my theory about categories?


Recommended Posts

Please?

 

 

I want to change my site so that my categories match the categories provided by my one and only vendor. (Aids in the process of inventory data feed.)(No additional categories should be created or necessary.)

 

Changes necessary:

 

Table: categories : Change categories_id

Table: categories : Change auto_increment to a number beyond greatest new categories_id value

Table: categories_description  : Change category_id

Table: products_to_categories  : Change categories_id   (although this is on a new install with zero products)

 

 

Any other changes anyone can think of?

 

 

Thanks

Mark

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

I don't understand what you need to change here. If this is a new site with no products, just delete all of the sample categories and set up your own categories to suit.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I don't understand what you need to change here. If this is a new site with no products, just delete all of the sample categories and set up your own categories to suit.

 

Regards

Jim

 

it's fairly simple. OSC creates categories starting with category ID 1. As you add a category it automatically advances to 2. Then 3, etc. My vendor categories are 25, 33, 64, 77, 96, etc.

 

 

I get a data feed from a vendor of my store products.. This vendor has products in categories. I get the feed as an XML file and have to put the products into my store using a script that reads the XML file, then writes the various tables. I enter no products by hand. As it is, I read the product id and product category, and to put the product in the store I have to cross reference the categories created by OSC to a list of categories by the vendor in order to get the products in the correct category.

 

By matching the store categories with the vendor categories I have one less call to the database to make for each of the 35k+ products that I import.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

@@mdtaylorlrim

 

Mark, how often do you (or your vendor) add new categories?

 

If not often, can't you just enter all of the categories (no products yet), let osC pick the category ID, manually edit them in the database to what you want them to be, and be done with it?

 

Malcolm

Link to comment
Share on other sites

Changing the automatically-generated table index fields is generally a bad idea. This can have unintended consequences, such as slowing the table indexing in the database.

 

If you really need a numeric index to match your vendor's category numbers, create a new field in the appropriate table(s) and use that.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

@@ArtcoInc

 

Never. Categories are not added, deleted, or changed.

 

And, this is exactly what I am asking. Am I changing all of the things necessary do you think?  I haven't found anything else.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

You need to set up the category numbers in the categories and categories_description tables. Obviously they have to match. The products_to_categories table is automatically updated when you add a product, so nothing to change there. Of course your update script will have to handle that.

 

If you want to learn more about the database structure, there's a database schema in the docs directory in your osCommerce distribution package.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...