Total Posts: 31
I’m trying to get the SKU of the product page I’m on, but only if I’m on a product page. If I’m on any other page I want it to show sku as null.
When I use the below, I am getting an SKU returned on category pages too. As far as I know the categories don’t have SKU. So how can I check if the current page has a “real SKU”. I’m grabbing the current id which is my problem on non-product pages. But I don’t know how else to grab the current product info.
$idParams = $this->getRequest()->getParam(’id’);
$cModel = Mage::getModel(’catalog/product’);
Thank You for your time and Happy Holidays!