Unirgy GiftCert Email Variables

Since Magento is developed by a company in the US and thus many english-speaking Magento developers exist, I thought I should write the Magento articles in English. No matter how I will write in future, this article is definitely in English and is about Unirgy GiftCert, a Magento extension adding gift certificate functionalities to Magento. I just installed and configured it in a shop of one of my clients and it was really a mess to set up the e-mail templates. So I thought I could help you with this 🙂

The e-mails that have been sent directly after installation were empty, so I decided to create my own e-mail templates containing the certificate numbers and a little custom text. The big question was, which e-mail variables are available in that mail. So I looked at the code of Unirgy/Giftcert/Helper/Data.php#sendEmail($data) and found out that the following variables are available in the e-mail template(s):

{{var amount}} // prints the amount of the GC
{{var sender_name}} // prints the whole senders name
{{var sender_firstname}} // prints the senders firstname
{{var recipient_name}} // prints the name of the recipient
{{var custom_message}} // prints the custom message entered by the user
{{var expire_on}} // prints the expiration date
{{var certificate_numbers}} // prints the code and the PIN of the GC
{{var website_name}} // prints the websites name
{{var group_name}} // prints the stores name
{{var store_name}} // prints the storeviews name

I tested the variables above in the e-mail templates and they work on Magento 1.4.1.1 and Unirgy Giftcert 0.9.18. I guess they will suffice to configure your own template, but if you need more data, you could also have a look at the following variables.

{{var order.*}} // replace the * with e.g. customer_email
{{var item.*}} // replace the * with e.g. ???
{{var product.*}} // replace the * with e.g. ???
{{var gc.*}} // replace the * with e.g. ???

I do not know the possible replacements in the listing above exactly, so please feel free to tell me in the comments 🙂 You can find more about the Magento transactional e-mail variables in Magento Wiki.

Ein Gedanke zu „Unirgy GiftCert Email Variables“

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert