News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Unable to locate translate words on order page

Started by glasya, February 16, 2012, 12:12:53 PM

Previous topic - Next topic

glasya

For some time now i am trying to find the location of a few words displayed on the order page.
I searched for these in both the frontend and backend language files, and i end up finding none.

The page calls two foreach loops, and that's where i lose track on it.

File:

Quoteadministrator/components/com_virtuemart/views/orders/tmpl/order.php


JPluginHelper::importPlugin('vmshipment');
$_dispatcher = JDispatcher::getInstance();
$returnValues = $_dispatcher->trigger('plgVmOnShowOrderBEShipment',array(  $this->orderID,$this->virtuemart_shipmentmethod_id));
foreach ($returnValues as $returnValue)
{
    if ($returnValue !== null)
    {
        echo $returnValue;
    }
}



glasya

#1
I managed to find the code that calls the build of the segment, found in:

Quoteplugins/vmshipment/weight_countries/weight_countries.php

$html = '<table class="adminlist">' . "\n";
$html .= $this->getHtmlHeaderBE();
$html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_SHIPPING_NAME', $shipinfo->shipment_name);
$html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_WEIGHT', $shipinfo->order_weight . ' ' . ShopFunctions::renderWeightUnit($shipinfo->shipment_weight_unit));
$html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_COST', $currency->priceDisplay($shipinfo->shipment_cost, '', false));
$html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_PACKAGE_FEE', $currency->priceDisplay($shipinfo->shipment_package_fee, '', false));
$html .= $this->getHtmlRowBE('WEIGHT_COUNTRIES_TAX', $taxDisplay);
$html .= '</table>' . "\n";


This in its turn calls the function getHtmlRowBE found in:
Quoteadministrator/components/com_virtuemart/plugins/vmpsplugin.php

protected function getHtmlRow($key, $value, $class='') {
$lang =& JFactory::getLanguage();
$key_text = '';
$complete_key = strtoupper($this->_type . '_' . $key);
// vmdebug('getHtmlRow',$key,$complete_key);
//if ($lang->hasKey($complete_key)) {
$key_text = JText::_($complete_key);
//}
$more_key = $complete_key . '_' . $value;
if ($lang->hasKey($more_key)) {
$value .=" (" . JText::_($more_key) . ")";
}
$html = "<tr>\n<td " . $class . ">" . $key_text . "</td>\n <td align='left'>" . $value . "</td>\n</tr>\n";
return $html;
}

protected function getHtmlRowBE($key, $value) {
return $this->getHtmlRow($key, $value, "class='key'");
}


I think the problem can be found there, when i do a print_r on the $lang variable it does load all the nl-NL translations but somehow they are not displayed.

maxispin

Check:  /admin/language/

all virtuemart files
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9