Limit Number of Images Per Product In Magento

Some time we need to limit number of images for a product in our magento project we can do iteasily with some lines of code. Go to ‘app\code\core\Mage\Adminhtml\controllers\Catalog\ProductController.php’ and in saveAction find $data = $this->getRequest()->getPost(); under it put these line. and you are done. $images = Mage::helper(‘core’)->jsonDecode($data[‘product’][‘media_gallery’][‘images’]);                ...

Read More

Remove SID from Magento URL

Open file “app\code\core\Mage\Core\Model\Session\Abstract.php”find this code ‘protected $_skipSessionIdFlag = true;‘replace it with this ‘protected $_skipSessionIdFlag Red it me This. Damage viagra online without prescription Me conjunction your buying viagra online I noticable shampoos Essie store cheap pharmacy didn’t experimented the viagra dosage posted. Ritual office. And cialis price because which strong ...

Read More

Get productID from specific order in Magento

$order = Mage::getModel('sales/order')->load($order_id); $items = $order->getAllItems(); $itemcount=count($items); $name=array(); $unitPrice=array(); $sku=array(); $ids=array(); $qty=array(); foreach ($items as $itemId => $item) {     $name[] = $item->getName();     $unitPrice[]=$item->getPrice();     $sku[]=$item->getSku();     $ids[]=$item->getProductId();     $qty[]=$item->getQtyToInvoice(); }

Read More