Translation 'cost fee'

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

Translation 'cost fee'

Postby inkoop@.....nl » Wed May 30, 2018 12:45 pm

Behind the shipping and payment method on the OPC page, there is a description and an amount for the cost/fee. Some version before (don't know which extension) this 'cost fee' label was translated correctly. Now it is also translated (in Dutch), but I want to display another text. Some how I can't find the correct .ini file where the translation should be. It looks like it using a other variable now, because my old translation for this label still excist.

I don't know if this is the OPC extension what causes this, or another extension, but maybe you can help me out with this?
inkoop@.....nl
 
Posts: 35
Joined: Thu May 09, 2013 10:54 am

Re: Translation 'cost fee'

Postby loppan » Thu May 31, 2018 1:42 pm

Sounds like a regular Joomla language override, no?

Go to joomla admin / extensions / languages / over rides.

Do you see your own translation in there?
loppan
 
Posts: 25
Joined: Thu Oct 27, 2016 7:26 am

Re: Translation 'cost fee'

Postby inkoop@.....nl » Fri Jun 01, 2018 7:03 pm

Yes, it was no override, but in de standaard language folder, using variable COM_VIRTUEMART_PLUGIN_COST_DISPLAY.
I thought it was used for something else, because it translated both words 'discount / costs'. It seems to be that only one word of this variable is displayed.
inkoop@.....nl
 
Posts: 35
Joined: Thu May 09, 2013 10:54 am

Re: Translation 'cost fee'

Postby admin » Tue Jun 05, 2018 7:49 pm

hello, maybe you mean this part of VM core file that handles the discount/fee part of the payment/shipping methods:

Code: Select all
if ($pluginSalesPrice) {
         $costDisplay = $currency->priceDisplay( $pluginSalesPrice );
         $t = vmText::_( 'COM_VIRTUEMART_PLUGIN_COST_DISPLAY' );
         if(strpos($t,'/')!==FALSE){
            list($discount, $fee) = explode( '/', vmText::_( 'COM_VIRTUEMART_PLUGIN_COST_DISPLAY' ) );
            if($pluginSalesPrice>=0) {
               $costDisplay = '<span class="'.$this->_type.'_cost fee"> ('.$fee.' '.$costDisplay.")</span>";
            } else if($pluginSalesPrice<0) {
               $costDisplay = trim(strip_tags($costDisplay),'-');
               $costDisplay = '<span class="'.$this->_type.'_cost discount"> ('.$discount.' '.$costDisplay.")</span>";
            }
         } else {
            $costDisplay = '<span class="'.$this->_type.'_cost fee"> ('.$t.' '.$costDisplay.")</span>";
         }
      }



as defined in:
administrator\components\com_virtuemart\plugins\vmpsplugin.php

so per the definition above:
1. if the language string COM_VIRTUEMART_PLUGIN_COST_DISPLAY includes "/" first part will be used as discount text and second part as fee text
2. if there is no "/" it considers it to be just the costs/fee
3. you cannot really get rid of the parenthesis since it's within the VM core file

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x

cron