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

#   Payment Notification Email

##

- **[smeako](/forum/user/6292-smeako "View smeako's Profile")**
- [![smeako's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/ball.gif)](/forum/user/6292-smeako "View smeako's Profile") Topic Author
- [ Offline](/forum/user/6292-smeako)

Less More

- Posts: 12
- Thank you received: 0
-
-

14 years 2 months ago [\#64983](#64983) by [smeako](/forum/user/6292-smeako "View smeako's Profile")  *[Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#64983 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")* was created by *[smeako](/forum/user/6292-smeako "View smeako's Profile")*

Hi Guys,

I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.

Site address is [ www.diggerscc.com.au](http://www.diggerscc.com.au) if that helps.

How do I achieve this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY0OTgzLXBheW1lbnQtbm90aWZpY2F0aW9uLWVtYWlsP3RtcGw9bWFya2Rvd24=) 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: 86555
- Thank you received: 14304
-
-

14 years 2 months ago -  14 years 2 months ago [\#65163](#65163) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65163 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Hi,

You will have to edit the order creation notification email via the menu System-&gt;Emails and add that code at the end of the HTML version: Code:

&lt;?php $email = ''; foreach($data-&gt;products as $product){ if(!empty($product-&gt;email)){ $email = $product-&gt;email; break; } } if(!empty($email) &amp;&amp; $data-&gt;order_payment_method=='banktransfer') $data-&gt;customer-&gt;user_email = $email; ?&gt;

Last edit: 14 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

- **[smeako](/forum/user/6292-smeako "View smeako's Profile")**
- [![smeako's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/ball.gif)](/forum/user/6292-smeako "View smeako's Profile") Topic Author
- [ Offline](/forum/user/6292-smeako)

Less More

- Posts: 12
- Thank you received: 0
-
-

14 years 2 months ago [\#65380](#65380) by [smeako](/forum/user/6292-smeako "View smeako's Profile")  Replied by *[smeako](/forum/user/6292-smeako "View smeako's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65380 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Hi Nicolas,

Thank you for your quick response. I have found the HTML Version code to modify and placed the code at the end. I'm not sure whether I have put it in the correct place or not though or whether I need to modify it in any way. This is what the bottom of the HTML version file now looks like.

&lt;td height="10"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;?php
$email = '';
foreach($data-&gt;products as $product){
if(!empty($product-&gt;email)){
$email = $product-&gt;email;
break;
}
}
if(!empty($email) &amp;&amp; $data-&gt;order_payment_method=='banktransfer') $data-&gt;customer-&gt;user_email = $email;
?&gt;

Have I placed the code in the corret place?

Thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY0OTgzLXBheW1lbnQtbm90aWZpY2F0aW9uLWVtYWlsP3RtcGw9bWFya2Rvd24=) 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: 86555
- Thank you received: 14304
-
-

14 years 1 month ago [\#65602](#65602) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65602 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Yes, that's correct.

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

- **[smeako](/forum/user/6292-smeako "View smeako's Profile")**
- [![smeako's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/ball.gif)](/forum/user/6292-smeako "View smeako's Profile") Topic Author
- [ Offline](/forum/user/6292-smeako)

Less More

- Posts: 12
- Thank you received: 0
-
-

14 years 1 month ago [\#65671](#65671) by [smeako](/forum/user/6292-smeako "View smeako's Profile")  Replied by *[smeako](/forum/user/6292-smeako "View smeako's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65671 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Thanks nicolas,

It looks like it is now trying to send the email but now getting this message.

"You must provide at least one recipient email address."

Any ideas on that one.

Cheers

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY0OTgzLXBheW1lbnQtbm90aWZpY2F0aW9uLWVtYWlsP3RtcGw9bWFya2Rvd24=) 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: 86555
- Thank you received: 14304
-
-

14 years 1 month ago [\#65882](#65882) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65882 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Mmm. I'm not sure.

Maybe you should try with another variable name in order to avoid overwriting another variable with the same name :

&lt;?php
$sendingEmail = '';
foreach($data-&gt;products as $product){
if(!empty($product-&gt;email)){
$sendingEmail = $product-&gt;email;
break;
}
}
if(!empty($sendingEmail) &amp;&amp; $data-&gt;order_payment_method=='banktransfer') $data-&gt;customer-&gt;user_email = $sendingEmail;
?&gt;

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

- **[smeako](/forum/user/6292-smeako "View smeako's Profile")**
- [![smeako's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/ball.gif)](/forum/user/6292-smeako "View smeako's Profile") Topic Author
- [ Offline](/forum/user/6292-smeako)

Less More

- Posts: 12
- Thank you received: 0
-
-

14 years 1 month ago [\#65972](#65972) by [smeako](/forum/user/6292-smeako "View smeako's Profile")  Replied by *[smeako](/forum/user/6292-smeako "View smeako's Profile")* on topic *[Re: Payment Notification Email](/forum/2-general-talk-about-hikashop/64983-payment-notification-email#65972 "Hi Guys,  I have a Hikashop set up for my cricket club with no registration requirement to purchase products. I do have a custom field for email in all products which is mandatory and would like to send the purchaser a confirmation email to the address entered in this field if they have selected bank transfer as a payment method.  Site address is   www.diggerscc.com.au  if that helps.  How do I achieve this?")*

Hi nicolas,

I now have this code at the bottom of the html version file

&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;?php
$sendingEmail = '';
foreach($data-&gt;products as $product){
if(!empty($product-&gt;email)){
$sendingEmail = $product-&gt;email;
break;
}
}
if(!empty($sendingEmail) &amp;&amp; $data-&gt;order_payment_method=='banktransfer') $data-&gt;customer-&gt;user_email = $sendingEmail;
?&gt;

I no longer get the error message but still don't get an email. I get the attached screen after checkout which is correct but no email.

I have now set up a new custom field with the type "item" and column name "sendingemail" and published that. I have also attached a list of my custom fields.

If I unpublish my original email field - type "item" and column name "email" the error returns so I now have 2 email fields showing in the product screen.

Sorry to hassle but just can't work out why this email won't send. I have also tried changing the text in the html version to lower case as the feild column name defaults to lower case when you create it.

Thanks

- [ ![Checkout&#95;screen.jpg](/forum/attachment/5811) ](/forum/attachment/5811 "...out&#95;screen.jpg") [ ](/forum/attachment/5811?download=1 "...out&#95;screen.jpg")
- [ ![Custom&#95;Fields.jpg](/forum/attachment/5812) ](/forum/attachment/5812 "Custom&#95;Fields.jpg") [ ](/forum/attachment/5812?download=1 "Custom&#95;Fields.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzY0OTgzLXBheW1lbnQtbm90aWZpY2F0aW9uLWVtYWlsP3RtcGw9bWFya2Rvd24=) 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.063 seconds

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