Magento 2 API: Get Stores Information

In this article, we will be looking into how we can get the store information in Magento 2 using its API. We will be fetching websites, stores, and store views. We will also be fetching the store configs that include the locale, timezone, currency code, and store URLs. Anonymouse APIs Restriction The REST endpoints to … Read more

Magento 2: Setup Multiple Stores and Websites

This article shows how you can setup multiple stores and multiple websites in your Magento 2 shop. I have assumed that we are having a separate domain or sub-domain for the stores and websites. After adding the necessary stores and websites in the Magento admin, you then need to add some code in either index.php … Read more

MailChimp API v3.0 – Add Store to List, Add Product to Store, Add Order to Campaign

This article shows how you can use MailChimp API v3.0 with PHP and CURL to add ecommerce data to your MailChimp campaign. When purchases happen in your shop then you can add your purchase order data to MailChimp to track purchases from your MailChimp Campaign. A MailChimp campaign is associated to any particular MailChimp list. … Read more

Magento 2: Get Store Information (Store ID, Code, Name, URL, Website ID)

This article shows how we can get store information in Magento 2. We will be fetching store id, store code, store name, store url, and store’s website id. We also write a function which checks if the store is active or not. Below is a block class of my custom module (Chapagain_HelloWorld). I have injected … Read more

Magento: Show/Hide Demo Store Notice

A demo store is where there are products but the order done by customer is not processed. If your website is in development mode then it is better to enable demo store notice. Enabling demo store notice in Magento is very simple. You just need to select an option in configuration settings in admin panel. … Read more

Magento: Get store information

Magento allows to maintain multiple websites from single backend admin. Furthermore, each website can have multiple stores. Below is the code to get Magento store information like store id, store code, store name, etc. All of these functions can be found in class Mage_Core_Model_Store. Get store data array // Get all store data in an … Read more

Magento: Load store specific product

Different stores can be set in Magento. A product can be made visible in selected stores. /** * get store id */ $storeId = Mage::app()->getStore()->getId(); /** * call the Magento catalog/product model * set the current store ID * load the product */ $product = Mage::getModel('catalog/product') ->setStoreId($storeId) ->load($key); Hope it helps. Thanks.