Skip to content

Commit

Permalink
Merge pull request #13 from Magenerds/store-configuration
Browse files Browse the repository at this point in the history
Fixed store sensitive system configuration
  • Loading branch information
sydekumf committed May 24, 2017
2 parents 50f5052 + 1d87b0b commit 88679f4
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Block/AfterPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public function isEnabled()
{
return $this->_scopeConfig->getValue(
'germanlaw/general/enabled',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$this->_storeManager->getStore()->getId()
);
}

Expand All @@ -108,7 +109,11 @@ public function getTaxText()
{
/** @var $product \Magento\Catalog\Model\Product */
$product = $this->_registry->registry('product');
$taxText = __($this->_scopeConfig->getValue('germanlaw/price/tax_text', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
$taxText = __($this->_scopeConfig->getValue(
'germanlaw/price/tax_text',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$this->_storeManager->getStore()->getId()
));

$taxRate = 0;

Expand Down Expand Up @@ -147,6 +152,10 @@ public function getTaxText()
*/
protected function _getCmsLink()
{
return $this->_urlBuilder->getUrl(null, ['_direct' => $this->_scopeConfig->getValue('germanlaw/price/shipping_page')]);
return $this->_urlBuilder->getUrl(null, ['_direct' => $this->_scopeConfig->getValue(
'germanlaw/price/shipping_page',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$this->_storeManager->getStore()->getId()
)]);
}
}

0 comments on commit 88679f4

Please sign in to comment.