Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 spurious </form> tag when using stayonpage
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

devshb
Senior Member

United Kingdom
1904 Posts

Posted - August 10 2004 :  07:19:19  Show Profile  Visit devshb's Homepage  Reply with Quote
We've come across a problem whereby when you set your "stayonpage" config option to "Yes", then the product pages won't create the form tags properly in some instances.

This might have the effect of people getting "cart is empty" when clicking on add-to-cart on some pages.

To solve this problem, edit "shopdisplayproducts.asp" and do a text search for "/form", and you'll then see the relevant bit of code:


If stayonpage="Yes" then
url="shopdisplayproducts.asp?page=" & mypage
response.write "<input type=hidden name=returnurl value=" & url & "></form>"
end if
response.write("</form>")

what this is doing is creating 2 end form tags when you're using stayonpage, thereby mucking-up the form-processing and causing weird effects on some browsers. To get round this, simply delete the first </form> tag so it reads:


If stayonpage="Yes" then
url="shopdisplayproducts.asp?page=" & mypage
response.write "<input type=hidden name=returnurl value=" & url & ">"
end if
response.write("</form>")


Hope that helps someone out there; it took a while for us to find the cause of the symptoms that this problem was bringing up.

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00