News:

Looking for documentation? Take a look on our wiki

Main Menu

Calculation Rule name value translations

Started by GSC, December 04, 2015, 17:22:05 PM

Previous topic - Next topic

GSC

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!

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GSC

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.

GJC Web Design

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'];
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

GSC

Thanks for taking the time to respond, going to check this out!