- Posts: 151
- Thank you received: 9
no confirmation e-mail with 100% coupon
13 years 11 months ago - 13 years 11 months ago #70820
by Maurice
no confirmation e-mail with 100% coupon was created by Maurice
Hi,
As a reward for buying a product I give away a free product. Normally this costs 39 Euro and via AwoCoupon they get a 100% discount coupon.
When they checkout, after entering the coupon code, price goes to zero and the order status goes to confirmed at once.
However the confirmation e-mail is not sent. I also cannot open the e-mail for viewing/editing when I try to change the order status in the back end back to created an then again back to confirmed. The HTML-email, in the pop-up window stays white.
Any idea what the problem is?
Maurice
As a reward for buying a product I give away a free product. Normally this costs 39 Euro and via AwoCoupon they get a 100% discount coupon.
When they checkout, after entering the coupon code, price goes to zero and the order status goes to confirmed at once.
However the confirmation e-mail is not sent. I also cannot open the e-mail for viewing/editing when I try to change the order status in the back end back to created an then again back to confirmed. The HTML-email, in the pop-up window stays white.
Any idea what the problem is?
Maurice
Last edit: 13 years 11 months ago by Maurice.
Please Log in or Create an account to join the conversation.
13 years 11 months ago #70895
by nicolas
Replied by nicolas on topic Re: no confirmation e-mail with 100% coupon
Hi,
That sounds like you have an error in the confirmation email generation.
Did you change anything in it ?
If you turn on the "error reporting" and debug mode options of the joomla configuration and try again, do you get some errors ?
That sounds like you have an error in the confirmation email generation.
Did you change anything in it ?
If you turn on the "error reporting" and debug mode options of the joomla configuration and try again, do you get some errors ?
Please Log in or Create an account to join the conversation.
13 years 10 months ago - 13 years 10 months ago #72813
by Maurice
Replied by Maurice on topic Re: no confirmation e-mail with 100% coupon
Hi Nicolas,
I found that the not opening of the HTML e-mail in the pop-up window was a web browser related issue. It only happens with Firefox. When I use Chrome, the HTML mail is visible.
An error in the e-mail template would also affect e-mails that ARE sent. But this is not the case and it looks the email template is okay.
Still, confirmation emails are NOT sent when a customer uses a 100% discount coupon. When he/she enters the coupon in the checkout page, price goes to zero (as expected) and therefore the payment options disappear.
The first e-mail is sent to the customer (that the order had been received).
The second email is NOT sent (that tells them that the order has been paid).
If a user uses a less than 100% coupon and still has to pay at least something, both emails are sent out correct.
So I must open EVERY order that has been ordered with a 100% coupon code, manually set the status from "confirmed" back to "received" without sending a notification. And then change the status again back to "confirmed", and notifying the customer.
Please help.
Kind regards,
Maurice
I found that the not opening of the HTML e-mail in the pop-up window was a web browser related issue. It only happens with Firefox. When I use Chrome, the HTML mail is visible.
An error in the e-mail template would also affect e-mails that ARE sent. But this is not the case and it looks the email template is okay.
Still, confirmation emails are NOT sent when a customer uses a 100% discount coupon. When he/she enters the coupon in the checkout page, price goes to zero (as expected) and therefore the payment options disappear.
The first e-mail is sent to the customer (that the order had been received).
The second email is NOT sent (that tells them that the order has been paid).
If a user uses a less than 100% coupon and still has to pay at least something, both emails are sent out correct.
So I must open EVERY order that has been ordered with a 100% coupon code, manually set the status from "confirmed" back to "received" without sending a notification. And then change the status again back to "confirmed", and notifying the customer.
Please help.
Kind regards,
Maurice
Last edit: 13 years 10 months ago by Maurice.
Please Log in or Create an account to join the conversation.
13 years 10 months ago #73147
by nicolas
Replied by nicolas on topic Re: no confirmation e-mail with 100% coupon
Hi,
So for the popup not opening for one browser, it might be a javascript error on your pages because of a conflict with another plugin on your website.
For the confirmation email that's actually normal.
When the order is free, the validate free order plugin will change the status of the order during its creation. There won't be a status change triggered. So only the order creation email is sent, not the order status notification email.
If you want to change the code:
to:
in the file plugins/hikashop/validate_free_order/validate_free_order.php
So for the popup not opening for one browser, it might be a javascript error on your pages because of a conflict with another plugin on your website.
For the confirmation email that's actually normal.
When the order is free, the validate free order plugin will change the status of the order during its creation. There won't be a status change triggered. So only the order creation email is sent, not the order status notification email.
If you want to change the code:
Code:
function onBeforeOrderCreate(&$order,&$send_email){
if(empty($order) || !isset($order->order_full_price))
return;
if(bccomp($order->order_full_price,0,5)==0){
$order->order_status = 'confirmed';
}
}
Code:
function onAfterOrderCreate(&$order){
if(empty($order) || !isset($order->order_full_price))
return;
if(bccomp($order->order_full_price,0,5)==0){
$orderObj = new stdClass();
$orderObj->order_status = 'confirmed';
$orderObj->history->history_notified = 1;
$orderObj->order_id = $order->order_id;
$orderClass = hikashop_get('class.order');
$orderClass->save($orderObj);
}
}
in the file plugins/hikashop/validate_free_order/validate_free_order.php
Please Log in or Create an account to join the conversation.
13 years 10 months ago #73151
by Maurice
Replied by Maurice on topic Re: no confirmation e-mail with 100% coupon
Hi Nicolas,
Thank you. I changed the onAfterOrderCreate funtion to this code and indeed the confirmation e-mail is now sent. This is good!
I am only missing the HikaSerial code that belongs to the product.
Kind regards,
Maurice
Thank you. I changed the onAfterOrderCreate funtion to this code and indeed the confirmation e-mail is now sent. This is good!
I am only missing the HikaSerial code that belongs to the product.
Kind regards,
Maurice
Please Log in or Create an account to join the conversation.
13 years 10 months ago #73414
by nicolas
Replied by nicolas on topic Re: no confirmation e-mail with 100% coupon
Can you try with that plugin ?
Please Log in or Create an account to join the conversation.
Time to create page: 0.177 seconds