How to use SQL distinct Query in Magento 2?

Magento 2 distinct SQL Query is used to return results as unique records for the given field by skipping duplicate values from the SQL Response.

If a Specific Column in a table contains, multiple duplicate values and you want to skip it and fetch only single records for the same column, You can use distinct keywords in a query to filter out duplicate values.

You can Learn about, A List of Direct SQL Queries in Magento 2.

Just use distinct keywords on a query like, $connection->select()->distinct()

Continue reading “How to use SQL distinct Query in Magento 2?”

How to get all children items of grouped product Magento 2?

Magento Get All the Child Products associated with Grouped Product Programmatically.

While you working with the Grouped product-related functionality, You need to fetch all the children’s items available with the grouped products.

You have to fetch the first product object, Based on that, You can retrieve all the children’s items from it and loop over items to get the associated child products individually.

You can check the article if you want to Get Grouped Product ID from their child’s product.

Continue reading “How to get all children items of grouped product Magento 2?”

How to set up Email settings for the Contact page in Magento 2?

You can set up Email settings for the contact page from the Stores Configuration section.

Go To Admin Panel, log in with your credentials, Continue reading “How to set up Email settings for the Contact page in Magento 2?”