Magento: Display price twice on product pages

Magento: Display price twice on product pages

August 15, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: Display price twice on product pages

Displaying Product Prices Twice on Magento Product Pages

When working with Magento product pages, you often need to display prices in multiple locations for design purposes or other customizations. While the default price rendering works well, it may not update correctly when copied and pasted multiple times.

Let me walk you through a step-by-step solution to display the product price twice on the same page while ensuring both prices update dynamically as customers select options.

Understanding the Default Price Rendering

Magento uses the getPriceHtml() function in most of its default views to render the product price. This function is responsible for generating the HTML markup for both plain text and special pricing formats, including taxes and discounts.

The default code snippet you provided:

<?= $this->getPriceHtml($_product) ?>

is located inside your view.phtml template file under app/design/frontend/default/CUSTOM_TEMPLATE/template/catalog/product/.

This line of code calls the getPriceHtml() function, which retrieves and formats the product price based on the current configuration settings.

The Challenge: Inconsistent Price Updates

When you copy this line and paste it in multiple locations within the same template file, you encounter a problem. Only one instance of the price will update when customers select options, while the second remains static.

This inconsistency occurs because Magento uses a single price model for the product object ($_product). When an option is selected that changes the price, this model gets updated only once and propagates the change to the first occurrence of the getPriceHtml() function. The subsequent calls to the same function receive the cached price value without reflecting the update.

The Solution: A New Product Object Instance

To resolve this issue, we need to create a new product object instance for each price rendering location. This approach ensures that Magento treats them as separate entities and updates both prices independently when options are selected.

Update your view.phtml file with the following modified code:

<?= $this->getPriceHtml($_product) ?>

<!-- Custom product object for second price rendering -->
<?php $secondaryProduct = Mage::getModel('catalog/product')->load($_product->getId()) ?>
<?= $this->getPriceHtml($secondaryProduct) ?>

How It Works

  1. We first retrieve the original product object using the provided $_product variable.
  2. Next, we create a new instance of the Mage_Catalog_Model_Product model and load it with the same product ID as the original object.
  3. This creates a separate product object ($secondaryProduct) that is independent from the first one.

When options are selected, Magento updates only the price related to the $_product object. The second instance ($secondaryProduct) remains unaffected by this change. Therefore, when we call getPriceHtml($secondaryProduct), it retrieves and formats the original product’s base price without considering any option selections.

Conclusion

Displaying prices twice on Magento product pages while ensuring both prices update dynamically requires a careful approach. By creating separate product object instances for each rendering location, you can achieve the desired behavior without compromising the consistency of your pricing information.

Remember that this method may have implications for other parts of your store, such as order processing or inventory management, which rely on the single $_product object. Ensure that any necessary adjustments are made to maintain data integrity across all components of your Magento setup.

For more in-depth customizations and advanced pricing strategies, consider exploring Laravel Company, which specializes in providing expert consulting services for Magento development projects. Their team of experienced developers can help you implement complex pricing logic and optimize your store’s performance.

Don’t hesitate to reach out to them if you have any further questions or need assistance with customizing your Magento store.

Catalog Themes Configuration Customers

Our network