コード例 #1
0
 $category_top_id = tep_db_prepare_input($_POST['ctid']);
 $genders = Product::getOldProductFunction()->productGenderName();
 unset($genders[0]);
 //none
 unset($genders[3]);
 //unisex
 $obj_ct = new CategoryTop($category_top_id);
 $subcats = ProductAttribute::getOldStylesFunction()->retrieveList($obj_ct->getSubCategoryGroup());
 if (in_array($jng_sp_id, array(1005))) {
     //get from Primary Navigation (Navigation for this SP separated between Primary and Secondary)
     $navids = retrieveNavIDs($jng_sp_id, 'sc');
 } else {
     //Navigation are used for both Primary and Additional
     $navids = retrieveNavIDs($jng_sp_id, '');
 }
 $params = $class_jpc->loadAsMapper($jng_sp_id, $param_code);
 if (count($subcats) == 0) {
     $result = '<h3 class="red">No Sub Categories found</h3>';
 } else {
     $result = '<div><table class="form" border="0" cellpadding="0" cellspacing="0">';
     foreach ($genders as $gkey => $gval) {
         $gender_color = $gkey == '1' ? 'green' : 'blue';
         foreach ($subcats as $sc) {
             $param_id = $sc['styles_id'];
             $param_name = $sc['name'];
             $param_id2 = $gkey;
             $params_key = $param_id . '-' . $param_id2;
             $navids_combo = '<select id="navids">' . loadComboListFromArray($navids) . '</select>';
             if (isset($params[$params_key])) {
                 $checked = 'checked="checked"';
                 $param_value = $params[$params_key];
コード例 #2
0
     }
     $content .= '</table>';
     $content .= '<div style="margin-top:20px;"><input id="amvd-download-all" type="button" value="Download All Files" /></div>';
     $javascript .= '
         $("#amvd-download-all").click(function() {
             $("a.dl-icon").each(function() { window.open($(this).attr("href")); });
         });
     ';
     //AMAZON VENDOR UPLOAD PROCESS END
 } elseif ($jng_sp_id == '1001') {
     ///////////////////////////////////////
     //  LAZADA INDONESIA UPLOAD PROCESS  //
     ///////////////////////////////////////
     //SP brand values will be filled later in the loop
     $sp_values_brand = array();
     $sp_values_colors = $class_jcp->loadAsMapper($jng_sp_id, 'C');
     $sp_values_navsubcat = $class_jcp->loadAsMapper($jng_sp_id, 'N');
     $sp_values_navcat = $class_jcp->loadAsMapper($jng_sp_id, 'V');
     //            $template_file = SP_LAZADAID_PATH . 'templates/catalog-fashion.xls';
     $template_file = SP_LAZADAID_PATH . 'templates/catalog-fashion-150519.xls';
     //set on which row the column key is
     $template_row_keys = 3;
     //set on which row the data should start
     $template_row_start = 4;
     $obj_excel_reader = new PHPExcel_Reader_Excel5();
     $test = $obj_excel_reader->canRead($template_file);
     $obj_excel = $obj_excel_reader->load($template_file);
     $obj_excel->setActiveSheetIndex(0);
     $obj_excel_ws = $obj_excel->getActiveSheet();
     //get all column key from template
     $colkey = 'Starter';