$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']; }
$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 = ''; }