Questions tagged [store-view]
Denotes questions regarding store views (scope, creation, management).
578
questions
50
votes
4
answers
40k
views
Difference between website, stores and store views
I have been researching about multi website/store setups and am a little confused.
I completely understand how stores and store views work but my confusion is on the differnece between websites and ...
25
votes
4
answers
22k
views
how to create multilingual static block
I need to create multilingual static block. So far I have created static block with id 'delivery_returns'.
I'm calling it in catalog\product\view.phtml like this:
$deliveryBlock = Mage::getModel('...
20
votes
1
answer
38k
views
How to create Multiple Store with different domain in Magento
How to create multiple stores with different domains in Magento with same products, same database but different customers.
Example :
I bought 2 domains: mystore1.com and mystore2.com (FYI: mystore1....
19
votes
3
answers
2k
views
Magento Adding a new Language?
I've looked at several pages regarding adding another language support to the Magento cart, however, there seems to be something missing.
The usual is to download translation through the admin ...
16
votes
4
answers
36k
views
Reset "Use Default Value" for specific store view on all products
Somehow a number of my products had the "Use Default Value" deselected.
My store has 2 languages, English and French. French uses the Default Store value, so now when I update products it doesn't ...
15
votes
3
answers
6k
views
Current store is 1 when running upgrade scripts
Any idea why Mage::app()->getStore() returns the store view with id 1 when inside the upgrade scripts independent on the store view I'm running the upgrade script in (even admin)?
I mean, I know ...
13
votes
5
answers
13k
views
404 on Store Switch with Product Store View Scoped URL Key
By default URL Key on product page is Global scoped.
EDIT:
As suggested by FlorinelChis the scope can be changes in Manage attributes.
However this breaks the store view switcher behavior.
This is ...
13
votes
1
answer
19k
views
How to get all options for all store views for a single attribute?
I am trying to retrieve all options for all store views for a single attribute e.g. color.
For the attribute color I have created two options blue and white. I have tried the following code that is ...
12
votes
2
answers
2k
views
Delete store view programmatically in upgrade script
I want to delete a store view programmatically. Looking at Mage_Adminhtml_System_StoreController::deleteStorePostAction(), this is pretty easy (shortened code a little bit):
$model = Mage::getModel('...
11
votes
1
answer
4k
views
Magento 2 - Store disable issue in Multi stores website
I am working on multi store website, as far I know person should be able to disable store view / website if that is not a default store view / website.
I want to disable some of the store views but ...
9
votes
4
answers
6k
views
How can I Change the store language after switching the store
I have two store one is English and one is French.
Create a product and category in English and French also, but I am not able to create category or product for french.
Please help, How can I ...
9
votes
2
answers
10k
views
Using URL subfolders for multi-language Store Views in Magento 2
I configured Magento 2 with two Store Views in order to have two front-end languages (English and Italian) and I would like to have the following behaviour:
http://example.com/ --> Store View ...
8
votes
2
answers
13k
views
How to get all stores collection include the store id 0 in magento 2
I have tried to get all the stores in Magento 2.
$stores = $this->storeManager->getStores();
$ids= array();
foreach ($stores as $storeId => $storeData) {
$ids[] = $storeId;
}
print_r($...
8
votes
2
answers
3k
views
Get page URL from current page, different store-view
I'm using different store-views to create different language versions of a shop. Now I'm trying to add links to the other pages. However, I can not find a way to get the actual URL from the other ...
8
votes
1
answer
5k
views
Magento2: store_id in UI Listing Component
I'm developing a Magento2 extension that has an admin grid which is generated using the UI Listing Component. The grid shows the records (a list of blog items) just fine. The extension allows to save ...
8
votes
1
answer
152
views
Anyone managed to have a dynamic default store view?
Due to different locales having more natural default values than others, the wish is to be able to have store views inherit values of a different store view rather than the common default store view (...
7
votes
2
answers
19k
views
getAttributeText() use default value regardless what store view the user is on
How would I go about getting the Admin value for an attribute, regardless of the visitor's chosen store view?
I've tried:
$_product = $this->getProduct();
$_condition = $_product->getAttributeText('...
7
votes
4
answers
3k
views
Magento2: Remove Store Code URL only for default store
I am developing a Magento 2 store with two store views, one for each language(English and Italian). I turned on the "Add Store Code to Urls" option from backend, so my URLs looks like:
http://mystore....
6
votes
2
answers
12k
views
Create global variable for Magento
I'm looking for a right way to create global variables in Magento that I can use it on every view page. I have some solution in mind but I don't if it's good enough.
Create a module which provides a ...
6
votes
3
answers
24k
views
Is it possible to have different price and currency per product and per store view?
I have setup multi-site in Magento. I have one Website with two Stores and one storeView per Store.
StoreA is in GBP, StoreB is in Euros. I have productA which I would like to sell for £99.99 from ...
6
votes
1
answer
8k
views
Magento 2 Product rating is not visible in all store views?
I have two store views in my website some products having rating stars and displaying them is fine in default store view.
While switching into another store view the rating stars are disappearing ...
6
votes
2
answers
4k
views
How to show storeview in ui component grid in Magento 2?
I want to show store-views in ui component grid. I am using this code in:
/app/code/Mymodule/Myimages/view/adminhtml/ui_component/communieimages_name.xml
<column name="store_ids" class="Magento\...
6
votes
2
answers
1k
views
Redirected automatically to a store view based on a user group (B2C & B2B) - M2
I have created two store views, one for B2C and one for B2B. I need that when a B2B customer login will be redirected automatically to the view created for their user group. But for B2C customers can ...
6
votes
0
answers
2k
views
Multi store with different domains, cookie store is causing problem
Please note that it's not another "how to setup multistore". I've read other questions and it seems that my problem is not described.
Following are not answering my question:
set default page to ...
6
votes
2
answers
2k
views
New website/store view, all pages 404 (including homepage)
As per the title, I've set up a new store on a different domain and all pages including the home page are returning 404.
I've tried pretty much everything, and I'm wondering if any of you can think ...
6
votes
1
answer
2k
views
Set product name per store view programmatically in Magento 2
How can I set the name of a product in a specific language (store view)?
5
votes
2
answers
19k
views
Magento 2 phtml get store view being viewed
In Magento 2 I have a phtml file I am trying to get what store view is currently being seen by the website visitor.
However it does not seem to work.
I dont want to have to create a whole module or ...
5
votes
4
answers
27k
views
How to change order increment prefix?
I run a shop (Magento CE 1.6.2) with 4 different store-views, which have (for historical reasons) ID's 1, 3, 4 and 7. Order numbers have been looking like this 10000001, 30000001, 40000001, 70000001.
...
5
votes
1
answer
12k
views
Get storeId from product
How can I get the store ID from a product instance ?
I have tried: $product->getStoreId();
but it don't works.
Thanks for help.
5
votes
2
answers
2k
views
Get system config option inside source model of another option
In my custom module I have two custom option in the system configuration. Values of the second option depend on the value of the first option. My problem is that inside the source model of the second ...
5
votes
2
answers
7k
views
How to create store view or store programmatically and do it right in Mage 2?
I want to create store or store view programmatically and I use the followng code (for store view):
$storeView = $objectManager->create(\Magento\Store\Model\Store::class); // Store - is a ...
5
votes
2
answers
1k
views
Error showing special prices when changing store view - Magento 2.3.1
I have 2 store views, one for normal customers (product prices including tax) and one for wholesale customers (product prices excluding tax). See images for reference.
Normal Store View (product ...
5
votes
1
answer
6k
views
checkout_submit_all_after Observer only triggered from one store view?
Afternoon all,
Run into a curious problem, I'm setting up an observer that will be triggered every time an order is made. Code is below;
Config XML:
<?xml version="1.0"?>
<config>
&...
5
votes
1
answer
15k
views
Get default store id from current website Magento 2
I'm implementing module which will change the store id for current webiste but not the default store id like this:
$this->_storeManager->setCurrentStore($storeId);
In magento 2 backend i've ...
5
votes
0
answers
749
views
Web API: Product set use default status for store view
Our products are created and updated via the web API. When we update a product for all /rest/all/V1/products/123 and set status: 2 the product is disabled. But per store view it's still enabled ...
5
votes
2
answers
2k
views
How to Remove Url Parameters and make english store as default [closed]
i have a website with 4 different stores, English (default), french, Italian, German.
but the issue is when i had default settings in magento my urls contains that parameter "?___store=en"
but i ...
5
votes
0
answers
166
views
Multistore with subfolders - Including language code before store group in URL
I have a client who needs to include a language code before the store group in the URL. For example, the current setup is:
example.com/store1
example.com/store2
There are two subfolders in the root ...
5
votes
1
answer
2k
views
collect phrases and lang pack command line different from official doc - Magento 2.0.1
I use magento version 2.0.1, I am trying to add new language package, I have followed the instruction from official doc, that commands are not working
command syntax mentioned in official doc
magento ...
4
votes
2
answers
12k
views
Magento 2: get attribute label (considering current store view)
I defined for 2 different store views 2 different attribut labels:
$_product->getResource()->getAttribute($_code)->getFrontendLabel();
This is how I get the attribute Label, but this ...
4
votes
1
answer
7k
views
What is App Emulation In magento
I want to know what is app emulation in magento...
I saw its forcefully set store id ....in store...but why this is use in magento..
I use this in my project..but i want to know Detail about App ...
4
votes
5
answers
20k
views
Magento 2 - Create product programmatically with different store view values
I have created this custom import module that will create products and set different values for each store view. The problem is, when I save a single attribute for the product on a store view, all the ...
4
votes
1
answer
3k
views
Install script to get access to root category id
I have a data install script which requires access to the default stores root category.
If the code for the module is run when the site is first installed, the value is never available i.e.
Mage::...
4
votes
2
answers
4k
views
Updating product attributes for multiple (but not all) Store Views at once?
On a current project, we have one store view per country that the shop targets. Here's an example list of store views:
Switzerland (German)
Germany (German)
UK (English)
USA (English)
Australia (...
4
votes
1
answer
3k
views
Get Store View info in JS
Is it possible to get the current store view data in a js file. I mean is that info is stored somewhere in the js environment?
4
votes
2
answers
2k
views
Magento 2.3 : Customer after login Storeview switcher/redirect problem
I have created 3 store for example:
Australia
India
USA
and created related store view as show below:
In my case if any customer is register from any store or store view. They are successfully ...
4
votes
3
answers
808
views
Bind subdomain to a Magento Controller
I am working on an application for which I want to create few sub-domains in system, which will be served by Magento application. One example scenario can be creating separate sub-domains for system ...
4
votes
1
answer
3k
views
Layout update handle per storeview
I'd like to change the title of certain blocks per storeview in my local.xml, however, I've tried numerous things and it doesn't seem to pick up on my changes, not even when I 'unset' the data, and ...
4
votes
2
answers
665
views
How to set the Store View after login automatically for the whole session?
After logging into the backend and navigating to Catalog / Manage Products, the the dropdown "Choose store view" is set to "All Store Views" instead of the defined default Store View.
After changing ...
4
votes
2
answers
3k
views
Setup shipping charges for two different Stores based on country selection
I have to one website which contains two different stores. I want to set different shipping charges for the both stores.
Magento Provide different shipping charges per website. but I need to create ...
4
votes
1
answer
203
views
Magento 2 - Store wise description very hard to manage
I have 1000s of products and there are 3 different stores.
Product descriptions are stored on store level. So everytime I need to update any description I have to update it on all store levels.
Is ...