Posted on

I want to translate “Buy” and “save” word in tier_price.phtml file. magento 2

I want to translate “Buy” and “Save” word in tier_price.phtml file.I have added the word in translation csv file but it is not working form me.

Refer screenshot

PATH :

vendor/magento/module-configurable-product/view/base/templates/product/price/tier_price.phtml

<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

?>
<script type=”text/x-magento-template” id=”tier-prices-template”>
<ul class=”prices-tier items”>
<% _.each(tierPrices, function(item, key) { %>
<% var priceStr = ‘<span class=”price-container price-tier_price”>’
‘<span data-price-amount=”‘ + priceUtils.formatPrice(item.price, currencyFormat) + ‘”‘
‘ data-price-type=””‘ + ‘ class=”price-wrapper “>’
‘<span class=”price”>’ + priceUtils.formatPrice(item.price, currencyFormat) + ‘</span>’
‘</span>’
‘</span>’; %>
<li class=”item”>
<%= $t(‘Buy %1 for %2 each and’).replace(‘%1’, item.qty).replace(‘%2’, priceStr) %>
<strong class=”benefit”>
<%= $t(‘save’) %><span class=”percent tier-<%= key %>”>&nbsp;<%= item.percentage %></span>%
</strong>
</li>
<% }); %>
</ul>
</script>
<div data-role=”tier-price-block”></div>

Leave a Reply

Your email address will not be published.