Forums / PayPal Website Payments Pro support / Any problem if I use ec_cancel to redirect to shopping cart?

Any problem if I use ec_cancel to redirect to shopping cart?

Locked

Started by kiddo on 11 Aug 2010, 1:10 AM · Views: 1,222

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
11 Aug 2010, 1:10 AM
#1
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Any problem if I use ec_cancel to redirect to shopping cart?

Hey Zen folks;

I will try to pose this clearly as I may.

On a site (1.3.9.alphabetsoup) I have both Paypal (the big yellow button) and Google checkout that show up on the shopping cart page. This is very nice.

When you go to Google but use the 'edit your order" link, you are brought back to the shopping cart page. Again very nice.

But, when you go to Pay pal via the big yellow button, and choose to return to the site via the "return to merchant link" at the bottom of the page, you go back to the ZC login page, not the shopping cart. This is not so nice.

Further, if you happen to be logged in to ZC already, and use the return to merchant link, you find yourself on the ZC shipping method page. Really not nice...

Now to the meat of my question.

In each case, when you return from paypal, the $_GET['ec_cancel'] is set to "1".

So, is there any badness to happen if I test for the ec_cancel flag on the login and shipping pages and if set, redirect back to the shopping cart?

perhaps something like:

if(isset($_GET['ec_cancel'])
  {
  redirect(... to shopping cart... sensible...);
  exit();
  }

This makes sense to me, but is there some unfortunate "gotcha" I'm overlooking?

Thanks!

11 Aug 2010, 1:47 AM
#2
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Any problem if I use ec_cancel to redirect to shopping cart?

Well, it does seem to work with no bad things so far and returns canceled paypal back to the shopping cart page, but oddly the actual var name is $_GET['amp;ec_cancel'] NOT $_GET['ec_cancel']

Weird.

So in the proper /modules/pages.header.php files, using:

if(isset($_GET['amp;ec_cancel']))

	{
	header("Location: /index.php?main_page=shopping_cart");
	exit();
	}

seems to make the Paypal button and Google button act the same way.

11 Aug 2010, 5:42 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,723
Plugin Contributions:
0

Re: Any problem if I use ec_cancel to redirect to shopping cart?

Hacking in those edits is not recommended.
Your issue was fixed. Upgrade your files to the most recent version.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.