Quickshiftin - Clever Crazy Code

Skip Order Review with PayPal Express in Magento 1.9

May 5th, 2015

I’m stepping into the Magento realm in version 1.9, lucky me. Turns out they’ve added a new option which allows customers to bypass an extra review step when they decide to pay via PayPal Express. This feature is a bit mysterious though as it doesn’t seem to work all the time, requiring customers to complete a final review step on your Magento site in some cases. Finally I got to the bottom of this and felt it fair to save everyone else the time I spent to understand.

PayPal Shortcut Buttons are incompatible with Skip Order Review Step

The difference turned out to be straightforward. When customers run through the entire Magento ‘Onepage Checkout’ flow and select PayPal during the Payment Method step, the Skip Order Review Step works as one would expect. Essentially the customer is billed and redirected to a thank you page on Magento.

Magento Checkout PayPal Express

Magento Checkout PayPal Express

However, if you’ve enabled either of the so called ‘PayPal Shortcut Buttons’ this won’t work as expected. The shortcut buttons are labeled in the admin as Shortcut on Shopping Cart and Shortcut on Product View. Here’s a snapshot of what a shortcut button looks like on the cart page.

Magento PayPal Express Checkout - Shortcut button

Magento PayPal Express Checkout – Shortcut button

These buttons are not compatible with the Skip Order Review Step option. How do I know? Just take a look at the code in Checkout.php (app/code/core/Mage/Paypal/Model/Express/Checkout.php).

/**
 * Check whether system can skip order review page before placing order
 *
 * @return bool
 */
public function canSkipOrderReviewStep()
{
    // @note Cannot skip the order review process
    //       when using a PayPal Express Checkout button
    $isOnepageCheckout =
    !$this->_quote
        ->getPayment()
        ->getAdditionalInformation(
            Mage_Paypal_Model_Express_Checkout::PAYMENT_INFO_BUTTON);

    return $this->_config->isOrderReviewStepDisabled() && $isOnepageCheckout;
}

Basically this code says you must have Skip Order Review Step option enabled in the admin and the customer must checkout through the Onepage Checkout flow. In other words, Skip Order Review Step is incompatible with the shortcut buttons.