Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [store-id]

The tag has no usage guidance.

2
votes
2answers
43 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->...
1
vote
2answers
46 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
0answers
23 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 ...
1
vote
2answers
329 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 ...
0
votes
2answers
932 views

magento 2 get store id php

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
1answer
23 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 ...
0
votes
3answers
455 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
2answers
496 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 ...
1
vote
1answer
287 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
0answers
285 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 ...
3
votes
2answers
9k views

Get Store ID by store code Magento 2

How to get Store ID by store code in Magento 2 Thanks
3
votes
2answers
3k 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\...
4
votes
4answers
5k 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
1answer
478 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
1answer
51 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
1answer
3k 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
0answers
261 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
2answers
290 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 ...
2
votes
1answer
1k 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
1answer
974 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
1answer
917 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
1answer
999 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
1answer
567 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
2answers
1k 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
2answers
886 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
1answer
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
1answer
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
3answers
2k 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
1answer
893 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
3answers
2k 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.
23
votes
4answers
23k 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
1answer
399 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
1answer
719 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
2answers
77 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
1answer
898 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
1answer
4k 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 ...