I am using PayPal Express Checkout, i set "Skip Order Review Step" to "No" but its still redirecting user to PayPal Page after selecting PayPal as a payment Method and Skipping order Review step. it should redirect after complete 5th (Order Review) step.
Magento 1.9 – Fix PayPal Skipping Order Step Issue
checkoutmagento-1.9paypal
Related Solutions
Actually all the solutions mentioned here required to edit the Magento core. This is known as bad practise and does not keep your shop updateable.
What you need to do for a clean solution:
- Create a module (in my exampe: Avoe_Paypal) to include the changes
- Rewrite Paypal Config
- Redirect on paypal express review step which is http://yourdomain.com/paypal/express/review/
1) Create your module
Avoe/Paypal/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Avoe_Paypal>
<version>0.1.0</version>
</Avoe_Paypal>
</modules>
<global>
<models>
<Avoe_Paypal>
<class>Avoe_Paypal_Model</class>
</Avoe_Paypal>
<paypal>
<rewrite>
<config>Avoe_Paypal_Model_Config</config>
</rewrite>
</paypal>
</models>
<events>
<controller_action_predispatch_paypal_express_review>
<observers>
<avoe_paypal_predispatch>
<type>singleton</type>
<class>Avoe_Paypal_Model_Observer</class>
<method>paypalExpressReturnPredispatch</method>
</avoe_paypal_predispatch>
</observers>
</controller_action_predispatch_paypal_express_review>
</events>
</global>
</config>
app/etc/Avoe_Paypal.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Avoe_Paypal>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Paypal />
</depends>
</Avoe_Paypal>
</modules>
</config>
2) Rewrite config, add useraction 'commit':
<?php
class Avoe_Paypal_Model_Config extends Mage_Paypal_Model_Config {
/**
* Get url for dispatching customer to express checkout start
* Added useraction 'commit' to remove PayPal Express Checkout review page
*
* @param string $token
* @return string
*/
public function getExpressCheckoutStartUrl($token)
{
return $this->getPaypalUrl(array(
'cmd' => '_express-checkout',
'useraction' => 'commit',
'token' => $token,
));
}
}
3) Create observer to redirect:
<?php
class Avoe_Paypal_Model_Observer {
function paypalExpressReturnPredispatch($observer) {
Mage::app()->getResponse()->setRedirect(Mage::getUrl('*/*/placeOrder'));
}
}
There is also a small Magento extension which was just released yesterday, to remove the review step:
https://github.com/tim-bezhashvyly/Sandfox_RemovePaypalExpressReviewStep
One way to achieve this is in the file: app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml
When looping over the selected methods add something like:
<?php if($_code == 'YOUR METHOD'): ?>
<span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
<?php $oneMethod = $_code; ?>
<?php endif; ?>
<label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
Then add some JS at the bottom:
<script type="text/javascript">
//<![CDATA[
<?php if (is_string($oneMethod)): ?>
payment.switchMethod('<?php echo $oneMethod ?>');
<?php endif; ?>
//]]>
In reality this is all that default magento template is doing to help the user select only a single option if one is set via the admin. However what I think might be happening in your case is that you have 2 methods available even though one may not be visible as a option. Adding this to the template will select that option by default and move to next step.
Best Answer
When using an external payment method, the workflow is the following :
And it is the same for each external payment method. Having the 5th step with an external payment method is not the usual way. The "Skip Order Review Step" option of Paypal Express Checkout is about the landing page you are redirected after paying on Paypal website. If you put it to "No", the review step after Paypal process will be skipped.