2

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

  • you can use printf('%06d', $id); to add leading zeroes – Robin Aug 19 '16 at 14:45
  • @Anja It's not possible to add PHP code inside the mail template ... – Alex Aug 19 '16 at 19:49
0

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);)

| improve this answer | |
  • I cannot understand , on that link can you explain me, How can i get it so? – Crock Aug 20 '16 at 4:13
  • Is any possible to assign a new variable for email template. i need this for only one email . 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. – Crock Aug 20 '16 at 5:56
  • as anyone knows, how can i get it? please help me. – Crock Aug 22 '16 at 5:26
  • It is described pretty well in the link I provided - how far did you come? – Alex Aug 22 '16 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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