Magento 2: Get Simple Product ID & Quantity in Configurable Product using Swatches

This article shows how you can get the associated Simple Product ID and Quantity (Qty) / inventory from a Configurable Product in frontend product detail page in Magento 2.x. – The below code assumes that Swatches have been used in the product detail page. – Suppose you have two configurable attributes (color and size) for … Read more