Skip to content

Instantly share code, notes, and snippets.

@tiagones
Created September 29, 2015 17:55
Show Gist options
  • Save tiagones/e2f3f822515e2fe0d23d to your computer and use it in GitHub Desktop.
Save tiagones/e2f3f822515e2fe0d23d to your computer and use it in GitHub Desktop.
Magento - Transaction Email Variables
Para a inscrição:
1. {{var customer}} irá imprimir todas as informações do cliente
2. {{var customer.ID}}
3. {{var customer.email}}
4. {{var customer.firstname}}
5. {{var customer.lastname}}
6. {{var customer.name}}
7. {{var customer.password}}
8. {{var customer.created_in}}
9. {{var customer.dob}} Date of Birth
10. {{var customer.password_hash}}
11. {{var customer.prefix}}
12. {{var customer.middlename}} Initial
13. {{var customer.suffix}}
14. {{var customer.group_id}}
15. {{var customer.taxvat}}
16. {{var customer.store.name}} What store they registered with (On Demo store this will display as ‘English’
17. {{var customer.store.group.name}} The actual Store’s name (not the Store View’s)
===========================
Para se inscrever / desinscrever newsletter:
1. {{var subscriber.getConfirmationLink()}}
2. {{var subscriber.getUnsubscriptionLink()}}
3. {{var subscriber.email}}
===========================
Send to a friend
1. {{var product_image}}
2. {{var name}} Recipient’s Name
3. {{var email}} Recipient’s Email
4. {{var product_name}}
5. {{var product_url}} Product Url
6. {{var message}} Message Text
7. {{var sender_name}} Sender’s Name
8. {{var sender_email}} Sender’s Email
9. {{var product_image}} Product Image
===========================
Block
1. {{block type=’core/template’ area=’frontend’ template=’email/order/shipment/track.phtml’ shipment=$shipment order=$order}}
===========================
Depend Condition
1. {{depend order.getIsNotVirtual()}}
2. {{depend salable}}
===========================
If Condition
1. {{if order.getStoreId() == 2}}
2. {{else}}
3. {{/if}}
(else is optional) (O resto é opcional)
===========================
Layout
Layout “handles” contain small code blocks for reuse.
Handles are stored in a different location than regular templates.
This location is found in the layout configuration file for the specific module you are working on.
For example, the “sales_email_order_invoice_items” handle would be found in the sales.xml configuration file found in:
/app/design/frontend/default/layout/sales.xml
De lá podemos encontrar onde o modelo está sendo puxado, e como ele está sendo construído.
(In this case: Neste caso:)
/app/design/frontend/default/{your_theme}/template/email/order/items.phtml
(is the parent template with the default template being used:) é o pai de modelo com o modelo padrão a ser utilizado:
/app/design/frontend/default/{your_theme}/template/email/order/items/order/default.phtml
1. {{layout area=”frontend” handle=”sales_email_order_invoice_items” invoice=$invoice order=$order}}
2. {{layout handle=”sales_email_order_items” order=$order}}
3. {{layout handle=”sales_email_order_creditmemo_items” creditmemo=$creditmemo order=$order}}
4. {{layout handle=”sales_email_order_shipment_items” shipment=$shipment order=$order}}
===========================
Skin
1. {{skin url=”‘}}
===========================
Store
1. {{store url=”"}}
===========================
Other
1. {{var addAllLink}}
2. {{var alertGrid}}
3. {{var billingAddress.format(‘html’)}}
4. {{var checkoutType}}
5. {{var comment}}
6. {{var creditmemo.id}}
7. {{var creditmemo.increment_id}}
8. {{var data.comment}}
9. {{var data.email}}
10. {{var data.name}}
11. {{var data.telephone}}
12. {{var dateAndTime}}
13. {{var invoice.id}}
14. {{var invoice.increment_id}}
15. {{var items}}
16. {{var items_html}}
17. {{var message}}
18. {{var name}}
19. {{var order.customer_email}}
20. {{var order.getBillingAddress().format(‘html’)}}
21. {{var order.getBillingAddress().getName()}}
22. {{var order.getCreatedAtFormated(‘long’)}}
23. {{var order.getCustomerName()}}
24. {{var order.getCustomerFirstName()}}
25. {{var order.getCustomerLastName()}}
26. {{var order.getEmailCustomerNote()}} Currently unknwon how to test this variable for being set/empty
27. {{var order.getEmailCustomerNote()}} Atualmente unknwon como testar esta variável por ser set / vazio
28. {{var order.getShippingAddress().format(‘html’)}}
29. {{var order.getShippingDescription()}}
30. {{var order.getStatusLabel()}}
31. {{var order.getStoreGroupName()}}
32. {{var order.id}}
33. {{var order.increment_id}}
34. {{var password}}
35. {{var payment_html}}
36. {{var paymentMethod}}
37. {{var product_name}}
38. {{var product_url}}
39. {{var reason}} Reason for payment failure
40. {{var reason}} Motivo da falta de pagamento
41. {{var shipment.increment_id}}
42. {{var shippingAddress.format(‘html’)}}
43. {{var shippingMethod}}
44. {{var total}}
45. {{var user.name}}
46. {{var viewOnSiteLink}}
47. {{var warnings}}
48. {{var billing.name}} Uses the fullname from billing information (to prevent e-mail being sent to ‘Dear Guest, etc’.
49. {{var billing.name}} Usa o nome completo de informações de faturamento (para evitar e-mail a ser enviado para ‘Caro cliente, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment