Questions tagged [store-id]
The store-id tag has no usage guidance.
47 questions
0
votes
1
answer
214
views
Magento 2.4.3 - The store that was requested wasn't found. Verify the store and try again
when customers are trying to create a profile on our client's website they get the following error message:
"The store that was requested wasn't found. Verify the store and try again."
After ...
0
votes
1
answer
483
views
Magento 2 - Redirect customers to correct store on login using the same url
My site requires customers to login via third party to a multistore on magento 2 using the same url (no store code in url).
I have 3 websites with corresponding stores, views and customer groups.
...
0
votes
2
answers
38
views
Magento 2.1.10 setStoreId vs. setCurrentStore?
I inherited a Magento v 2.1.10 project and was curious what the difference is between setStoreId(0) and setCurrentStore(0)?
Besides setStoreId being derived from the ProductFactory while ...
0
votes
1
answer
146
views
Where does the page Identifier set in Magento 2
We are using Porto theme and I want to echo the store id inside of the body tag as a extra class.
So for instance on our category page we get this:
< body data-container="body" class=&...
0
votes
0
answers
790
views
magento 2 change store id
I have a multi store Magento 2 site and I need to change the ID of one of the stores. Is there any easy way to do this? I tried to run an update query on the store table but I get and error because ...
1
vote
2
answers
2k
views
Magento 2 Custom GET REST API ready store code from url
I have a custom REST API url:
<route url="/V1/vendor/module/id/:Id" method="GET">
<service class="Vendor\Module\Api\ModuleRepositoryInterface" method="get"/>
<resources&...
0
votes
2
answers
2k
views
How to get store currency code by store Id in Magento 2.3.x?
I have multiple stores on my website. I need to get the store currency code by store Id. How can I get it?
I was trying by below code but it's always returning default store currency code:
$...
0
votes
2
answers
291
views
Magento 2 get current store currency code [duplicate]
In Magento 2 I have tried to get the current store code by the below-mentioned code line. But it returns an empty string.
$this->_storeManager->getStore()->getBaseCurrencyCode();
0
votes
3
answers
2k
views
Delete Stores in Magento 2
I have a Magento Site which have around 20 stores.
I have deleted 17 stores as they are not useful to me but when I go to Admin panel and go Catalog -> Categories then it shows me the following ...
2
votes
0
answers
264
views
Magento 2 : Set current store throughout the site
I want to set currentstore according to geoip of customer.for that i have tried below code:
MagentoDir/app/code/Shasha/Geoip/Observer/Redirect.php
<?php
namespace Shasha\Geoip\Observer;
...
5
votes
3
answers
7k
views
How to get Attribute Text depending on storeId in magento2
I want to get attributeText of product depending on what storeId is passed.
2
votes
2
answers
2k
views
How to get root category using store id in magento 2 block file?
How to get root category using store id.
we get store id using $storeId = $this->getStoreId();
We use below code for get root category using store id; but we get wrong.
$rootCat = $this->...
3
votes
4
answers
3k
views
Magento 2: How to filter category by store id?
I want to filter category by store id. Used the following code, but it is not working.
$collection = $this->categoryCollectionFactory->create();
$collection->addAttributeToSelect('*')
...
1
vote
0
answers
30
views
Need to show Store name under Order grid
I am New to Magento. I have a live Magento site (1.9.3.8). The previous developer created Store name and store views.
Currently having 2 store's 1. default 2. mobile.
If the customer places the ...
2
votes
2
answers
3k
views
How can we set store value in UI form Magento 2
I have a UI form in admin with store switcher. I need store_id in post data.
As all can see store_id in url when I change store from store switcher but once I submit it I am not getting any store ...
7
votes
1
answer
30k
views
magento 2 How to get store Id phtml
I need to show something based on store id on Magento 2
for example;
<?php
$storeManager = \Magento\Framework\App\ObjectManager::getInstance()->get('\Magento\Store\Model\StoreManagerInterface')...
2
votes
1
answer
37
views
how to stop creating multiple url of product
Product URL created for all stores even I have disable the stores 1,2,3,4. I just need store 2. but while uploading the product the nos of product URL created for all stores(in url_rewrite table). If ...
3
votes
3
answers
4k
views
M2: How to get storeId in javascript?
I'am adding a new validation rule.
The result should depend on storeview code.
How can I get the storeId in the following javascript code?
validator-mixin.js
define([
'jquery'
], function ($) {...
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 ...
2
votes
1
answer
709
views
setStoreId() not working on quote collecton [closed]
I have been loading quote collection like this:
$quote = Mage::getModel('sales/quote')
->setStoreId($store)
->load($quote_id);
I have 2 stores ...
1
vote
0
answers
760
views
Change store id of the order at the time of checkout
In my website i can change the store as per the region from the front end , but while placing the order , i want to change the order store id as per the product
vendor region store id even if the ...
7
votes
5
answers
35k
views
Get Store ID by store code Magento 2
How to get Store ID by store code in Magento 2
Thanks
5
votes
2
answers
13k
views
Get product collection by store ID on Magento 2.2
I want to get all products by store ID, so I'm doing it like this
return $this->productCollection->addStoreFilter(27);
productCollection is
Magento\Catalog\Model\ResourceModel\Product\...
8
votes
5
answers
23k
views
Magento 2 saving update product in "All Store Views"
I want to update product information for "All Store Views" but it seems that when I try to update a product, Magento ignores setStoreId(0). Instead the product information will be saved to store view ...
0
votes
1
answer
2k
views
Magento 2: How to run CLI command on admin store (storeId:0)?
I have a multi-store setup with Magento 2.1.7 CE on the domain a, domain b, domain c. I want to apply images to some products programmatically. When I make an API call on any domain with the "all" ...
0
votes
1
answer
87
views
Custom models working with storeViews
I made a custom module that creates a model which can be associated to products. There are 2 tables:
Model (for simplify, it only has an id, name and img)
ModelProduct (id, id_model, id_product)
I ...
2
votes
1
answer
7k
views
How to get category ids of specific store in Magento 2?
I want to get category ids of specific store.
$product->getCategoryIds()
This will get all categories of product
Array ( [0] => 63 [1] => 178 )
63 is category of store 1 and 178 is ...
1
vote
0
answers
627
views
Product repository - get methods' store id argument = null
If I do not provide $storeId argument for methods get() or getById what store id would be used? Default? Or current?
If I DO use this argument we can see that it will be set and data specific for ...
1
vote
2
answers
357
views
Magento get store Name in a file which is in root directory
I have a file assume abc.php in multisite set up.
If I hit this using url :domain1.com/abc.php, I should get store name of domain1 and if I hit it using domain2.com/abc.php, I should get store name ...
3
votes
1
answer
3k
views
Creating order in Magento 2 backend, how to find out the store?
I have a payment module used in Magento 2 backend order creation.
In Magento 2 the administrator first chooses the store where the order is to be created. However, when reading configuration I ...
3
votes
1
answer
1k
views
Get stores id of static block on Magento 1.x
For programatically create a static block I use a function that behaves like this pieces of code
$block = Mage::getModel('cms/block');
$block->setTitle($title);
$block->...
0
votes
1
answer
1k
views
Call to member function error - please help!
I am trying to fix an error with an extension. The error appears when you are in admin and changing a customer's password. The new password does get saved in the database, but the page throws this ...
1
vote
1
answer
2k
views
Getting the store ID when placing an admin order
I have a multisite setup with multiple custom shipping modules. Each store has different settings for free shipping etc.. (based on weight/value)
Everything works great from the front end, however on ...
0
votes
1
answer
632
views
magento routing not works when i enabled 'Add Store Code to Urls' in admin
when i change Add Store Code to Urls to yes at
system > web > url options in admin panel,
all the routing to my controller is not works. returns 404 error page. how to resolve this?
1
vote
2
answers
3k
views
Event Observer for specific store
I use this Event Observer on a multistore for a custom URL Structure Manufacturer in product url key.
The problem is now that I need this for only one specific store id. How can I set a custom Event ...
0
votes
2
answers
1k
views
How to get the ID of a store by name?
Let´s say I have a store named "Megastore". How can I get the id of that specific store?
Can I do it by using some kind of filter?
Mage::getModel('core/store')->addFieldToFilter('name', '...
1
vote
1
answer
2k
views
How to get the store id from the any category id [closed]
So I have the category id and I would really like simply the store id. Ideally I do not want to simply load the store completely as I only need the id.
Here my meaning of category id is: One Root ...
0
votes
1
answer
1k
views
Get Store Details by Root Category Id [closed]
I am working on script and i have only Root Category Id of store. I want to get Store Details by Root Category Id.
1
vote
3
answers
3k
views
Removing Magento Store URLs Param ?__store=
Magento's store URL wuery param is really annoying me and I'm not sure of the point of it when there is a store cookie for holding this info, also it only appears when you first visit a site or switch ...
1
vote
1
answer
969
views
Store filter column
I want to add store filter column to my custom grid,like the one in order grid.How can I do that? Below is my code in which I want to add column.
<?php
/**
*
*/
class ...
2
votes
3
answers
3k
views
Get Store IDs associated to a particular CMS Page
Given I have a Page Object (Mage_Cms_Model_Page), how do I get its associated store id's? As an array is preferable.
24
votes
4
answers
29k
views
How to get the store id from the code
So I have the store code and I would really like simply the store id. Ideally I do not want to simply load the store completely as I only need the id.
One idea I had was to load this via a collection ...
1
vote
1
answer
494
views
Multi Site, Multi Domain, Multi Language
I have 2 sites running on Magento 1.8.1 and each site has a different domain. I would like to have 3 store views for each site.
Each site will have 3 languages.
Each language will use the same TLD. ...
1
vote
1
answer
739
views
Issue in displaying store multi-select drop down in custom module
I have a custom community module in which I want to allow store multi-select drop-down.
I am already displaying the drop-down but when I save it's value and then, if I edit the form, I don't see the ...
0
votes
2
answers
183
views
Where to change this store variable [closed]
On this page, the Smart Coffee Australia / APAC is pulled from a setting somewhere.
The rest is taken from Configuration > Store Information.
Do you know where I can change this?
Configuration &...
0
votes
1
answer
1k
views
Magento Category Store ID
Magento categories and store id's.
In the catalog_category_flat_store_1 database table it says the store_id is 1.
When I checked catalog_category_entity_int al entries have a store_id of 0.
If I ...
1
vote
1
answer
6k
views
Change store id value
I'm working on a store with one store which has store id = 1. I want to write a db query that will update this id to something else (say 9 for example). Which table should I look for to edit this and ...