{"id":1084,"date":"2020-07-02T07:03:30","date_gmt":"2020-07-02T07:03:30","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/07\/02\/reorder-display-prices-including-and-excluding-taxes-on-category-page-in-magento-2\/"},"modified":"2025-05-22T12:39:21","modified_gmt":"2025-05-22T07:09:21","slug":"reorder-display-prices-including-and-excluding-taxes-on-category-page-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/reorder-display-prices-including-and-excluding-taxes-on-category-page-in-magento-2\/","title":{"rendered":"How to Reorder &#8220;Display Prices&#8221; Including and Excluding Taxes on Category Page in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2 offers three options to display prices on the frontend: including taxes, excluding taxes, and both the prices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can highlight the product price exclusive of taxes in order to earn a visitor\u2019s attention.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if you want to be upfront with your customers and display the product prices as inclusive of taxes, or both, you can implement the below solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, if you want to make changes in the frontend related to the layout or designing and change the order of both the prices, i.e., inclusive and exclusive of taxes, the below solution can be helpful.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reorder the display prices including and excluding taxes on category page in Magento 2&nbsp;that suits your pricing strategy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Override Price on Product List Page in Magento 2:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Navigate to&nbsp;<strong>Store &gt; Configuration &gt; Sales &gt; Tax &gt; Price Display Settings<\/strong>&nbsp;and select the \u201cincluding excluding tax\u201d on Display Product Prices In Catalog<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/06\/Screenshot-at-June-24th-2020-12.27.49-pm.png\" alt=\"Screenshot-at-June-24th-2020-12.27.49-pm\" class=\"wp-image-9425\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">2. Override&nbsp;<strong>default.phtml<\/strong>&nbsp;file into&nbsp;<strong>app\/design\/frontend\/[Namespace]\/[theme]\/Magento_Catalog\/templates\/product\/price\/amount<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. If you want to change the sequence of including tax and excluding tax replace this code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> &lt;?php if ($block->hasAdjustmentsHtml()) :?>\n        &lt;?= $block->getAdjustmentsHtml() ?>\n    &lt;?php endif; ?><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4. With:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;?php\n\/**\n * Copyright \u00a9 Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n *\/\n?>\n\n&lt;?php \/** @var $block \\Magento\\Framework\\Pricing\\Render\\Amount *\/ ?>\n\n&lt;span class=\"price-container &lt;?= $block->escapeHtmlAttr($block->getAdjustmentCssClasses()) ?>\"\n        &lt;?= $block->getSchema() ? ' itemprop=\"offers\" itemscope itemtype=\"http:\/\/schema.org\/Offer\"' : '' ?>>\n    &lt;?php if ($block->getDisplayLabel()) :?>\n        &lt;span class=\"price-label\">&lt;?= $block->escapeHtml($block->getDisplayLabel()) ?>&lt;\/span>\n    &lt;?php endif; ?>\n    &lt;?php if ($block->hasAdjustmentsHtml()) :?>\n        &lt;?= $block->getAdjustmentsHtml() ?>\n    &lt;?php endif; ?>\n    &lt;span &lt;?php if ($block->getPriceId()) :?> id=\"&lt;?= $block->escapeHtmlAttr($block->getPriceId()) ?>\"&lt;?php endif;?>\n        &lt;?= ($block->getPriceDisplayLabel()) ? 'data-label=\"' . $block->escapeHtmlAttr($block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes()) . '\"' : '' ?>\n        data-price-amount=\"&lt;?= $block->escapeHtmlAttr($block->getDisplayValue()) ?>\"\n        data-price-type=\"&lt;?= $block->escapeHtmlAttr($block->getPriceType()) ?>\"\n        class=\"price-wrapper &lt;?= $block->escapeHtmlAttr($block->getPriceWrapperCss()) ?>\"\n    >&lt;?= $block->escapeHtml($block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()), ['span']) ?>&lt;\/span>\n    &lt;?php if ($block->getSchema()) :?>\n        &lt;meta itemprop=\"price\" content=\"&lt;?= $block->escapeHtmlAttr($block->getDisplayValue()) ?>\" \/>\n        &lt;meta itemprop=\"priceCurrency\" content=\"&lt;?= $block->escapeHtmlAttr($block->getDisplayCurrencyCode()) ?>\" \/>\n    &lt;?php endif; ?>\n    \n&lt;\/span><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check these images with changed sequences of the prices:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Case 1:<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/06\/Screenshot-at-June-23rd-2020-3.44.18-pm.png\" alt=\"Screenshot-at-June-23rd-2020-3.44.18-pm\" class=\"wp-image-9427\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Case2:<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/06\/Screenshot-at-June-23rd-2020-3.33.30-pm.png\" alt=\"Screenshot-at-June-23rd-2020-3.33.30-pm\" class=\"wp-image-9426\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Also, I\u2019d be grateful if you could share the solution with fellow Magento developers via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 offers three options to display prices on the frontend: including taxes, excluding taxes, and both the prices. You can highlight the product price&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1084","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1084"}],"version-history":[{"count":3,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1084\/revisions"}],"predecessor-version":[{"id":14817,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1084\/revisions\/14817"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}