Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 Category/subcategory question
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Tyssen
Starting Member

28 Posts

Posted - May 26 2005 :  23:40:48  Show Profile  Visit Tyssen's Homepage  Reply with Quote
I want to import some products from a db using the bulk import function. The products are for school stationery items and fall under 2 main categories: school name and school year. Products can appear in both category groups as well as appearing in multiple records for both e.g. pencils can be in years 1-12 as well as being in schools x, y & z. Users will choose the school their student attends, then choose their school year and be presented with a list of all the available products.
So how do I set up the ccategory and subcategoryid fields so that products can be attached to multiple categories or do I have to create a different product for every permutation of school name/school year combinations?

devshb
Senior Member

United Kingdom
1904 Posts

Posted - May 27 2005 :  08:59:04  Show Profile  Visit devshb's Homepage  Reply with Quote
I think you can use convertproducts.asp after you've done the import.

In your data file you'd store the list of categories that a given product is in, in a field like "other3" (separated by commas)

eg other3 for a given product might be:
"1,4,143"

then import your file

then change convertproducts.asp; look for:

const subcatfield="level3"

and change "level3" to "other3" (or whatever column you're using to store the extra categories)

then run convertproducts.asp

make sure you test it out on a test database first!


In addition to that, if you want to make sure you've got prodcategories data going right the way up the branches, and generally test/fix your prodcategory data, you can try:
Product/Category/ProdCategory verification/fixing tool:
http://bigyellowzone.com/shopexd.asp?id=74

Also, if you want to check/tweak your category tree structure, you might find this useful:
Admin Category Tree:
http://bigyellowzone.com/shopexd.asp?id=31

(we always use both of those when we setup clients' sites; it makes things much easier and the data much cleaner)

If I were in your shoes, I'd make my import process:
1) Import the data (with your extra categories listed as per above)
2) Run convertproducts
3) Run the prodcategories checking/fixing tool mentioned above

(and prior to doing all that, use the category admin tree to double-check your category structure)

