Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Shopping cart empty after canceling external payment provider (like paypal)
 
nathan.bolin
Jr. Member
 
Total Posts:  4
Joined:  2010-09-03
 

Solution on page 1 from Nijhof Internet Media does the trick.

//$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();
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
PavelPolyakov
Sr. Member
 
Total Posts:  98
Joined:  2009-08-17
 

Simple module, which overrides the standard Magento behavior, with the help of tracking sales_model_service_quote_submit_after event.
Just copy the app folder to your Magento shop and from that time Magento would not set the Quote to inactive state after it creates the order.

File Attachments
app.zip  (File Size: 3KB - Downloads: 396)
app.zip  (File Size: 3KB - Downloads: 243)
 
Magento Community Magento Community
Magento Community
Magento Community
 
revb9
Jr. Member
 
Total Posts:  1
Joined:  2010-09-22
 

Solution on page 1 from Nijhof Internet Media does work, but if it doesn’t, make sure that “Hide Cart Contents” in the Google API settings is set to “NO”.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xinhaozheng
Sr. Member
 
Total Posts:  107
Joined:  2009-03-09
 

i have meet the same problem here,and will try the patch.thanks a lot.

 
Magento Community Magento Community
Magento Community
Magento Community
 
moobaa
Sr. Member
 
Total Posts:  171
Joined:  2009-10-05
 
pavel.polyakov - 12 January 2011 03:31 AM

Simple module, which overrides the standard Magento behavior, with the help of tracking sales_model_service_quote_submit_after event.
Just copy the app folder to your Magento shop and from that time Magento would not set the Quote to inactive state after it creates the order.

Has anyeon got this working. Makes no change for me… :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
motofzr1000
Jr. Member
 
Total Posts:  5
Joined:  2008-10-15
 

Hi,

I’ve tried the solution on page 1 from Nijhof Internet Media in Magento 1.5.0.1, but it doesn’t seem to work.
I’m also using the official Ogone Extension.

// $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(); 
}

In 1.5.0.1 there’s an extra line beneath $result[’redirect’] = $redirectUrl;

$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

Maybe this has something to do with it?

Does anyone have a clue how to solve this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tyveris
Jr. Member
 
Total Posts:  28
Joined:  2010-05-17
 
motofzr1000 - 25 May 2011 06:17 AM

Hi,

I’ve tried the solution on page 1 from Nijhof Internet Media in Magento 1.5.0.1, but it doesn’t seem to work.
I’m also using the official Ogone Extension.

// $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(); 
}

In 1.5.0.1 there’s an extra line beneath $result[’redirect’] = $redirectUrl;
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

Maybe this has something to do with it?

Does anyone have a clue how to solve this?

I’ve installed CE v1.4.2.0 and I have the same line of code you write.
The modifications from “Nijhof Internet Media” from first site does work without problems.
I’ve tested it with GUEST and LOGGED IN USERS. Both times it works fine.

I’ve use the PayPal Standard Payment with IPN. My settings are:
Shop-Backend-Config:
PayPal Settings:
- Select a PayPal Solution: “Website Payments Standard”
- Payment Action: Sale
- Sandbox Mode: No
- Transfer Cart Line Items: Yes
- Debug Mode: No

PayPal Setttings:
- IPN URL: http://www.mydomain.com/paypal/ipn/standard/
The rest of the settings are default.

I hope this will help someone.
So long, Tyv.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SPDolman
Jr. Member
 
Total Posts:  2
Joined:  2009-11-29
 

Hi Guys, I am having the same problem on Magento 1.4.2. Tried everything, also the code change suggested above, but nothing changed. Cart is still emptied after cancelling payment. I am using One Step Checkout. On Magento 1.4.0 this problem is not there. Any other suggestions?

Thx.
Stephan
Dolman Design

 
Magento Community Magento Community
Magento Community
Magento Community
 
Speurhoek
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-04-02
Ouderkerk aan den ijssel
 

I have the same problem, tried everything but nothing works.
Magento 1.5.1.0.

Image Attachments
naamloos.bmp
 
Magento Community Magento Community
Magento Community
Magento Community
 
Speurhoek
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-04-02
Ouderkerk aan den ijssel
 

Hello can you help my,

I have change Onepagecontroller.php , does not work Magento 1.5.1.0
Payment module docdata,
As hy payment then hy return the shoppingcart and give shopping bag is empthy.

 
Magento Community Magento Community
Magento Community
Magento Community
 
freshshop
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2009-03-07
 

Hi,

any news on this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
TravelSize_ie
Member
 
Total Posts:  39
Joined:  2009-10-19
 

I’ve tried the Nijhof method and it works in that the cart contents are maintained after cancelling a Paypal transaction - the only problem is that the order status is then set to cancelled.
If the customer then proceeds with the order again it’s treated as a new order.

Any suggestions on correcting this, or word on a fix? (I’m still on 1.5.0.1)

 
Magento Community Magento Community
Magento Community
Magento Community
 
terici
Jr. Member
 
Total Posts:  13
Joined:  2008-09-22
 

//$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(); 
}

I had tried this solution on magento 1.5.1 and 1.6 , it’s working fine on GUEST checkout or RETURN CUSTOMER that login on the checkout page, but it’s not working for NEW USER that register on the one page checkout.

After having a deep look into this issue, I find that the problem come from (/app/code/core/Mage/Checkout/Model/Type/Onepage.php) :

protected function _involveNewCustomer()
{
/*--------------*/

$this->getCustomerSession()->loginById($customer->getId());

/*--------------*/
}

After this line, the customer become login, but his cart is empty.

I still don’t know how to fix this issue?

Any help will be very welcome....

 
Magento Community Magento Community
Magento Community
Magento Community
 
Speurhoek
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-04-02
Ouderkerk aan den ijssel
 

for me was the fault of the PSP provider

 
Magento Community Magento Community
Magento Community
Magento Community
 
bugaga
Jr. Member
 
Total Posts:  8
Joined:  2009-07-26
 
Speurhoek - 20 August 2011 07:43 AM

for me was the fault of the PSP provider

witch fault?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top