My custom payment is blocked by this core function for free orders:

in app/code/core/Mage/Payment/Model/Method/Abstract.php

    public function isApplicableToQuote($quote, $checksBitMask) {
    if ($checksBitMask & self::CHECK_ZERO_TOTAL) {
        $total = $quote->getBaseSubtotal() + $quote->getShippingAddress()->getBaseShippingAmount();
        if ($total < 0.0001 && $this->getCode() != 'free'
            && !($this->canManageRecurringProfiles() && $quote->hasRecurringItems())
        ) {
            return false;

How can I bypass this? Do I need to overwrite the whole function?


You can overwrite the function and while calling parent, unset the CHECK_TOTAL_ZERO in the second parameter.

public function isApplicableToQuote($quote, $checksBitMask)
    return parent::isApplicableToQuote($quote, $checksBitMask & (~ self::CHECK_ZERO_TOTAL));

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.