Skip to main content

Stop invoices attaching to vendor emails

11 years 6 months ago #201624 by vividfish
-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28

Hi

We're using the attach invoice plugin along with Hikamarket. However we don't want to attach invoices to any of the vendor emails, is there a way of stopping this?

Thanks in advance

KH

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

11 years 6 months ago #201628 by Jerome
Hi,

You can edit the plugin attachinvoice (plugins/hikashop/attachinvoice/attachinvoice.php) and replace
Code:
if(empty($data->mail_name) || empty($data->data->order_status) || !in_array($data->mail_name,array('order_status_notification','order_creation_notification')) || !in_array($data->data->order_status,$confirmed)) return;
By
Code:
if(empty($data->mail_name) || empty($data->data->order_status) || !in_array($data->mail_name,array('order_status_notification','order_creation_notification')) || !in_array($data->data->order_status,$confirmed)) return; if(!empty($data->data->order_type) && $data->data->order_type != 'sale') return;
So it will only attach the PDF invoice to customer "sale" and not to the vendor "subsale".

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: vividfish

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

11 years 6 months ago #201648 by vividfish
Thanks Jerome,

That's fantastic, works perfectly.

Best regards

KH

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

Moderators: Obsidev
Time to create page: 0.065 seconds
Powered by Kunena Forum