I'm trying to get information from a product using Amazon MWS API and I'm get this annoying error:
Fatal error: Redefinition of parameter $quotaMax in....(path to file ResponseHeaderMetadata.php)
My MWS credentials are ok because I tried the exact same credentials on the MWS scratchpad and the response was correct. My code are using the MWS samples for the Products API. I'm using the GetMatchingProductSample.php, the most important part are:
$asin_list = new MarketplaceWebServiceProducts_Model_ASINListType();
$asin_list->setASIN(array("B01BH9EXX2"));
$request = new MarketplaceWebServiceProducts_Model_GetMatchingProductRequest();
$request->setMarketplaceId(MARKETPLACE_ID);
$request->setASINList($asin_list);
invokeGetMatchingProduct($service, $request);
When getting the dump of the request, all seems to be ok, again:
$parameters = $request->toQueryParameterArray();
var_dump($parameters);
array(2) { ["MarketplaceId"]=> string(13) "ATVPDKIKX0DER" ["ASINList.ASIN.1"]=> string(10) "B01BH9EXX2" }
The MWS API documentation is not very good.
Thanks
Try following....
Open your MarketplaceWebServices->model->ResponseHeaderMetadata.php
Find and replace below code
public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaMax = null, $quotaResetsAt = null){
with
public function __construct($requestId = null, $responseContext = null, $timestamp = null,$quotaMax = null, $quotaRemaining = null, $quotaResetsAt = null) {
:)
Apart from the above line change, the line:
$this->metadata[self::QUOTA_REMAINING] = $quotaMax;
should be changed to
$this->metadata[self::QUOTA_REMAINING] = $quotaRemaining;
Regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With