I was trying to customize the Order Confirmation and copied the customer.itpl.php file in uc_order/invoices folder and renamed it. The problem is that when I change the template in Conditional Actions I always get "Unable to send e-mail"-error. Even if I choose the template that already is chosen (by default) and save changes. When i reset the action, e-mails are again moving normally.
It also seems that if I change the code in template, the e-mail that is sent doesn't change. The shop is localized and the phares in the template are getting translated (there's a translations-folder in uc_order/templates/) - could that somehow conflict with the action? Or is it something else?
Comments
Comment #1
cha0s CreditAttribution: cha0s commentedDunno, I can change the template here and the mail sends out fine. What would I have to set up to localize my sandbox as you have? Maybe that'll help to reproduce.
Comment #2
cha0s CreditAttribution: cha0s commentedComment #3
shiroitatsu CreditAttribution: shiroitatsu commentedThere's a lot's of stuff on board, I don't know what information would be valuable to you? It's drupal 6.9, now with 6.x-2.0-rc2 localized in Finnish.
What I found interesting is that I don't really have to change anything, but if I save the "changes" in CA, it stops sending the mails and gives the error. And when i null the "changes" it works again. So what does change when you save the changes even if there are no changes?
Comment #4
Island Usurper CreditAttribution: Island Usurper commentedWhat changes is there is now a row in the ca_predicates table that is used instead of the definition in the module code. If there aren't any changes, they should work the same.
Maybe you can post what values are being saved in that table, and we can see how it's different from what it should be.
Comment #5
shiroitatsu CreditAttribution: shiroitatsu commentedOk. This is what i get in uc_checkout_customer_notification in ca_predicates after "change" for Actions:
a:1:{i:0;a:4:{s:5:"#name";s:22:"uc_order_email_invoice";s:6:"#title";s:30:"Send an e-mail to the customer";s:13:"#argument_map";a:1:{s:5:"order";s:5:"order";}s:9:"#settings";a:5:{s:4:"from";s:49:""nettikauppa" <name@domain.fi>";s:9:"addresses";s:13:"[order-email]";s:7:"subject";s:27:"Tilauksesi [store-name]:ssa";s:8:"template";s:8:"customer";s:4:"view";s:13:"checkout-mail";}}}
and when i make changes to Actions tab it becomes:
a:1:{i:0;a:4:{s:5:"#name";s:22:"uc_order_email_invoice";s:6:"#title";s:30:"Send an e-mail to the customer";s:13:"#argument_map";a:1:{s:5:"order";s:5:"order";}s:9:"#settings";a:5:{s:4:"from";s:49:""nettikauppa" <name@domain.fi>";s:9:"addresses";s:20:"<p>[order-email]</p>";s:7:"subject";s:27:"Tilauksesi [store-name]:ssa";s:8:"template";s:8:"customer";s:4:"view";s:5:"print";}}}
I wonder where it gets the p-tags from (around [order-email] - no wonder it doesn't send the mail)?
Comment #6
Island Usurper CreditAttribution: Island Usurper commentedNo, that looks right. It's basically the same as what I have.
For conditions I have
N;
, and the status is1
. Unless you've added conditions, those should be the same. I'm not sure how saving the actions form would affect the status, but that could cause it not to work.Comment #7
shiroitatsu CreditAttribution: shiroitatsu commentedConditions and status are like you have.
Do you have the
<p>-tags
around the order-email? Because that causes the e-mail to be send to address<p>name@domain.fi</p>
and it would seem to me the most logical place for the mailer to fail.Comment #8
Island Usurper CreditAttribution: Island Usurper commentedYeah, that would be it. I just noticed that this issue is for version beta5. I would suggest upgrading to rc3, because it shouldn't cause that to happen any more.