-- url of the page with the problem -- : /index.php/my-acount/order/show
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5.17
-- PHP version -- : 5.5.3
-- Browser(s) name and version -- : Chrome 33
-- Error-message(debug-mod must be tuned on) -- :
Notice: Undefined property: stdClass::$name in /var/www/explorationgeochemsite/components/com_hikashop/views/order/tmpl/show.php on line 389
Notice: Undefined variable: config in /var/www/explorationgeochemsite/components/com_hikashop/views/order/tmpl/show.php on line 404
Hi,
I am using additional cost via a plugin using the onAfterCartProductsLoad callback. Here is a sample of the code:
function onAfterCartProductsLoad(&$cart) {
$handlingfees = new stdClass();
$handlingfees->name = 'Handling fees';
$handlingfees->value = '';
$handlingfees->price_currency_id = hikashop_getCurrency();
$handlingfees->price_value = 25.95;
$handlingfees->price_value_with_tax = 25.95;
$cart->additional['handlingfees'] = $handlingfees;
}
The handling fees are taken into account and processed in the total order amount. BUT they are not shown in the order. If I look at the file components/com_hikashop/views/order/tmpl/show.php I see 2 issues:
line 389 is currently
if(in_array($additional->name, $exclude_additionnal)) continue;
But, shouldn't $additional->name be $additional->
order_product_name instead ?
Also, line 404 is
if($config->get('price_with_tax')){
but $config has not been defined here thus causing a problem.
Can you please let me know what to do ?
Thanks for your help
-Tom