cDGo IT Consultancy Posted February 13, 2022 Posted February 13, 2022 Hi, At the moment the official Paypal App v5.018 (Paypal Standard) module creates an order when landing oin the checkout_confirmation.php page instead of after the customer confirms the order on this page like all other payment modules. Is there a step by step instruction how to change this behavior? Problem is that most often customers only want to check the totals on the confirmation page (like shipping and payment fees) and than go back to order more products or product quantities. The shopping cart already shows these fees, but they do tend to act this way, leaving us with multiple orders. The customer emails or calls in panic, that they only want "one". Quote
Jack_mcs Posted February 13, 2022 Posted February 13, 2022 That is the way that module works and there isn't a way to change it, as far as I know. The problem is that there is no way to know that the customer abandoned the order so adding code to delete such orders may cause more harm than good. But the order status of orders that have not been completed is (should be) different than those that have completed. So you can ignore, or delete, those orders with that status if you are sure the customer is not going to complete it later. If you are not using a coupon-type of addon you can use the Express module instead. For it, an order isn't created until the customer clicks the confirm button. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons
cDGo IT Consultancy Posted February 27, 2022 Author Posted February 27, 2022 What worked for me: In modules/payment/paypal_standard.php Replace this: Line 184 - 187 function confirmation() { global $cartID, $cart_PayPal_Standard_ID, $customer_id, $language, $languages_id, $order, $order_total_modules, $sendto, $billto, $shipping; if (tep_session_is_registered('cartID')) { With this And be ware of the 2 additional global variables! These are in use in my webshop, and I'm not sure if they are available in the vanilla installation And use you're own title text as this might also not be vanilla. function confirmation() { return array('title' => MODULE_PAYMENT_PAYPAL_STANDARD_TEXT_PUBLIC_TITLE); } function process_button() { global $cartID, $cart_PayPal_Standard_ID, $customer_id, $language, $languages_id, $order, $order_total_modules, $sendto, $billto, $shipping ,$currency, $paypal_fee; if (tep_session_is_registered('cartID')) { And remove these lines: Line 407 - 412 return false; } function process_button() { global $language, $customer_id, $order, $sendto, $currency, $cart_PayPal_Standard_ID, $shipping, $order_total_modules, $paypal_fee; My shop is very heavilly customized, so use at your own risk. All suggestions to further improve are welcome! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.