[Skip to main content](#vessel-content)

#   Stop invoices attaching to vendor emails

##

- **[vividfish](/forum/user/18346-vividfish "View vividfish's Profile")**
- [![vividfish's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/18346-vividfish "View vividfish's Profile") Topic Author
- [ Offline](/forum/user/18346-vividfish)

Less More

- Posts: 46
- Thank you received: 1
-
-

11 years 6 months ago [\#201624](#201624) by [vividfish](/forum/user/18346-vividfish "View vividfish's Profile")  *[Stop invoices attaching to vendor emails](/forum/23-market-how-to/876946-stop-invoices-attaching-to-vendor-emails#201624 "-- 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")* was created by *[vividfish](/forum/user/18346-vividfish "View vividfish's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc2OTQ2LXN0b3AtaW52b2ljZXMtYXR0YWNoaW5nLXRvLXZlbmRvci1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#201628](#201628) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Stop invoices attaching to vendor emails](/forum/23-market-how-to/876946-stop-invoices-attaching-to-vendor-emails#201628 "-- 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")*

Hi,

You can edit the plugin attachinvoice (plugins/hikashop/attachinvoice/attachinvoice.php) and replace Code:

if(empty($data-&gt;mail_name) &#124;&#124; empty($data-&gt;data-&gt;order_status) &#124;&#124; !in_array($data-&gt;mail_name,array('order_status_notification','order_creation_notification')) &#124;&#124; !in_array($data-&gt;data-&gt;order_status,$confirmed)) return;

By Code:

if(empty($data-&gt;mail_name) &#124;&#124; empty($data-&gt;data-&gt;order_status) &#124;&#124; !in_array($data-&gt;mail_name,array('order_status_notification','order_creation_notification')) &#124;&#124; !in_array($data-&gt;data-&gt;order_status,$confirmed)) return; if(!empty($data-&gt;data-&gt;order_type) &amp;&amp; $data-&gt;data-&gt;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 &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [vividfish](/forum/user/18346-vividfish "View vividfish's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc2OTQ2LXN0b3AtaW52b2ljZXMtYXR0YWNoaW5nLXRvLXZlbmRvci1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[vividfish](/forum/user/18346-vividfish "View vividfish's Profile")**
- [![vividfish's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/18346-vividfish "View vividfish's Profile") Topic Author
- [ Offline](/forum/user/18346-vividfish)

Less More

- Posts: 46
- Thank you received: 1
-
-

11 years 6 months ago [\#201648](#201648) by [vividfish](/forum/user/18346-vividfish "View vividfish's Profile")  Replied by *[vividfish](/forum/user/18346-vividfish "View vividfish's Profile")* on topic *[Stop invoices attaching to vendor emails](/forum/23-market-how-to/876946-stop-invoices-attaching-to-vendor-emails#201648 "-- 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")*

Thanks Jerome,

That's fantastic, works perfectly.

Best regards

KH

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc2OTQ2LXN0b3AtaW52b2ljZXMtYXR0YWNoaW5nLXRvLXZlbmRvci1lbWFpbHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.056 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
