How to set meta title, keywords, description and page title for a page programmatically in magento 2?

You can set Page Title and Page Browser Title separately using Magento 2.
If you want to set Different Page title and browser tab title you need to do using programmatically.

You can do it via Either Block prepareLayout() function or Controller execute() function.

You can set custom Page Title, Meta Title, Meta Description, Meta Keywords for any page using programmatically. Continue reading “How to set meta title, keywords, description and page title for a page programmatically in magento 2?”

How to create a new database table using declarative schema in Magento 2.3?

From Magento 2.3, use  db_schema.xml  to create a new table for the database instead of written InstallSchema PHP class. The new database table creation/updating concept in Magento 2.3 is called declarative schema.

From Magento 2.3 You don’t need to create InstallSchema.php and UpgradeSchema.php Continue reading “How to create a new database table using declarative schema in Magento 2.3?”

How to get Grouped Product id from child product id in Magento 2?

Using Magento 2, You can fetch Parent product Ids as an array from the child id of the product.

To Retrieve the Parent product id, You need Child Item Id associated with Grouped Product. Using Magento\GroupedProduct\Model\Product\Type\Grouped Magento Core class you can fetch the parent product Id.

For More Knowledge check the article, You can fetch All the children’s items by Grouped Product SKU.

Used function getParentIdsByChild($childProductId)
Continue reading “How to get Grouped Product id from child product id in Magento 2?”