Thursday, 15 March 2018

Magento 2 : [Solution] Update default Order Id / Invoice Id / Shipment Id

Go to your database from phpmyadmin,

Here _1 is used for store id after tablename.

Default Frontend store id is 1. if you have multi store then you have to set query for each store with table name like sequence_order_2 upto sequence_order_.*

Enter below query for table sequence_order_1 is used for default store. If you have multiple store you have to set tablename as per store id in below query.

This is only used for order placed from frontend.

sequence_order_1 is used for order id management in magento 2.

ALTER TABLE sequence_order_1 AUTO_INCREMENT=100000001;

Next order id is start from 100000002.

Below Query is defined for INVOICE, if you want to change invoice id

ALTER TABLE sequence_invoice_1 AUTO_INCREMENT=100000001;

For Shipment ALTER TABLE sequence_shipment_1 AUTO_INCREMENT=100000001;

Magento 2 : [Solution] Remove compare functionality in Magento 2

Removed compare product functionality by adding below code in my theme 'degault.xml' file.

/app/design/frontend/themes/default/Magento_Theme/layout/default.xml

<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalog.compare.link" remove="true"/>

And

/app/design/frontend/themes/default/Magento_Catalog/layout/default.xml

<referenceBlock name="catalog.compare.sidebar" remove="true"/>
<referenceBlock name="catalog.compare.link" remove="true"/>