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
 Customization
 Displaying products of a sub-cat and price range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Happy
VP-ASP New User

90 Posts

Posted - February 12 2007 :  11:34:30  Show Profile  Reply with Quote
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-ASP Super User

Australia
373 Posts

Posted - February 13 2007 :  05:53:38  Show Profile  Reply with Quote
this should help you

http://www.vpasp.com/helpnotes/shoptocdetail.asp?id=27&cat=Searching
Go to Top of Page

Happy
VP-ASP New User

90 Posts

Posted - February 14 2007 :  20:23:18  Show Profile  Reply with Quote
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
Go to Top of Page

Kidd
VP-ASP Super User

Australia
373 Posts

Posted - February 14 2007 :  20:46:56  Show Profile  Reply with Quote
so something like
shopquery.asp?cprice=100

will give you no product match?
Go to Top of Page

Happy
VP-ASP New User

90 Posts

Posted - February 15 2007 :  11:12:48  Show Profile  Reply with Quote
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
Go to Top of Page

Happy
VP-ASP New User

90 Posts

Posted - February 17 2007 :  05:31:33  Show Profile  Reply with Quote
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
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - February 17 2007 :  07:04:44  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page

Happy
VP-ASP New User

90 Posts

Posted - February 17 2007 :  09:05:28  Show Profile  Reply with Quote
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
Go to Top of Page

devshb
Senior Member

United Kingdom
1898 Posts

Posted - February 17 2007 :  09:36:02  Show Profile  Visit devshb's Homepage  Reply with Quote
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
Go to Top of Page

Happy
VP-ASP New User

90 Posts

Posted - February 17 2007 :  10:28:42  Show Profile  Reply with Quote
Thanks for the help Simon. I will continue with the debugging.

Thanks,
Happy
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000