VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Bulk Import Help!!!
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - April 03 2005 :  08:36:39  Show Profile  Reply with Quote
Ok, so here I am about to run bulk imports and I notice the documentation seems to be a little sparse in this area so I figured I'd better start here before bungling it all up.

On the surface, looking into the database it seems simple enough: just insert the records into the product table with the proper ccatalogid and voila, I am in business. But then comes the monkey-wrench. What the heck is the prodcategories table?

At first that table seemed fairly intuitive, at least in function if not purpose because there was a single catalogid for each categoryid. But now, inexplicably there are more repeats of categoryID.

So bottom line, has anyone written their own SQL code to import from one table to another and would they be willing to share to save me the (potential) many hours of frustration I am about to endure?

Zach B

Senior Member

United Kingdom
1898 Posts

Posted - April 03 2005 :  13:19:21  Show Profile  Visit devshb's Homepage  Reply with Quote
prodcategories is a matrix table, it records all the cross-matches between products and categories.

This is used for 2 reasons:

1) All the values in a category branch
ie for a given category branch, you can put a product in all the categories going up/down that branch so that people can query products at any level.

2) Multiple Branches
ie for a given product, you can put it into more than one category branch by creating extra prodcategories records.

All this can be done via the product admin screen (whenever you select more than one category it'll create the corresponding prodcategories records.

There might be one or 2 gaps though, and sometimes you might not have all the relevant branches/levels put into the prodcategories table through the normal processes.

To help out, we've created 2 addons that might be relevant here:

1) Admin Category Tree
cross-check all your branches of categories etc, making sure you've got all the relevant flags set properly.

2) ProdCategory/Products/Categories Verification/Fixing Tool
cross-checks all your category, products, and prodcategories data, and does things like automatically adding missing prodcategories records going up the branches.

In addition to this, the convertproducts.asp file will allow you to specify a list of multiple categories that you want a given product ot be put into. I've got a feeling that the standard import can also use this kind of extra categories processing, but I'm not sure exactly how offhand.

If I were a merchant, what I'd do would be to put the bottom-most level category onto each product's subcategory in the spreadsheet that you're going to import, and then run the prodcategory fixing tool above to create records for all the levels going up the branch and to generally tidy-up, but if anyone else here has other suggestions then hopefully they'll post them here.

But, it all depends on the kind of structure of your categories/products; different solutions might fit different setups. If the setup for the site is quite complex (eg 3 or more levels, and/or products in multiple branches) then you will need to do a bit of jiggery-pokery for your admin processes. vpasp will be able to query your products properly etc, but you will need to have some kind of catch, like that prodcategories tool to tidy things up. If you've got a simple setup then you should just be able to use all the admin functions as-is and it should all work fine.

It's a balance between keeping the admin processes simple (but needing some kind of manual intervention for complex setups), or having the admin processes horribly complex to automatically cater for all scenarios. I personally think that vpasp have struck the right balance on this, but if you've got a complex setup you'll definitely need to formalise your processes and maybe make the odd tweak or two or buy an addon etc.

Simon Barnaby
[email protected]yellowzone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on April 03 2005 13:49:04
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000