Rename a tablename using db_schema(Declarative schema) in Magento 2.

In Magento 2, You can create a new table using db_schema.xml file. After creating a table you want to rename a table name, You can rename a table using declarative schema.

New Table(mycustom_table) db_schema.xml file,

Now you must have to run generate-whitelist command to generate db_schema_whitelist.json file, Continue reading “Rename a tablename using db_schema(Declarative schema) in Magento 2.”

How to create Guest Empty Cart quote programmatically in Magento 2?

Magento 2, You can create Guest or anonymous customer empty quote programmatically using Magento\Quote\Api\GuestCartManagementInterface class.

You can create quote entry using GuestCartManagementInterface interface, Interface mapped to GuestCartManagement.php class. Continue reading “How to create Guest Empty Cart quote programmatically in Magento 2?”

How to get all the Items of Order In Magento 2?

In this tutorial, We want to get all the items of the placed order.

The customer placed an order and after place order, if a developer needs to get all the items programmatically this tutorial will help them.

We can get all the items of the order by order id in Magento 2 by just simple code snippets. For,  getting all the items of Order we need to required order id. Continue reading “How to get all the Items of Order In Magento 2?”