How to add a website switcher instead of store view switcher?Website/Store View scope helpMulti-Website, Multi-language switcher not workingStoreswitcher (not storeview-switcher) - MultistoreHow to get the URL for the B2C website/storeview from a B2B website/storeview/product-pageBest Practise for Multiple StoreMagento2: Different domain for each store viewAdd website/store name to manage attributes options/labels pageHow to set stock per website/store?Magento 2 Multiple storeviews Product price incorrectMagento 2: country (Website) switcher
Align a table column at a specific symbol
Why did Missandei say this?
How could a civilization detect tachyons?
How do I give a darkroom course without negatives from the attendees?
Are there vaccine ingredients which may not be disclosed ("hidden", "trade secret", or similar)?
Was Mohammed the most popular first name for boys born in Berlin in 2018?
How do I minimise waste on a flight?
When an electron around an atom drops to a lower state, is 100% of the energy converted to a photon?
Why did Ham the Chimp push levers?
Magical Modulo Squares
Do you take falling damage if falling from 20 feet or less while grappled by someone affected by the Cat's Grace option of the Enhance Ability spell?
Is it a good idea to copy a trader when investing?
Why doesn't increasing the temperature of something like wood or paper set them on fire?
mini sub panel?
Identity of a supposed anonymous referee revealed through "Description" of the report
Opposite party turned away from voting when ballot is all opposing party
Why doesn't Dany protect her dragons better?
When I add a cylinder, it doesn't even show up on my screen at all
Capturing the entire webpage with WebExecute's CaptureImage
Is the tensor product (of vector spaces) commutative?
Creating Stored Procedure in local db that references tables in linked server
99 coins into the sacks
why it is 2>&1 and not 2>>&1 to append to a log file
Exactly which act of bravery are Luke and Han awarded a medal for?
How to add a website switcher instead of store view switcher?
Website/Store View scope helpMulti-Website, Multi-language switcher not workingStoreswitcher (not storeview-switcher) - MultistoreHow to get the URL for the B2C website/storeview from a B2B website/storeview/product-pageBest Practise for Multiple StoreMagento2: Different domain for each store viewAdd website/store name to manage attributes options/labels pageHow to set stock per website/store?Magento 2 Multiple storeviews Product price incorrectMagento 2: country (Website) switcher
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have 3 websites (mydomain.com/us/, mydomain.com/en/ and mydomain.com/eu/), each has one store view. I want to switch between these 3 Magento websites with a dropdown switcher similar to that used for switching store views, but there isn't one for switching websites. There are dropdowns for switching language, currency and storeviews but not for switching websites.
I know this has been asked previously and I have tried to apply those solutions.
I found a previous solution to this at;
https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher
Following these instructions, I copied;
app/design/frontend/base/default/template/page/switch/stores.phtml
to;
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
and replaced existing with following code;
<?php
$websites = Mage::app()->getWebsites();
if (count($websites) > 1): ?>
<div class="website-switcher">
<label for="select-website"><?php echo $this->__('Select Store:') ?></label>
<select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
<?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
<?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
<option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I then refresh cache and when I check the site, there is no switcher where I expect it to be?
Currently each website has one storeview but I may want to add additional storeviews to the EU site for different language versions at some future point.
I have already tested this by adding an additional storeview to the EU website and when I go to mydomain.com/eu/ the storeview switcher does appear for these eu-en and eu-de storeviews.
Additionally, for testing purposes I have also added an additional storeview to US website, the storeview switcher does appear for us or canada storeviews.
When I go to either the mydomain.com/ or mydomain.com/uk/ websites there is no storeview switcher which is correct.
Looking at it now I probably need a website switcher and possibly a storeview switcher together in the scenario of having more than one EU storeview, other than Geo-IP Default Store, is there an extension for this?
multistore websites ce-1.9.1.0
add a comment |
I have 3 websites (mydomain.com/us/, mydomain.com/en/ and mydomain.com/eu/), each has one store view. I want to switch between these 3 Magento websites with a dropdown switcher similar to that used for switching store views, but there isn't one for switching websites. There are dropdowns for switching language, currency and storeviews but not for switching websites.
I know this has been asked previously and I have tried to apply those solutions.
I found a previous solution to this at;
https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher
Following these instructions, I copied;
app/design/frontend/base/default/template/page/switch/stores.phtml
to;
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
and replaced existing with following code;
<?php
$websites = Mage::app()->getWebsites();
if (count($websites) > 1): ?>
<div class="website-switcher">
<label for="select-website"><?php echo $this->__('Select Store:') ?></label>
<select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
<?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
<?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
<option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I then refresh cache and when I check the site, there is no switcher where I expect it to be?
Currently each website has one storeview but I may want to add additional storeviews to the EU site for different language versions at some future point.
I have already tested this by adding an additional storeview to the EU website and when I go to mydomain.com/eu/ the storeview switcher does appear for these eu-en and eu-de storeviews.
Additionally, for testing purposes I have also added an additional storeview to US website, the storeview switcher does appear for us or canada storeviews.
When I go to either the mydomain.com/ or mydomain.com/uk/ websites there is no storeview switcher which is correct.
Looking at it now I probably need a website switcher and possibly a storeview switcher together in the scenario of having more than one EU storeview, other than Geo-IP Default Store, is there an extension for this?
multistore websites ce-1.9.1.0
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
2
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
1
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16
add a comment |
I have 3 websites (mydomain.com/us/, mydomain.com/en/ and mydomain.com/eu/), each has one store view. I want to switch between these 3 Magento websites with a dropdown switcher similar to that used for switching store views, but there isn't one for switching websites. There are dropdowns for switching language, currency and storeviews but not for switching websites.
I know this has been asked previously and I have tried to apply those solutions.
I found a previous solution to this at;
https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher
Following these instructions, I copied;
app/design/frontend/base/default/template/page/switch/stores.phtml
to;
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
and replaced existing with following code;
<?php
$websites = Mage::app()->getWebsites();
if (count($websites) > 1): ?>
<div class="website-switcher">
<label for="select-website"><?php echo $this->__('Select Store:') ?></label>
<select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
<?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
<?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
<option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I then refresh cache and when I check the site, there is no switcher where I expect it to be?
Currently each website has one storeview but I may want to add additional storeviews to the EU site for different language versions at some future point.
I have already tested this by adding an additional storeview to the EU website and when I go to mydomain.com/eu/ the storeview switcher does appear for these eu-en and eu-de storeviews.
Additionally, for testing purposes I have also added an additional storeview to US website, the storeview switcher does appear for us or canada storeviews.
When I go to either the mydomain.com/ or mydomain.com/uk/ websites there is no storeview switcher which is correct.
Looking at it now I probably need a website switcher and possibly a storeview switcher together in the scenario of having more than one EU storeview, other than Geo-IP Default Store, is there an extension for this?
multistore websites ce-1.9.1.0
I have 3 websites (mydomain.com/us/, mydomain.com/en/ and mydomain.com/eu/), each has one store view. I want to switch between these 3 Magento websites with a dropdown switcher similar to that used for switching store views, but there isn't one for switching websites. There are dropdowns for switching language, currency and storeviews but not for switching websites.
I know this has been asked previously and I have tried to apply those solutions.
I found a previous solution to this at;
https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher
Following these instructions, I copied;
app/design/frontend/base/default/template/page/switch/stores.phtml
to;
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
and replaced existing with following code;
<?php
$websites = Mage::app()->getWebsites();
if (count($websites) > 1): ?>
<div class="website-switcher">
<label for="select-website"><?php echo $this->__('Select Store:') ?></label>
<select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
<?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
<?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
<option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I then refresh cache and when I check the site, there is no switcher where I expect it to be?
Currently each website has one storeview but I may want to add additional storeviews to the EU site for different language versions at some future point.
I have already tested this by adding an additional storeview to the EU website and when I go to mydomain.com/eu/ the storeview switcher does appear for these eu-en and eu-de storeviews.
Additionally, for testing purposes I have also added an additional storeview to US website, the storeview switcher does appear for us or canada storeviews.
When I go to either the mydomain.com/ or mydomain.com/uk/ websites there is no storeview switcher which is correct.
Looking at it now I probably need a website switcher and possibly a storeview switcher together in the scenario of having more than one EU storeview, other than Geo-IP Default Store, is there an extension for this?
multistore websites ce-1.9.1.0
multistore websites ce-1.9.1.0
edited May 23 '17 at 12:37
Community♦
1
1
asked Apr 10 '15 at 20:13
CalimoCalimo
2315
2315
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
2
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
1
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16
add a comment |
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
2
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
1
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
2
2
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
1
1
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16
add a comment |
1 Answer
1
active
oldest
votes
You stated you copied it over to
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
which lacks the template folder
The correct path would have been
app/design/frontend/my_theme_package/my_theme/template/page/switch/stores.phtml
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f63347%2fhow-to-add-a-website-switcher-instead-of-store-view-switcher%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You stated you copied it over to
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
which lacks the template folder
The correct path would have been
app/design/frontend/my_theme_package/my_theme/template/page/switch/stores.phtml
add a comment |
You stated you copied it over to
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
which lacks the template folder
The correct path would have been
app/design/frontend/my_theme_package/my_theme/template/page/switch/stores.phtml
add a comment |
You stated you copied it over to
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
which lacks the template folder
The correct path would have been
app/design/frontend/my_theme_package/my_theme/template/page/switch/stores.phtml
You stated you copied it over to
app/design/frontend/my_theme_package/my_theme/page/switch/stores.phtml
which lacks the template folder
The correct path would have been
app/design/frontend/my_theme_package/my_theme/template/page/switch/stores.phtml
answered Jun 14 '18 at 13:42
muhkuh2005muhkuh2005
134
134
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f63347%2fhow-to-add-a-website-switcher-instead-of-store-view-switcher%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you actually have multiple websites installed? Try var dumping $websites.
– mbalparda
Apr 10 '15 at 20:18
2
If each website has just one store, why not just use the store switcher?
– Sander Mangel♦
Apr 11 '15 at 10:38
1
I cannot see how the unmodified storeview switcher could be used to take a user to a different website only another storeview within the same website.
– Calimo
Apr 11 '15 at 15:25
Do you have any reason to not have all the store views under the same "website" - but with different URLs? I manage a 5 store-view Magento 1.9 install on 5 separate domains. We had our store switcher customized into tabs instead of the dropdown provided with Magento. If you don't need to separate your customers based on the store-view they are GEO-ip'd to, then this is your solution.
– Steven J
Jul 28 '17 at 16:16