(but then again I'm biased because those are our addons!)


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

Edited by - devshb on May 27 2005 09:10:25
Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 30 2005 :  00:35:27  Show Profile  Visit Tyssen's Homepage  Reply with Quote
I've created all the categories into which products will need to go. There's 177 all up because I need a different category for each grade for each school but when I add more than 99 into the categories table of the db that VPASP is going to use, I get a Subscript out of range: 'CategoryCount'. Line 235 error message when trying to use shopa_addcategory.asp. I'm guessing it's something to do with the number of records going from 2 digits to 3, but not sure how to fix it.

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - May 30 2005 :  04:45:14  Show Profile  Visit devshb's Homepage  Reply with Quote
Due to a small coding oversight by VP-ASP, the number of categories that your VP-ASP site can handle is restricted to 100 (create more and you'll get vbscript errors).

To get round this, edit the file shopsess.asp, and in the function:
GetSessA

Change:
temparray(100)

to:
temparray(1000)

And then set your xmaxcategories config option to 1000.

You will then be able to handle up to 1000 categories. If you want even more, then just change both instances of 1000 to however many is the maximum you'll need.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 30 2005 :  17:00:38  Show Profile  Visit Tyssen's Homepage  Reply with Quote
Hmmm, I did both of those and still got the same error. Maybe it's time to move to VPASP's support ticket? Also, when I went to edit the xmaxcategories config option (or any other for that matter), on shopa_editrecord.asp all the fields come up blank, so I had to fill them all in again. They're s'posed to come up with the info already contained in the db aren't they?

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - May 30 2005 :  17:17:16  Show Profile  Visit devshb's Homepage  Reply with Quote
make sure you've got a ccategory column in your import file. Every product has to be pinned to a category on the product record, even if it's in multiple categories. That ccategory value should always be a top-level category.

Also, make sure you've closed your browser and re-opened/relogged in since changing the config options, just to make sure you're picking up the new values.

I'm unsure which version of vpasp you're on, but in 5+5.5 it seems to redim the variables that relate to that error with the maxcategories values, so it should never run out of range as long as maxcategories is set above the number of categories records.

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

Edited by - devshb on May 30 2005 17:19:35

Edited by - devshb on May 30 2005 17:20:24
Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 30 2005 :  19:02:41  Show Profile  Visit Tyssen's Homepage  Reply with Quote
quote:

make sure you've got a ccategory column in your import file.



Haven't got that far yet. Still trying to knock my import file into shape. It turns out I hadn't hit the 'reload shop config' link after updating xmaxcategories. :/

Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 30 2005 :  22:50:49  Show Profile  Visit Tyssen's Homepage  Reply with Quote
I did a sample run of 200 products and imported them OK from a text file and then used converproducts.asp to create all the entries in prodcategories.
They're all in the db, I can see them and their links to the relevant categories when I edit products through VPASP's browser admin and all the categories and their structure look right on shopcategorylist.asp, but when I go to shopdisplayproducts.asp, it says No products match your search.
I had this same problem when I was manually entering one or two records before but thought that maybe I was missing something that doing the whole import thing would sort out.

Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - May 31 2005 :  03:14:28  Show Profile  Visit devshb's Homepage  Reply with Quote
aha; that might be the stock level on the products; if you leave the products' stock levels blank or set them to zero then by default they won't show up. You can change the stock config settings in admin>config>stock-control, or just put a stock level into the product records.

Hopefully that's what the not-displaying problem is.

I know it might sound really basic, but there's many-a-time that I've forgotten that and bashed my head against a brick-wall for ages wondering why I couldn't see new products!

There might be some other fields like that (created date, entered-by-user) which might be relevant if you're using an import rather than the admin screen.

One way to check the import process logic after the first time you've done an import (to make sure relevant flag fields are set etc) is to look at the raw data of a product that's been manually entered through admin and compare it to one that's been imported. You can look at the "raw values" of a product (as opposed to the product admin screen which uses poplists etc) using:
http://yoursite/shopa_editrecord.asp?which=xxxx&idfield=catalogid&table=products&database=

(replacing "xxxx" with the catalogid of the product you want to look at)

you should only use that for viewing the product's raw-data; never use it to alter the data.

You might also want to check that the relevant categories are being imported going up the tree branches, eg:
If selling radios under:
Entertainment>Gadgets>Radios
And under:
Electronics>Entertainment>Radios

then make sure the category for all of those categoryids are being used/imported, going up the branches.
(in case some people are viewing at the level of "Entertainment>Gadgets" and not at the full level of "Entertainment>Gadgets>Radios")

This is something that our prodcategory verification/fixing tool can check/fix, but it's also something you can check manually if you prefer.

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

Edited by - devshb on May 31 2005 03:45:55
Go to Top of Page

bmw000
VP-CART New User

137 Posts

Posted - May 31 2005 :  05:14:44  Show Profile  Visit bmw000's Homepage  Reply with Quote
When importing data from a file. Be sure to include the field "HIDE" and put a value of "FALSE".



Brian Weber
BMW Solutions, LLC
http://www.bmwsolutions.com
Go to Top of Page

rvaga
VP-CART Super User

USA
254 Posts

Posted - May 31 2005 :  10:55:43  Show Profile  Reply with Quote
bmw000: "When importing data from a file. Be sure to include the field "HIDE" and put a value of "FALSE".

This was THE fix for me. Should be clarified in the developer docs somewhere, in my opinion. I'll bet a lot of people have spent too much time trying to figure out why bulk-uploaded products don't show for the customer - and then go through them one-by-one updating each record.

Go to Top of Page

bmw000
VP-CART New User

137 Posts

Posted - May 31 2005 :  17:02:21  Show Profile  Visit bmw000's Homepage  Reply with Quote
Glad I could help.



Brian Weber
BMW Solutions, LLC
http://www.bmwsolutions.com
Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 31 2005 :  17:49:26  Show Profile  Visit Tyssen's Homepage  Reply with Quote
Actually, setting a stock value to all my products got them to show up except that now instead of a select button, I'm getting an out of stock message even though I've set a stock level of 999 for all of them and even though stock control's not even turned on in my shop config :/

Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 31 2005 :  18:05:35  Show Profile  Visit Tyssen's Homepage  Reply with Quote
Yesterday I encountered another problem which I hadn't realised before. This is nothing to do with VPASP, but with the way the whole ordering process needs to function and will rely mostly on the way the database is structured. So I'd like to explain the exact nature of the problem and maybe you good guys (thanks for all your great help so far by the way) could give me an idea of how to approach it.
Starting from the beginning: a parent from a school goes to our site and logs on using a username & password supplied by the school. They then choose the grade of their student and are presented with a list of products that kid needs for that year. Each item has a recommended quantity which the parent can accept, add to or subtract from before updating the total. Having accepted the total, the parent then moves onto the ordering process etc.
There are about 20 different schools each with anywhere from 1-12 grades. I've made categories for the schools & the grades and ended up with about 177 categories.
There are over 800 individual product items which can show up in different schools' grade requirements. Altogether, there are about 5000 permutations of product/grade/school.
Up until now I had thought it was a simple matter of assigning the 800+ products to the 177 different categories. Unfortunately, I've now realised that each product can have different quantity numbers depending on school/grade.
So am I right in thinking that I need to now turn my 800+ products into categories themselves which are then attached to grades which are attached to schools and then create products with different quantities which are then attached to the product categories?
Or is there a better way to do this? 900+ categories sounds like an awful lot. Or do I just create the 5000+ products as they are even though it means there's going to be loads of duplicates except for the quantity amount.
Any insight would be greatly appreciated.

Go to Top of Page

greatphoto
VP-CART Super User

USA
304 Posts

Posted - May 31 2005 :  20:49:26  Show Profile  Reply with Quote
quote:

a parent from a school goes to our site and logs on using a username & password supplied by the school. They then choose the grade of their student and are presented with a list of products that kid needs for that year. Each item has a recommended quantity which the parent can accept, add to or subtract from before updating the total. Having accepted the total, the parent then moves onto the ordering process etc.
..... Unfortunately, I've now realised that each product can have different quantity numbers depending on school/grade.
......Or is there a better way to do this?



A modification of the Gift Registry add-on might be ideal for this. Each grade at each school can be entered as a different "registrant" (the name here can be changed to your liking). Each grade ("registrant") can have its own private password or, if you choose, can be accessed through a more public search. A parent logs in and is presented with a list of items with quantities that can be purchased. The Parent adds these to the cart, and checks out. Note that the code will need to be modified slightly to keep the items purchased from being removed from the registry since they are to stay there for the next parent to also purchase.

As has been discussed elsewhere (http://www.vpasp.com/virtprog/vpaspforum/topic.asp?TOPIC_ID=2937), the gift registry is not very user friendly and needs a lot of modification. The ironic thing is that it may require fewer mods to make it useful for your situation that it will require to make it useful as a standard gift registry. ;-)

BTW, it would make sense to start a new thread for this new topic.

Go to Top of Page

Tyssen
Starting Member

28 Posts

Posted - May 31 2005 :  22:05:46  Show Profile  Visit Tyssen's Homepage  Reply with Quote
The problem with the Gift Registry is that we have to buy it and I'm not even sure at this stage if it's gonna provide the answer to my main question which is how to structure my products/categories. It certainly sounds like it might be a good way to enable people to login etc. but I was going to worry about that later.
Taking your point about a new thread...

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00