/** * * 'Operation' => 'ItemSearch', // ItemSearch, ItemLookup, SimilarityLookup * @since 2.0.2 * @see http://docs.aws.amazon.com/AWSECommerceService/latest/DG/ItemSearch.html * @see http://docs.aws.amazon.com/AWSECommerceService/latest/DG/PowerSearchSyntax.html */ protected function getAPIParameterArray($sOperation = 'ItemSearch', $iItemPage = null) { $_bIsIndexAllOrBlended = 'All' === $this->oUnitOption->get('SearchIndex') || 'Blended' === $this->oUnitOption->get('SearchIndex'); $_sTitle = $this->trimDelimitedElements($this->oUnitOption->get('Title'), ',', false); $_aParams = array('Keywords' => $this->trimDelimitedElements($this->oUnitOption->get('Keywords'), ',', false), 'Power' => $this->oUnitOption->get('Power'), 'Title' => $_bIsIndexAllOrBlended ? null : ($_sTitle ? $_sTitle : null), 'Operation' => $this->oUnitOption->get('Operation'), 'SearchIndex' => $this->oUnitOption->get('SearchIndex'), $this->oUnitOption->get('search_by') => $this->oUnitOption->get('additional_attribute') ? $this->oUnitOption->get('additional_attribute') : null, 'Sort' => $_bIsIndexAllOrBlended ? null : $this->oUnitOption->get('Sort'), 'ResponseGroup' => "Large", 'BrowseNode' => !$_bIsIndexAllOrBlended && $this->oUnitOption->get('BrowseNode') ? $this->oUnitOption->get('BrowseNode') : null, 'Availability' => $this->oUnitOption->get('Availability') ? 'Available' : null, 'Condition' => $_bIsIndexAllOrBlended ? null : $this->oUnitOption->get('Condition'), 'IncludeReviewsSummary' => "True", 'MaximumPrice' => !$_bIsIndexAllOrBlended && $this->oUnitOption->get('MaximumPrice') ? $this->oUnitOption->get('MaximumPrice') : null, 'MinimumPrice' => !$_bIsIndexAllOrBlended && $this->oUnitOption->get('MinimumPrice') ? $this->oUnitOption->get('MinimumPrice') : null, 'MinPercentageOff' => $this->oUnitOption->get('MinPercentageOff') ? $this->oUnitOption->get('MinPercentageOff') : null, 'MerchantId' => 'Amazon' === $this->oUnitOption->get('MerchantId') ? 'Amazon' : null, 'MarketplaceDomain' => 'Marketplace' === $this->oUnitOption->get('SearchIndex') ? AmazonAutoLinks_Property::getMarketplaceDomainByLocale($this->oUnitOption->get('country')) : null); $_aParams = $iItemPage ? $_aParams + array('ItemPage' => $iItemPage) : $_aParams; // 3+ When the Power argument is set, the SearchIndex must not be set. // and when the SearchIndex is not set, Sort cannot be set. if ($_aParams['Power']) { unset($_aParams['Sort']); } unset($_aParams['']); // if ( $_aParams[ 'Title' ] ) { // unset( // $_aParams[ 'SearchIndex' ] // ); // $_aParams[ 'SearchIndex' ] = 'Books'; // } return $_aParams; }