How to use left join SQL query in Model class Magento 2?

Magento 2 Left Join SQL query in resource model class to get data from multiple tables.

Left Join is used to fetch all records from the left table and retrieve matching records from the second table.

We can use the joinLeft() method to use Left Join in Magento Collection.

A Demo to fetch customers with customer address details like city and postcode from the customer_address_entity table using the join query. Continue reading “How to use left join SQL query in Model class Magento 2?”

How to bulk product websites update using Magento 2?

Magento contains the queue message functionality to bulk product websites update.

If your store is running with multiple websites and wants to update a bulk website for the products in your store you will not see immediate changes on the products after the update is completed. That dependes on the cron running status. Continue reading “How to bulk product websites update using Magento 2?”

How to validate qty increment by product in magento 2?

Products Management in Magento has some advanced inventory feature that supports the qty increment feature or minimum qty allowed in the shopping cart.

For the Enabled Qty Increments feature, the user can only purchase a specific item in multiple of the qty defined in the back panel of the Magento. Continue reading “How to validate qty increment by product in magento 2?”