/**
  * Outputs items for upsell.
  * You can configure items for upsell by following this WooCommerce guide.
  * http://docs.woothemes.com/document/related-products-up-sells-and-cross-sells/
  * This is tested to work on single-product pages.
  * @access public
  * @return void
  */
 public function wpv_woo_show_upsell_func()
 {
     global $post, $woocommerce;
     ob_start();
     if (is_object($woocommerce)) {
         //WooCommerce plugin activated
         //Get products
         $product = $this->wcviews_setup_product_data($post);
         if (isset($product) && is_product()) {
             //Executable only on single product page
             //Check if product_type is set
             if (isset($product->product_type)) {
                 //Set check if defined
                 $product_type = $product->product_type;
                 if (!empty($product_type)) {
                     //Defined
                     //Simple or variable products
                     if (function_exists('woocommerce_upsell_display')) {
                         //Call WooCommerce core public function on outputting upsell items
                         woocommerce_upsell_display();
                     }
                     return ob_get_clean();
                 }
             }
         }
     }
 }
Example #2
0
		function dt_woocommerce_output_upsells() {
			$page_layout = dttheme_option('woo',"product-layout");
			$page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
	
			$upsell_products = ( $page_layout === "content-full-width" ) ? 4 : 3;
	
			$output = "";
			ob_start();
			woocommerce_upsell_display($upsell_products,$upsell_products); // X products, X columns
			$content = ob_get_clean();
			if($content):
				$output .= "<div class='upsell-products-container'>{$content}</div>";
			endif;
			echo $output;
		}
Example #3
0
function avia_woocommerce_output_upsells()
{
    global $avia_config;
    $output = "";
    ob_start();
    woocommerce_upsell_display($avia_config['shop_single_column_items'], $avia_config['shop_single_column']);
    // 4 products, 4 columns
    $content = ob_get_clean();
    if ($content) {
        $output .= "<div class='product_column product_column_" . $avia_config['shop_single_column'] . "'>";
        //$output .= "<h3>".(__('You may also like', 'avia_framework'))."</h3>";
        $output .= $content;
        $output .= "</div>";
    }
    $avia_config['woo_upsells'] = $output;
}
Example #4
0
/**
 * Display upsells in 3 columns
 * @since 1.1.0
 */
function highwind_woocommerce_upsell_display()
{
    woocommerce_upsell_display(-1, 3);
}
Example #5
0
function avia_woocommerce_output_upsells()
{
    global $avia_config;
    echo "<div class='product_column product_column_" . $avia_config['shop_single_column'] . "'>";
    woocommerce_upsell_display($avia_config['shop_single_column_items'], $avia_config['shop_single_column']);
    // 4 products, 4 columns
    echo "</div>";
}
Example #6
0
 /**
  * Change products per row for upsells.
  *
  * @since 2.0.0
  */
 public static function upsell_display()
 {
     woocommerce_upsell_display(wpex_get_mod('woocommerce_upsells_count', '4'), wpex_get_mod('woocommerce_upsells_columns', '4'));
 }
 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(2, 1);
     // Display 3 products in rows of 3
 }
/** Set limit and column on upsell products */
function spyropress_wc_upsell_display($args)
{
    if (get_setting('shop_upsell', false)) {
        return;
    }
    $limit = get_setting('shop_upsell_limit', 4);
    $columns = get_setting('shop_upsell_columns', 4);
    woocommerce_upsell_display($limit, $columns);
}
							<div class="uncont">
								<?php 
if ($show_body_title) {
    woocommerce_template_single_title();
}
woocommerce_template_single_rating();
woocommerce_template_single_price();
woocommerce_template_single_excerpt();
woocommerce_template_single_add_to_cart();
woocommerce_template_single_meta();
woocommerce_template_single_sharing();
?>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<?php 
ob_start();
woocommerce_output_product_data_tabs();
woocommerce_upsell_display();
$the_content = ob_get_clean();
echo uncode_get_row_template($the_content, '', '', '', ' product', false, false, false);
ob_start();
woocommerce_output_related_products();
$the_content = ob_get_clean();
echo uncode_get_row_template($the_content, '', $limit_content_width, '', ' row-related', false, true, false);
 function woo_wc_upsell_display()
 {
     woocommerce_upsell_display(-1, 3);
 }
Example #11
0
 function dt_woocommerce_output_upsells()
 {
     $page_layout = dttheme_option('woo', "product-layout");
     $page_layout = !empty($page_layout) ? $page_layout : "content-full-width";
     $upsell_products = $page_layout === "content-full-width" ? 4 : 2;
     $output = "";
     ob_start();
     woocommerce_upsell_display($upsell_products, $upsell_products);
     // X products, X columns
     $content = ob_get_clean();
     if ($content) {
         $content = str_replace('<h2>', '<div class="border-title"><h2>', $content);
         $content = str_replace('</h2>', '<span></span></h2></div>', $content);
         $output .= "<div class='upsell-products-container'>{$content}</div>";
     }
     echo $output;
 }
Example #12
0
 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(3, 3);
 }
 function woo_upsell_display()
 {
     // Display up sells in correct layout.
     woocommerce_upsell_display(-1, 3);
 }
 function aggression_woocommerce_product_page_cross_sell_output()
 {
     woocommerce_upsell_display(get_theme_mod('aggression_woocommerce_set_cross_sell_product_limit'), 4);
     // Display 4 products in rows of 4
 }
Example #15
0
 function woocommerce_pdc_upsells()
 {
     $columns = get_option('wc_pdc_columns');
     woocommerce_upsell_display(-1, $columns);
 }
Example #16
0
function ht_redefine_upsell_display()
{
    woocommerce_upsell_display('-1', 3);
}
Example #17
0
function pinnacle_woocommerce_output_upsells()
{
    woocommerce_upsell_display(4, 4);
}
Example #18
0
 /**
  * Updates upsell limit
  *
  * @access public
  * @return void
  */
 public static function updateUpsellLimit()
 {
     $columns = 4;
     $limit = ThemexCore::getOption('product_upsell_number', 4);
     woocommerce_upsell_display($limit, $columns);
 }
Example #19
0
function woocommerce_output_upsells()
{
    $output = null;
    ob_start();
    woocommerce_upsell_display(4, 4);
    $content = ob_get_clean();
    if ($content) {
        $output .= $content;
    }
    echo $output;
}
 function storefront_upsell_display()
 {
     woocommerce_upsell_display(-1, 3);
 }
Example #21
-1
 function woocommerce_output_upsells()
 {
     $woo_product_layout = wpex_option('woo_product_layout', 'full-width');
     $columns = wpex_option('woocommerce_upsell_columns', '4');
     if (is_singular() && $woo_product_layout != 'full-width') {
         $columns = wpex_option('woocommerce_with_sidebar_upsell_columns', '3');
     }
     woocommerce_upsell_display($columns, $columns);
 }
Example #22
-1
 function shop_isle_upsell_display()
 {
     echo '</div></div>';
     global $product;
     $upsells = $product->get_upsells();
     if (!empty($upsells) && count($upsells) > 0) {
         echo '<hr class="divider-w">';
     }
     echo '<div class="container">';
     woocommerce_upsell_display(-1, 3);
     $related = $product->get_related();
     if (!empty($related) && count($related) > 0) {
         echo '</div>';
         echo '<hr class="divider-w">';
         echo '<div class="container">';
     }
 }
 /**
  * Output upsell products in correct number and columns
  */
 public function output_upsells()
 {
     $number = Bunyad::core()->get_sidebar() == 'none' ? 4 : 3;
     woocommerce_upsell_display($number, $number);
 }
Example #24
-1
 function woo_upsell_display()
 {
     // Display up sells in correct layout.
     global $woo_options, $post;
     woocommerce_upsell_display(-1, 4);
 }
Example #25
-1
 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(2, 2);
     // Показать 4 товара а 4 колонки
 }
Example #26
-1
function avada_woocommerce_upsell_display()
{
    global $product, $woocommerce_loop, $post;
    $upsells = $product->get_upsells();
    if (sizeof($upsells) == 0) {
        return;
    }
    ?>
		<div class="fusion-clearfix"></div>
		<?php 
    if (get_post_meta($post->ID, 'pyre_number_of_related_products', true) == 'default' || get_post_meta($post->ID, 'pyre_number_of_related_products', true) == '' || !get_post_meta($post->ID, 'pyre_number_of_related_products', true)) {
        $number_of_columns = Avada()->settings->get('woocommerce_related_columns');
    } else {
        $number_of_columns = get_post_meta($post->ID, 'pyre_number_of_related_products', true);
    }
    woocommerce_upsell_display(-1, $number_of_columns);
}
Example #27
-1
/**
 * Displays 3 upsell products on single product pages
 *
 * This function is attached to the 'woocommerce_after_single_product_summary' filter hook.
 *
 * @since 1.0.0
 * @return array
 */
function bavotasan_woocommerce_output_upsells()
{
    woocommerce_upsell_display(3, 3);
    // Display 3 products in rows of 3
}
Example #28
-1
 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(4, 4);
     // Display 4 products in rows of 4
 }
Example #29
-1
function avada_woocommerce_upsell_display()
{
    global $product, $woocommerce_loop, $post, $smof_data;
    $upsells = $product->get_upsells();
    if (sizeof($upsells) == 0) {
        return;
    }
    if (get_post_meta($post->ID, 'pyre_number_of_related_products', true) == 'default' || get_post_meta($post->ID, 'pyre_number_of_related_products', true) == '' || !get_post_meta($post->ID, 'pyre_number_of_related_products', true)) {
        $number_of_columns = $smof_data['woocommerce_related_columns'];
    } else {
        $number_of_columns = get_post_meta($post->ID, 'pyre_number_of_related_products', true);
    }
    woocommerce_upsell_display(-1, $number_of_columns);
}
Example #30
-1
function wootique_upsell_display()
{
    woocommerce_upsell_display(3, 3);
    // 3 products, 3 columns
}