Author |
Topic |
|
rrold1
Starting Member
48 Posts |
Posted - January 17 2006 : 13:41:01
|
I have just imported a few hundred items and was already aware (unhapilly) that I would have to add "second" categories manually.
My current project is a 6.0 cart that is working as a parts catalog where the items are indexed by model (as a category). The older versions allowed multiple product display category selection by pressing control while selecting. I like the new way of doing it but not for my current needs. With 400 plus items that can be in up to 14 categories each, progress is slow at best. Select, add...select,add...select,add... select aaahhhhhhhhhh
Does anyone know of an add-on that allows a faster way to do this or has come up with a creative solution?
Thanks,
Steve
|
|
support
Administrator
4679 Posts |
Posted - January 17 2006 : 13:53:52
|
An alternative and much quicker way of doing this is to use the level3 field in your import file for the sub categories.
You can enter multiple sub cat ids separated by a comma into the level3 field and these will be added to the prodcategories table automatically.
First do your import and then run convertproducts.asp in your browser to populate the prodcategories.
Please see the following FAQ:
http://www.vpasp.com/helpnotes/shoptocdetail.asp?id=65&cat=Importing+Data
Thank you VP-ASP Support |
|
|
vodka
Starting Member
35 Posts |
Posted - January 17 2006 : 15:23:02
|
I'm confused. Is this just for importing. I thought as I added a product to multiple categories, all those categories we added to the same field in the database when using shopa_addproduct.asp? Why do we need a second field for subcategories?? |
|
|
support
Administrator
4679 Posts |
Posted - January 17 2006 : 16:56:25
|
The relationship between categories and products are stored in a 3rd table called prodcategories.
When you add a prouct to a category in the admin this table is updated with the new informaiton.
Using the level3 field short cuts this process by allowing you to add your product to multiple sub-categories at once.
Thank you VP-ASP Support |
|
|
vodka
Starting Member
35 Posts |
Posted - January 17 2006 : 18:23:27
|
So, if I upload all new products...all categories id's for each uploaded product go in level3 for all products I upload?
How do I later uplaod additional categories for an existing product? I take it theis is only additive...I can't remove an existing product from a category it is already assigne to with upload? |
|
|
support
Administrator
4679 Posts |
Posted - January 17 2006 : 19:00:47
|
You can upload over the top of existing records. Whle this method wont remove categories it will add extra.
I belive BigYellowXZone has an add-on that may deal with this very nicely.
Devshb may be able to shed more light?
Thank you VP-ASP Support |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - January 17 2006 : 20:14:52
|
yes; we've got some core addons which'd help in this respect.
The reason that vpasp use prodcategories (which is a matrix cross-referencing categories with products) is that a product can be at more than one category level, or on more than one category branch, (or both). It means that realistically the best way to import such product data is, indeed, as per vpasp's current way of doing things where you do this (assuming that you do this via imports and not just via the edit-product admin screen)......
1) In your local products spreadsheet/file you record the product code (as an identifier; ccode), the ccategory (the categoryid of the top-level category of the first branch that the product should go into), and then in another column (such as level3) you record a list of the other categories that the product should also be in.
2) You then import that file via the vpasp import facility
3) You then run convertproducts.asp (with your config setting in it set to "level3"; defined at the top of convertproducts.asp.
There are 2 extra aspects here: 1) You want to delete the prodcategories before you do the import 2) You want to ensure that all the categories going up/down the branches take effect
For (1+2), here's what we do: First we delete our prodcategories records to start with a clean slate. Then we record only the bottom-level categoryid(s) of each branch that the product should go into in the "level3" field (plus recording the top-level category in ccategory) in our local product-spreadsheet-files, and then do the import, and then run convertproducts.asp, and then we run our prod/cat check/fix tool to automatically add all the missing parent/mid categories. It means that we only need to specify a single top-level and only the relevant bottom level category/categories for each product, and not all the ones in-between, and just let the check/fix tool do all that work for you to create the missing ones.
as per vpasp's note, prodcategories is loaded incrementally using the import (ie it adds, but won't delete where it was before). If you did want it to delete then you could make a small change to convertproducts.asp to do that, or just run a manual sql statement prior to your upload ("delete from prodcategories")
to generally help-out with keeping a clean/tidy/correct set of categories and prodcategories, here are some very useful tools that we use all the time:
Prod/ProdCategories/Categories Check/Fix Tool: http://www.bigyellowzone.com/shopexd.asp?id=74
Admin Category Tree: http://www.bigyellowzone.com/shopexd.asp?id=31
It might sounds a convoluted way of doing things, but I've been racking my brains for ages on all this stuff, and I think that the combination of the vpasp edit-product screens, vpasp import, vpasp convertproducts.asp, and our tools above, should, between them all, allow most people to be able to do most things that they'd want regarding their prodcategory/category maintenance.
Everyone sources their products in different ways, so there's not really a one-size-fits-all solution, so generally I'd just use the relevant bits at the relevant times and do a quick customisation if/where it's needed.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on January 17 2006 20:24:55 |
|
|
rrold1
Starting Member
48 Posts |
Posted - January 17 2006 : 20:40:34
|
If I understand this correctly, my solution would go something like this:
One of my top level categories is "Parts" with 14 subcategories. I don't want anything but a subcategories menu when "Parts" shows.
When bulk importing, I would make "Parts" the ccategory for all items within all of the Parts" subcategories and control their display through the productcategories table (using level3 and convert products).
Correct?
Thanks,
Steve 6.0 SQL |
|
|
support
Administrator
4679 Posts |
Posted - January 19 2006 : 00:47:24
|
In ccategory insert the category id for Parts, say 1.
In the level3 field insert the subcategory id's you would like the product to appear in.
Then run convertproducts.asp to have the items placed in the correct locations.
Thank you
Cam VP-ASP Support |
|
|
rrold1
Starting Member
48 Posts |
Posted - January 20 2006 : 16:07:37
|
I did get this to work.
For other who pass by here later:
I was getting an error when I had multiple category numbers in the level3 field separated by a comma. This is due to the fact that in a comma delimited file, each record is separated by a comma.
Error example: Null Nulll 3
Added current catlogid=
Provider error '80020005'
Type mismatch.
shopa_import.asp, line 481
I have Excel and it does not offer (at least it appears) anything like semi colon.
This was my path to sucess: I selected the level3 column and did a search and replace, putting a "~" where the "," were (no quotes). I then saved the file as comma delimited, closed Excel, opened notepad and search/replaced all of the commas with semicolons. I then replaced all of the "~" with ","
I uploaded the file and chose ; delimiter It uploaded fine I then ran the convertproducts.asp The result? 450 products, some displaying in up to 14 categories, added in about 3 mintutes time (not counting the few hours trying).
This would have taken DAYS by hand!
Another VAPSP victory!
Steve
|
Edited by - rrold1 on January 20 2006 17:34:29 |
|
|
|
Topic |
|