magento-client
magento-client copied to clipboard
Get product by SKU (method)
I've seen that there's a getInfo() method which has the following parameters: productId, $storeView = null, $attributes = null, $identifierType = null
$sku = 'some-sku';
$productId = Mage::getModel('catalog/product')->getIdBySku($sku);
if($productId){
//sku exists
}
How I'd achieve this using this wrapper?
$data = $productManager->getInfo($sku, null, null, 'SKU')->execute();
if($data)
$productId = $data['product_id'];