Magento 2 Modes and its Purposes

Magento 2 can be configured to run in 3 modes, Default, Developer and Production.

Default Mode:

As its name implies, default mode is how Magento operates if no other mode is specified. Default mode enables you to deploy the Magento application on a single server without changing any settings. However, default mode is not as optimized for production as is production mode.

Developer Mode:

Enable Developer mode only when you are extending or customizing your Magento store.

In developer mode:

  • Static view files are not cached; they are written to the Magento pub/static directory every time they’re called
  • Uncaught exceptions display in the browser
  • System logging in var/report is verbose
  • An exception is thrown in the error handler, rather than being logged
  • An exception is thrown when an event subscriber cannot be invoked

Production Mode:

Put your Magento store in Production mode after all development is done and store ready is open for end customers.

In production mode:

  • Static view files are not materialized, and URLs for them are composed on the fly. Static view files are served from the cache only.
  • Errors are logged to the file system and are never displayed to the user.
  • You can enable and disable cache types only using the command line.

There is another mode in Magento 2 which is Maintenance mode and used when making any changes in live store front.

How to configure GST in Magento 2?

Hello World,

GST(Goods and Service Tax) is the standard tax on products in India. It is categorised in 4 tax rates, 5%, 12%, 18% and 28%. There are also different tax rules for interstate and intrastate trade.

We’ll be configuring our Magento 2 store with GST tax rates based on our origin state. Origin state has a very important role here. If the customer is placing an order from the same state then the tax rules will be CGST and SGST but if the customer is placing an order from any other state then IGST will be charged.

Prerequisites: Latest version of Magento 2 where you get Indian states list at the time of checkout, if your Magento version is not having state’s list then you’ll require to have this module installed.

After installing this module you’ll be able to get state’s list after selecting India in the country list.

If you are having a state list visible then you’re ready to setup GST tax rates.

Now based on your origin state, you’ll require to set up the tax rates, I have already created the CSV files with all tax rates for each state.

You can get the CSV file from here

https://github.com/amansrivastava/magento2-in-gst-taxrates

After downloading your respective CSV file, if you are from MP then you will use taxrates-MP.csv file.

Now we’ll create Tax Classes, Tax Rules, and Tax Rates.

Tax Classes:

To create tax class, you need to open tax rules link and select “Add New”.

In the Additional Settings tab, you’ll get the list of Tax Classes, here you create GST 5, GST 12, GST 18 and GST 28.

Tax Rates:

You’ll also get the import tax rates option in Add New Tax Rule window.

Upload the CSV file from above link and your tax rates are configured.

Tax Rules:

Now comes the tricky part, here we’ll create CGST, SGST and IGST tax rules for all tax slabs. CGST-5, SGST-5, IGST-5, CSGT-12 … IGST-28.

Select the respective tax rates in tax rules and then you are ready to assign your tax classes in products.

You can also configure the visibility of taxes in catalog price, cart and order from System Configuration.

 

IGST in Magento 2 cart

Magento2 : Select product attribute and values from SQL

SET @entityid (product_id) in line no. 1

 

Magento2, How to override the product list limit on category page in Magento 2 ?

Hello World,

In a large catalog where product count in a category exceed 10k in Magento2, The category shows products count 10000 only.

This value is added in search_request.xml in Magento/CatalogSearch module.

 

To override this value, create a module and define own value in size node.

Step 1 : Define New Module.

Create VendorName/PackageName directory in app/code.

Create etc/module.xml and registration.php in your PackageName.

2. Create search_request.xml which will be overwriting the values in CatalogSearch Module.

You will find size value defined in 3 requests, I have extended it for catalog view only, you can extended for search results as well.