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
 VP-ASP 6.00 Questions
 Front page random display
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jill
VP-ASP Super User

USA
249 Posts

Posted - June 03 2003 :  21:49:46  Show Profile  Reply with Quote
Does anyone have any idea what might be wrong here -- I want to randomly display only certain records. I marked about 40 of them with "show", but only the first 8 show and they never change.

Thanks for any ideas.

Jill

support
Administrator

4266 Posts

Posted - June 03 2003 :  22:05:06  Show Profile  Visit support's Homepage  Reply with Quote
There is no logic to use random and something else. You would need to alter the SQL generator in file shoprandomproduct.asp

Set the frontpage field to Random Then


change this SQl to add additional criteria to limite which products display
sqlstr="SELECT catalogid FROM products where hide=0"

for example
sqlstr="SELECT catalogid FROM products where hide=0 and pother5='show'"

VP-ASP Support

Go to Top of Page

Bosse
Starting Member

Sweden
25 Posts

Posted - June 13 2003 :  03:05:49  Show Profile  Reply with Quote
Hi

Does this go only if you've got sql?

I have Access. When changing the line as below, I'll get a message:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: 'i'
/500shop/shoprandomproducts.asp, line 138

How do I do?
/Bosse

quote:

There is no logic to use random and something else. You would need to alter the SQL generator in file shoprandomproduct.asp

Set the frontpage field to Random Then


change this SQl to add additional criteria to limite which products display
sqlstr="SELECT catalogid FROM products where hide=0"

for example
sqlstr="SELECT catalogid FROM products where hide=0 and pother5='show'"

VP-ASP Support





Go to Top of Page

Jill
VP-ASP Super User

USA
249 Posts

Posted - June 13 2003 :  08:55:05  Show Profile  Reply with Quote
Bosse,

I don't know what your error message means, but I have Access, too.


Jill

Go to Top of Page

Bosse
Starting Member

Sweden
25 Posts

Posted - June 13 2003 :  17:30:27  Show Profile  Reply with Quote
Hi Jill,

Did you get it to work? (random with the 40 "show")
If yes, how did you do it?

/Bosse

Go to Top of Page

Jill
VP-ASP Super User

USA
249 Posts

Posted - June 14 2003 :  21:32:59  Show Profile  Reply with Quote
Bosse,

I did just like support said to do - I set the frontpage field to Random (in the admin), and then changed the line on shoprandomproduct.asp to say "SELECT catalogid FROM products where hide=0 and pother1=show"

Then in the products table, I marked the ones I wanted to show with the word "show" (in the pother1 field).

Hope that explains it!

Jill

Go to Top of Page

jackbox
VP-ASP New User

United Kingdom
72 Posts

Posted - May 17 2005 :  04:33:14  Show Profile  Visit jackbox's Homepage  Reply with Quote
I found I had no need for the 'mfg' field in products table so changed its caption in languages file to "Show On Homepage" and altered shoprandomproducts to:

sqlstr="SELECT catalogid FROM products where hide=0 and mfg=Yes"

I then downloaded database and in design view set the default value for 'mfg' to 'Yes' (updating all products in that field to 'Yes').

After that if you DON'T want a product to show on the home page you just delete the 'Yes' in the products table.

Same thing I guess but might work better for some. It was a case of finding a simpler clearer way for the merchant rather than having to remember what "Pother1" was for etc.

Mind you, you could always retitle Pother1 I suppose.

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