Skip to content

Commit

Permalink
Merge pull request #1 from frithjof/master
Browse files Browse the repository at this point in the history
Make the module usable with Composer install
  • Loading branch information
brnquester committed Feb 9, 2021
2 parents bb6df00 + 4a16626 commit 11362ac
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Block/HrefLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ private function getLocaleCode($store)
*/
private function getStores()
{
/*if ($this->_scopeConfig->isSetFlag('seo/hreflang/same_website_only')) {
return $this->getSameWebsiteStores();
}*/
return $this->_storeManager->getStores();
$config = $this->_scopeConfig->getValue('seo/hreflang/same_website_only');
if ($config === null || $config === '1') {
return $this->getSameWebsiteStores();
}
else{
return $this->_storeManager->getStores();
}
}

/**
Expand Down
17 changes: 17 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "brunocanada/hreflang",
"description": "adds the alternate hreflang tag for: Pages, Product and Category",
"homepage": "https://github.com/bruno-canada/magento2-hrefLang",
"type": "magento2-module",

"require": {
},
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"BrunoCanada\\HrefLang\\": ""
}
}
}

0 comments on commit 11362ac

Please sign in to comment.