From ed8550e6eb4f8a783afa9158e5f9e7471a434ab4 Mon Sep 17 00:00:00 2001 From: Tapha Ngum Date: Wed, 22 Jun 2016 22:49:09 +0100 Subject: [PATCH] bug fixes. --- src/Classes/AmazonCore.php | 2 +- src/Classes/AmazonProduct.php | 2 +- src/Classes/AmazonProductList.php | 2 +- src/Classes/AmazonProductsCore.php | 7 ++----- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Classes/AmazonCore.php b/src/Classes/AmazonCore.php index 78fb48f..654fe10 100644 --- a/src/Classes/AmazonCore.php +++ b/src/Classes/AmazonCore.php @@ -474,7 +474,7 @@ private function readyConfig () ], // Default service URL - 'AMAZON_SERVICE_URL' => 'https://mws.amazonservices.com/', + 'AMAZON_SERVICE_URL' => Setting::get('amazonServiceUrl'), 'muteLog' => false ]; diff --git a/src/Classes/AmazonProduct.php b/src/Classes/AmazonProduct.php index ef143af..c77a377 100755 --- a/src/Classes/AmazonProduct.php +++ b/src/Classes/AmazonProduct.php @@ -300,7 +300,7 @@ protected function genHierarchy($xml) * See getData. * @return array Huge array of Product data. */ - public function getProduct() + public function getProductData() { return $this->getData(); } diff --git a/src/Classes/AmazonProductList.php b/src/Classes/AmazonProductList.php index 4a06da0..574c35f 100755 --- a/src/Classes/AmazonProductList.php +++ b/src/Classes/AmazonProductList.php @@ -27,7 +27,7 @@ * that match the given product IDs. In order to do this, both the ID type * and product ID(s) must be given. */ -class AmazonProductList extends AmazonProductsCore implements \Iterator +class AmazonProductList extends AmazonProductsCore implements Iterator { private $i = 0; diff --git a/src/Classes/AmazonProductsCore.php b/src/Classes/AmazonProductsCore.php index 19bdb37..8cdf1ba 100755 --- a/src/Classes/AmazonProductsCore.php +++ b/src/Classes/AmazonProductsCore.php @@ -1,5 +1,6 @@ env); - if (file_exists($this->config)) { - include($this->config); - } else { - throw new Exception('Config file does not exist!'); - } if (isset($AMAZON_VERSION_PRODUCTS)) { $this->urlbranch = 'Products/' . $AMAZON_VERSION_PRODUCTS; $this->options['Version'] = $AMAZON_VERSION_PRODUCTS; } + $store = Config::get('amazon-mws.store'); if (isset($store[$s]) && array_key_exists('marketplaceId', $store[$s])) { $this->options['MarketplaceId'] = $store[$s]['marketplaceId'];