1

I try to get the total value (price of his order) of the customer in the sales_order_place_before event.

How can I read the total value?

This is a part of my observer, it is getting called, I only need to find out how I can read the total value:

public function changeCustomerGroup(Varien_Event_Observer $observer)
{
    Mage::Log('observer called', 7, 'autochange_customer_group.log', true);


    Mage::Log(var_dump($observer->getEvent()->getOrder()->getTotalDue()), 7, 'autochange_customer_group.log', true);

But my attempt with var_dump($observer->getEvent()->getOrder()->getTotalDue() returns nothing.

0

I figured it out, it has to be $observer->getEvent()->getOrder()->getBaseTotalDue()

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.