Skip to content

Commit 109c12c

Browse files
authored
Change _getCmsLink() for a multi website setup
see issue Magenerds#42, fix for wrong identifier if multiple pages exist with the same identifier (url-key) as the ID will be added to the configured value
1 parent 4568d19 commit 109c12c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Block/AfterPrice.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,12 @@ public function getTaxText()
153153
*/
154154
protected function _getCmsLink()
155155
{
156-
return $this->_urlBuilder->getUrl(null, ['_direct' => $this->_scopeConfig->getValue(
156+
$directLink = $this->_scopeConfig->getValue(
157157
'germanlaw/price/shipping_page',
158158
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
159159
$this->_storeManager->getStore()->getId()
160-
)]);
160+
);
161+
$directLink = explode('|', $directLink);
162+
return $this->_urlBuilder->getUrl(null, ['_direct' => reset($directLink)]);
161163
}
162164
}

0 commit comments

Comments
 (0)