shakespearesattic
posted this on June 18, 2011 14:48
Hi! Is there a list of email template variables anywhere? I am especially interested in the following:
... $orderid - This variable works in the subject line, but not in body of the email.
... Customer ID / Number
... Bill To / Ship To - Are the only variables available Ship To variables? It would be nice if I could confirm different Bill To information.
... Unit Price - The variable for $item.totalprice works, of course. I tried $item.price, which does not. Is there a variable for unit price?
... Subtotal - Since subtotal is already calculated on the order detail page, it would be nice to have it as a variable. Javascript is not my strong suit.
Thanks for your help!
Comments
I received this list of variables from Tomas. I am posting them here for the next person who needs them:
The following variables are available in the email subject:
$order.orderid
$order.storetitle
The following variables are available on the body:
$order.orderid
$order.orderdate
$order.buyeremail
$order.lastname
$order.address1
$order.address2
$order.zip
$order.country
$order.state
$order.city
$order.phone
$order.ordertotal
$order.taxes
$order.shippingfees
$order.shippingmethod
$order.buyershippingfees
$order.handlingfees
$order.buyernotes
$order.paymentmethod
$order.paymentid
$order.couponused
$order.couponamount
$order.couponcode
$order.storetitle
$order.shipped
$order.trackingnumber
$orderitems
.quantity
.totalprice
.productitle
.sku
This is a very handy list. I would however also like to know more about adding the unit price to the list. How can that become reality?
"... Unit Price - The variable for $item.totalprice works, of course. I tried $item.price, which does not. Is there a variable for unit price?"
Any reason why some of these just don't seem to work? $order.address1 for example. In my email template it simply renders $order.address1 instead of its value. Same thing wither some of the others. Some work and some don't.