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-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 order button in tmp_product.htm
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

34 Posts

Posted - June 19 2008 :  21:43:39  Show Profile  Reply with Quote
Have a problem I can't solve. I want to have an order button in tmp_product.htm that doesn't take the customer to the view cart page after it is clicked. Instead the item will be added to the minicart displayed in the left sidebar of the main page and show "item added to cart" message in tmp_product.htm. [add_orderbutton] and [special_orderbutton] both take the customer to the view cart page after an item is added. Does anyone know how to change the codes in either of these buttons to do the above? Thank you.

VP-ASP Expert

United Kingdom
948 Posts

Posted - June 20 2008 :  03:26:21  Show Profile  Reply with Quote

you can go to Admin Panel > Cart Set-Up and find the field xproductstayonpage Set this value to Yes. This will keep the customer on the product or category page after they add an item to the cart, and the mini cart will be updated.


Go to Top of Page

Starting Member

1 Posts

Posted - June 20 2008 :  05:15:38  Show Profile  Reply with Quote
As like carfin suggested, you will first to set xproductstayonpage to Yes.
And try edit shopfileio.asp, around line 854 after <input type="hidden" name="productid" value="<%=ID%>" /><%
Insert these codes :

dim stayonpage, url
If stayonpage="Yes" then
url="shopexd.asp?addtocartmsg=Item added to cart."
response.write "<input type=""hidden"" name=""returnurl"" value=""" & url & """ /></form>"
end if

Also in line 965 something like : WriteForm "<input class=""submitbtn"" type=""submit"" value=""" & mytext & """ name=""Order"">"
After that line you can put these codes :

dim sAddtoCartMsg
sAddtoCartMsg = request.querystring("addtocartmsg")
if sAddtoCartMsg <> "" then
response.write " <B>" & sAddtoCartMsg & "</B>"
end if

The scripts work well in my site before.
You can have a try.
Go to Top of Page

Starting Member

34 Posts

Posted - June 28 2008 :  01:40:40  Show Profile  Reply with Quote
Thank you Carrol and Froggie. I have already done what Carrol suggested but the command seems to only work for the main page and not for the pop up window. I'll put the codes in and see what happens. Thank you.
Go to Top of Page

Starting Member

34 Posts

Posted - June 30 2008 :  04:14:45  Show Profile  Reply with Quote
I have added the codes and it worked like a charm! Thank you.

But one question, how do I make the main page's minicart auto refresh to reflect the added item in shopexd.asp?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000