Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Customization
 update minicart without viewing cart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

epseja
VP-CART New User

USA
61 Posts

Posted - December 05 2004 :  10:34:16  Show Profile  Reply with Quote
Hi,

Right now I have my minicart in my omnipresent left navigation bar. What I want to accomplish is this:

(1) From item's extended description page, customer hits "add to cart".
(2) shopaddtocart's "ProcessNewAdd" sub runs, adding the item to the cart.
(3) after the sub is run, it automatically redirects back to the page it came from (refreshing the page), thus showing the updated minicart.

Now, I'd LOVE to have this happen without ever hitting shopaddtocart so it's lightning fast, but I would assume that I'd have to pull the "ProcessNewAdd" sub out of shopaddtocart and put it into shopexd, then have it refresh the page once it's run. Would that cause problems with other functions or can it be done?

I'm up for any solution, so fire away!

-Eric

epseja
VP-CART New User

USA
61 Posts

Posted - December 05 2004 :  10:54:10  Show Profile  Reply with Quote
Figured out an interim solution. At the end of the ProcessNewAdd sub, just before the "end sub" line, I stuck in this line:

ProcessReturntoLastPage

Then, right after the "end sub" line, I stuck this code in:

Sub ProcessReturntoLastPage()
Dim lastpage
set lastpage=request.servervariables("http_referer")
responseredirect lastpage
end sub

That performs the (1) (2) (3) combo I requested above. Now to try and get the sub to run right on the shopexd page.

-Eric

Go to Top of Page

epseja
VP-CART New User

USA
61 Posts

Posted - December 05 2004 :  10:58:50  Show Profile  Reply with Quote
Ack! The code above doesn't allow you to view the shopping cart at all. Working on a fix...

-Eric

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