Author |
Topic |
|
Happy
VP-CART New User
90 Posts |
Posted - February 12 2007 : 11:34:30
|
I wish to put up a link on my jewelry site, say "Rings less than $100" which will take them to a page which will display all rings lesser than $100?
Is there a way to do this?
Thanks, Happy |
|
Kidd
VP-CART Super User
Australia
373 Posts |
|
Happy
VP-CART New User
90 Posts |
Posted - February 14 2007 : 20:23:18
|
Thanks Kidd.
But when I tried, any value of "cprice=" query string gave me "no products match". The prices have been correctly set up. Any further tips?
Thanks for your time.
Thanks, Happy |
|
|
Kidd
VP-CART Super User
Australia
373 Posts |
Posted - February 14 2007 : 20:46:56
|
so something like shopquery.asp?cprice=100
will give you no product match? |
|
|
Happy
VP-CART New User
90 Posts |
Posted - February 15 2007 : 11:12:48
|
That's right Kidd.
For example, if I give shopquery.asp?cprice=200 and I do have products of lesser price than that, still I get no match. If I give shopquery.asp?ccategory=52 or ?ccatalogid=12 for example, it does display correctly.
Thanks, Happy |
|
|
Happy
VP-CART New User
90 Posts |
Posted - February 17 2007 : 05:31:33
|
The SQL being generated by the system is: select DISTINCTROW p.catalogid,sortorder from products p, prodcategories cc, categories c where cc.intcatalogid=p.catalogid and cc.intcategoryid=c.categoryid AND p.cprice=100 AND hide=0 ORDER BY sortorder.
Sortorder is a new column I have added in the products table.
The problem is evident from the sQL - it has cprice= instead of cprice<=. I do not know why this is happening but this is the root cause.
Any help will be appreciated.
Thanks, Happy |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - February 17 2007 : 07:04:44
|
that's strange; it might be that the arguments are used differently in different versions; our site accepts cprice as a ceiling price in the args, eg:
www.bigyellowzone.com/shopquery.asp?cprice=10 will display everything on *and under* £10
(that's without any relevant customisations)
make sure your cprice column is defined as per the standard vpasp sql scripts (or access database), ie that it's a money/currency field and not a double/number; it might be that.
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on February 17 2007 07:53:44 |
|
|
Happy
VP-CART New User
90 Posts |
Posted - February 17 2007 : 09:05:28
|
Thanks Simon for the quick response.
I have not changed anything as far as arguments are concerned.
I am using MySQL and that does not have currency/money as a datatype for column definitions. It indeed is double. I checked create600mysql.txt I received with the package and there cprice is defined as double, not currency or money. Not sure why this is then a problem with me only (as it apparently works for others as no one else has reported this!). Is there something I am not doing right?
Thanks, Happy |
|
|
devshb
Senior Member
United Kingdom
1904 Posts |
Posted - February 17 2007 : 09:36:02
|
you're right; all the amount columns are defined as doubles on the mysql script (not sure offhand if there's such a thing as money/currency on mysql, I just know that there is for access/sqlserver)
having looked at the code, what looks like the relevant bit will return a currency type in the asp anyway for cprice or lowprice, regardless of the physical column definition.
I'd guess it'd need loads of debugging messages added to the code in the relevant bits to track exactly which bits of the search it's using and hence which bit is going wrong (as there are tons of search functions; it is, as you say, hard to track what bit is being used)
Simon Barnaby Developer [email protected] www.BigYellowZone.com Web Design, Online Marketing and VPASP addons |
Edited by - devshb on February 17 2007 09:45:07 |
|
|
Happy
VP-CART New User
90 Posts |
Posted - February 17 2007 : 10:28:42
|
Thanks for the help Simon. I will continue with the debugging.
Thanks, Happy |
|
|
|
Topic |
|