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

#   Add attachment to admin e-mail from custom field

##

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

Less More

- Posts: 18
- Thank you received: 2
-
-

11 years 6 months ago [\#200766](#200766) by [mj](/forum/user/8198-mj "View mj's Profile")  *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#200766 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")* was created by *[mj](/forum/user/8198-mj "View mj's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29

I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the "order" table, with the column name "uploadacopyofpo".

Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.

Thanks!

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

11 years 6 months ago [\#200776](#200776) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#200776 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")*

Hi,

You would have to edit the email via the menu System&gt;Emails and add custom code for that.
Here is a thread with some indications:
[ www.hikashop.com/forum/2-general-talk-ab...fication.html#141160](http://www.hikashop.com/forum/2-general-talk-about-hikashop/865314-adding-attachment-to-email-notification.html#141160)

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

11 years 5 months ago [\#203498](#203498) by [seoleo](/forum/user/36301-seoleo "View seoleo's Profile")  Replied by *[seoleo](/forum/user/36301-seoleo "View seoleo's Profile")* on topic *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#203498 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")*

Hello Nicolas,

I guess this case is a bit different. Here [ www.hikashop.com/forum/2-general-talk-ab...fication.html#141160](http://www.hikashop.com/forum/2-general-talk-about-hikashop/865314-adding-attachment-to-email-notification.html#141160) somebody wants to add a attachment depending on the product.

mj just wants to have the file from the custom field added, when the user uploaded something.
I also have this problem and the hints in the post you adressed are a bit unspecific.

Can you please provide a bit more information? How is it possible to add the custom field attachment to an e-mail?

Thanks!

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86359
- Thank you received: 14296
-
-

11 years 5 months ago [\#203503](#203503) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#203503 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")*

HI,

The other thread solution indeed needs to be adapted.

I suppose that you would want to write something like this in your emails that you can edit via the menu System&gt;Emails:
&lt;?php $this-&gt;mailer-&gt;AddAttachment($path_to_the_file); ?&gt;

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

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

Less More

- Posts: 8
- Thank you received: 0
-
-

11 years 5 months ago [\#203533](#203533) by [seoleo](/forum/user/36301-seoleo "View seoleo's Profile")  Replied by *[seoleo](/forum/user/36301-seoleo "View seoleo's Profile")* on topic *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#203533 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")*

But &lt;?php $this-&gt;mailer-&gt;AddAttachment($path_to_the_file); ?&gt; will be the same file in all cases right?
In my case it should be the file, which the user uploaded during the checkout. I have a custom field with type "attachment". But it makes no sense, if I won't get the file in the confirmation mail.

Thanks in advance!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3Njc4MS1hZGQtYXR0YWNobWVudC10by1hZG1pbi1lLW1haWwtZnJvbS1jdXN0b20tZmllbGQ/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: 26395
- Thank you received: 4077
-
- [](http://obsi.dev)
-

11 years 5 months ago [\#203544](#203544) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Add attachment to admin e-mail from custom field](/forum/27-checkout/876781-add-attachment-to-admin-e-mail-from-custom-field#203544 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.29  I have a custom field which allows customers to upload a file during the checkout process. I'd like to add the file that they uploaded as an attachment to the email that notifies the admin of a new order. In this case, the custom field is in the &quot;order&quot; table, with the column name &quot;uploadacopyofpo&quot;.  Is there any direction that you can provide for adding this? I know that there's already a link included in the e-mail that allows the admin to login and access the download, but I would like to have it as an attachment.  Thanks!")*

Hi,

So you will have to put the right file path in the variable $path_to_the_file ; by reading the file uploaded by the customer during the checkout for example.
It will require some PHP development, but it's something possible.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3Njc4MS1hZGQtYXR0YWNobWVudC10by1hZG1pbi1lLW1haWwtZnJvbS1jdXN0b20tZmllbGQ/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?

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

Time to create page: 0.064 seconds

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