Jump to content

Translate unit price


samverdyck

Recommended Posts

Working on a shop where we have a lot of different unit price values. 

The shop is bilingual, but it seems that the unit price value can't be translated? 

For example the "st" (Dutch) value should be "pc" in the French version. 

 

Possible to edit this? 

 

 

post-1050945-0-25167200-1498046150_thumb.png

Link to comment
Share on other sites

  • 4 years later...

hey we solved the problem with the translation in the Shop Theme Catalog Unit Price
 

before doing this u have to do this workaround

Go into ure File :
\themes\YourTheme\templates\catalog\_partials\product-prices.tpl

At line 61 you have to change the Code

From:

        {block name='product_unit_price'}
          {if $displayUnitPrice}
            <p class="product-unit-price sub">{l s='(%unit_price%)' d='Shop.Theme.Catalog' sprintf=['%unit_price%' => $product.unit_price_full]}</p>
          {/if}
        {/block}
      </div>
    {/block}

    {block name='product_without_taxes'}
      {if $priceDisplay == 2}
        <p class="product-without-taxes">{l s='(%price%) tax excl. ' d='Shop.Theme.Catalog' sprintf=['%price%' => $product.price_tax_exc]}</p>
      {/if}
    {/block}

To:

        {block name='product_unit_price'}
          {if $displayUnitPrice}
            <p class="product-unit-price sub">{l s='%unit_price% per piece' d='Shop.Theme.Catalog' sprintf=['%unit_price%' => $product.unit_price_full]}</p>
          {/if}
        {/block}
      </div>
    {/block}

    {block name='product_without_taxes'}
      {if $priceDisplay == 2}
        <p class="product-without-taxes">{l s='%price% per piece tax excl. ' d='Shop.Theme.Catalog' sprintf=['%price%' => $product.price_tax_exc]}</p>
      {/if}
    {/block}

and save it, after doing this u have to go into ure backoffice

Go to ure Article and it into the price where u write down the metrics kg or piece u have to fill /

 

See on Screenshot.

After this go to Translation into ure Themetranslation and search in catalog for the unit-price there u can change the Translation for the word per piece.

See other Screenshot

 

But Attention

This Workaround only works for SHops that only has one Metrics, if u have different metrics like one product with "ml" one with "l" and other with "per pieces" this workaround doesn´t helps

unit-price.png

unit-price2.png

unit-price3.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...