These are the steps i took (on Drupal 5.2):
1) followed the install (and patch instructions one of the testing servers),
2) removed the two & signs that gave php errors in the salemail.module,
3) enabled the salemail module,
4) created a default admin notification mail of the correct type.
5) used the cod module for payment.
but still do not get a admin mail. Any suggestions of how to debug this situation?
Btw i do not see a combobox for the notification mail under /?q=admin/ecsettings/store (Email Notificatons).
The normal mail to the customer gets sent without problems.
I noticed that the patch to the cart won't send a mail if the price is $0,- or less (as it has a return statement in that case just before the new code).
Comments
Comment #1
wvd_vegt commentedIf you replace the code that has to be inserted to
//This bit of code taken from EC4 to allow mails to be sent on order submission
foreach (module_implements('checkoutapi') as $module) {
$function = "{$module}_checkoutapi";
function_exists($function) && $function($txn, 'post_process');
}
//End code insertion
It works properly. Somehow the salemail does not appear in the $txn->review_screens of the original code:
foreach ($txn->review_screens as $module) {
..
}
Also inserting it before the block (in cart.module)
// If the transaction is done, tell them and send them home
if ($txn->gross <= 0) {
store_send_invoice_email($txn->txnid);
drupal_set_message(t('Your order has been submitted.'));
return '';
}
the admin will always receive a notification, even when free items are ordered.
Forgot to mention above is for the ecommerce-5.x-3.x branch of eCommerce.
Comment #2
wvd_vegt commentedHi,
Got the solution for the last issue, the missing mailid.
Solution is to add an installation file called 'salemail.install' containing the following code:
This code might throw some warnings about array_merge() which i think are caused by a harmless bug in e-Commerce:ec_mail.module (it does not check if the thing it excepts is an array indeed).
Comment #3
smoothstr@drupal.org commentedThanks again Wim. I thought I'd included an install file when I originally uploaded, but yes, the install file IS missing and it's crucial otherwise you won't have the mail visible.
Probably to do with me actually having developed this on Drupal 4.7.
(For others looking at SaleMail - yes, it does work on 4.7. Currently use the 5.3 download.
Will be fixed over the weekend.
Comment #4
smoothstr@drupal.org commentedRegarding no mail on $0.
Yes, I guess it does make sense to mail if a product is free. Will check and change if it's not guarding against something else.
Comment #5
acdtrp commentedI still get just an empty message when a sale is made even that I have created a text of that mail type and did everything as told above. I have created and uploaded the salemail.install file but I don't think it gets executed - I don't see the "SALEMAIL module installed successfully." but only the "The configuration options have been saved." Any ideas?
Comment #6
Phillip Mc commentedI had the same problems as others, which is a pity..this could be a very useful module.
I wasn't able to work out why it wasn't working, but, I did find a patch for store.module and cart.module (for eCommerce 5.x-3.x here:
http://drupal.org/node/193086
That patch sends an admin email on each sale automatically. It also allows you to switch single order notices on/off in the store settings page, which is useful.
hope that's of use for others.
Comment #7
mdowsett commentedadding this salemail.install file didn't help me.
I didn't get the confirumation message that this module was installed successfully nor is there a 'Sale Notification' mail in the ec_mail lists either.
Comment #8
mdowsett commentedI managed to get the ecommerce patch working...I'd go that route if you need this feature over using salemail