I'm using visual studio 2010 service reference to consume magento soap v2 api web service.
php 5.3.8, magento 1.6 install on windows 7 iis 7.5
I can log in and list all the product, but as soon as i put a filter there is an exception
Call to a member function getBackend() on a non-object
php error log:
PHP Fatal error: Call to a member function getBackend() on a non-object in C:\inetpub\wwwroot\Magento1620\app\code\core\Mage\Eav\Model\Entity\Abstract.php on line 816
static void TestMagentoSoapV2Wcf()
{
MagentoService magentoService = new MagentoService();
MageSvcRef.associativeEntity assoEntity = new MageSvcRef.associativeEntity();
assoEntity.key = "like";
assoEntity.value = "n2610";
MageSvcRef.complexFilter complexFilter = new MageSvcRef.complexFilter();
complexFilter.key = "sku";
complexFilter.value = assoEntity;
MageSvcRef.complexFilter[] compFilters = new MageSvcRef.complexFilter[1];
compFilters[0] = complexFilter;
MageSvcRef.filters filters = new MageSvcRef.filters();
filters.complex_filter = compFilters;
string sessionId = magentoService.login("zzc000", "zzc000");
var products = magentoService.catalogProductList(sessionId, filters, string.Empty);
}
Please help
Thanks
It seems to be a Magento bug, but I'm not sure since I'm not a PHP developer, it may only reflect Magento and PHP install on windows
modify this file
line 57-62
to
I also notice that in different V2.php file, this piece of code is written differently. The customer API is the same as product, but the order API is written like this
anyone can point out the correct array usage in PHP?