84585
21-01-09, 14:15
Hi i am currently developing a shop using the shop window API,
i am having trouble refining by multiply objects.
According to information read this can be done by simply placing each refined object in an array and passing this to the query method. Please see:
// Refine by price (1)
$oRefineBy = new stdClass();
$oRefineBy->iId = 1;
$oRefineBy->sName = 'Price';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition->sId = $priceID;
$oRefineByDefinition->sName = '';
$oRefineBy->oRefineByDefinition = $oRefineByDefinition;
// Refine by Category (4)
$oRefineBy2 = new stdClass();
$oRefineBy2->iId = 4;
$oRefineBy2->sName = 'Category';
$oRefineByDefinition2 = new stdClass();
$oRefineByDefinition2->sId = $categoryID;
$oRefineByDefinition2->sName = $categoryName;
$oRefineBy2->oRefineByDefinition = $oRefineByDefinition2;
$oProductDisplayListParams -> oActiveRefineByGroup = array( $oRefineBy, $oRefineBy2 );
$aParams = array("iLimit" => 10, "bExpandAllBranches" => true, "bAdult" => false, "oActiveRefineByGroup" => $oProductDisplayListParams);
# API Call Examples #
$oResponse= $oClient->call('getProductList', $aParams);
Any ideas on what i am missin gor doing wrong?
i am having trouble refining by multiply objects.
According to information read this can be done by simply placing each refined object in an array and passing this to the query method. Please see:
// Refine by price (1)
$oRefineBy = new stdClass();
$oRefineBy->iId = 1;
$oRefineBy->sName = 'Price';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition->sId = $priceID;
$oRefineByDefinition->sName = '';
$oRefineBy->oRefineByDefinition = $oRefineByDefinition;
// Refine by Category (4)
$oRefineBy2 = new stdClass();
$oRefineBy2->iId = 4;
$oRefineBy2->sName = 'Category';
$oRefineByDefinition2 = new stdClass();
$oRefineByDefinition2->sId = $categoryID;
$oRefineByDefinition2->sName = $categoryName;
$oRefineBy2->oRefineByDefinition = $oRefineByDefinition2;
$oProductDisplayListParams -> oActiveRefineByGroup = array( $oRefineBy, $oRefineBy2 );
$aParams = array("iLimit" => 10, "bExpandAllBranches" => true, "bAdult" => false, "oActiveRefineByGroup" => $oProductDisplayListParams);
# API Call Examples #
$oResponse= $oClient->call('getProductList', $aParams);
Any ideas on what i am missin gor doing wrong?