I need get all skus in a current category page, the code works only with getId, i want get skus: getSku, but doesnt work:
$products = Mage::getBlockSingleton('catalog/product_list')->getLoadedProductCollection();
$category = Mage::registry('current_category');
foreach ($products as $item) {
if($lista[0] != ''){
$lista[0][] = ' '.$item->getSku();
}
else{
$lista[0][] = $item->getSku();
}
$data['event'] = 'category';
$google_tag_params = array();
$google_tag_params['ecomm_prodid'] = $lista[0];
$data['google_tag_params'] = $google_tag_params;
}
This return: [null, ' ', ' ', ' ', ' ', ' ', ' ', ' ' ]
What's wrong?