function getDisplay($pid, $spid, $amvd_provision_rate, $row_class = 'o') { global $class_jc; $result = ''; $obj_product = new Product($pid); $have_amvd_catalog = $obj_product->isAddedToSalesPartner($spid); $is_active = $obj_product->isActiveInSalesPartner($spid); $products_image = $obj_product->displayImage(IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1); $info = '<div style="margin-bottom:20px;">' . $obj_product->displayIDAndCode() . '</div>'; $info .= '<div class="w150" style="margin:0 auto;">' . $obj_product->displayRecentSoldTable() . '</div>'; $navids = array('0' => 'Please select a navigation...'); $navids_opts = retrieveNavIDs($spid, 'bn'); foreach ($navids_opts as $n_id => $n_name) { //if doesn't work in dev environment, it could be caused by umlauts //in the navigation name. Can be fixed by adding htmlspecialchars or //but we don't need it for live (sahat- 16.09.2014) $navids[$n_id] = $n_name; } $navid = $have_amvd_catalog ? $obj_product->getSalesPartnerMainNavigationID($spid) : null; $navigation = '<select class="navigation input">' . loadComboListFromArray($navids, null, $navid, false) . '</select>'; $result .= '<tr id="' . $pid . '" class="' . $row_class . '">'; $result .= '<td class="img">' . $products_image . '</td>'; $result .= '<td class="name">' . $info . '</td>'; $result .= '<td class="pb">' . $navigation . '</td>'; $btn_update_text = $is_active ? 'Update' : 'Activate'; $btn_add = '<input type="button" style="width:90px;" class="add button blue" value="Add" title="Add this product to AM.VD Catalogue"/>'; $btn_update = '<input type="button" style="width:90px;" class="update button blue" value="' . $btn_update_text . '" title="Update and activate this product on AM.VD Catalogue"/>'; $btn_ignore = '<input type="button" style="width:90px;" class="ignore button" value="Ignore" title="Ignore from list"/>'; $btn_deactivate = '<input type="button" style="width:90px;" class="deactivate button blue" value="Deactivate" title="Deactivate or remove from AM.VD catalog"/>'; $i_hidden = '<input type="hidden" name="jcid" value="' . $obj_product->getSalesPartnerCatalogID($spid) . '"/>'; if ($have_amvd_catalog) { $btn = $i_hidden . $btn_update . '<br/>' . $btn_deactivate; } else { $btn = $btn_add . '<br/>' . $btn_ignore; } $result .= '<td class="act">' . $btn; $result .= '<input type="hidden" class="pid" value="' . $pid . '"/>'; $result .= '</td>'; $result .= '</tr>'; return $result; }
function neckermannNavIDs($type = '*') { $navid = array(); if ($type == '*') { $type = array('sch', 'jng', 's'); } $navs = retrieveNavIDs('1', $type); foreach ($navs as $id => $name) { $navid[$id] = $name; } /* if($type=='sch' || $type=='*') { $schmuck_nav = load_config('neckermann-navids-schmuck'); foreach($schmuck_nav as $id=>$name) { $navid[$id] = $name; } } if($type=="f") { $damen_nav = load_config('neckermann-navids-damen'); foreach($damen_nav as $id=>$name) { $navid[$id] = $name; } } if($type=='m') { $herren_nav = load_config('neckermann-navids-herren'); foreach($herren_nav as $id=>$name) { $navid[$id] = $name; } } if($type=='jng' || $type=='*') { $jng_nav = load_config('neckermann-navids-jng'); foreach($jng_nav as $id=>$name) { $navid[$id] = $name; } } if($type=='s' || $type=='*') { $special_nav = load_config('neckermann-navids-special'); foreach($special_nav as $id=>$name) { $navid[$id] = $name; } } * */ return $navid; }
$content .= '<tr><td colspan="2"><strong>Primary</strong></td></tr>'; $content .= '<tr><td width="150">Nav ID</td><td>'; $content .= ComboBoxAmazonDeNavIDs('navigation', $product_navigation, 'input2', 'id="navigation"'); $content .= '<input type="checkbox" name="navigation" value="1" style="display:none;" />'; $content .= '</td></tr>'; $content .= '<tr><td colspan="2"> </td></tr>'; $content .= '<tr><td colspan="2"><strong>Secondary</strong></td></tr>'; $content .= '<tr><td width="150">Nav ID</td><td>'; $content .= ComboBoxAmazonDeNavIDs('navid0', $product_nav_secondary[0], 'input2', 'id="nav0"'); $content .= '</td></tr>'; $content .= '</table></div>'; } elseif ($jng_sp_id == '5') { $content .= '<div><table class="form" border="0" cellpadding="0" cellspacing="0">'; $content .= '<tr><td colspan="2"><strong>Primary (BrowseNode)</strong></td></tr>'; $content .= '<tr><td width="150">Nav ID</td><td>'; $navids = array('' => 'Please select a navigation...') + retrieveNavIDs($jng_sp_id, 'bn'); $navid_filters = '<select id="navigation" name="navigation" class="input2">'; $navid_filters .= loadComboListFromArray($navids, null, $product_navigation, false); $navid_filters .= '</select>'; //$content .= ComboBoxneckermannAtNavIDs('p','navigation', $product_navigation, 'input2', 'id="navigation"'); $content .= $navid_filters; $content .= '<input type="checkbox" name="navigation" value="1" style="display:none;" />'; $content .= '</td></tr>'; $content .= '</table></div>'; } else { $content .= '<div>No Structure Info yet</div>'; } $content .= '</div>'; $content .= '<div>'; $content .= '<h3><a href="#">Images</a></h3>'; $content .= '<div><table class="form" border="0" cellpadding="0" cellspacing="0">';
} if (count($cat) == 1) { foreach ($cat[0] as $key => $val) { $c = array(); $c[$key] = ' '; $cat[] = $c; } } $actfil_options = array('act' => 'only Active Products', 'ina' => 'only Inactive Products', 'all' => 'all Active and Inactive Products'); $activefilter = '<select name="active-filter" class="input" onchange="filtering.submit();">'; foreach ($actfil_options as $value => $option) { $sel = $activefiltered == $value ? 'selected="selected"' : ''; $activefilter .= '<option value="' . $value . '" ' . $sel . '>' . $option . '</option>'; } $activefilter .= '</select>'; $navids = array('0' => 'Please select a navigation...', 'UNSET' => 'None / Unset') + retrieveNavIDs($jng_sp_id, '*'); $navid_filters = '<select name="nav-filter" class="input" onchange="filtering.submit();">'; $navid_filters .= loadComboListFromArray($navids, null, $navfiltered, false); $navid_filters .= '</select>'; if ($navid_filters != '') { $navid_filters = '<tr><td>Filter by Nav ID</td><td>' . $navid_filters . '</td></tr>'; } $content = ''; $content .= '<div style="float:right;">'; $content .= '<form name="filtering" action="?open=analysis-vc" method="post">'; $content .= '<table class="form" border="0" cellpadding="0" cellspacing="0">'; $content .= $navid_filters; $content .= '<tr><td>Filter by Brand</td><td>' . drawBrandCombo(true, 'brand-filter', $brandfiltered, 'class="input" onchange="filtering.submit();"') . '</td></tr>'; $content .= '<tr><td>Filter by</td><td>' . $activefilter . '</td></tr>'; $content .= '</table>'; $content .= '</form>';
$content .= '<li><a href="#pri-nav">Primary</a></li>'; $content .= '<li><a href="#sec-nav">Secondary</a></li>'; } $content .= '</ul>'; //PRIMARY NAVIGATIONS $content .= '<div id="pri-nav">'; $type = $navpri[$jng_sp_id]; $navigations = retrieveNavIDs($jng_sp_id, $type); $content .= spNAVdrawTable($jng_sp_id, $type, $navigations, false); $content .= '</div>'; //#pri-nav //SECONDARY NAVIGATIONS if (is_array($navsec[$jng_sp_id])) { $content .= '<div id="sec-nav">'; foreach ($navsec[$jng_sp_id] as $type) { $navigations = retrieveNavIDs($jng_sp_id, $type); $content .= spNAVdrawTable($jng_sp_id, $type, $navigations, true); } $content .= '<div style="clear:both;"> </div>'; $content .= '</div>'; //.sec-nav $content .= '</div>'; //end div tab } } $javascript = ' $("#nav-tab").tabs(); function applyNavFunctions(iconTarget) { $(iconTarget).hover( function() { $(this).parent().parent("tr").find("td").addClass("bold");
unset($genders[0]); //none unset($genders[3]); //unisex $obj_ct = new CategoryTop($category_top_id); $cats = array(); while ($cat = $obj_ct->getCategoriesOneByOneAsObject()) { $cats[$cat->id] = $cat->getName(LANGUAGEID); } 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, 'c'); } 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($cats) == 0) { $result = '<h3 class="red">No 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 ($cats as $param_id => $param_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];