In function store_send_invoice_email($txnid, $preview = null) is loaded transaction:

$t = store_transaction_load($txnid);

and later it is called function to send invoice to user

return ec_mail_send_mid($mid, $to, ECMAIL_TYPE_CUSTOMER_INVOICE, $t);

Unfortunately $t variable doesn't contain transaction informations, so no store tokens are replaced with correct value.

CommentFileSizeAuthor
#4 store_14.patch1002 bytesanantagati

Comments

anantagati’s picture

Version: 4.7.x-3.0 » 4.7.x-3.x-dev

It is also present in dev version.

spidersilk’s picture

Could this be responsible for the issue reported here: http://drupal.org/node/112862 ?

Because i'm having that same problem on a site I'm working on, and the client is not going to sign off on it until this is fixed... No one will pay for an order if they can't see what they've ordrered!

anantagati’s picture

I found problem in functions:

function store_send_invoice_email($txnid, $preview = null) { ... }

function store_send_error_email($txnid, $preview = null) { ... }

In that functions is called function ec_mail_send_mid() with bad parameters.

If you will change line

return ec_mail_send_mid($mid, $to, ECMAIL_TYPE_CUSTOMER_INVOICE, $t);

to

return ec_mail_send_mid($mid, $to, $t);

problem will be solved.

anantagati’s picture

Assigned: Unassigned » anantagati
Status: Active » Needs review
StatusFileSize
new1002 bytes
dougdagaz’s picture

We installed the patch and it fixed the problem in the invoice email! Thank you.
However, we see the same problem in the Shipping notification email as well:
(and suspect it will show up in the other emails.)
Hello [txn-billing-name],

We have shipped the following item(s) from Order #[txn-id], received
[txn-order-date].

Items(s) Shipped:
[items]
[txn-ship-to]
Questions about your order? ........

Any advise on patching the shipping and other default emails?

Thank you so much for the fix on the invoice email.
Doug

anantagati’s picture

Assigned: anantagati » Unassigned
Status: Needs review » Reviewed & tested by the community
abramo’s picture

token [items] is not valid any more.
replace this token with [txn-items] in any email messages you still have token [items].
no patches are necessary.

for a list of available valid tokens, install module tokens.
then, when you edit email messages in e-commerce, click link "See available tokens" and pick and use the ones you need.

hope this helps.

anantagati’s picture

Without patch simply no tokens from store were replaced with correct values. All tokens became empty.

abramo’s picture

works for me.

anantagati’s picture

With latest versions 4.7.x-3.x and 4.7.x-3.x-dev (2007-Mar-20) for download from http://drupal.org/project/ecommerce it is not working without patch.

spidersilk’s picture

I'm trying to install the patch, but none of the code it says to look for seems to be there. I searched for the string:$mid = variable_get(MAILVAR_CUSTOMER_INVOICE, 0); in store.module (and store.inc just fpr good measure) and it doesn't appear to be there. Not even "$mid" or "MAILVAR_CUSTOMER_INVOICE" on their own seem to be there. Likewise when I try searching for the line referred to in comment #3:return ec_mail_send_mid($mid, $to, ECMAIL_TYPE_CUSTOMER_INVOICE, $t);it's not there.

Am I looking in the wrong files, or is the patch for another version of the store (I'm using 4.7, but I'm not sure how to tell which version of 4.7 it is)?

anantagati’s picture

If you will download Ecommerce 4.7.x-3.0 from http://drupal.org/project/ecommerce. You can find
return ec_mail_send_mid($mid, $to, ECMAIL_TYPE_CUSTOMER_INVOICE, $t);

gordon’s picture

Status: Reviewed & tested by the community » Fixed

Fixed and committed to both v4 and v3. With be available from the next release v3.1

Anonymous’s picture

Status: Fixed » Closed (fixed)