2

Having a few issues with PayPal Express and CT Pro 2.2.9:

  1. Upon checking out to PayPal and clicking PayPal's "Cancel and Return to Store" link, the user is taken back to the URL in the checkout form's return parameter. Does PayPal Express not make use of the failed_redirect parameter?

  2. Upon a successful PayPal Express transaction, CT's cart isn't emptied? I have tried this method (http://cartthrob.com/forums/viewthread/7557/), however, the clear cart tag, although in the if authorized conditional, empties the cart on payment failure also.

Many thanks

1

Re: 2.

My checkout_form returns to /checkout/clear_cart. I was having the same issue with the cart not being emptied on a successful transaction, so here is what I used:

{exp:cartthrob:submitted_order_info}
        {if segment_2 == "order_status" OR segment_2 == "clear_cart"}
            <div class="store_block order_status">
                    {if authorized}
                        {if segment_2 == "clear_cart"}{embed="_includes/.clear_cart"}{/if}
                        [html removed]
                    {if:elseif processing}
                        [html removed]
                    {if:elseif declined}
                        [html removed]
                    {if:elseif failed}
                        [html removed]
                    {/if}
            </div><!-- /order messages -->
        {/if}
{/exp:cartthrob:submitted_order_info}

Then I put my clear_cart in the _includes embed template.

{exp:cartthrob:clear_cart return="checkout/order_status"}

I'm sure you could modify this to work for you too. I cancel transactions on Paypal and returned to the checkout page with the cart keeping my items in it (which is how I wanted it), and when I complete a successful transaction the cart gets cleared and the successful transaction message displays.

| improve this answer | |
  • You needed to have the clear cart tags in an embedded template because you are using advanced conditionals which means that other then embedded templates the contents between each advanced conditional is parsed even if they do not evaluate to true. – Justin Long Jun 21 '13 at 0:16
  • If you simply had {if authorized} {exp:cartthrob:clear_cart return="checkout/order_status"} {/if} {if processing} something and so for each conditional but not nested within another if segment {/if} it would only clear the cart if the cart had indeed been authorized. – Justin Long Jun 21 '13 at 0:18
0

I believe I read something about this error in the CT changelog. I might be wrong. Might be worth a look there. Here is a new version out now.

| improve this answer | |
0

Seems like this issue is back again. I'm running CT v2.4 and when I select PayPal from the available gateways (I have two) I'm directed to PP as expected. If I then select the "Cancel and return to [Company Name] Pty Ltd." button I'm redirected back to my site but I receive a success response message and a corresponding order number. Also the item is still available in the cart.

Can reproduce every time.

In the backend the order is displayed but with the "Failed" status defined.

Thanks a mill,

Andy.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.