web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

magento web service filter product list error Call to a member function getBackend() on a non-object

Zhongchen Zhou Profile Picture Zhongchen Zhou 681

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

the solution is to modify this file, change line 57-62

\app\code\core\Mage\Catalog\Model\Product\Api\V2.php

from

foreach ($filters->complex_filter as $_filter) {            	
                $_value = $_filter->value;
                $preparedFilters[$_filter->key] = array(
                    $_value->key => $_value->value
                );
            }

to

foreach ($filters->complex_filter as $_field => $_filter) {
            	$preparedFilters[$_field] = array(
            			$_filter->key => $_filter->value
            	);
            }


Filed under: eCommerce Tagged: Magento

This was originally posted here.

Comments

*This post is locked for comments