I would like to display the user store credit in an order confirmation email. I think that I have to add the right @var code in the template in "app/locale/en_US/template/email/sales/order_new.html".

At the top of the template file I have this vars:

{"store url=\"\"":"Store Url",
"var logo_url":"Email Logo Image Url",
"var logo_alt":"Email Logo Image Alt",
"htmlescape var=$order.getCustomerName()":"Customer Name",
"var store.getFrontendName()":"Store Name",
"store url=\"customer/account/\"":"Customer Account Url",
"var order.increment_id":"Order Id",
"var order.getCreatedAtFormated('long')":"Order Created At (datetime)",
"var order.getBillingAddress().format('html')":"Billing Address",
"var payment_html":"Payment Details",
"var order.getShippingAddress().format('html')":"Shipping Address",
"var order.getShippingDescription()":"Shipping Description",
"layout handle=\"sales_email_order_items\" order=$order":"Order Items Grid",
"var order.getEmailCustomerNote()":"Email Order Note"}

I see that these methods are defined in "app/code/core/Mage/Sales/Model/Order.php", but I don't see any "getCustomerStoreCredit" or similar method.

So my first question is, is it possible to display the user store credit on the order confirmation?

Second, how can one add a user store credit to a template?

1 Answer 1


You have to add the params somehow here \Mage_Sales_Model_Order::queueNewOrderEmail

to be more exact:

    'order'        => $this,
    'billing'      => $this->getBillingAddress(),
    'payment_html' => $paymentBlockHtml

So whatever model gives you access to the customer store credit, needs to be passed there in.

Unfortunately, there is still no event you can hook into, so you have to rewrite the class :-(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.