Written by Jon Webb on July 24th, 2009, Posted in New Projects, News |
ecommerce, magento
Well done to Devour Design for getting www.bagkandi.co.uk up and running. It’s a great looking Magento store with heaps of customisation – with a little help from me.
Written by Jon Webb on July 17th, 2009, Posted in Development Ramblings |
magento, magento extension
Well – it has to be said that I thoroughly enjoy Magento development, but today I came across an issue I’d never seen before.
This problem is down to extending Magento to observe certain events in the administration interface, call it hooking into events or whatever – but your essentially observing events which are triggered within Magento – these events then call your code and you can then manipulate Magento to your hearts content.
The problem I experienced was very simple. I just couldn’t work out why my code was not being triggered by an event. I knew that the event existed, and that my code was sound, and that my module config was correct. However in my method signature I had explicitly set the data type I was expecting, and the data type that Varien (the company who develops Magento) had documented – so my method signature should have been the following
public function emailSupplierFromInvoicePayment(Varian_Object $ob)
{
die("event-trace");
}
When I’d actually set it to:
public function emailSupplierFromInvoicePayment(Varian_Event_Observer $ob)
{
die("event-trace");
}
So much for explicit declaration.