VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: GSC on December 04, 2015, 17:22:05 PM

Title: Calculation Rule name value translations
Post by: GSC on December 04, 2015, 17:22:05 PM
I have a multilingual site and would like to have translations for the 'Calculation Rule name' value for all languages (eg: VAT 21%, BTW 21%, MWst 21%).

I tried this by adding constants to the ini files but this does not seem the way to go ?

Thanks in advance for any suggestions!
Title: Re: Calculation Rule name value translations
Post by: GJC Web Design on December 04, 2015, 22:54:52 PM
displayed where?
Title: Re: Calculation Rule name value translations
Post by: GSC on December 07, 2015, 11:56:05 AM
In the cart I now see 'Tax 21%' (which is the name I gave to the tax rule) for each language.

I would like this to be specific to the language selected.
Title: Re: Calculation Rule name value translations
Post by: GJC Web Design on December 07, 2015, 12:17:23 PM
you need prob to do something in an over ride for components\com_virtuemart\views\cart\tmpl\default_pricelist.php


<?php if (VmConfig::get ('show_tax')) {
      $tax = vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT');
      if(!empty($this->cart->cartData['VatTax'])){
         if(count($this->cart->cartData['VatTax']) < 2) {
            reset($this->cart->cartData['VatTax']);
            $taxd = current($this->cart->cartData['VatTax']);
            $tax = shopFunctionsF::getTaxNameWithValue($taxd['calc_name'],$taxd['calc_value']);
         }
      }
      ?>

replace with a vmText

maybe

$tax = vmText::_ ('COM_VIRTUEMART_CART_SUBTOTAL_TAX_AMOUNT').' '.$taxd['calc_value'];
Title: Re: Calculation Rule name value translations
Post by: GSC on December 07, 2015, 16:14:48 PM
Thanks for taking the time to respond, going to check this out!