After the order is canceled, paypel returns to the website and will see: The cart is empty, but we want him to go back to the shopping cart page, and there are products in the shopping cart that we haven't paid yet, magento files to be modified
APP/code/CORE/MAGE/Checkout/controllers/onepagecontroller. php
Line 484-491
$this->getOnepage()->getQuote()->save();
/**
* when there is redirect to third party, we don't want to save order yet.
* we will save the order in return action.
*/
if (isset($redirectUrl)) {
$result['redirect'] = $redirectUrl;
}
Changed:
//$this->getOnepage()->getQuote()->save();
/**
* when there is redirect to third party, we don't want to save order yet.
* we will save the order in return action.
*/
if (isset($redirectUrl)) {
$result['redirect'] = $redirectUrl;
}
else {
$this->getOnepage()->getQuote()->save();
}
Recompile and refresh the cache. Okay!