Feb 7, 2011 ·
2 minute read
magento
It’s fairly common that you need to add in some custom data to a Magento object. The most common scenario is products and its totally handled via the admin side. However if you need to extend something like the order object to store custom order information then things get a little bit more tricky, but it’s fairly easy still. If you are extending an order, you also need to make sure that you extend in the “flat table” way as opposed to the standard EAV way otherwise things won’t work as you expect.
Read On →
Feb 7, 2011 ·
1 minute read
magento
Adding an order status history comment to a Magento order object is easy, when you know how! There is a very helpful Mage_Sales_Model_Order::addStatusHistoryComment() method which will take a comment and optional order status and either just save the comment or save the comment and update the order status. However I found that it didn’t quite work for me. Reading the docblock on the Mage_Sales_Model_Order::addStatusHistory() method, it turns out that it won’t take effect unless the order object itself is saved.
Read On →
Feb 3, 2011 ·
1 minute read
magento
If you are finding that Magento seems to be silently failing to include your files without triggering any kind of error (this tends to happen mostly with layouts or installer scripts) then you might find this useful. For me, my installer script wasn’t working and it turned out to be a tiny typo in my config.xml file that meant that Magento was looking in the wrong place for the file and failing silently when it didn’t find it: The code in question is here: Mage_Core_Model_Resource_Setup protected function _modifyResourceDb($actionType, $fromVersion, $toVersion) { $resModel = (string)$this->_connectionConfig->model; $modName = (string)$this->_moduleConfig[0]->getName(); $sqlFilesDir = Mage::getModuleDir('sql', $modName).DS.$this->_resourceName; if (!is_dir($sqlFilesDir) || !is_readable($sqlFilesDir)) { die($sqlFilesDir); //it was failing silently here, not really helpful to me return false; } There are a few of these kinds of code snippets around the codebase.
Read On →
Jan 20, 2011 ·
1 minute read
php
This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub Looking for PHP Jobs in the Leeds area? You have come to the right place. Edmonds Commerce are actively recruiting PHP developers in the Leeds area. We have more work on than we can handle and that’s only likely to grow even more.
Read On →
Jan 15, 2011 ·
3 minute read
mysql
This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub MySQL has a nice feature that you may well not have used called Triggers. These are little SQL statements that are tied to events on table and then perform some extra work.
Read On →
Jan 12, 2011 ·
2 minute read
ubuntu
This is post is now quite old and the the information it contains may be out of date or innacurate. If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub We are starting to get more and more international clients primarily from America and Australasia. It’s great to be getting a more global market, though keeping track of client’s local time is sometimes confusing.
Read On →