HikaShop Invoice PDF plugin

  • Posts: 132
  • Thank you received: 2
8 years 8 months ago #231119

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.10
-- Error-message(debug-mod must be tuned on) -- : PHP Notice: Undefined property: stdClass::$information in /plugins/hikashop/attachinvoice/attachinvoice/invoice.php on line 333,

Hi, there seem to be a slight issue with the plugin, the invoice.php seem to be calling for some "information" that isn't there, depending on Payment method, if I chose a order paid with QuickPay / Paypal I get the error, but If I chose a order with Bank transfer the error isn't there.

Also, before I could see the invoice directly in the backend via a modal, now it opens a blank modal and downloads the PDF, I don't know if that is controlled by the "Override on the backend" setting in the plugin params?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 8 months ago #231136

Hi,

1. Add the line:
if(!empty($payment->payment_params->information))
before the line:
echo $payment->payment_params->information;
in the file /plugins/hikashop/attachinvoice/attachinvoice/invoice.php and that will remove that notice.

2. That's indeed that setting which controls that. Turn it off and you'll get the popup with the invoice again.

The following user(s) said Thank You: earmaster

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
8 years 8 months ago #231227

Thanks a lot, that fixed it :)

Please Log in or Create an account to join the conversation.

  • Posts: 132
  • Thank you received: 2
8 years 8 months ago #231239

Another thing I noticed was this line, it seems to generate a double Invoice title, like so:

InvoiceInvoice NumberC1S4W45

And it seems to be generated here:

$number = ' n° ';
if(JText::_('INVOICE_NUMBER') != 'INVOICE_NUMBER'){
	$number = JText::_('INVOICE_NUMBER');
}
By removing the
$number = JText::_('INVOICE_NUMBER');
line the invoice title looks like this:

Invoice n° C1S4W45

As it's suppose to I assume?

Last edit: 8 years 8 months ago by earmaster.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
8 years 8 months ago #231243

Hi,

You should use that code instead:

	$number = JText::_('INVOICE').' n° ';
	if(JText::_('INVOICE_NUMBER') != 'INVOICE_NUMBER'){
		$number = JText::_('INVOICE_NUMBER');
	}
?>
	<div class="invoicetitle"><?php echo $number.$order->order_invoice_number; ?></div>

There was indeed an issue, thank you for this report.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum