Question

I am trying to get the product Id but below are given the conditions through which I want to get Id of the product. I have SKU of the product. but using that sku I want to get Id of that product. It is necessary condition to get product Id using SKU no other way I want....

Was it helpful?

Solution

use the product factory as explained here, then just use the $product->getIdBySku($sku) method.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top