Skip to content

Instantly share code, notes, and snippets.

@clare485
clare485 / related products limit to 3
Created October 11, 2013 15:03
You need to edit the template file catalog/product/list/related.phtml and limit the loop to only iterate through 3 products. For example:
@clare485
clare485 / jquery noconflict.js
Created October 9, 2013 15:01
jquery noconflict
jQuery(function($) {
$.noConflict();
});
@clare485
clare485 / woocommerce search
Created October 9, 2013 10:48
woocommerce search - must use either woo search widget or woocommerce product search widget
@clare485
clare485 / add static block
Created October 3, 2013 12:17
magento add static block using xml
<block type="cms/block" name="how-it-works-button">
<action method="setBlockId"><block_id>how-it-works</block_id></action>
</block>
// add this code to functions.php
if(is_admin()) {
add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
define( 'FS_CHMOD_DIR', 0751 );
}
@clare485
clare485 / Add order information to success page
Created September 19, 2013 12:29
Add order information to success page - for Channel Advisor script
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@clare485
clare485 / blockUI error
Created September 19, 2013 08:59
blockUI error blockUI requires jQuery v1.2.3 or later
replace the two block ui files in woocommerce with these:
https://github.com/woothemes/woocommerce/blob/master/assets/js/jquery-blockui/jquery.blockUI.js
https://github.com/woothemes/woocommerce/blob/master/assets/js/jquery-blockui/jquery.blockUI.min.js
This might not work, so try using the jquery updater plugin
This might break the fancybox lightbox, in which case:
@clare485
clare485 / woocommerce UIblock bug
Created September 16, 2013 14:08
define( 'CONCATENATE_SCRIPTS', false ); or use 'update jquery' plugin
define( 'CONCATENATE_SCRIPTS', false );