Skip to main content

Stop invoices attaching to vendor emails

More
11 years 4 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.

More
11 years 4 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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: vividfish

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

More
11 years 4 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.201 seconds
Powered by Kunena Forum