So I suppose that you've made a view override of the invoice view file to force the prices to not display with tax
Where is this view file exactly (I am talking about the default hikashop invoices) ? I can't find it to check it
a similar change will have to be added to the invoice.php file of the plugin at its beginning like that:
$this->config->set('price_with_tax', 1);
How do I insert this line of code exactly?
I am editing this file: /plugins/hikashop/attachinvoice/attachinvoice/invoice.php
I tried surround it with php tags and inserting it right after
<?php
/**
* @copyright Copyright (C) 2009-2015 Adrien Baborier - All rights reserved.
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
?>
but I get this error upon generating any invoice
0 Call to a member function set() on null
I tried to insert it without php tags but the generated invoices just show the line of code and nothing else
Thank you
UPDATE:
Ok, I solved by editing the following lines
202
if($config->get('price_with_tax')){
//echo $currencyHelper->format($product->order_product_price+$product->order_product_tax,$order->order_currency_id);
echo $currencyHelper->format($product->order_product_price,$order->order_currency_id
215
if($config->get('price_with_tax')){
//echo $currencyHelper->format($product->order_product_total_price,$order->order_currency_id);
echo $currencyHelper->format($product->order_product_total_price_no_vat,$order->order_currency_id);
234
if($config->get('price_with_tax')){
//echo $currencyHelper->format($order->order_subtotal,$order->order_currency_id);
echo $currencyHelper->format($order->order_subtotal_no_vat,$order->order_currency_id);
it does the job, but if there's a more elegant solution please advice