Skip to content

Commit ed8550e

Browse files
committed
bug fixes.
1 parent 29ed1a7 commit ed8550e

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

src/Classes/AmazonCore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ private function readyConfig ()
474474
],
475475

476476
// Default service URL
477-
'AMAZON_SERVICE_URL' => 'https://mws.amazonservices.com/',
477+
'AMAZON_SERVICE_URL' => Setting::get('amazonServiceUrl'),
478478

479479
'muteLog' => false
480480
];

src/Classes/AmazonProduct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ protected function genHierarchy($xml)
300300
* See <i>getData</i>.
301301
* @return array Huge array of Product data.
302302
*/
303-
public function getProduct()
303+
public function getProductData()
304304
{
305305
return $this->getData();
306306
}

src/Classes/AmazonProductList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* that match the given product IDs. In order to do this, both the ID type
2828
* and product ID(s) must be given.
2929
*/
30-
class AmazonProductList extends AmazonProductsCore implements \Iterator
30+
class AmazonProductList extends AmazonProductsCore implements Iterator
3131
{
3232
private $i = 0;
3333

src/Classes/AmazonProductsCore.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php namespace Mws\Laravel;
22

3+
use Config;
34
use Mws\Laravel\AmazonCore;
45

56
/**
@@ -48,17 +49,13 @@ public function __construct($s, $mock = false, $m = null, $config = null)
4849
{
4950
parent::__construct($s, $mock, $m, $config);
5051
include($this->env);
51-
if (file_exists($this->config)) {
52-
include($this->config);
53-
} else {
54-
throw new Exception('Config file does not exist!');
55-
}
5652

5753
if (isset($AMAZON_VERSION_PRODUCTS)) {
5854
$this->urlbranch = 'Products/' . $AMAZON_VERSION_PRODUCTS;
5955
$this->options['Version'] = $AMAZON_VERSION_PRODUCTS;
6056
}
6157

58+
$store = Config::get('amazon-mws.store');
6259

6360
if (isset($store[$s]) && array_key_exists('marketplaceId', $store[$s])) {
6461
$this->options['MarketplaceId'] = $store[$s]['marketplaceId'];

0 commit comments

Comments
 (0)