danielwhite Posted January 31, 2011 Share Posted January 31, 2011 Hi, new here and just downloaded oscommerce last week and I'm the middle of installing contributions prior to importing my products using easy populate. First, thanks to all of you who have been involved in this project. I really appreciate it! I've been installing contributions for 2.3.1 and until now, I've have a few problems but haven't been complete stumped. With the extra product fields contribution, I went through the directions 3 times now and still get the same error after I upload the categories.php file. Here are the errors I've found so far: Parse error: syntax error, unexpected '<' in /home/c352part/public_html/admin/categories.php on line 775, if I remove the code from the instructions, I get this: Parse error: syntax error, unexpected T_ELSE in /home/c352part/public_html/admin/categories.php on line 1457 I tested adding a extra field and that appears to work correctly but I can't go into the categories box at all. Here are the instructions: 15h) Around line 342 you should find the require(DIR_WS_INCLUDES . 'template_top.php');. Immediately BEFORE you need to ADD the following: <?php // begin Extra Product Fields if ($action == 'new_product') { foreach ($epf as $e) { if ($e['language_active']) { if ($e['multi_select']) { echo '<script type="text/javascript">' . "\n"; echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; echo " var thisbox = document.getElementById('ms' + id);\n"; echo " if (thisbox.checked) {\n"; echo " switch (id) {\n"; foreach ($e['values'] as $val) { $el = get_exclude_list($val); if (!empty($el)) { echo " case " . $val . ":\n"; foreach($el as $i) { echo " var cb = document.getElementById('ms" . $i . "');\n"; echo " cb.checked = false;\n"; } echo " break;\n"; } } echo " default: ;\n"; echo " }\n"; echo " }\n"; echo "}\n"; echo "</script>\n"; } elseif ($e['uses_list'] && $e['linked']) { echo '<script type="text/javascript">' . "\n"; if ($e['checkbox']) { echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; } else { echo "function process_" . $e['field'] . '_' . $e['language'] . "() {\n"; echo " var id = document.getElementById('lv" . $e['id'] . '_' . $e['language'] . "').value;\n"; } if (!empty($link_groups[$e['id']][$e['language']])) { foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = 'none'; lf.disabled = true;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { echo " document.getElementById('ms" . $id . "').disabled = true;\n"; } } foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " if ("; $first = true; $enables = ''; foreach(get_children($val) as $x) { if ($first) { $first = false; } else { echo ' || '; } echo '(id == ' . $x . ')'; } echo ") {\n"; echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = ''; lf.disabled = false;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { $enables .= " document.getElementById('ms" . $id . "').disabled = false;\n"; } echo $enables; echo " }\n"; } foreach ($linked_fields[$e['id']][$e['language']] as $group) { foreach ($group as $id) { echo " var lv = document.getElementById('ms" . $id . "');\n"; echo " if (lv.disabled == true) { lv.checked = false; }\n"; } } } echo "}\n"; echo "</script>\n"; } } } } // end Extra Product Fields ?> ANY HELP WOULD BE APPRECIATED. If you want to see the error live, go to 352parts.com. Again, thanks to everyone that's helped with this project. Quote Link to comment Share on other sites More sharing options...
pdcelec Posted January 31, 2011 Share Posted January 31, 2011 If the fault is around line 775 then the code that you posted is not responsible as it is 200 lines aerlier. Also you need to secure your admin Quote Link to comment Share on other sites More sharing options...
danielwhite Posted January 31, 2011 Author Share Posted January 31, 2011 Thanks for the response, here is the actual code from the page. Secure my admin? What does that mean? Sorry if this is a bad question: I'm looking it up next too. Starting at line 775: <?php // begin Extra Product Fields if ($action == 'new_product') { foreach ($epf as $e) { if ($e['language_active']) { if ($e['multi_select']) { echo '<script type="text/javascript">' . "\n"; echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; echo " var thisbox = document.getElementById('ms' + id);\n"; echo " if (thisbox.checked) {\n"; echo " switch (id) {\n"; foreach ($e['values'] as $val) { $el = get_exclude_list($val); if (!empty($el)) { echo " case " . $val . ":\n"; foreach($el as $i) { echo " var cb = document.getElementById('ms" . $i . "');\n"; echo " cb.checked = false;\n"; } echo " break;\n"; } } echo " default: ;\n"; echo " }\n"; echo " }\n"; echo "}\n"; echo "</script>\n"; } elseif ($e['uses_list'] && $e['linked']) { echo '<script type="text/javascript">' . "\n"; if ($e['checkbox']) { echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; } else { echo "function process_" . $e['field'] . '_' . $e['language'] . "() {\n"; echo " var id = document.getElementById('lv" . $e['id'] . '_' . $e['language'] . "').value;\n"; } if (!empty($link_groups[$e['id']][$e['language']])) { foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = 'none'; lf.disabled = true;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { echo " document.getElementById('ms" . $id . "').disabled = true;\n"; } } foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " if ("; $first = true; $enables = ''; foreach(get_children($val) as $x) { if ($first) { $first = false; } else { echo ' || '; } echo '(id == ' . $x . ')'; } echo ") {\n"; echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = ''; lf.disabled = false;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { $enables .= " document.getElementById('ms" . $id . "').disabled = false;\n"; } echo $enables; echo " }\n"; } foreach ($linked_fields[$e['id']][$e['language']] as $group) { foreach ($group as $id) { echo " var lv = document.getElementById('ms" . $id . "');\n"; echo " if (lv.disabled == true) { lv.checked = false; }\n"; } } } echo "}\n"; echo "</script>\n"; } } } } // end Extra Product Fields ?> require(DIR_WS_INCLUDES . 'template_top.php'); if ($action == 'new_product') { $parameters = array('products_name' => '', Ending at line 858 Quote Link to comment Share on other sites More sharing options...
pdcelec Posted January 31, 2011 Share Posted January 31, 2011 Thanks for the response, here is the actual code from the page. Secure my admin? What does that mean? Sorry if this is a bad question: I'm looking it up next too. Starting at line 775: <?php // begin Extra Product Fields if ($action == 'new_product') { foreach ($epf as $e) { if ($e['language_active']) { if ($e['multi_select']) { echo '<script type="text/javascript">' . "\n"; echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; echo " var thisbox = document.getElementById('ms' + id);\n"; echo " if (thisbox.checked) {\n"; echo " switch (id) {\n"; foreach ($e['values'] as $val) { $el = get_exclude_list($val); if (!empty($el)) { echo " case " . $val . ":\n"; foreach($el as $i) { echo " var cb = document.getElementById('ms" . $i . "');\n"; echo " cb.checked = false;\n"; } echo " break;\n"; } } echo " default: ;\n"; echo " }\n"; echo " }\n"; echo "}\n"; echo "</script>\n"; } elseif ($e['uses_list'] && $e['linked']) { echo '<script type="text/javascript">' . "\n"; if ($e['checkbox']) { echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; } else { echo "function process_" . $e['field'] . '_' . $e['language'] . "() {\n"; echo " var id = document.getElementById('lv" . $e['id'] . '_' . $e['language'] . "').value;\n"; } if (!empty($link_groups[$e['id']][$e['language']])) { foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = 'none'; lf.disabled = true;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { echo " document.getElementById('ms" . $id . "').disabled = true;\n"; } } foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " if ("; $first = true; $enables = ''; foreach(get_children($val) as $x) { if ($first) { $first = false; } else { echo ' || '; } echo '(id == ' . $x . ')'; } echo ") {\n"; echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = ''; lf.disabled = false;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { $enables .= " document.getElementById('ms" . $id . "').disabled = false;\n"; } echo $enables; echo " }\n"; } foreach ($linked_fields[$e['id']][$e['language']] as $group) { foreach ($group as $id) { echo " var lv = document.getElementById('ms" . $id . "');\n"; echo " if (lv.disabled == true) { lv.checked = false; }\n"; } } } echo "}\n"; echo "</script>\n"; } } } } // end Extra Product Fields ?> require(DIR_WS_INCLUDES . 'template_top.php'); if ($action == 'new_product') { $parameters = array('products_name' => '', Ending at line 858 Try ?> <?php // begin Extra Product Fields if ($action == 'new_product') { foreach ($epf as $e) { if ($e['language_active']) { if ($e['multi_select']) { echo '<script type="text/javascript">' . "\n"; echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; echo " var thisbox = document.getElementById('ms' + id);\n"; echo " if (thisbox.checked) {\n"; echo " switch (id) {\n"; foreach ($e['values'] as $val) { $el = get_exclude_list($val); if (!empty($el)) { echo " case " . $val . ":\n"; foreach($el as $i) { echo " var cb = document.getElementById('ms" . $i . "');\n"; echo " cb.checked = false;\n"; } echo " break;\n"; } } echo " default: ;\n"; echo " }\n"; echo " }\n"; echo "}\n"; echo "</script>\n"; } elseif ($e['uses_list'] && $e['linked']) { echo '<script type="text/javascript">' . "\n"; if ($e['checkbox']) { echo "function process_" . $e['field'] . '_' . $e['language'] . "(id) {\n"; } else { echo "function process_" . $e['field'] . '_' . $e['language'] . "() {\n"; echo " var id = document.getElementById('lv" . $e['id'] . '_' . $e['language'] . "').value;\n"; } if (!empty($link_groups[$e['id']][$e['language']])) { foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = 'none'; lf.disabled = true;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { echo " document.getElementById('ms" . $id . "').disabled = true;\n"; } } foreach ($link_groups[$e['id']][$e['language']] as $val) { echo " if ("; $first = true; $enables = ''; foreach(get_children($val) as $x) { if ($first) { $first = false; } else { echo ' || '; } echo '(id == ' . $x . ')'; } echo ") {\n"; echo " var lf = document.getElementById('lf" . $e['id'] . '_' . $e['language'] . '_' . $val . "');\n"; echo " lf.style.display = ''; lf.disabled = false;\n"; foreach ($linked_fields[$e['id']][$e['language']][$val] as $id) { $enables .= " document.getElementById('ms" . $id . "').disabled = false;\n"; } echo $enables; echo " }\n"; } foreach ($linked_fields[$e['id']][$e['language']] as $group) { foreach ($group as $id) { echo " var lv = document.getElementById('ms" . $id . "');\n"; echo " if (lv.disabled == true) { lv.checked = false; }\n"; } } } echo "}\n"; echo "</script>\n"; } } } } // end Extra Product Fields ?> <?php require(DIR_WS_INCLUDES . 'template_top.php'); if ($action == 'new_product') { $parameters = array('products_name' => '', Quote Link to comment Share on other sites More sharing options...
danielwhite Posted January 31, 2011 Author Share Posted January 31, 2011 Now I get this: Parse error: syntax error, unexpected T_ELSE in /home/c352part/public_html/admin/categories.php on line 1519 Here is my code: *****LINE 1519**** is marked like that. <tr> <td align="right" class="smallText"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link($back_url, $back_url_params, 'NONSSL')); ?></td> </tr> </table> <?php *****LINE 1519**** } else { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> Quote Link to comment Share on other sites More sharing options...
pdcelec Posted January 31, 2011 Share Posted January 31, 2011 Now I get this: Parse error: syntax error, unexpected T_ELSE in /home/c352part/public_html/admin/categories.php on line 1519 Here is my code: *****LINE 1519**** is marked like that. <tr> <td align="right" class="smallText"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link($back_url, $back_url_params, 'NONSSL')); ?></td> </tr> </table> <?php *****LINE 1519**** } else { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> somewhere above that code something is missing. Have you done a count of { and }? Quote Link to comment Share on other sites More sharing options...
danielwhite Posted January 31, 2011 Author Share Posted January 31, 2011 (edited) I'm not a good coder.... so no I haven't. How would I go about doing that? I begain counting but with that many lines of code (tried) I keep loosing count.... I inlcuded more of the code: <?php } if (isset($HTTP_GET_VARS['origin'])) { $pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0); if ($pos_params != false) { $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params); $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } } else { $back_url = FILENAME_CATEGORIES; $back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id; } ?> <tr> <td align="right" class="smallText"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link($back_url, $back_url_params, 'NONSSL')); ?></td> </tr> </table> <?php *****LINE 1519**** } else { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); echo tep_hide_session_id() . '</form>'; ?> Edited January 31, 2011 by danielwhite Quote Link to comment Share on other sites More sharing options...
danielwhite Posted January 31, 2011 Author Share Posted January 31, 2011 I used textpad to try to match brackets and found this but I don't know what to do about it: Line 1372<?php Line 1373 } elseif ($action == 'new_product_preview') { <----------********** there doesn't appear to be a match for this bracket*********** if (tep_not_null($HTTP_POST_VARS)) { $pInfo = new objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; // begin Extra Product Fields $extra = array(); foreach ($xfields as $f) { $extra[$f] = $HTTP_POST_VARS[$f]; } // end Extra Product Fields Daniel White added 1/31/2011 } else { //match starts here // begin Extra Product Fields $query = "select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id"; foreach ($xfields as $f) { $query .= ', pd.' . $f; } $query .= " from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'"; $product_query = tep_db_query($query); // end Extra Product Fields $product = tep_db_fetch_array($product_query); $pInfo = new objectInfo($product); $products_image_name = $pInfo->products_image; $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']); $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']); $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $pInfo->products_name; ?></td> <td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td> </tr> <?php if ($pInfo->products_url) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php if ($pInfo->products_date_available > date('Y-m-d')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long($pInfo->products_date_available)); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['origin'])) { $pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0); if ($pos_params != false) { $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params); $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } } else { $back_url = FILENAME_CATEGORIES; $back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id; } ?> <tr> <td align="right" class="smallText"><?php echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link($back_url, $back_url_params, 'NONSSL')); ?></td> </tr> </table> <?php } else { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> <tr> <td class="smallText" align="right"> <?php echo tep_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onchange="this.form.submit();"'); echo tep_hide_session_id() . '</form>'; ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $categories_count = 0; $rows = 0; if (isset($HTTP_GET_VARS['search'])) { $search = tep_db_prepare_input($HTTP_GET_VARS['search']); $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name"); } else { $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name"); } while ($categories = tep_db_fetch_array($categories_query)) { $categories_count++; $rows++; // Get parent_id for subcategories if search if (isset($HTTP_GET_VARS['search'])) $cPath= $categories['parent_id']; if ((!isset($HTTP_GET_VARS['cID']) && !isset($HTTP_GET_VARS['pID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $categories['categories_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { $category_childs = array('childs_count' => tep_childs_in_category_count($categories['categories_id'])); $category_products = array('products_count' => tep_products_in_category_count($categories['categories_id'])); $cInfo_array = array_merge($categories, $category_childs, $category_products); $cInfo = new objectInfo($cInfo_array); } if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <strong>' . $categories['categories_name'] . '</strong> ('.TEXT_PRODUCTS.tep_products_in_category_count($categories['categories_id']).' , '.TEXT_SUBCATEGORIES.tep_childs_in_category_count($categories['categories_id']).')'; ?></td> <td class="dataTableContent" align="center"> </td> <td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $products_count = 0; if (isset($HTTP_GET_VARS['search'])) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name"); } else { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name"); } while ($products = tep_db_fetch_array($products_query)) { $products_count++; $rows++; // Get categories_id for product if search if (isset($HTTP_GET_VARS['search'])) $cPath = $products['categories_id']; if ( (!isset($HTTP_GET_VARS['pID']) && !isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) { // find out the rating average from customer reviews $reviews_query = tep_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$products['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); $pInfo_array = array_merge($products, $reviews); $pInfo = new objectInfo($pInfo_array); } if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $products['products_name']; ?></td> <td class="dataTableContent" align="center"> <?php if ($products['products_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=0&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=setflag&flag=1&pID=' . $products['products_id'] . '&cPath=' . $cPath) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?></td> <td class="dataTableContent" align="right"><?php if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } $cPath_back = ''; if (sizeof($cPath_array) > 0) { for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) { if (empty($cPath_back)) { $cPath_back .= $cPath_array[$i]; } else { $cPath_back .= '_' . $cPath_array[$i]; } } } $cPath_back = (tep_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : ''; ?> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br />' . TEXT_PRODUCTS . ' ' . $products_count; ?></td> <td align="right" class="smallText"><?php if (sizeof($cPath_array) > 0) echo tep_draw_button(IMAGE_BACK, 'triangle-1-w', tep_href_link(FILENAME_CATEGORIES, $cPath_back . 'cID=' . $current_category_id)); if (!isset($HTTP_GET_VARS['search'])) echo tep_draw_button(IMAGE_NEW_CATEGORY, 'plus', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_category')) . tep_draw_button(IMAGE_NEW_PRODUCT, 'plus', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&action=new_product')); ?> </td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'new_category': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_NEW_CATEGORY . '</strong>'); $contents = array('form' => tep_draw_form('newcategory', FILENAME_CATEGORIES, 'action=insert_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_NEW_CATEGORY_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']'); } $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br />' . TEXT_CATEGORIES_IMAGE . '<br />' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br />' . TEXT_SORT_ORDER . '<br />' . tep_draw_input_field('sort_order', '', 'size="2"')); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath))); break; case 'edit_category': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_EDIT_CATEGORY . '</strong>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=update_category&cPath=' . $cPath, 'post', 'enctype="multipart/form-data"') . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_EDIT_INTRO); $category_inputs_string = ''; $languages = tep_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $category_inputs_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', tep_get_category_name($cInfo->categories_id, $languages[$i]['id'])); } $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_NAME . $category_inputs_string); $contents[] = array('text' => '<br />' . tep_image(DIR_WS_CATALOG_IMAGES . $cInfo->categories_image, $cInfo->categories_name) . '<br />' . DIR_WS_CATALOG_IMAGES . '<br /><strong>' . $cInfo->categories_image . '</strong>'); $contents[] = array('text' => '<br />' . TEXT_EDIT_CATEGORIES_IMAGE . '<br />' . tep_draw_file_field('categories_image')); $contents[] = array('text' => '<br />' . TEXT_EDIT_SORT_ORDER . '<br />' . tep_draw_input_field('sort_order', $cInfo->sort_order, 'size="2"')); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id))); break; case 'delete_category': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_CATEGORY . '</strong>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=delete_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => TEXT_DELETE_CATEGORY_INTRO); $contents[] = array('text' => '<br /><strong>' . $cInfo->categories_name . '</strong>'); if ($cInfo->childs_count > 0) $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_CHILDS, $cInfo->childs_count)); if ($cInfo->products_count > 0) $contents[] = array('text' => '<br />' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $cInfo->products_count)); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id))); break; case 'move_category': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_MOVE_CATEGORY . '</strong>'); $contents = array('form' => tep_draw_form('categories', FILENAME_CATEGORIES, 'action=move_category_confirm&cPath=' . $cPath) . tep_draw_hidden_field('categories_id', $cInfo->categories_id)); $contents[] = array('text' => sprintf(TEXT_MOVE_CATEGORIES_INTRO, $cInfo->categories_name)); $contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $cInfo->categories_name) . '<br />' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_MOVE, 'arrow-4', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $cInfo->categories_id))); break; case 'delete_product': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_DELETE_PRODUCT . '</strong>'); $contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=delete_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_DELETE_PRODUCT_INTRO); $contents[] = array('text' => '<br /><strong>' . $pInfo->products_name . '</strong>'); $product_categories_string = ''; $product_categories = tep_generate_category_path($pInfo->products_id, 'product'); for ($i = 0, $n = sizeof($product_categories); $i < $n; $i++) { $category_path = ''; for ($j = 0, $k = sizeof($product_categories[$i]); $j < $k; $j++) { $category_path .= $product_categories[$i][$j]['text'] . ' > '; } $category_path = substr($category_path, 0, -16); $product_categories_string .= tep_draw_checkbox_field('product_categories[]', $product_categories[$i][sizeof($product_categories[$i])-1]['id'], true) . ' ' . $category_path . '<br />'; } $product_categories_string = substr($product_categories_string, 0, -4); $contents[] = array('text' => '<br />' . $product_categories_string); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id))); break; case 'move_product': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</strong>'); $contents = array('form' => tep_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name)); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>'); $contents[] = array('text' => '<br />' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br />' . tep_draw_pull_down_menu('move_to_category_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_MOVE, 'arrow-4', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id))); break; case 'copy_to': $heading[] = array('text' => '<strong>' . TEXT_INFO_HEADING_COPY_TO . '</strong>'); $contents = array('form' => tep_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . tep_draw_hidden_field('products_id', $pInfo->products_id)); $contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENT_CATEGORIES . '<br /><strong>' . tep_output_generated_category_path($pInfo->products_id, 'product') . '</strong>'); $contents[] = array('text' => '<br />' . TEXT_CATEGORIES . '<br />' . tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id)); $contents[] = array('text' => '<br />' . TEXT_HOW_TO_COPY . '<br />' . tep_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . tep_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE); $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_COPY, 'copy', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id))); break; default: if ($rows > 0) { if (isset($cInfo) && is_object($cInfo)) { // category info box contents $category_path_string = ''; $category_path = tep_generate_category_path($cInfo->categories_id); for ($i=(sizeof($category_path[0])-1); $i>0; $i--) { $category_path_string .= $category_path[0][$i]['id'] . '_'; } $category_path_string = substr($category_path_string, 0, -1); $heading[] = array('text' => '<strong>' . $cInfo->categories_name . '</strong>'); $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=edit_category')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=delete_category')) . tep_draw_button(IMAGE_MOVE, 'arrow-4', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $category_path_string . '&cID=' . $cInfo->categories_id . '&action=move_category'))); $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added)); if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified)); $contents[] = array('text' => '<br />' . tep_info_image($cInfo->categories_image, $cInfo->categories_name, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '<br />' . $cInfo->categories_image); $contents[] = array('text' => '<br />' . TEXT_SUBCATEGORIES . ' ' . $cInfo->childs_count . '<br />' . TEXT_PRODUCTS . ' ' . $cInfo->products_count); } elseif (isset($pInfo) && is_object($pInfo)) { // product info box contents $heading[] = array('text' => '<strong>' . tep_get_products_name($pInfo->products_id, $languages_id) . '</strong>'); $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=new_product')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=delete_product')) . tep_draw_button(IMAGE_MOVE, 'arrow-4', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=move_product')) . tep_draw_button(IMAGE_COPY_TO, 'copy', tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&action=copy_to'))); $contents[] = array('text' => '<br />' . TEXT_DATE_ADDED . ' ' . tep_date_short($pInfo->products_date_added)); if (tep_not_null($pInfo->products_last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($pInfo->products_last_modified)); if (date('Y-m-d') < $pInfo->products_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($pInfo->products_date_available)); $contents[] = array('text' => '<br />' . tep_info_image($pInfo->products_image, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $pInfo->products_image); $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity); $contents[] = array('text' => '<br />' . TEXT_PRODUCTS_AVERAGE_RATING . ' ' . number_format($pInfo->average_rating, 2) . '%'); } } else { // create category/product info $heading[] = array('text' => '<strong>' . EMPTY_CATEGORY . '</strong>'); $contents[] = array('text' => TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS); } break; } // Modular SEO Header Tags Daniel White added 1/28/2011 include( DIR_WS_MODULES . 'header_tags/categories_insert.php' ); if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
pdcelec Posted January 31, 2011 Share Posted January 31, 2011 LOL,Notepad++ has a facility for counting Quote Link to comment Share on other sites More sharing options...
pdcelec Posted January 31, 2011 Share Posted January 31, 2011 At this stage, I would go back to your backed up copy of categories.php and start over. Quote Link to comment Share on other sites More sharing options...
danielwhite Posted February 1, 2011 Author Share Posted February 1, 2011 I randomly started adding brackets and this worked! Here is the code above and below where I added the bracket for anyone else having this error. $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']); $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']); $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']); } //PUT THE END HERE!!!!!! ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $pInfo->products_name; ?></td> THANK YOU FOR YOUR HELP!!!! Quote Link to comment Share on other sites More sharing options...
RobinAngelo Posted July 25, 2013 Share Posted July 25, 2013 Hello, Does anybody know if it is possible to apply a extra field ONLY to the main category and NOT automaticly apply these also to it's subdirectories? For example: If I have a main categorie: "shoes" with 2 sub categories "High" heels and "low heels". When a visitor clicks and see's the main catagorie shoes, they kan filter by 2 extra fields I have made: color and heel-type. Now the visitor clicks in the menu on the "high heel" category and see's all the High heel shoes. But the filter option "Heel types" is also show'n here witch is not necessary here. How can I change the code that when I apply a extra field to a main categorie it not automaticly applies to it's subcategories? Kind regards, Carmelo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.