This Works:
Code: Select all
$filterData = array(
'product_id' => array('lteq' => 6000)
); Code: Select all
$filterData = array(
'product_id' => array('gteq' => 6001, 'to'=> 7000)
);Moderator: General Moderators
Code: Select all
$filterData = array(
'product_id' => array('lteq' => 6000)
); Code: Select all
$filterData = array(
'product_id' => array('gteq' => 6001, 'to'=> 7000)
);Greg,twinedev wrote:All those commands do is assign a value to the variable $filterData. You would need to post the code of where those values are used for us to help.
-Greg
Code: Select all
//load up local xml file for processing
$feed_xml = simplexml_load_file($superFile);
// Begin SOAP Requests
$client = new SoapClient($myDomain.'/api/?wsdl');
$session = $client->login($myAPILogin, $myAPIKey);
$updatedProducts = "";
//some counters - counting loops this way lets me see and set where the count increments
$x = 0;
//some filter date to pass to the API - add more to filter your results further - see Magento API docs
//$filterData = array('type'=>'simple');
/* This works...
$filterData = array(
'product_id' => array('lteq' => 6000)
);
*/
//This down doesn't.
$filterData = array(
'product_id' => array('gt' => 2001),
'product_id' => array('lteq' => 3000)
);
print_r($filterData);
/*
$filterData = array(
'product_id' => array(10001, 'to'=> 14000)
);
*/
//get all my database products into an array
$products = $client->call($session, 'catalog_product.list', array($filterData));
//loop through my product array
foreach ($products as $product) {...