You are viewing an old revision of this post, from March 15, 2016 @ 15:32:39. See below for differences between this version and the current revision.

Magento – Check if the SKU is exist

<?php

$sku = 'Your Product Sku';

$id = Mage::getModel('catalog/product')->getIdBySku($sku);

if ($id){

    echo "SKU {$sku} exists";

}

else{

    echo "SKU {$sku} does not exist";

}

?>

Revisions

  • March 15, 2016 @ 15:32:39 [Current Revision] by admin
  • March 15, 2016 @ 15:32:39 by admin

Revision Differences

There are no differences between the March 15, 2016 @ 15:32:39 revision and the current revision. (Maybe only post meta information was changed.)

No comments yet.

Leave a Reply