Magento Themes and Magento Extensions

Extending Order object and hooking on event in Magento

Share
Posted on May 19th, 2011 | Posted by admin

One of my previous articles was a Magento Event Hooks. This one will be a practical example on using the event hooks. Although the more proper way would be to call them Observers, bare with me. I’m use to this “hooks”.

Here’s the walk-trough on how to add a new property (attribute) to an object (Mage_Sales_Model_Order object in our case).

To add an attribute to object, we need (the dirty way) 2 little steps

  • Go to app/code/core/Mage folder. If you drill down into most of the folders and go to /Model subfolder there you will see /Entity subfolder under /Model for most of the stuff (modules) under /Mage. For our example we go to app/code/core/Mage/Sales/Model/Entity/Setup.php file. This Setup.php file holds Objects fields definitions in database. We need to add new fields to public function getDefaultEntities(). Once again, this is the “quick” and “dirty” way of adding new attributes.

Magento + .Net Framework, simple order preview app

Share
Posted on May 17th, 2011 | Posted by admin

For those of you who are into kinky stuff  I made a simple, more of a proof of concept, application that sits in Widnows taskbar and shows the order info in balloon popup. Took me little more than half of hour to get this working. Almost forgot how great C# is

Magento has this great feature, rss feed for orders. You can access it via link http://myshopsite/rss/order/new. It requires authentication, so you need to provide Magento user and pass to access this link. Idea I wanted to play around was how to get this info in my windows app. It’s really, really simple. Below is the screenshot of this little app for you to see what I’m talking about.

Add Adwords tracking code to order confirmation page in Magento

Share
Posted on May 12th, 2011 | Posted by admin

Adding an Adwords tracking code to order confirmation page in Magento is relatively easy task. One that can be handled under an hour or so if you choose to implement it the proper way. Here is how.

Modify the “app/design/frontend/default/my_custom_theme/layout/checkout.xml” file. Look for section

Magento + .Net Framework, simple order preview app

Share
Posted on May 8th, 2011 | Posted by admin

Magento + .Net Framework, simple order preview app

For those of you who are into kinky stuff  I made a simple, more of a proof of concept, application that sits in Widnows taskbar and shows the order info in balloon popup. Took me little more than half of hour to get this working. Almost forgot how great C# is  Magento has this great feature, rss feed for orders. You can access it via link http://myshopsite/rss/order/new. It requires authentication, so you need to provide Magento user and pass to access this link. Idea I wanted to play around was how to get this info in my windows app. It’s really, really simple. Below is the screenshot of this little app for you to see what I’m talking about.

Delete test orders in Magento

Share
Posted on May 6th, 2011 | Posted by admin

You got a Magento project to develop, you created a Magento theme, you placed initial products and categories and you also placed some test orders to see if Shipping and Payment methods work as expected. Everything seems to be cool and the client wishes to launch the site. You launch it. When you enter the administration for the first time after the launch, you will see all your test orders there. You know those should be deleted. But how?

If you try to delete orders in the backend, you will find out that you can only set the status to “cancelled” and the order is still there.  Unfortunately, Magento doesn’t enable us to delete those via administration, so you will not see any “Delete order” button. This can be quite frustrating both to developers and the merchants. People coming from an SAP world find the inability to delete to have some merit but there should be a status that removes the sales count from the reports i.e. sales, inventory, etc.

Page 3 of 3«123