Forum

Thread tagged as: Suggestions, PayPal

Shop item option(s) in the logged order

I have a suggestion for the next updates to the Shop (PayPal) add-on.

The option(s) selected - example: colour - for an item are correctly logged and passed through to the PayPal shopping cart. They appear in PayPal and the order email (from PayPal). However, the option(s) are not logged in the Perch Shop Orders table and list. Could 'option(s)' be stored/listed there too please?

And ... an additional mention/request for minicart.js to be increased to the latest version and a paypal.minicart.reset(); to be added to the return page please. Its mentioned in this thread - https://forum.grabaperch.com/forum/11-05-2014-shop-order-appears-but-quantity-is-not-reduced. If there is a patch that I can apply to the core code for this reset, I'd be very happy to apply and test it as its becoming a problem now that orders are arriving in a new shop we've developed. I'm happy to take that code change by private email if you don't want to publish a core code change here.

Thanks, Graham

Graham Street

Graham Street 17 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can update the minicart to any version you need. We only include it for convenience.

Yes, I've done that and it works fine (except the cart is not cleared on return from PayPal). I'm missing the reset that's needed on the return page. I don't think that was required in the previous minicart version. I could do with some guidance on where to include that reset as I think it has to go into the Shop App's core code somewhere?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

What is the reset code? Is it some JavaScript?

Yes, its a script - see https://minicartjs.com/

When I first read this, I'd assumed that the script needed to be in .../apps/perch_shop_paypal/callback/ipn_callback.php and hence my questions about updating Perch and the add-on. Re-reading this, I wonder if I should/can insert this script into the 'return URL' set up with PayPal. In other words, the 'thanks' page on the site. Presumably the ipn_callback.php is executed before PayPal sends the purchaser to the 'thanks' page and therefore inserting this reset script on the 'thanks' page isn't going to mess up Perch's logging of the order and reducing the stock quantity?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

It would go on the thank you page, you just put it there yourself. It's to clear the PayPal cart and has nothing to do with stock control or Perch.

Just confirming that this works, when you put the 'reset' in the right place.

Graham, is your last response a question or informational post of a now working script?

UPDATE: thanks for the clarification. Glad you got things working. :-)

Informational post. I can now clear the cart upon return to the site from PayPal. See also https://forum.grabaperch.com/forum/12-09-2014-changing-the-minicart-supplied-with-paypal-shop-app-121

I didn't get a solution to my other point, so hopefully its been logged as an enhancement suggestion instead ... The option(s) selected - example: colour - for an item are correctly logged and passed through to the PayPal shopping cart. They appear in PayPal and the order email (from PayPal). However, the option(s) are not logged in the Perch Shop Orders table and list. Could 'option(s)' be stored/listed there too please?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think they should be logged - I'll see if I can find out.