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

#   adding attachment to email notification

##

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

Less More

- Posts: 19
- Thank you received: 1
-
-

12 years 9 months ago [\#141129](#141129) by [ilan.power](/forum/user/12208-ilan-power "View ilan.power's Profile")  *[adding attachment to email notification](/forum/2-general-talk-about-hikashop/865314-adding-attachment-to-email-notification#141129 "--HikaSerial -- : 1.8 -- HikaShop version -- : 2.2.3 -- Joomla version -- : 2.5.11 Hello, is there a way to add an attachment to the email &quot;order status confirmation&quot; when an order is confirmed, but the attached file would change according to the product ordered. for example if a user ordered product A, he would receive a user manual or installation instruction for product A. but for product B he would receive the manual/install instruction for product B.")* was created by *[ilan.power](/forum/user/12208-ilan-power "View ilan.power's Profile")*

--HikaSerial -- : 1.8
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 2.5.11
Hello,
is there a way to add an attachment to the email "order status confirmation" when an order is confirmed, **but** the attached file would change according to the product ordered.
for example if a user ordered product A, he would receive a user manual or installation instruction for product A. but for product B he would receive the manual/install instruction for product B.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NTMxNC1hZGRpbmctYXR0YWNobWVudC10by1lbWFpbC1ub3RpZmljYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#141160](#141160) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[adding attachment to email notification](/forum/2-general-talk-about-hikashop/865314-adding-attachment-to-email-notification#141160 "--HikaSerial -- : 1.8 -- HikaShop version -- : 2.2.3 -- Joomla version -- : 2.5.11 Hello, is there a way to add an attachment to the email &quot;order status confirmation&quot; when an order is confirmed, but the attached file would change according to the product ordered. for example if a user ordered product A, he would receive a user manual or installation instruction for product A. but for product B he would receive the manual/install instruction for product B.")*

Hi,

By override in the emails (thanks to HikaShop business ; menu System &gt; Emails) you can add some PHP code and you can access to the $mail object.
The mail object can contains attachments though $mail-&gt;attachments.
You should also access to the $this-&gt;mailer object to add the attachments yourself.

To put your PHP code, the best is to use the "preload" email. You should find all required data (order, products, etc) in this file.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg2NTMxNC1hZGRpbmctYXR0YWNobWVudC10by1lbWFpbC1ub3RpZmljYXRpb24/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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?

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

Time to create page: 0.062 seconds

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