Skip to content

Commit

Permalink
add storeId #240
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Mar 15, 2018
1 parent 67e3dd4 commit 5b555a1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Model/Config/Source/MonkeyStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ public function __construct(
\Magento\Framework\App\RequestInterface $request
) {
$storeId = (int) $request->getParam("store", 0);

if($request->getParam('website',0)) {
$scope = 'websites';
$storeId = $request->getParam('website',0);
}
elseif($request->getParam('store',0)) {
$scope = 'stores';
$storeId = $request->getParam('store',0);
}
else {
$scope = 'default';
}
if ($helper->getApiKey($storeId)) {
try {
$this->options = $helper->getApi()->ecommerce->stores->get(null, null, null, \Ebizmarts\MailChimp\Helper\Data::MAXSTORES);
$this->options = $helper->getApi($storeId)->ecommerce->stores->get(null, null, null, \Ebizmarts\MailChimp\Helper\Data::MAXSTORES);
} catch (\Exception $e) {
$helper->log($e->getMessage());
}
Expand Down

0 comments on commit 5b555a1

Please sign in to comment.