Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Standard creating order on the checkout_confirmation page


cDGo IT Consultancy

Recommended Posts

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

Link to comment
Share on other sites

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.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...