Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-Cart 8.00 Issues
 looking for the Generatefrontpagesql sub on 8
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

apswater
VP-CART Super User

443 Posts

Posted - May 03 2018 :  15:10:26  Show Profile  Visit apswater's Homepage  Reply with Quote
Been searching, have not found the sub for Generatefrontpagesql. I need to make it so it does not display random products when price is set to 0.00. Help anyone?

diegomilito
VP-CART Expert

Argentina
766 Posts

Posted - May 03 2018 :  21:18:55  Show Profile  Reply with Quote
should be in that shoprandomproducts.asp file.
you can see inside file got this;

sub GenerateFrontpagesql (selectfield, selectvalue, sql,procategorylist,maxrecords)

diego
Go to Top of Page

apswater
VP-CART Super User

443 Posts

Posted - May 03 2018 :  21:32:47  Show Profile  Visit apswater's Homepage  Reply with Quote
Code correction. This one actually works.

Thank you, it seems to work. Around line 513 of shoprandomproducts.asp

change

sql = "* from products where hide=0 and CatalogId In (" & plist & ")"

to
sql = "* from products where cprice>0 AND hide=0 and CatalogId In (" & plist & ")"

What it does is make that spot blank if it comes up with a product with 0 price. I have 3 products shown at a time on mine. So every now and again one of the three is blank. If someone has a better way please let us know.

Edited by - apswater on May 05 2018 11:29:34
Go to Top of Page

Alex123
VP-CART New User

USA
171 Posts

Posted - May 04 2018 :  17:43:59  Show Profile  Reply with Quote
Thank you for sharing the details :) useful

-Alex
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