0

In Website the Catalog price is set with a 3rd party API and that automatically adds the tax amount.

It also shows in the front end but when i try to apply coupon condition based on subtotal the condition does not match .

When i debug i check the Quote object i see subtotal is separated from tax . i tracked it farther and found it is sending the object to

src/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php

public function validate(Varien_Object $object){
    $address = $object;
    if (!$address instanceof Mage_Sales_Model_Quote_Address) {
        if ($object->getQuote()->isVirtual()) {
            $address = $object->getQuote()->getBillingAddress();
        }
        else {
            $address = $object->getQuote()->getShippingAddress();
        }
    }

    if ('payment_method' == $this->getAttribute() && ! $address->hasPaymentMethod()) {
        $address->setPaymentMethod($object->getQuote()->getPayment()->getMethod());
    }
    return parent::validate($address);
}

but I am not sure how can i add the tax amount with subtotal when it tries to validate the coupon condition.

Thanks in Advance!!

Your Answer

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

Browse other questions tagged or ask your own question.