Problem when the customer cancels out of PayPal...

  • Posts: 74
  • Thank you received: 1
12 years 3 weeks ago #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 & 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 or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 3 weeks ago #71812

Hi,

The order created email is sent when the customer go to the payment method.
You can disable this email in HikaShop > System > 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 or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 1
12 years 3 weeks ago #71829

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->customer->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->customer->user_email = '';

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

Many thanks.

Last edit: 12 years 3 weeks ago by Southcoaster. Reason: More information.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
12 years 3 weeks ago #71896

Can you try that:

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

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 1
12 years 3 weeks ago #71901

Many thanks. I will give that a try.

Kind regards.

Please Log in or Create an account to join the conversation.

  • Posts: 74
  • Thank you received: 1
12 years 3 weeks ago #72265

Hi Xavier,

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

Many thanks.

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum