Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
Little confused on this one, how can I clear the cart after the user is directed to paypal?
I thought maybe put a command into the checkout.php file, but then figured that this will clear the cart before it is passed on to paypal!
Any ideas/help would be great, I completely overlooked this one and the site has now gone live!

Edit: Damn! It's always the way isn't it, you figure out your mistake after posting! I forgot to change the "clear_cart" parameter from a 0 to a 1! Doh!!

Either way, just wondering - is there a way to redirect the customer to a success page after they order?
just wondering - is there a way to redirect the customer to a success page after they order?

To summarize what has been discussed in the docs on PayPal button (and the following post: viewtopic.php?f=2&t=8275) -
when a visitor presses the PayPal button, he actually moves away from your site to a different site (i.e. PayPal).
Thereon we have no surety of whether or not the visitor completes the sales transaction (we only get to know it by an asynchronous message from PayPal known as IPN).

Therefore, there is no way to redirect the customer to any success page because he has already been redirected off to PayPal (and can possibly not return).

Hope I was able to explain the issue properly :)
Don't know if this is any use for future etc but I have been looking in to this today and found out that you can choose a "Success" page for paypal to redirect to - and it can even pass certain transaction information back with it.
To be honest, I've discussed it with my client and we have decided that for the moment it's not essential and if they want it then it will have to be done on a separate job in the future.
I think it might be quite a new feature, but I'm not sure!
Cheers dude :)
The cms:payment_gateway tag accepts a 'return_url' parameter -
when a buyer completes the transaction at PayPal, he is shown a button that says something like 'Back to the seller's site'. We can set the url of this button to a page of our choice (i.e. a success page) by setting the page's url as the 'return_url' parameter.

However, please remember that whether or not the buyer clicks this link is completely at his discretion (i.e. we cannot forcibly redirect him back to the success page after the transaction) and that is what I was trying to explain in the previous post.

Hope this helps.
4 posts Page 1 of 1