cancel
Showing results for 
Search instead for 
Did you mean: 

How can create the new variable for email template

How can create the new variable for email template

I need increase, Magento default {{var qty}} is like 1 or 10 or 100. now i want to increase the digits purchased qty 1 means = 000001 and same for 10= 000010 for 100 = 000100 need to add 0's in front on EMAIL TEMPLATE only. Need to increase the digits. please help ! thanks in advance

 

Is any possible to assign a new variable for email template. i need this for only one email template. not for all the email template. please guide me how can i create new custom variable to get the qty and which file have to add the custom code to get the all qty.

1 REPLY 1

Re: How can create the new variable for email template

I think there is no easy possibility for this. You could add an own email template directive to accomplish that as described here:

How can an extension add transactional email variables? (available in email templates)

The directive would simply contain Anja's code (printf('%06d', $qty);)

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions