Magento 1.9.3.1 – Add images/icons to attribute options to replace placeholder image of your Magento products page

magento 1.9.3.1 view.phtml around line 100 replace the if statement <?php if($_item->getColor()): ?> <?php $optionId = $_item->getColor(); $optionIdurl = Mage::helper(‘attributeoptionimage’)->getAttributeOptionImage($optionId) ?> <a href=”#” class=”color_swatch”> <?php if (strpos( $this->helper(‘catalog/image’)->init($_item, ‘small_image’)->resize(100, 150), ‘placeholder’)) { ?> <img src=”<?php echo $optionIdurl; ?>” /> <?php } else { ?> <img src=”<?php echo $this->helper(‘catalog/image’)->init($_item, ‘small_image’)->resize(100, 150); ?>” /> <?php } ?> […]

Shitty documentation installing magmi

When you install magmi and you access magmi/web/magmi.php initial login/pass will be “magmi/magmi”. After you setup db connection info it will use magento back office login/password. create magmi/.htaccess Order deny,allow Deny from all then create magmi/web/.htaccess Order allow,deny Allow from all RewriteEngine On RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

How to install magmi

extract magmi to your magento folder go to magmi/web/ create htpasswd using ‘/usr/local/apache/bin/htpasswd -c .htpasswd itheadaches’ set owner to files ‘chown -R fill4style.fill4style itheadaches’ set permission to files install php-mbstring, in my case I had to recompile apache with mbstring    

Pagespeed higher score for magento with cache-control

Add this at the end of .htaccess file ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg “access 1 week” ExpiresByType image/jpeg “access 1 week” ExpiresByType image/gif “access 1 week” ExpiresByType image/png “access 1 week” ExpiresByType text/css “access 1 week” ExpiresByType application/pdf “access 1 week” ExpiresByType application/javascript “access 1 week” ExpiresByType application/x-javascript “access 1 […]

Magento – Menu toggle dropdown broken in left column

design/frontend/mogan/default/template/catalog/layer/view.phtml moved javascript to the very bottom <script> jQuery(document).ready(function(){ jQuery(document).on(‘click’,”#shop-by-header”,function(){ jQuery(“#shop-by-content”).slideToggle(); }); jQuery(document).on(‘click’,”dt[data-toggle=’true’]”,function(){ var elm=jQuery(this),name=jQuery(this).attr(‘data-name’).split(‘-‘)[1]; console.log(‘dd[data-toggle=”toggle-‘+name+'”]’); jQuery(‘.toggle-‘+name).slideToggle( “slow”,function(){ if(elm.text()===’- ‘){ elm.find(‘span’).text(‘+ ‘); }else{ elm.find(‘span’).text(‘- ‘); } }); }); }); </script>java  

Magento – swatches slowing down site

The category page aka product-list page was really slow to load, about 25 seconds plus To troubleshoot Magento’s cpu usage, first enable varien profiler http://www.techawaken.com/enable-magento-profiler-identify-magento-performance-bottlenecks/ You can also try aoe_profiler Found out it was the configurable swatches. Tried the first method in this post. http://magento.stackexchange.com/questions/69863/configurable-swatches-slow-site-down My load time went from 25s to 10s. Then I […]

Increase Catalog Resize Image in Magento

Please follow the steps below: Open: /app/design/frontend/default/milano/template/catalog/product/list.phtml Find (on lines 52-57): <?php $mainImg = $this->helper(‘catalog/image’)->init($_product, ‘small_image’)->resize($imgSize); ?> <?php if($_hoverSwap): $backImg = $_listMedia->setTemplate(“catalog/product/list/media.phtml”)->setData(‘size’, $imgSize)->setData(‘product’, $_product)->toHtml(); endif; ?> <a href=”<?php echo $_product->getProductUrl() ?>” title=”<?php echo $this->stripTags($this->getImageLabel($_product, ‘small_image’), null, true) ?>” class=”product-image”> <?php if($backImg != ‘null’ && $backImg): ?><img src=”<?php echo $backImg ?>” class=”hover-image” width=”<?php echo $imgSize ?>” […]