How product images are saved in database Magento 2?

A Product is the heart of any e-Commerce system, A product contains multiple information like Title, SKU, Price, Inventory, Images and so more details.

Let’s start with the Main point, A product has multiple images, and I will just explore how each product is stored in the database. Your confusion will be clear after reading the below details of the image saved in the database.

catalog_product_entity_varchar  used for store product image value.

Continue reading “How product images are saved in database Magento 2?”

How to apply custom condition before product collection loaded magento 2?

You can apply custom conditions to Product Collection before load by creating a plugin in Magento 2. Some situation in your project need to add some conditions before product collection loaded you can achieve it by below way,

In Magento\Catalog\Model\ResourceModel\Product\Collection file load() method is used for load the product collection globally.

Continue reading “How to apply custom condition before product collection loaded magento 2?”

Magento 2 Add Anchor link to Success or Error Message.

You can add anchor tag link in success message, an error message or any notification message in Magento 2 by addSuccessMessage( ), addErrorMessage( ) and addNoticeMessage( ) respectively.

Let’s add a link to the Shopping cart of a product successfully added to the cart. Continue reading “Magento 2 Add Anchor link to Success or Error Message.”