There may come a time when you want to get a frontend template from an admin function – possibly some form of shared observer function – normally you wouldn’t be able to grab the file because Magento will instinctively look inside it’s own area (adminhtml)…
If you want to update a table using DDL – for example you want to add a column – you can do so simply by using the following snippet in your upgrade scripts.
You have the ability in Magento to create tables in your own sql installer scripts using DDL (database definition language). DDL acts as a syntax to convert common database methods into the appropriate database language used on your server. Rather than writing separate queries for…
If ever you cannot get into your Magento administration panel but need to clear the cache – simply perform the following.
If you want to remove a css/js file from your head using XML you can do so with the following snippet.
You can load an order by increment id using the snippet below. You can then loop through the items to use further in your code.
If you want to retrieve the selected product options from an order you can do so with the following code (where $item is your order item).