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


PHP mslib_fe::getProductToCategories方法代码示例

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


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

示例1: array

     $subpartArray['###JS_ADVANCED_OPTION_TOGGLE###'] = '$(".toggle_advanced_option").show();' . "\n";
 }
 $subpartArray['###LABEL_HEADING_EDIT_PRODUCT###'] = $heading_page;
 $subpartArray['###LABEL_PRODUCT_STATUS###'] = $this->pi_getLL('admin_visible');
 $subpartArray['###LABEL_PRODUCT_STATUS_ON_CHECKED###'] = ($product['products_status'] or $_REQUEST['action'] == 'add_product') ? 'checked="checked"' : '';
 $subpartArray['###LABEL_ADMIN_YES###'] = $this->pi_getLL('admin_yes');
 $subpartArray['###LABEL_PRODUCT_STATUS_OFF_CHECKED###'] = (!$product['products_status'] and $_REQUEST['action'] == 'edit_product') ? 'checked="checked"' : '';
 $subpartArray['###LABEL_ADMIN_NO###'] = $this->pi_getLL('admin_no');
 $subpartArray['###LABEL_PRODUCT_SEARCH_ENGINE_INDEXING###'] = $this->pi_getLL('search_engine_indexing');
 $subpartArray['###LABEL_PRODUCT_SEARCH_ENGINE_INDEXING_ON_CHECKED###'] = ($product['search_engines_allow_indexing'] or $_REQUEST['action'] == 'add_product') ? 'checked="checked"' : '';
 $subpartArray['###LABEL_ADMIN_YES_INDEXING###'] = $this->pi_getLL('admin_yes');
 $subpartArray['###LABEL_PRODUCT_SEARCH_ENGINE_INDEXING_OFF_CHECKED###'] = (!$product['search_engines_allow_indexing'] and $_REQUEST['action'] == 'edit_product') ? 'checked="checked"' : '';
 $subpartArray['###LABEL_ADMIN_NO_INDEXING###'] = $this->pi_getLL('admin_no');
 $subpartArray['###LABEL_PRODUCT_CATEGORY###'] = $this->pi_getLL('admin_category');
 //categories path
 $old_current_categories_id = mslib_fe::getProductToCategories($this->get['pid'], $product['categories_id']);
 $current_categories_id = $old_current_categories_id;
 if ($this->get['action'] == 'add_product' && $this->get['cid'] > 0) {
     $old_current_categories_id = '';
     $current_categories_id = $this->get['cid'];
 }
 $subpartArray['###VALUE_OLD_CATEGORY_ID###'] = $old_current_categories_id;
 //$product['categories_id'];
 $subpartArray['###INPUT_CATEGORY_TREE###'] = '<input type="hidden" name="categories_id" id="categories_id" class="categoriesIdSelect2BigDropWider" value="' . $current_categories_id . '" />';
 $subpartArray['###INPUT_CATEGORY_TREE_DEFAULT_PATH###'] = '';
 if ($this->get['action'] == 'edit_product' && $this->ms['MODULES']['ENABLE_DEFAULT_CRUMPATH'] > 0) {
     $product_path = mslib_befe::getRecord($this->get['pid'], 'tx_multishop_products_to_categories', 'products_id', array('is_deepest=1 and default_path=1'));
     $default_path = 0;
     if (is_array($product_path) && count($product_path)) {
         $default_path = $product_path['node_id'];
     }
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_edit_product.php

示例2: array_reverse

     $cats = mslib_fe::Crumbar($rs['categories_id']);
     $cats = array_reverse($cats);
     $where = '';
     if (count($cats) > 0) {
         foreach ($cats as $cat) {
             $where .= "categories_id[" . $level . "]=" . $cat['id'] . "&";
             $level++;
         }
         $where = substr($where, 0, strlen($where) - 1);
         $where .= '&';
     }
     // get all cats to generate multilevel fake url eof
 }
 $product_detail_link = mslib_fe::typolink($this->conf['products_detail_page_pid'], '&' . $where . '&products_id=' . $rs['products_id'] . '&tx_multishop_pi1[page_section]=products_detail');
 // view product link eof
 $tmp_product_categories = mslib_fe::getProductToCategories($rs['products_id'], $rs['categories_id']);
 $product_categories = explode(',', $tmp_product_categories);
 $cat_crumbar = '';
 foreach ($product_categories as $product_category) {
     $cat_crumbar .= '<ul class="msAdminCategoriesCrum list-inline">';
     $cats = mslib_fe::Crumbar($product_category);
     $teller = 0;
     $total = count($cats);
     for ($i = $total - 1; $i >= 0; $i--) {
         $teller++;
         // get all cats to generate multilevel fake url eof
         if ($total == $teller) {
             $class = 'lastItem';
         } else {
             $class = '';
         }
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_products_search_and_edit.php


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