Making custom options available in quote in admin area (Magento 1)

Sometimes, when adding custom options to a quote in ther admin area, the custom options are not available. To avoid that problem, simply add the custom options to your modules config.xml, like this:

Getting the front name of a route programmatically (Magento 1)

Use the ollowing code to get a routes front name:

The code will return “config”, if you add the following XML to your modules config.xml:

Getting the full country name by country code (Magento 1)

See the following example on how to get the long country name by its short code:

Loading a mail template by its name (Magento 1)

Use the below code to load a Magento transaction mail template by its name:

Getting mail template content by name (Magento 1)

Use the following code to get a mail templates content by its name: