- I'm trying to add a link to an order confirmation email.
- The link should only display if SKU 2133 exists.
- The problem when SKU 2133 exists it displays SKU 2133 does not exist.
Before adding the link, I'm testing with the code below. In default.phtml, I added the code below -
<?php
$sku = '2133';
$id = Mage::getModel('catalog/product')->getIdBySku($sku);
if ($id){
echo "SKU {$sku} exists";
}
else{
echo "SKU {$sku} does not exist";
}
?>
$_item
? – Keyur Shah Jan 8 '18 at 19:20