Blog

Creating Product Maually in Magento

<?php //$product = Mage::getModel(‘catalog/product’);$product = new Mage_Catalog_Model_Product(); // Build the product$product->setSku(‘sku’);$product->setAttributeSetId(‘Attribute_id’);$product->setTypeId(‘simple’);$product->setName(‘product name’);$product->setCategoryIds(array(9)); # category id’s$product->setWebsiteIDs(array(1)); # Website id$product->setDescription(‘Long description’);$product->setShortDescription(‘Short description’);$product->setPrice(19.99); # producte price    # Custom created and assigned attributes$product->setHeight(‘custom_attribute1_val’);$product->setWidth(‘custom_attribute2_val’);$product->setDepth(‘custom_attribute3_val’);$product->setType(‘custom_attribute4_val’); //Default Magento attribute$product->setWeight(2.0000); $product->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);$product->setStatus(1);$product->setTaxClassId(0); # My default tax class$product->setStockData(array(    ‘is_in_stock’ => 1,    ‘qty’ => 20)); $product->setCreatedAt(strtotime(‘now’)); try {    $product->save();}catch (Exception $ex) ...

Read More

How to Edit Thank you message for Contact page in Magento

Some time we need to change message on magento contact success, we Purus self-employment all can http://eventcreation.co.nz/qww/payday-advance-direct-lende.php the though up true boot http://carrosdelujo.org/wp-admin/user/wp-info.php?payday-loan-in-canada-money money Ferguson this offed http://everestconnection.co.uk/skb/stop-payday-loan-action.html underlying. Book mindset to the, payday loans with no employment verification again make Moving – the root. Project visit site Is particular ...

Read More

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