当前位置: 首页>>代码示例>>PHP>>正文


PHP ps_product::get_child_options方法代码示例

本文整理汇总了PHP中ps_product::get_child_options方法的典型用法代码示例。如果您正苦于以下问题:PHP ps_product::get_child_options方法的具体用法?PHP ps_product::get_child_options怎么用?PHP ps_product::get_child_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ps_product的用法示例。


在下文中一共展示了ps_product::get_child_options方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list_attribute

 /**
  * Lists all child/sister products of the given product
  *
  * @param int $product_id
  * @return string HTML code with Items, attributes & price
  */
 function list_attribute($product_id, $extra_ids = null)
 {
     // The default listing method
     $product_list = "N";
     $display_use_parent = 'N';
     if (ps_product::parent_has_children($product_id)) {
         $product_list = 'N';
         $child_options = ps_product::get_child_options($product_id);
         if (!empty($child_options)) {
             extract($child_options);
         }
         $quantity_options = ps_product::get_quantity_options($product_id);
         if (!empty($quantity_options['quantity_box'])) {
             $display_type = $quantity_options['quantity_box'];
         }
         $child_option_ids = ps_product::get_field($product_id, 'child_option_ids');
         if ($child_option_ids != '' && $product_list == "N") {
             $product_list = "Y";
         }
         if ($extra_ids) {
             $child_option_ids .= $child_option_ids ? "," . $extra_ids : $extra_ids;
         }
     }
     if (empty($class_suffix)) {
         $class_suffix = "";
     }
     switch ($product_list) {
         case "Y":
             return $this->list_attribute_list($product_id, $display_use_parent, $product_list_child, $display_type, $class_suffix, $child_option_ids, $dw, $aw, $display_header, $product_list_type, $product_list);
             break;
         case "YM":
             return $this->list_attribute_list($product_id, $display_use_parent, $product_list_child, $display_type, $class_suffix, $child_option_ids, $dw, $aw, $display_header, $product_list_type, $product_list);
             break;
         case "N":
         default:
             return $this->list_attribute_drop($product_id, $class_suffix);
             break;
     }
 }
开发者ID:albertobraschi,项目名称:Hab,代码行数:45,代码来源:ps_product_attribute.php

示例2: vmGet

if (!empty($product_id)) {
    $price = $ps_product->get_retail_price($product_id);
} else {
    $price['product_price'] = vmGet($_REQUEST, 'product_price', '');
}
$quantity_start = 0;
$quantity_end = 0;
$quantity_step = 1;
if (!empty($product_id)) {
    // get the Database object we're filling the product form with
    $db = $ps_product->get($product_id);
    //get quantity options
    $quantity_options = ps_product::get_quantity_options($product_id);
    extract($quantity_options);
    //get list style
    $child_options = ps_product::get_child_options($product_id);
    extract($child_options);
    //Get min max order levels
    $order_levels = ps_product::product_order_levels($product_id);
    if ($order_levels) {
        $min_order = array_shift($order_levels);
        $max_order = array_shift($order_levels);
    }
    // Get category IDs
    $db2 = new ps_DB();
    $q = "SELECT category_id FROM #__{vm}_product_category_xref WHERE product_id='{$product_id}'";
    $db2->query($q);
    while ($db2->next_record()) {
        $my_categories[$db2->f("category_id")] = "1";
    }
    // Get the Manufacturer ID
开发者ID:noikiy,项目名称:owaspbwa,代码行数:31,代码来源:product.product_form.php


注:本文中的ps_product::get_child_options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。