0

I have a problem where cart do not empty after checkout when Bank transfer payment is used.

I found the reason to be due an observer.php file of anther payment (hyperpay).

if I delete this file, this problem will be solved, however I will get another problem where cart will be emptied before a successful payment is made when hyperpay payment is used.

I believe this observer is missing something like if condition, to make it only applied when hyperpay payment is used.

Can anyone advise for a solution ?

here is observer.php

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 *
 * @package     Hyperpay
 * @copyright   Copyright (c) 2014 HYPERPAY
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */

/**
 * Order success observer
 *
 */
class Hyperpay_Model_Success_Observer 
{

    /**
     * Reactivate the cart because the order isn't finished
     * 
     * @param Varien_Event_Observer $observer 
     */
    public function activateQuote(Varien_Event_Observer $observer)
    {
        $observer->getEvent()->getQuote()->setIsActive(true)->save();
    }
}
0

Seems your extension code has different version.

Here I found code on link [a link] (https://github.com/TariqAtari/HyperpayMagentoo/blob/f9d59c70a1c1d5053789e20dc0c71b63051ebb16/app/code/community/Hyperpay/etc/config.xml#L59)

**

 <events>
             <sales_model_service_quote_submit_success>
                    <observers>
                        <hyperpay_success_observer>
                            <type>model</type>
                            <class>Hyperpay_Model_Success_Observer</class>
                            <method>activateQuote</method>
                        </hyperpay_success_observer>
                    </observers>
                </sales_model_service_quote_submit_success>     
            </events>

**

Please ensure you use correct version code to solve issue.

  • I did not understand what you mean, can you please clarify more – mubdea Apr 22 '16 at 18:49
  • means you have observer file and your config not showing means you have mismatch version installed. please see code at link...they added router and removed observer event from file. – Yeshu Apr 22 '16 at 19:02
  • I see. thank you. I installed the version that available in the GitHub and now this problem is solved but I have the other problem where the cart empty before success payment with hyperpay – mubdea Apr 22 '16 at 19:15
1

have you installed the newest Version of the Module?

The current Version still has the Observer, but it is not defined in the config.xml anymore and so it just should do nothing at all.

Looking at an old commit: https://github.com/TariqAtari/HyperpayMagentoo/blob/f9d59c70a1c1d5053789e20dc0c71b63051ebb16/app/code/community/Hyperpay/etc/config.xml#L59

the current config.xml does not have this definition anymore: https://github.com/TariqAtari/HyperpayMagentoo/blob/master/app/code/community/Hyperpay/etc/config.xml

So maybe have a look at your versions config.xml or just try installing the newest version I think

  • I will try to install newest version and see, thank you for the guide – mubdea Apr 22 '16 at 18:39
  • I installed the version that available in the GitHub and now this problem is solved but I have the other problem where the cart empty before success payment with hyperpay – mubdea Apr 22 '16 at 19:15
  • So still this does not work for me. – mubdea Apr 22 '16 at 19:50
  • @mubdea You should accept this answer, as it solved your question. Yes, it leads to a new problem, but that should be a new question. Additionally, you should file a bug report with the developers of the hyperpay module (file a github bug report) - Since this is an issue you have with a 3rd party module, it is out of scope for this forum. Best of luck – ProxiBlue Apr 23 '16 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.