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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 General help me questions
 Sorting of features
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Bosse
Starting Member

Sweden
25 Posts

Posted - April 25 2004 :  03:36:00  Show Profile  Reply with Quote
How do I get the features sorted as I want them? Default is in alphabetic order.
The sizes XL/S/M/L/XL is shown in order M/L/S/XL/XS.

Any ideas?

/Bosse


Edited by - Bosse on April 25 2004 03:44:15

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - April 26 2004 :  21:37:21  Show Profile  Reply with Quote
Ah! This is very similar to a problem I just solved in my own cart. In fact its almost humorous because its the same example I've been using to explain the sort order dilema. I'm actually not using features since they don't yet support inventory management in version 5.0, but I did have the same problem with sorting categories. It is especially apparent when I use use categories to separate sizes like the ones you listed. My solution was to add a field to the categories table in the database and manually add information to the field to force it to sort the way I wanted. Assuming you are using VP-ASP version 5.0, I'll extend that idea to features to try to help you here:

1) Assuming your database is Access (as opposed to SQL), you can edit the database using Microsoft Access. If you attempt this, make CERTAIN you back up the database first in case you accidently break something in the database. Find the features table, and add a field named "sortorder" of type "number".

2) In the Shop Administration facility, set xfeaturesort to "sortorder"

3) In the Edit Product Features facility, edit your "XS" feature. You'll notice at first that your new "sortorder" field does not show up since the default form does not automatically sense any new fields. To see your sortorder field, hit the "Edit" hyperlink at the top just to the left of the "Select Table" hyperlink. This will get you to the "Raw" edit screen which should show your sortorder field. Since the feature you are editing should show up first, type "10" in the sortorder field, and save your change by hitting the "Update record" button.

4) repeat step 3 for each of your other features so that you end up with:
Feature sortorder
XS 10
S 20
M 30
L 40
XL 50


Why do it in increments of 10 like this? Well, you can do it with any increment you want. My approach is to space them out a bit so it will be easier to add additional features in the future and easily fit them in. For example, if you later add a XXS, you can make its sort order 5 and it will sort correctly without having to renumber all the other features.

Please let me know whether this helps.



Edited by - greatphoto on April 26 2004 22:05:45

Edited by - greatphoto on April 26 2004 22:08:51
Go to Top of Page

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - April 26 2004 :  22:05:16  Show Profile  Reply with Quote
Oh....Since the features table already has a couple of extra fields that are unused by VP-ASP, you can save yourself from having to add an extra field by just using one of the fields already there. This will save you the risk of manually editing the database in step 1, and will make step 3 easier since you won't have to use the "Raw" edit form. To do this sorting using "Other Fields," set xfeaturesort to "featureother" and put the numbering in the "Other Fields" field of each of the features.

The longer steps that I wrote for adding a field and using it for the sorting is still useful for someone using categories for features. For them, they'll use xsortsubcategories instead of xfeaturesort.

Nathan

Go to Top of Page

Bosse
Starting Member

Sweden
25 Posts

Posted - April 27 2004 :  02:05:28  Show Profile  Reply with Quote
yeah.. And even easier is to insert the features in correct order and sort after id.
I did'n know about the xfeaturesort, so you really helped me!

/Bosse

VP-ASP Shopping Cart 5.0 Deluxe
Microsoft-IIS/5.0
HTTP/1.1
LCID: 1053

Database:
ADO: 2.7

Provider: Microsoft.Jet.OLEDB.4.0
Go to Top of Page

greatphoto
VP-ASP Super User

USA
304 Posts

Posted - April 27 2004 :  06:20:08  Show Profile  Reply with Quote
Bosse-

Yeah, I thought of sorting by ID also. If that works for you its great. For me, I needed to allow for future additions (like the XXS example). If there was a xfeaturesort per product, I could just sort by id by default and then change certain products to the more manual sorting where it is needed. However, with the one global setting that exists now, I know it will be too hard to get all the features in there in the right order the first time since we are always adding new products and new features.

Go to Top of Page

Bosse
Starting Member

Sweden
25 Posts

Posted - April 27 2004 :  07:51:11  Show Profile  Reply with Quote
I do unique features for each product. Even if several products have the same feature. For article no #123456 I make a feature named #123456. If [Green/XL] is out of stock, I can just take that away from the #123456 feature...


/Bosse

VP-ASP Shopping Cart 5.0 Deluxe
Microsoft-IIS/5.0
HTTP/1.1
LCID: 1053

Database:
ADO: 2.7

Provider: Microsoft.Jet.OLEDB.4.0
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000