12

If you want all products have checked Use Default value then run below sql in database: DELETE FROM `catalog_product_entity_text` where store_id = 1; DELETE FROM `catalog_product_entity_datetime` where store_id = 1; DELETE FROM `catalog_product_entity_decimal` where store_id = 1; DELETE FROM `catalog_product_entity_int` where store_id = 1; DELETE FROM `...


11

I have tried numerous ways to achieve this task. I would like to thank @matias-hidalgo for his contributions, although I did not understand his answer at first read :). Here is the scenario. We have two different websites, and each website has two different store views as follows: Website 1 Website 1 (E-commerce) Website 1 (Venda Assistida) Website 2 ...


6

Created multi website in magento, Steps to create a multistore in admin panel is same as like in magento1.x. Don't forget to change the base url and secure url for new website/store. Once made changes in admin panel follow the below steps, 1) Create a new folder in magento root and copy the index.php and .htaccess files from magento root to new folder. 2) ...


5

Create a Websites and it's relevant Store and StoreView from Admin > Stores > All Stores Go to Stores > Configuration, Select website which you have created. Then Go to Web and change both Base URLs & Base URLs (Secure) For example : e.g. Base URL: xyz.com (Main website url keep as it is) Base Link URL: {{unsecure_base_url}}ch/ Here, ch is a sub ...


5

Magento generates files in following directories generated var pub/static pub/media/catalog/products/cache (In most cases this directory takes most of the storage) The no of files you have uploaded at start would surly increase after Magento generates all other files. You need to manually check directory sizes in each of the above listed directories by ...


4

I was able to resolve my problem with below code. I used saveAttribute method to save attribute values (price, special price, etc.) which will only save attribute value to database without saving complete product. public function __construct( ..... \Magento\Catalog\Model\ProductFactory $productFactory, \Magento\Catalog\Model\ResourceModel\...


4

When Magento compiles (di compilation and static content deploy) it takes a lot of the already existing files in the app/code/ directory, or vendor directory, and produces a lot of generated and cached content in the generated/ and var/ directories. File caching will also generate a large number of files, try to cache using Redis instead if you don't ...


3

You can do this via magento interface itself In product grid select all products you want to add in the new website. Then from mass action select update attributes. You will get a new interface select websites from left tab. In Add Product To Websites select the website you want to assign. You can do both operation add and remove products from that ...


3

You can simply set multiple product id to website using magento 2 as below way, Set Magento\Catalog\Model\Product\WebsiteFactory to your construct and set productids. protected $_productWebsiteFactory; public function __construct( \Magento\Catalog\Model\Product\WebsiteFactory $productWebsiteFactory ) { $this->_productWebsiteFactory = $...


3

You can get website name and url using this snippet. public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, ) { $this->_storeManager = $storeManager; } public function getWebsites() { $_websites = $this->_storeManager->getWebsites(); $_websiteData = array(); foreach($_websites as $website){ ...


3

When we talk about code level of Magento 2 - There is no code limit for the creating of website , stores and store views. you can create website , store and store views as many as you want there is no limit at all on code level. But when we talk about performance, yes it will affect on performance when we have huge amount of catalog and multiple store ...


3

Here's how to do it with proper DI: use Magento\Catalog\Api\ProductRepositoryInterface; class Price { /** * @var ProductRepositoryInterface */ protected $productRepository; public function __construct(ProductRepositoryInterface $productRepository) { $this->productRepository = $productRepository; } /** * @...


3

Check that you have enabled To include the store code in URLs as explained in user guide here. Try to either the .htaccess or index.php override. So you can remove, $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = $mageRunType; References: devdocs.magento.com/v2.3/...


2

Here's a suggestion on how you could structure your site: 1 website per subdomain 1 custom theme/styling per website global admin user create for each store admin user for each store, with permissions only to that store products are scoped/loaded per store - easiest to just have the store admin manage products Out of the box; customers are unique to website ...


2

Export customer list, and change _website field to correct one for particular customer. And then import the list again Make sure to take backup


2

Follow this and comment for any issue: Verify your desired domain name points to the server. Create a secondary domain for your new store. Using either FTP or SSH, copy the .htaccess and index.php files from your Magento installation to the document root of your new domain. Open the index.php file that you just copied and edit the last lines of the file as ...


2

Please follow http://vagento.com/setup-multi-store-multi-domain-magento-2/ link. I hope that'll help you for Setup Multi Store With Multi Domain in Magento 2.


2

By Nginx configuration you can use this example configuration: server { listen 80; ## SSL directives might go here server_name local.magento2.com; root /PATH/TO/YOUR/MAGENTO/pub; location / { index index.html index.php; ## Allow a static html file to be shown first try_files $uri $uri/ @handler; ## If missing pass the ...


2

Yes you can. You can create different themes for same in same or different packages. If you have different packages or themes you can define it store wise from system -> config -> design Example Store A - rwd (Package) themea (Theme name) Example Store B - rwd (Package) themeb (Theme name) So the skin path will be like For Store A - <...


2

Looking at the scenario in a cryptic manner, you must need to go with the multi-website concept not multi-store. In Magento 2 - Currency scope is either Website Level or Global level so if you want to achieve multi currency feature you need to create multiple website. Because we only have one Base currency for one site. Second thing if you go with ...


2

To run Magento with multiple storeviews or websites without using the index.php hack you could configure this in your server software. Magento has documentation on this for both nginx (docs) and apache (docs) (Update) MAGE_RUN_TYPE is what you want to call upon. Like a Magento website, or a store within a website. MAGE_RUN_CODE is the code belonging to that ...


2

Check this code. Try loading product $prod by setting store ID and product ID from $product object. protected $productRepository; public function __construct( Magento\Catalog\Model\ProductRepository $productRepository ) { $this->productRepository = $productRepository; } public function updateProductPricesByStoreId($productId) { $product // &...


2

Before worrying about why it happens, you may want to consider whether it's actually a problem for you. It seems to be that having a leading dot shouldn't be affecting cookie behaviour in the browser. The leading dot means that the cookie is valid for subdomains as well. RFC 6265 Section 4.1.2.3 defines this as so modern browsers should ignore leading dots ...


2

You can manage it like below: Magento 2 database contains a table name 'sales_sequence_profile' which has prefix column and every row contains a meta_id which relates with table 'sales_sequence_meta'. Table 'sales_sequence_meta' sequence table names according to stores and type(order, invoice, shipment, creditmemo, rma). sequence_order_* contains the last ...


2

You need to set the Base URL for the store view in the admin. I had the same issue until I did that.


2

Try this for getting website id from an order in observer file $websiteid=$order->getStore()->getWebsiteId();


2

I think you have tried to find the solution from the google but my advise is to check Magento DevDocs first always where you can find everything which can be done in Magento 2. Here, I have attached the link where Magento DevDocs provided the steps to setup the multiple websites or stores. Kindly refer this link: https://devdocs.magento.com/guides/v2.3/...


2

However it says that it uses "objectManager which is not recommended" so is there a better way of implementing it? Yes there is you can use a view model for this. The view model will come in handy for your second question too. You can declare your view model like this: <?php namespace [Vendor]\[Module]\ViewModel; use Magento\Framework\App\Config\...


1

Check in this path. Here we can configure the package and related themes for each store view. System > configuration > design


1

If The Server Is NGINX then Follow Below Steps. Here is the scenario. We have two different websites, and each website has two different store views as follows: Website 1 Website 1 (E-commerce) Website 1 (Venda Assistida) Website 2 Website 2 (E-commerce) Website 2 (Venda Assistida) In my solution, we are going to change some configuration in Magento ...


Only top voted, non community-wiki answers of a minimum length are eligible