magentosnippet.blogspot.com
Magento Code Snippet: 05/06/11 - 12/06/11
http://magentosnippet.blogspot.com/2011_06_05_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Friday, 10 June 2011. Get all product collection with the below code:. Collection = Mage: getModel('catalog/product')- getCollection(); $collection- addAttributeToSelect('*');. Add different types of filters on collection. example shown below. Posted by Mage: Works. Thursday, 9 June 2011. Magento Product Thumbnail Image Switcher. Go to file media.phtml. Find the code below. Php echo $this- getGalleryUrl($ image)? Php echo $ product- getName();?
magentosnippet.blogspot.com
Magento Code Snippet: Change Admin URL In Magento
http://magentosnippet.blogspot.com/2011/07/change-admin-url-in-magento.html
Magento Solutions: Magento Code Snippet, Magento Tips. Wednesday, 6 July 2011. Change Admin URL In Magento. Its easy to change admin URL in Magneto, open local.xml at location below,. Now search for the code below. Now replace 'admin' with your desired name. As you do so your admin URL will be changed to adminarea. Posted by Mage: Works. Subscribe to: Post Comments (Atom). Get New Magento Updates. Take A Look At Our New Website. Mage: Works. Magento Shop By Brand in SideBar. Change Admin URL In Magento.
magentosnippet.blogspot.com
Magento Code Snippet: 26/06/11 - 03/07/11
http://magentosnippet.blogspot.com/2011_06_26_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Thursday, 30 June 2011. Send Every Store Activity Email To Store Owner In Magento. We can do this by editiing Templete.php file at the location given below. App code core Mage Core Model Email. Search for code below. This- setSentSuccess($this- send($email, $name, $vars) ;. And just below the searched code paste the code given. This- setSentSuccess($this- send('owner@store.com', $name, $vars) ;. Posted by Mage: Works. Get Customer GroupId in Magento.
magentosnippet.blogspot.com
Magento Code Snippet: 12/06/11 - 19/06/11
http://magentosnippet.blogspot.com/2011_06_12_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Saturday, 18 June 2011. Disabling Magento Extension Manually. Some time we need to disable extension manually, its easy to do as as every magento extension create its XML file in 'app etc modules' folder like our extension name is 'AdvLay Nav' so it will create file named AdvLay Nav.xml when u open it you will see code like this. Self name Advance Layed Navigation /self name. Posted by Mage: Works. Friday, 17 June 2011. Get Current Category In Magento.
magentosnippet.blogspot.com
Magento Code Snippet: 03/07/11 - 10/07/11
http://magentosnippet.blogspot.com/2011_07_03_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Saturday, 9 July 2011. Magento 'Shop By Brand' in SideBar. First create the template file and name it productbrand.phtml place it in catalog/product folder. Copy the code given below and paster it in you productbrand.phtml. Note: Please chnage 'yourdomain.com' with your site domain name. Span Product Brands /span /h4. Product = Mage: getModel('catalog/product');. Attribute = $attributes- getFirstItem()- setEntity($product- getResource() ;. Its easy t...
magentosnippet.blogspot.com
Magento Code Snippet: 29/05/11 - 05/06/11
http://magentosnippet.blogspot.com/2011_05_29_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Saturday, 4 June 2011. Getting all top and sub categories in magento. Place this code in you top.phtml ( app design frontend base default template catalog navigation). Php $ helper = Mage: helper('catalog/category')? Php $ categories = $ helper- getStoreCategories()? Php $currentCategory = Mage: registry('current category')? Php if (count($ categories) 0):? Php foreach($ categories as $ category):? Php echo $ helper- getCategoryUrl($ category)?
magentosnippet.blogspot.com
Magento Code Snippet: Magento Load Product By Name / SKU / ID
http://magentosnippet.blogspot.com/2011/07/magento-load-by-name-load-by-sku-load.html
Magento Solutions: Magento Code Snippet, Magento Tips. Saturday, 16 July 2011. Magento Load Product By Name / SKU / ID. Load by name $ category = Mage: getModel('catalog/category')- loadByAttribute('name', 'Ruby Ring'); $ product = Mage: getModel('catalog/product')- loadByAttribute('name', 'emerald earring'); / Load by SKU $ product = Mage: getModel('catalog/product')- loadByAttribute('sku', 'Eram18j4'); / Load by ID (just load): $ product = Mage: getModel('catalog/product')- load($productID);.
magentosnippet.blogspot.com
Magento Code Snippet: Magento Reindexing Problem Fixing programmability
http://magentosnippet.blogspot.com/2011/07/mahento-reindexing-problem-fixins.html
Magento Solutions: Magento Code Snippet, Magento Tips. Friday, 15 July 2011. Magento Reindexing Problem Fixing programmability. When ever number of products increased it get tuff to reindex all data it get more worse if you are on shared host. Now you can solve this issues with the code given below. Create new file on your root i.e. reindex.php and copy all data given below and paste it in reindex.php. Now you can start reindex data by just accessing URL like http:/ yourdomain.com/reindex.php.
magentosnippet.blogspot.com
Magento Code Snippet: Magento Display Category BestSellers
http://magentosnippet.blogspot.com/2011/07/magento-display-category-bestsellers.html
Magento Solutions: Magento Code Snippet, Magento Tips. Wednesday, 6 July 2011. Magento Display Category BestSellers. Curr categoryid = Mage: registry('current category')- getId(); $cat Id= $curr categoryid; $category = Mage: getModel('catalog/category')- load($cat Id); $products = Mage: getResourceModel('reports/product collection') - addOrderedQty() - addAttributeToSelect('*') - setOrder('ordered qty', 'desc') - addCategoryFilter($category);. Posted by Mage: Works. Subscribe to: Post Comments (Atom).
magentosnippet.blogspot.com
Magento Code Snippet: 10/07/11 - 17/07/11
http://magentosnippet.blogspot.com/2011_07_10_archive.html
Magento Solutions: Magento Code Snippet, Magento Tips. Saturday, 16 July 2011. Magento Load Product By Name / SKU / ID. Load by name $ category = Mage: getModel('catalog/category')- loadByAttribute('name', 'Ruby Ring'); $ product = Mage: getModel('catalog/product')- loadByAttribute('name', 'emerald earring'); / Load by SKU $ product = Mage: getModel('catalog/product')- loadByAttribute('sku', 'Eram18j4'); / Load by ID (just load): $ product = Mage: getModel('catalog/product')- load($productID);. Try{ ob i...