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

#   Problem when the customer cancels out of PayPal...

##

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 5 days ago [\#71662](#71662) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  *[Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#71662 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")* was created by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")*

During testing of my Hikashop site, I have created an order and elected to pay by PayPal.
When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.

However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed.
(In the detail, the status of the order is 'cancelled', but this is not present in the emails).

However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.

Many thanks.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 5 days ago [\#71812](#71812) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#71812 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")*

Hi,

The order created email is sent when the customer go to the payment method.
You can disable this email in HikaShop &gt; System &gt; Emails, by this way the order created email will no more be sent.
To disable the email you must have a commercial version of Hikashop.

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

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 4 days ago -  14 years 4 days ago [\#71829](#71829) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#71829 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")*

Hi Xavier,

Thanks for your reply.
Yes I do have the Essential commercial version.

However if I delete the email address from 'Order creation notifications email address' the customer still gets an email, but as administrator I don't anymore. This is the wrong way around.
I want to stop all automatic emails going to the customer, but I still need all automatic emails sent to me so that I know an order has been placed or was attempted to be placed.

Many thanks.

**Addition:**
Doing some more research I noticed that Nicolas answered this over a year ago, by suggesting adding

$data-&gt;customer-&gt;user_email = '';

to the top of the order creation email, and this seems to work for me.
However is the order status available? As what I would like to perform:

if order status = cancelled then $data-&gt;customer-&gt;user_email = '';

Perhaps you could give me the correct php please, as I am a not totally sure.

Many thanks.

Last edit: 14 years 4 days ago by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile"). Reason: More information.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

14 years 4 days ago [\#71896](#71896) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Re: Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#71896 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")*

Can you try that: Code:

if($data-&gt;order_status == 'cancelled'){ $data-&gt;customer-&gt;user_email = ''; }

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

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 4 days ago [\#71901](#71901) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#71901 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")*

Many thanks. I will give that a try.

Kind regards.

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

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

Less More

- Posts: 74
- Thank you received: 1
-
-

14 years 2 days ago [\#72265](#72265) by [Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")  Replied by *[Southcoaster](/forum/user/8042-southcoaster "View Southcoaster's Profile")* on topic *[Re: Problem when the customer cancels out of PayPal...](/forum/4-how-to/71662-problem-when-the-customer-cancels-out-of-paypal#72265 "During testing of my Hikashop site, I have created an order and elected to pay by PayPal. When I am directed to the live PayPal site, I simulate a customer changing his mind by immediately clicking on the 'cancel &amp; return' link, and I am directed back to my site's 'submit order' page.  However an email is sent to the customer (and one to the administrator) as though an order has been completed/placed. (In the detail, the status of the order is 'cancelled', but this is not present in the emails).  However I don't believe these emails should be sent anyway, as the customer has not completed/placed an order, and will be confused/panicked that they then receive an email thanking them for their order.  Many thanks.")*

Hi Xavier,

No that didn't work, perhaps order_status is not available.
However on reflection I think the single line of $data-&gt;customer-&gt;user_email = ''; is sufficient.

Many thanks.

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

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

[](#top)
