Moved upsells above related products.

This commit is contained in:
Mike Jolley 2012-08-21 11:07:54 +01:00
parent c19bf47390
commit 52f3dd350f
1 changed files with 15 additions and 19 deletions

View File

@ -66,16 +66,16 @@ if ( ! is_admin() || defined('DOING_AJAX') ) {
*/
add_filter( 'loop_end', 'woocommerce_reset_loop' );
add_action( 'woocommerce_before_shop_loop', 'woocommerce_show_messages', 10 );
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10);
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
/**
* Subcategories
*
* @see woocommerce_subcategory_thumbnail()
*/
add_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10);
add_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10 );
/**
* Before Single Products
@ -90,17 +90,19 @@ if ( ! is_admin() || defined('DOING_AJAX') ) {
* @see woocommerce_show_product_images()
* @see woocommerce_show_product_thumbnails()
*/
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20);
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );
/**
* After Single Products Summary Div
*
* @see woocommerce_output_product_data_tabs()
* @see woocommerce_upsell_display()
* @see woocommerce_output_related_products()
*/
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10);
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20);
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
/**
* Product Summary Box
@ -111,18 +113,12 @@ if ( ! is_admin() || defined('DOING_AJAX') ) {
* @see woocommerce_template_single_meta()
* @see woocommerce_template_single_sharing()
*/
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
/**
* After Single Products
*
* @see woocommerce_upsell_display()
*/
add_action('woocommerce_after_single_product', 'woocommerce_upsell_display');
/**
* Product Add to cart
@ -133,7 +129,7 @@ if ( ! is_admin() || defined('DOING_AJAX') ) {
* @see woocommerce_variable_add_to_cart()
* @see woocommerce_external_add_to_cart()
*/
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );