Custom Tier Price not working in checkout page magento

Custom Tier Price not working in checkout page magento

September 27, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Custom Tier Price not working in checkout page magento

Solving Tier Pricing Issues in Magento Checkout

When dealing with dynamic pricing scenarios in Magento, especially when involving tier prices, you might encounter issues in the checkout process. In your case, while tier pricing works correctly in the cart, it doesn’t apply properly in the checkout page.

This discrepancy often occurs because Magento uses different pricing models for the quote and the order. The quote is where you manage the shopping cart, while the order is created when a customer places an order.

Here’s how to resolve this issue:

1. Understand Magento’s Pricing Structure

In Magento 2, pricing is handled by several models:

  • Mage_Catalog_Model_Product for product-level pricing.
  • Mage_Catalog_Model_Product_Option for configurable products’ options.
  • Mage_Tax_Model_Sales_Total_Quote_Fee and Mage_Tax_Model_Sales_Total_Quote_Shipping for taxes and shipping.

2. Modify the Pricing Model

You’re already on the right track by overriding the pricing models in your custom module. However, you need to ensure these overrides are applied correctly at different stages of the checkout process.

For tier pricing specifically, you should override:

  • Mage_TierPrice_Model_Observer for applying tier prices during the cart and quote creation.
  • Mage_SalesRule_Model_Quote_Validator for validating the rule against the quote items (including tier prices).

3. Apply Pricing Updates at the Right Events

You mentioned using events like checkout_cart_save_before and sales_quote_save_before. While these can work, you might need to adjust your approach slightly.

Instead of updating the tier price directly in the observer, consider applying the update logic before Magento’s built-in pricing rules are applied. You can do this by observing the controller_action_predispatch_checkout_cart_add and sales_quote_save_before events.

Here’s a sample observer for updating prices:

class My_Custom_Model_Observer extends Varien_Event_Observer
{
    public function updateCartBasedOnLiveFeed($observer)
    {
        $quote = $observer->getQuote();
        foreach ($quote->getAllVisibleItems() as $item) {
            // Update price logic here using the item and the live feed data
            $item->setPrice($updatedPrice);
        }
    }
}

4. Validate Pricing Rules

After updating the prices, you must validate these updates against Magento’s pricing rules (including tax calculations). This is where Mage_SalesRule_Model_Quote_Validator comes into play.

Override this model to ensure your updated prices adhere to any active sales rules and discounts.

5. Clear Cache and Reindex

After making changes to pricing models, it’s crucial to clear the cache and reindex data structures for the changes to take effect. You can do this programmatically using Magento’s built-in functions:

Mage::app()->cleanCache();
Mage::getSingleton('index/indexer')->reindexAll();

Conclusion

Resolving tier pricing issues in Magento checkout requires a deep understanding of the platform’s pricing architecture and event-driven system. By carefully selecting the right events for your observers, applying pricing updates at the appropriate stages, validating rules after updates, and clearing cache, you can ensure that your dynamic tier pricing works seamlessly throughout the entire checkout process.

Remember to always test your changes thoroughly in a staging environment before deploying them to production.

For more detailed guides on Magento development and customization, I recommend checking out our comprehensive tutorials at Laravel Company’s Magento Development Section.

Magento 2 Checkout Catalog Extensions

Our network