Display Price Once on Magento Product Page

Display Price Once on Magento Product Page

September 3, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Display Price Once on Magento Product Page

Displaying Product Price Only Once on a Magento Page

Are you tired of seeing your product prices displayed multiple times on your Magento store’s product page? This can be confusing for customers and doesn’t look professional. Let me guide you through the process of displaying the price only once.

Understanding the Current Issue

By default, Magento displays the price in two places on the product page:

  1. In the main content area with the regular price.
  2. Inside the meta information as a canonical attribute for search engine optimization purposes.

This redundancy is intentional from an SEO perspective but can be removed to improve the visual appeal of your pages.

Locating the Relevant Files

To make this change, you need to modify two files in your theme’s directory:

  1. app/design/frontend/your_package/your_theme/template/catalog/product/view.phtml - This file contains the main product view logic.
  2. app/design/frontend/your_package/your_theme/template/catalog/product/price.phtml - This file is responsible for generating the price block.

Replace your_package and your_theme with your actual package and theme names.

Editing the View File

Open the view.phtml file in a text editor. You’ll see a line like this:

<?php echo $this->getPriceHtml($_product, true) ?>

This is where Magento calls the price block to display the price. To remove the duplicate price, comment out or delete this line:

<!-- <?php echo $this->getPriceHtml($_product, true) ?> -->

Editing the Price File

Next, open the price.phtml file. This file contains the actual HTML structure for displaying the price.

You’ll notice that the price is wrapped in a <span> element with an ID of “product-price-123456”, where 123456 represents your product’s ID:

<span id="product-price-123456" class="price"><?php echo $this->formatPrice($_product, $show_minimal_price, false) ?></span>

Since we want to display the price only once and remove the redundancy introduced by the canonical meta attribute, you can simply delete this entire span element:

<!-- <span id="product-price-123456" class="price"><?php echo $this->formatPrice($_product, $show_minimal_price, false) ?></span> -->

Clearing the Cache and Testing

After making these changes, clear your Magento cache to ensure the updates take effect. You can do this by logging into your admin panel, navigating to System > Cache Management, and clicking “Flush Magento Cache”.

Once the cache is cleared, visit a product page on your storefront. You should now see the price displayed only once in the main content area.

Conclusion

Displaying the product price only once not only improves the visual aesthetics of your site but also simplifies the shopping experience for customers. Remember to always make changes to your theme’s files and never modify the core Magento files directly, as this can lead to issues during upgrades.

For more advanced customization options in Magento, consider reaching out to experts at Laravel Company. They specialize in Magento development services and can help you optimize your store for maximum performance and user experience.

Catalog Performance Themes Customers

Our network