No payment methods display for free products with shipping costs

No payment methods display for free products with shipping costs

October 13, 2026 · Illustrated author avatarBy Stefan Bogdanescu
No payment methods display for free products with shipping costs

Solving Payment Method Display Issues for Free Products with Shipping Costs

As an experienced e-commerce developer, I frequently encounter situations where custom configurations lead to unexpected behavior during checkout. In your Magento store configuration, you’re facing a challenge with displaying payment methods when only free products with shipping costs are present in the cart.

Understanding the Underlying Issue

Magento’s default logic handles payment method availability based on the order total and the presence of taxable items. If an order contains only zero-priced items (like your free booklets) but has associated shipping costs, the platform considers this scenario as having no chargeable items, hence no payment methods are displayed.

Step-by-Step Solution Approach

1. Verify Shipping Method Configuration

Firstly, ensure that your Table Rates shipping method is correctly configured and enabled for all products, including free ones. You can confirm this by navigating to Stores > Settings > Configuration > Sales > Shipping Methods. Check the Shipping Rates field under your Table Rates configuration.

2. Enable Payment Methods for Free Items

To override Magento’s default logic, you’ll need to allow payment methods for zero-priced items with shipping costs. This can be achieved by adding a custom module that extends the core Magento\Quote\Model\Quote class.

Create a new module in your app directory (e.g., app/code/Vendor/PaymentOverride). Inside the module’s Quote model, override the isAllowToPlaceAfter() function:

namespace Vendor\PaymentOverride\Model;

class Quote extends \Magento\Quote\Model\Quote
{
    public function isAllowToPlaceAfter()
    {
        if ($this->getIsMultiShipping()) {
            return true;
        }

        $Totals = $this->getTotals();
        if (isset($Totals['shipping']) && $Totals['shipping']['tax_amount'] > 0) {
            return true; // Allow payment for free items with shipping costs
        }

        return parent::isAllowToPlaceAfter();
    }
}

3. Update the Payment Method Collection

Next, update the Magento\Payment\Model\Config class to include payment methods for zero-priced items:

namespace Magento\Payment\Model;

class Config extends \Magento\Payment\Block\Form
{
    public function getAllowedMethods()
    {
        $quote = $this->getQuote();
        $isAllowToPlaceAfter = $quote->isAllowToPlaceAfter();

        if ($isAllowToPlaceAfter) {
            return $this->_allowedPaymentMethods;
        }

        // Proceed with the default logic for non-zero-priced items
    }
}

Best Practices and Additional Considerations

  • Always ensure your custom code is well-documented and properly tested before deployment to a live environment.
  • Be cautious when overriding core classes; use the di.xml configuration file to replace dependencies where necessary.

Conclusion: Addressing Payment Method Display Challenges

By implementing these solutions, you should now see payment methods displayed during checkout even when only free products with shipping costs are present in the cart. This approach overrides Magento’s default logic for handling zero-priced items and ensures a consistent user experience across all product types.

Remember to clear your cache and reindex data after making these changes:

php bin/magento cache:clean
php bin/magento indexer:reindex

For more advanced customizations and in-depth guides, I recommend exploring the comprehensive resources available on our blog at Laravel Company.

Checkout Catalog Database Extensions

Our network