Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 Numeric Ordering of subproducts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cierra1
Starting Member

USA
6 Posts

Posted - September 27 2008 :  23:01:10  Show Profile  Reply with Quote
Has anyone figured out how to get the subproducts to display numerically -- ie. we have subproducts -- 1 oz, 4 oz, 8 oz, 10 oz and they are ordering 1 - 10 - 4 - 8 -- we want them to order by actual number - 1 - 4 - 8 -10. Any way to do this?

devshb
Senior Member

United Kingdom
1904 Posts

Posted - September 29 2008 :  05:08:04  Show Profile  Visit devshb's Homepage  Reply with Quote
They're ordering in that way because it's a text/character field, so, for example:
10
comes before
2
(because the first character "1" is before "2")

If you want to order it in a numerical way, then there are 2 ways to do it:

1) Add a new value to a number column which is a copy of the oz value but just numeric eg use price2 to hold something like:
1
2
10
etc

or:

2) Add a left-padded-with-zeroes value to a character column which is a copy of the oz value but just numeric eg use pother2 to hold something like:
001
002
010
etc

and then (whichever of the above you use), add that column for your ordering config option.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
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