Created
June 10, 2016 12:46
-
-
Save mathewjosephh/605048d6bf2ac5e4229b1e2aa85ba844 to your computer and use it in GitHub Desktop.
Magento – How to Check if the SKU is Exist?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sku = 'Your Product Sku'; | |
$id = Mage::getModel('catalog/product')->getIdBySku($sku); | |
if ($id){ | |
echo "SKU {$sku} exists"; | |
} | |
else{ | |
echo "SKU {$sku} does not exist"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment