當前位置: 首頁>>代碼示例>>PHP>>正文


PHP woocommerce_upsell_display函數代碼示例

本文整理匯總了PHP中woocommerce_upsell_display函數的典型用法代碼示例。如果您正苦於以下問題:PHP woocommerce_upsell_display函數的具體用法?PHP woocommerce_upsell_display怎麽用?PHP woocommerce_upsell_display使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了woocommerce_upsell_display函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: dt_woocommerce_output_upsells

		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;
		}
開發者ID:namnguyen2312,項目名稱:spa,代碼行數:15,代碼來源:index.php

示例2: wpv_woo_show_upsell_func

 /**
  * 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();
                 }
             }
         }
     }
 }
開發者ID:rebeccayshen,項目名稱:kitlist,代碼行數:35,代碼來源:Class_WooCommerce_Views.php

示例3: avia_woocommerce_output_upsells

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;
}
開發者ID:Jiersone,項目名稱:mac,代碼行數:16,代碼來源:config.php

示例4: highwind_woocommerce_upsell_display

/**
 * Display upsells in 3 columns
 * @since 1.1.0
 */
function highwind_woocommerce_upsell_display()
{
    woocommerce_upsell_display(-1, 3);
}
開發者ID:hkarriche,項目名稱:wordpress,代碼行數:8,代碼來源:template.php

示例5: avia_woocommerce_output_upsells

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>";
}
開發者ID:eddiewilson,項目名稱:new-ke,代碼行數:8,代碼來源:config.php

示例6: upsell_display

 /**
  * 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'));
 }
開發者ID:iq007,項目名稱:MadScape,代碼行數:9,代碼來源:woocommerce-config.php

示例7: woocommerce_output_upsells

 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(2, 1);
     // Display 3 products in rows of 3
 }
開發者ID:kiddyhpzx94,項目名稱:ISCProject,代碼行數:5,代碼來源:accesspress-function.php

示例8: spyropress_wc_upsell_display

/** 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);
}
開發者ID:rinodung,項目名稱:myfreetheme,代碼行數:10,代碼來源:woocommerce-init.php

示例9: woocommerce_template_single_title

							<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);
開發者ID:b0123498765,項目名稱:fithealthyandwealthy,代碼行數:31,代碼來源:content-single-product.php

示例10: woo_wc_upsell_display

 function woo_wc_upsell_display()
 {
     woocommerce_upsell_display(-1, 3);
 }
開發者ID:pwillems,項目名稱:mimosa-contents,代碼行數:4,代碼來源:theme-woocommerce.php

示例11: dt_woocommerce_output_upsells

 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;
 }
開發者ID:PNW3DEV,項目名稱:iesdb-v1,代碼行數:17,代碼來源:index.php

示例12: woocommerce_output_upsells

 function woocommerce_output_upsells()
 {
     woocommerce_upsell_display(3, 3);
 }
開發者ID:ksan5835,項目名稱:maadithottam,代碼行數:4,代碼來源:woocommerce.php

示例13: woo_upsell_display

 function woo_upsell_display()
 {
     // Display up sells in correct layout.
     woocommerce_upsell_display(-1, 3);
 }
開發者ID:vanminh0910,項目名稱:shangri-la,代碼行數:5,代碼來源:theme-woocommerce.php

示例14: aggression_woocommerce_product_page_cross_sell_output

 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
 }
開發者ID:TheAggressive,項目名稱:aggression,代碼行數:5,代碼來源:woocommerce-settings.php

示例15: woocommerce_pdc_upsells

 function woocommerce_pdc_upsells()
 {
     $columns = get_option('wc_pdc_columns');
     woocommerce_upsell_display(-1, $columns);
 }
開發者ID:sawan34,項目名稱:tanzi,代碼行數:5,代碼來源:details-customiser.php


注:本文中的woocommerce_upsell_display函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。