Patching Magento

All your effort could come to nothing with faulty installation, and it is likely that you have it as some of the bugs related to the API are still not addressed, you may find that your api calls returns the empty results (resources list) or you can’t save your selection for “roles resources”. To fix it you need a patch, so far I needed to patch 2 magento core files, the fixes are from the magento community found on the magento forum.

magetno user role acl saving problem in admin
Magento API returning empty resources array

If you need to patch it, copy affected file from the core “codePool” into the same folder structure in local “codePool” and update/fix file.

For more clarity I supposed to add an example:) I will do it now, better later than never:)

As an example I will use patched file from second link:

copy this file from “core” code pool
magento\app\code\core\Mage\Api\Model\Session.php

to the “local” code pool
magento\app\code\local\Mage\Api\Model\

and then amend it as you wish:)

Posted in magento | Tagged , , , | 1 Comment

indeed magic methods

Magento and the PHP world that I am trying to learn is full of surprises, in my way to replicate (made it better:) ) the Dashboard (and more) functionality using magenots API I have found methods that I wasn’t able to locate source for, and this time I have searched everywhere. Continue reading

Posted in magento, php | Tagged , , | Comments Off on indeed magic methods

How to create Magento’s Custom API?

It is not in-depth tutorial but description on how I tackled creation of custom API for magento. There are still vast fields of unknown but at least this will let you start building your own API and let you learn, like me, on how to do it. If I will find out anything new about it or I will gain some theoretical knowledge then I will update this post with those revelations.
Continue reading

Posted in magento, php, xml-rpc | Tagged , , | 17 Comments

Where is Varien_Object?

While battling with the Custom API I tried to locate Varien_Object class, I couldn’t locate it nowhere within the “app” folder, when I looked again at the magento’s root folder I have noticed “lib” folder, bingo, I have found it, also I have found other code used by magento i.e. the image uploader.

Posted in magento, xml-rpc | Tagged , | Comments Off on Where is Varien_Object?

Well earned holiday break

It’s been a busy time for me last couple of months, but today my well earned holiday will start (COB 🙂 ) If I will have a time today I will post a tutorial on adding custom API if not than after the break.

cheers:)

Posted in Uncategorized | Tagged | Comments Off on Well earned holiday break