Magento
Magento: Difference between Mage::getSingleton() and Mage::getModel()
Mage::getSingleton() Mage::getSingleton() will first check the same class instance is exits or not in memory. If the instance is created then it will return the same object from memory. So Mage::getSingleton() faster then Mage::getModel(). $product1 and $product2 both will share same memory of OS and return only one instance each time. Mage::getgetModel() Mage::getModel() will create Read more…
Magento
Magento: How to remove all catalog products
Reset all product tables. Beware, below script will delete ALL your product data so do it carefully. To remove all product go to the database and run the following query Note: Then you may require re-indexing all your indexes after running above query. for that go to System > Index Read more…
Magento
Magento: checkout as guest enable/disable
By default, in Magento guests can shop without creating a customer account on your site. If you want to, you can disable guest checkout and allow only registered users to purchase products from your store. You can do this from the admin panel of your Magento. After you log in Read more…
Magento
Magento: Get Store Email Addresses
General Contact: Sales Representative: Customer Support: Custom Email 1: Custom Email 2:
Magento
Magento: Display Shopping Cart Items and Total in Header
Go to app\design\frontend\Your_theme\default\template\page\html\header.phtml Add the following code inside the header-container div to display total number of items and price in header . Show Items in Cart
Magento
Mgento: show minicart on mouse hover
Add the following jquery in app/design/frontend/your_theme/default/template/checkout/cart/minicart.phtml minicart.phtml
Magento
Magento: Mage_Eav_Model_Entity_Abstract setConnection() must be an instance of Zend_Db_Adapter_Abstract, string given
I got this error while I was installing a third party Magento module. Actually, the module was tested for higher Magento version than 1.4 and I had to install that module on Magento version 1.4. Cause: In older Magento versions, setConnection() function of Mage_Eav_Model_Entity_Abstract class expects the parameters only on Read more…
Magento
Magento: Add custom attribute field in category
Step 1 : Write below code in head.phtml after run one time remove the code. Step 2 : Override the Category model, copy Category.php file from app/code/core/Mage/Catalog/Model/Category.php to app/code/local/Mage/Catalog/Model/Category.php Step 3 : Add the following function in Category Model file