How to Display Tier Price at Category Page in Magento 2?

Tier pricing in Magento 2 allows you to offer discounts based on the quantity of items purchased. By displaying these tier prices directly on the category page, you can effectively communicate these discounts to your customers upfront, potentially increasing sales volume. This guide will walk you through the necessary steps to enable and display tier prices on the category page in Magento 2.

Step 1: Log in to Magento Admin Panel

  1. Access Magento Admin: Log in to your Magento 2 admin panel using your credentials.

Step 2: Enable Tier Pricing

  1. Navigate to Product Settings: Go to Stores > Configuration.

  2. Enable Tier Pricing: Under Catalog, select Catalog.

  3. Expand the Catalog section: Find the Price section and locate the Catalog Price Scope setting.

  4. Set Scope to Website: Ensure that the Catalog Price Scope is set to Website.

  5. Save Configuration: Save your configuration changes.

Step 3: Modify Category Page Templates

  1. Override Template Files: Override the default Magento 2 template files to customize the category page.

  2. Create a Custom Module (Optional): For cleaner code management, consider creating a custom module.

Step 4: Display Tier Prices on Category Page

  1. Edit list.phtml Template File: Locate the list.phtml file in your custom theme or module.

  2. Add PHP Code: Insert below PHP code to fetch and display tier prices for each product on the category page.

     

<?php
$_product = $block->getProduct();
$tierPrices = $_product->getTierPrice();
if (count($tierPrices) > 0):
    foreach ($tierPrices as $tierPrice):
        if ($tierPrice['price_qty'] > 1):
            echo '<div class="tier-price">';
            echo '<span class="qty">' . __('Buy %1 for', $tierPrice['price_qty']) . '</span>';
            echo '<span class="price">' . $block->getPriceCurrency()->format($tierPrice['price']->getValue()) . '</span>';
            echo '</div>';
        endif;
    endforeach;
endif;
?>

   Customize CSS: Style the tier price display to match your theme's design.

Enabling tier pricing on the category page in Magento 2 enhances user experience by providing customers with valuable pricing information at a glance. By following these steps, you can effectively implement and display tier prices, potentially increasing conversion rates and customer satisfaction on your ecommerce store.