Aitoc Aitpreorder (Aitoc_Aitpreorder)

Extension Name

Aitoc Aitpreorder

Developer

Aitoc

Versions

Aitoc_Aitpreorder 1.1.34
MageRewards: 1.7.7.3

Issue Status

Resolved with modifications.

Problem

Orders: Double Points calculated for Shopping Cart Earning Rule.

Resolution

To solve, follow these instructions:

Note: This is a temporary solution. You can also get in touch with extension provider for more information.

1. Open app/code/local/Aitoc/Aitpreorder/Model/Observer.php.

2. Line 278 Find below code

public function onSalesOrderLoad($observer)
    {
        $order = $observer->getEvent()->getOrder();
        if(!$order->getId())
        {
            return;
        }
        if(!Mage::helper('aitpreorder')->checkSynchronization($order->getStatus(),$order->getStatusPreorder()))
        {
			  
            $order->setStatusPreorder($order->getStatus());
            $order->save();
			
        }
        $order->setStatus($order->getStatusPreorder());
    }

Replace with this code.  You will be commenting out below code $order->save();

public function onSalesOrderLoad($observer)
    {
        $order = $observer->getEvent()->getOrder();
        if(!$order->getId())
        {
            return;
        }
        if(!Mage::helper('aitpreorder')->checkSynchronization($order->getStatus(),$order->getStatusPreorder()))
        {
			  
            $order->setStatusPreorder($order->getStatus());
            // $order->save();
			
        }
        $order->setStatus($order->getStatusPreorder());
    }

5. Upload new and modified files to your server.

6. Clear your cache.


Please keep in mind that implementing any modifications to your MageRewards core code does void your support agreement because you're adding dependency to the other module.

Still need help? Get Help Get Help