Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default 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:

    Code:
    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!
    Last edited by kiddo; 11 Aug 2010 at 02:11 AM. Reason: cant type

  2. #2
    Join Date
    Jul 2006
    Location
    SF Bay Area
    Posts
    867
    Plugin Contributions
    1

    Default 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:

    Code:
    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.

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 22 Dec 2014, 08:55 PM
  2. v139h redirect add to cart & shopping cart to another zc installation
    By iddy in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 20 Jun 2012, 01:21 PM
  3. JAM problem - redirect your affiliate links to any other URL
    By FreeArticlePublishin in forum General Questions
    Replies: 5
    Last Post: 28 Jan 2008, 05:07 PM
  4. Redirect if Shopping Cart is Empty
    By robgnyc in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Nov 2007, 12:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg