Leibtek Posted November 15, 2006 Share Posted November 15, 2006 Still waiting on a solution to the problem I'm having as well. Not sure how supported this contrib is. I didn't try this yet, but I had similar issues with time-outs, and it works! Try using Firefox, get the latest version. I was getting time-out even when loading my regular catalog, and Firefox is a pleasure. Hope this helps. Link to comment Share on other sites More sharing options...
psousa Posted December 7, 2006 Share Posted December 7, 2006 Hi I installed this contribution (by the way, nice work) and it went fine. Then when i try to copy one or more products i get the sql error : 264 - Out of range value adjusted for column 'products_id' at row 1 insert into products (products_id, products_quantity, products_model, products_image, products_price, products_date_added, products_last_modified, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_ordered) values ('', '10', '1', '1.jpg', '10.0000', '2006-11-28 23:37:40', '2006-12-07 17:05:34', '2006-12-08 00:00:00', '1.00', '1', '2', '14', '0') It seems like there is no product_id in the query. Did i missed something ? Does anybody have any idea of the problem ? Link to comment Share on other sites More sharing options...
psousa Posted December 11, 2006 Share Posted December 11, 2006 I think i found the error. First of all, the "products_id" field of the "products" table is an auto-increment field (i missed this). In my MySql configuration file "my.ini" (5.0) there is this line : sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" If i take the "STRICT_TRANS_TABLES" parameter, the error is gone. But this is no solution, because this parameter changes the way MySql implements the referential integrity rules. So, in my products_multi.php around line 88, i changed : $product_query['products_id'] = ''; to $max_pid = tep_db_fetch_array(tep_db_query("select max(products_id)+1 as max from `" . TABLE_PRODUCTS)); $product_query['products_id'] = $max_pid['max']; Hope this helps people that come across the same error. Link to comment Share on other sites More sharing options...
soniamit Posted December 15, 2006 Share Posted December 15, 2006 this contribution is working fine with my website but when install on other website...........its not working without give me any error... we have osCommerce 2.2-MS2 in both website we fallow all instruction.............. please guide what wrong Link to comment Share on other sites More sharing options...
monoespiral Posted December 30, 2006 Share Posted December 30, 2006 [Hi everybody... Specially Stephan who developed the tool But I need some help... My webpage is in three languages and the tool seem to copy only the English content. ¿What can I do about it? If I can't figure out how to do it the copy tool is useless for my purposes Thanks Ernesto Link to comment Share on other sites More sharing options...
ruudger Posted January 12, 2007 Share Posted January 12, 2007 Hi, Needed to move a lot of products, so found this great contribution, but it refreshes my page and thats it. I have dutch shop and only dutch laguage installed, maybe here is a problem. Notices Mike has same problem. any help apriceated Ruud Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2007 Share Posted January 18, 2007 I have a problem thou. Hope someone can help. Everything seems to work BUT it ONLY show the categories, NOT the products AND there is no "square" that I can choose from. Anyone know what file those 2 is conserning? Jacala Link to comment Share on other sites More sharing options...
sukarya Posted January 18, 2007 Share Posted January 18, 2007 Hi, I have installed this fine contrib. the thing is that i cant see the check boxes on the left, nor the products event though i have products in the DB. couldnt find any solution for this problem. Does anyon have any suggestions? Thanks, Sharon. Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
sukarya Posted January 18, 2007 Share Posted January 18, 2007 Hi, I have installed this fine contrib. the thing is that i cant see the check boxes on the left, nor the products even though i have products in the DB. couldnt find any solution for this problem. solution anyone? Manyyyyyyyyyy Thanks, Sharon. Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
sukarya Posted January 19, 2007 Share Posted January 19, 2007 I have a problem thou.Hope someone can help. Everything seems to work BUT it ONLY show the categories, NOT the products AND there is no "square" that I can choose from. Anyone know what file those 2 is conserning? Jacala Hi Jacala, I think we have the same problem. to narrow the options, what contributions do yu have installed? maybe we can explore the prolem a bit... Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2007 Share Posted January 19, 2007 Hi Jacala,I think we have the same problem. to narrow the options, what contributions do yu have installed? maybe we can explore the prolem a bit... Hi Sukarya I don't believe it has anything to do with our other contributions installed. I don't have any of those you have installed. But here is mine: Installed contributions: More_Pics_6 / Specials By Category v2.0 / category_descriptions_v500 ...and working on Multiple_Products_Manager_2.5 But I can see that Vlad Savitsky have done some bug fixes and code optimization. He might have cleaned a little to much. If you find the problem please let me know and I will do the same. Jacala Link to comment Share on other sites More sharing options...
sukarya Posted January 19, 2007 Share Posted January 19, 2007 Hi Sukarya I don't believe it has anything to do with our other contributions installed. I don't have any of those you have installed. hi, At first I installed the 2.2v - he symptoms occxured then. I tried to install updeted versions, but nada (the update consists of only replacing the "multi" files. Well any way, if you hear something ill be gladd to know. 10x, Sharon. Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2007 Share Posted January 19, 2007 hi, At first I installed the 2.2v - he symptoms occxured then. I tried to install updeted versions, but nada (the update consists of only replacing the "multi" files. Well any way, if you hear something ill be gladd to know. 10x, Sharon. Wll that rules out that is "cleanup" error. ...and it's not our contributions installed - what then? But I also see (up in the tread) that there is a problem with more than 1 language (I use 2) Perhaps one of us should contact the author and/or the last modificator? Nothing happens here in the tread.....! Jacala Link to comment Share on other sites More sharing options...
sukarya Posted January 19, 2007 Share Posted January 19, 2007 Wll that rules out that is "cleanup" error....and it's not our contributions installed - what then? But I also see (up in the tread) that there is a problem with more than 1 language (I use 2) Allrighty then, After goin through the code o fthe last 3 versions (2.15) is the one that worked, the problem is with the Manufacturers: now correct me if im wrong: you have no manufacturers in your DB that coneccted to the products, right? So there is the problem: In this current store I do not connect Manufactureres to the Products: I dont have any Manufacturers at all. So, I have changed the code to one with no Manufacturers, but you can chaned it back by commenting/Uncommenting the right code line for with/without manufacturers. This code below is for the one WITHOUT the manufacturers. Just copy/paste all of it in a products_multi.php file. BACK UP FIRST (just in case...) Do Tell how it goes, I know it works for me. Good Luck!!! Sharon. <?php/* $Id: products_multi.php, v 2.3 autor: sr, 2003-07-31 / sr@ibis-project.de v.2.3 by Vlad Savitsky osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License*/ /* THIS VERSION IS FOR THOSE THAT DO NOT USE MANUFACTURERS IN THERE DATA (NO MANUFACTURERS ARE IN THE TABLEIF YOU WANT TO USE MANUFACTURERS, COMMENT/UNCOMMENT THE RELEVANT <HTML> AND <?PHP LINES. THE CHANGES ARE FOLLOWED BY: "With no Manufacturers" text. */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $cat_stat=0; // internal use -- 0 = no / 1 = yes $action=(isset($_REQUEST['action']) ? $_REQUEST['action'] : ''); if (tep_not_null($action)) { $choose = (isset($_REQUEST['choose']) ? $_REQUEST['choose'] : ''); switch ($action) { case 'delete_product_confirm': $del_art=(isset($_REQUEST['del_art']) ? $_REQUEST['del_art'] : ''); foreach ($choose as $products_id) { if ($del_art=='complete') tep_remove_product($products_id); elseif ($del_art=='this_cat') { $duplicate_check = tep_db_fetch_array(tep_db_query("select count(*) as total from ".TABLE_PRODUCTS_TO_CATEGORIES. " where products_id='".tep_db_input($products_id). "' and categories_id<>'". tep_db_input($current_category_id)."'")); //If product exists only in this category we remove him totally //If we have this product in other categories we just remove from TABLE_PRODUCTS_TO_CATEGORIES. if ($duplicate_check['total']>0) tep_db_query("delete from ".TABLE_PRODUCTS_TO_CATEGORIES. " where products_id='". $products_id."' and categories_id='".$current_category_id."'"); else tep_remove_product($products_id); } if (USE_CACHE=='true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath=' . $cPath)); break; case 'move_product_confirm': foreach ($choose as $products_id) { $new_parent_id=tep_db_prepare_input($_REQUEST['categories_id']); $duplicate_check_query=tep_db_query("select count(*) as total from ".TABLE_PRODUCTS_TO_CATEGORIES. " where products_id='".tep_db_input($products_id)."' and categories_id='". tep_db_input($new_parent_id)."'"); $duplicate_check = tep_db_fetch_array($duplicate_check_query); if($duplicate_check['total']<1) tep_db_query("update ".TABLE_PRODUCTS_TO_CATEGORIES. " set categories_id ='".tep_db_input($new_parent_id). "' where products_id='".tep_db_input($products_id)."' and categories_id='". $current_category_id."'"); if (USE_CACHE == 'true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath='.$new_parent_id.'&pID='.$products_id)); break; case 'link_to_confirm': foreach ($choose as $products_id) { $categories_id = tep_db_prepare_input($_REQUEST['categories_id']); if ($_REQUEST['categories_id'] != $current_category_id) { $check=tep_db_fetch_array(tep_db_query("select count(*) as total from ". TABLE_PRODUCTS_TO_CATEGORIES." where products_id='".tep_db_input($products_id) . "' and categories_id='". tep_db_input($categories_id) . "'")); if ($check['total']<'1') tep_db_query("insert into ".TABLE_PRODUCTS_TO_CATEGORIES. " (products_id, categories_id) values ('".tep_db_input($products_id)."', '".tep_db_input($categories_id)."')"); } else $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error'); if (USE_CACHE == 'true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath=' . $categories_id . '&pID=' . $products_id)); break; case 'copy_to_confirm': foreach ($choose as $products_id) { $product_query = tep_db_fetch_array(tep_db_query('select * from '.TABLE_PRODUCTS.' where products_id="'.(int)$products_id.'"')); $product_query['products_id'] = ''; tep_db_perform(TABLE_PRODUCTS, $product_query); $categories_id = tep_db_prepare_input($_REQUEST['categories_id']); $dup_products_id = tep_db_insert_id(); //Attributes Copy, Contributed by Joshua Guerra, josh@xvracing.com $num_row_query=tep_db_query("select products_attributes_id from ".TABLE_PRODUCTS_ATTRIBUTES." WHERE products_id=".$products_id); $num_rows_attrib = array(); while ($categorie = tep_db_fetch_array($num_row_query)) $num_rows_attrib[]=$categorie['products_attributes_id']; sort($num_rows_attrib); //for ($j=0; $j < sizeof($num_rows_attrib); $j++) { foreach($num_rows_attrib as $attrib_id) { $attrib = tep_db_fetch_array(tep_db_query("select products_attributes_id, options_id, options_values_id, options_values_price, price_prefix from ".TABLE_PRODUCTS_ATTRIBUTES." where products_attributes_id=".$attrib_id)); tep_db_query("insert into ".TABLE_PRODUCTS_ATTRIBUTES." (products_id, options_id, options_values_id, options_values_price, price_prefix) values ('".$dup_products_id."','".$attrib['options_id']."','". $attrib['options_values_id']."','".tep_db_input($attrib['options_values_price']). "','".tep_db_input($array['price_prefix'])."')"); }// EOF: Attributes Copy $description_query=tep_db_query("select language_id, products_name, products_description, products_url from ".TABLE_PRODUCTS_DESCRIPTION." where products_id='".$products_id."'"); while ($description = tep_db_fetch_array($description_query)) { tep_db_query("insert into ".TABLE_PRODUCTS_DESCRIPTION." (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('".$dup_products_id."', '".$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')"); } tep_db_query("insert into ".TABLE_PRODUCTS_TO_CATEGORIES." (products_id, categories_id) values ('". $dup_products_id."', '".$categories_id."')" ); if (USE_CACHE == 'true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath='.$categories_id.'&pID=' .$dup_products_id)); break; } } // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html <?php echo HTML_PARAMS; ?>><head><meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><title><?php echo TITLE; ?></title><link rel="stylesheet" type="text/css" href="includes/stylesheet.css"><script language="javascript" src="includes/general.js"></script> <script language="JavaScript" type="text/javascript"><!--/** * Checks/unchecks all tables * * @param string the form name * @param boolean whether to check or to uncheck the element * * @return boolean always true */function setCheckboxes(the_form, do_check) { var elts=(typeof(document.forms[the_form].elements['choose[]']) != 'undefined') ? document.forms[the_form].elements['choose[]'] : (typeof(document.forms[the_form].elements['choose[]']) != 'undefined') ? document.forms[the_form].elements['choose[]'] : document.forms[the_form].elements['choose[]']; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } // end for } else { elts.checked = do_check; } // end if... else return true;} // end of the 'setCheckboxes()' function //--></script> </head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"><div id="spiffycalendar" class="text"></div><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?><!-- header_eof //--> <!-- body //--><table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"><!-- left_navigation //--><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?><!-- left_navigation_eof //--> </table></td><!-- body_text //--> <td width="100%" valign="top"><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; //echo $action.count($choose).$categories_id.$current_category_id; // nur zu testzwecken - only for tests ?> </td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('spacer/pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td> <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><?php echo tep_draw_form('search', FILENAME_PRODUCTS_MULTI, tep_get_all_get_params(), 'post'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_SEARCH . ' ' . tep_draw_input_field('search', $_REQUEST['search']); ?></td> </form></tr> <tr><?php echo tep_draw_form('goto', FILENAME_PRODUCTS_MULTI, '', 'post'); ?> <td class="smallText" align="right"><?php echo HEADING_TITLE_GOTO . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); ?></td> </form></tr> </table></td> </tr> </table></td> </tr><?php echo tep_draw_form('mainForm', FILENAME_PRODUCTS_MULTI, 'cPath='.$cPath.'&cID='. $cID, 'post'); ?><!--<form method="post" action="products_multi.php?cPath=<?php echo $cPath; ?>&cID=<?php echo $cID; ?>" name="mainForm">--> <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">choose</td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="left">(No.) / <?php echo TABLE_HEADING_STATUS; ?></td> <!--<td class="dataTableHeadingContent" align="left"><?php// echo TABLE_HEADING_MANUFACTURERS_NAME; ?></td> Uncomment both HTML and PHP if you have Manufacturers --> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_PRODUCTS_QUANTITY; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr><?php $categories_count = 0; $rows = 0; if ($_REQUEST['search']) { if($cat_stat==1) { $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, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and cd.categories_name like '%" . $_REQUEST['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.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and cd.categories_name like '%" . $_REQUEST['search'] . "%' order by c.sort_order, cd.categories_name"); } } else { if($cat_stat==1) { $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, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' 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 = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $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 ($_REQUEST['search']) $cPath= $categories['parent_id']; if ( ((!$_REQUEST['cID']) && (!$_REQUEST['pID']) || (@$_REQUEST['cID'] == $categories['categories_id'])) && (!$cInfo) && (substr($_REQUEST['action'], 0, 4) != '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 = tep_array_merge($categories, $category_childs, $category_products); $cInfo = new objectInfo($cInfo_array); } if ( (is_object($cInfo)) && ($categories['categories_id'] == $cInfo->categories_id) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_MULTI, tep_get_path($categories['categories_id'])) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath=' . $cPath . '&cID=' . $categories['categories_id']) . '\'">' . "\n"; }?> <td class="dataTableContent"></td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_MULTI, tep_get_path($categories['categories_id'])) . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a> <b>' . $categories['categories_name'] . '</b>'; ?></td> <!-- <td class="dataTableContent" align="center"> </td> --> <td class="dataTableContent" align="center"><?php if($cat_stat==1) { if ($categories['categories_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10); } else { echo tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } }?> </td><td class="dataTableContent" align="left"></td><td class="dataTableContent" align="center"></td> <td class="dataTableContent" align="right"><?php if ( (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_PRODUCTS_MULTI, '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 ($_REQUEST['search']) { // $products_query = tep_db_query("select p.products_tax_class_id, 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, p.products_model, p2c.categories_id, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and p.manufacturers_id=m.manufacturers_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . $_REQUEST['search'] . "%' order by pd.products_name"); // original $products_query = tep_db_query("select p.products_tax_class_id, 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, p.products_model, 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 = '" . $languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . $_REQUEST['search'] . "%' order by pd.products_name"); // with no Manufacturers } else { // $products_query = tep_db_query("select p.products_tax_class_id, 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, p.products_model, m.manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and p.manufacturers_id=m.manufacturers_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name"); // original $products_query = tep_db_query("select p.products_tax_class_id, 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, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name"); // with no Manufacturers } while ($products = tep_db_fetch_array($products_query)) { $products_count++; $rows++; // Get categories_id for product if search if ($_REQUEST['search']) $cPath=$products['categories_id']; if ( ((!$_REQUEST['pID']) && (!$_REQUEST['cID']) || (@$_REQUEST['pID'] == $products['products_id'])) && (!$pInfo) && (!$cInfo) && (substr($_REQUEST['action'], 0, 4) != '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 = '" . $products['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); $pInfo_array = tep_array_merge($products, $reviews); $pInfo = new objectInfo($pInfo_array); } if ( (is_object($pInfo)) && ($products['products_id'] == $pInfo->products_id) ) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'">' . "\n"; }?> <td class="dataTableContent"> <input type="checkbox" name="choose[]" value="<?php echo $products['products_id']; ?>" id="checkbox_choose_<?php echo $products_count; ?>" <?php if($checkall==1) { echo 'checked'; } ?>> </td> <td class="dataTableContent"><label for="checkbox_choose_<?php echo $products_count; ?>"><?php echo $products['products_name']; ?></label></td> <td class="dataTableContent" align="left"><table><tr><td align="left" class="dataTableContent" width="100"><?php echo ' '.$products['products_model'].' </td><td align="left" class="dataTableContent">'; if ($products['products_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10); } else { echo tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); }?> </td></tr></table></td><!--<td class="dataTableContent" align="left"><?//echo $products['manufacturers_name'];?></td> Uncomment both HTML and PHP if you have Manufacturers --><td class="dataTableContent" align="center"><?echo $products['products_quantity'];?></td> <td class="dataTableContent" align="right"><?php if ( (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_PRODUCTS_MULTI, 'cPath=' . $cPath . '&pID=' . $products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr><?php } // zu: while ($products = tep_db_fetch_array($products_query)) { if ($cPath_array) { $cPath_back = ''; for($i=0;$i<sizeof($cPath_array)-1;$i++) { if ($cPath_back == '') { $cPath_back .= $cPath_array[$i]; } else { $cPath_back .= '_' . $cPath_array[$i]; } } } $cPath_back = ($cPath_back) ? 'cPath=' . $cPath_back : '';?> <tr> <td colspan="6"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td> <img src="images/icons/arrow_checkall.gif" alt="" width="38" height="22" border="0"> <nobr><a href="<?php echo tep_href_link(FILENAME_PRODUCTS_MULTI, '&cPath='. $cPath.'&cID='.$cID.'&checkall=1');?>" onclick="setCheckboxes('mainForm', true); return false;"><?php echo TEXT_CHOOSE_ALL; ?></a> / <a href="<?php echo tep_href_link(FILENAME_PRODUCTS_MULTI, '&cPath='. $cPath.'&cID='.$cID);?>" onclick="setCheckboxes('mainForm', false); return false;" ><?php echo TEXT_CHOOSE_ALL_REMOVE; ?></a></nobr></td> <td align="right" class="smallText"></td> <td align="right" class="smallText"> <?php if ($cPath) echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_MULTI, $cPath_back . '&cID=' . $current_category_id) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a> '; ?> </td> </tr> <tr> <td class="smallText"> <input type="hidden" name="cPath" value="<?php echo $cPath; ?>"> <input type="hidden" name="cID" value="<?php echo $cID; ?>"> <p> </p></td> <td align="right" class="smallText"></td> <td align="right" class="smallText"></td> </tr> <tr> <td class="smallText"><?php echo TEXT_CATEGORIES . ' ' . $categories_count . '<br>' . TEXT_PRODUCTS . ' ' . $products_count; ?></td> <td align="right" class="smallText" colspan="2"> <label for="move_product_confirm"><?php echo TEXT_MOVE_TO; ?></label><input type="radio" name="action" value="move_product_confirm" id="move_product_confirm"> <label for="copy_to_confirm"><?php echo IMAGE_COPY_TO; ?></label><input type="radio" name="action" value="copy_to_confirm" id="copy_to_confirm"> <label for="link_to_confirm"><?php echo LINK_TO; ?></label><input type="radio" name="action" value="link_to_confirm" id="link_to_confirm" checked> <?php echo tep_draw_pull_down_menu('categories_id', tep_get_category_tree(), $current_category_id); ?></td> </tr> <tr> <td class="smallText"></td> <td align="right" class="smallText" colspan="2"> <label for="delete_product_confirm"><?php echo DEL_DELETE; ?></label><input type="radio" name="action" value="delete_product_confirm" id="delete_product_confirm"> <select name="del_art" title="<?php echo DEL_CHOOSE_DELETE_ART; ?>" id="del_art"><option value="this_cat" selected><?php echo DEL_THIS_CAT; ?></option><option value="complete"><?php echo DEL_COMPLETE; ?></option></select> </td> </tr> <tr> <td class="smallText"></td> <td align="right" class="smallText"></td> <td align="right" class="smallText"> <input type="submit" name="go" value=" go! " title=" go! "> </td> </tr> <tr> <td class="dataTableContent" colspan="3"> <?php echo TEXT_ATTENTION_DANGER; ?> </td> </tr> </table></td> </tr> </table></td><?php $heading = array(); $contents = array(); switch ($_REQUEST['action']) { default: if ($rows > 0) { if (is_object($cInfo)) { // category info box contents $heading[] = array('text' => '<b>' . $cInfo->categories_name . '</b>'); $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 (is_object($pInfo)) { // product info box contents $heading[] = array('text' => '<b>' . tep_get_products_name($pInfo->products_id, $languages_id) . '</b>'); $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' => '<b>' . EMPTY_CATEGORY . '</b>'); $contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS, $parent_categories_name)); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; & Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
sukarya Posted January 19, 2007 Share Posted January 19, 2007 Allrighty then, After goin through the code o fthe last 3 versions (2.15) is the one that worked, the problem is with the Manufacturers: now correct me if im wrong: you have no manufacturers in your DB that coneccted to the products, right? So there is the problem: In this current store I do not connect Manufactureres to the Products: I dont have any Manufacturers at all. So, I have changed the code to one with no Manufacturers, but you can chaned it back by commenting/Uncommenting the right code line for with/without manufacturers. This code below is for the one WITHOUT the manufacturers. Just copy/paste all of it in a products_multi.php file. BACK UP FIRST (just in case...) Do Tell how it goes, I know it works for me. Good Luck!!! Sharon. Jacala, Im sorry, but it some how didnt paste all code. The following code is the end of last + a bit from what it has allready, so make sure to deltet so u wont have duplicity this supppose to be from about line 408 (on my file) 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> <?php //} ?> </table></td> <!-- body_text_eof //--> </tr> </form> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Installed contributions: Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others... Link to comment Share on other sites More sharing options...
Pilly Posted January 19, 2007 Share Posted January 19, 2007 that code fixed it for me, cheers :D Link to comment Share on other sites More sharing options...
UncleSteve Posted January 20, 2007 Share Posted January 20, 2007 Hi, Has anyone made any mods to this contrib to change the product status (in or out of stock) on bulk? If so, how did you do it please? Thanks :) ____________________________________________________________________ ____________________________________________________________________ Link to comment Share on other sites More sharing options...
mattik Posted January 22, 2007 Share Posted January 22, 2007 i install the Multiple_Products_Manager_2.5 but i cant see my products what can i do? Link to comment Share on other sites More sharing options...
mattik Posted January 22, 2007 Share Posted January 22, 2007 i install the Multiple_Products_Manager_2.5 but i cant see my products what can i do? sorry i correct it thanks Link to comment Share on other sites More sharing options...
mattik Posted January 22, 2007 Share Posted January 22, 2007 i install the Multiple_Products_Manager_2.5 but i cant see my products what can i do? sorry i correct it thanks Link to comment Share on other sites More sharing options...
ctroyp Posted February 7, 2007 Share Posted February 7, 2007 I have successfully installed the latest version of this contrib (Multiple_Products_Manager_2.5). Then I installed the multiple admin products paging contrib (http://www.oscommerce.com/community/contributions,1965) I have noticed that products will move perfectly until I try to move a product(s) from a category that has more than one page. In other words, I can only move products from a category only if they are all listed on one page and not spanned to other pages. Thanks for any help... Link to comment Share on other sites More sharing options...
mjfontec Posted February 8, 2007 Share Posted February 8, 2007 Hi, I have some products with manufacturers and others that don't. Can I still use this contrib? I have it installed and working with products that have manufacturers currently. Thanks Mike sorry i correct it thanks Link to comment Share on other sites More sharing options...
NEMROD34 Posted February 8, 2007 Share Posted February 8, 2007 Here is I modified that page products_multi.php: <?php } $products_count = 0; if ($_REQUEST['search']) { $products_query = tep_db_query("select p.products_id, p.products_ship_price_one,p.products_ship_price_two,p.products_ship_price_three, p.products_ship_price_four, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and p.manufacturers_id=m.manufacturers_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . $_REQUEST['search'] . "%' order by pd.products_name"); // original } else { $products_query = tep_db_query("select p.products_id, p.products_ship_price_one,p.products_ship_price_two,p.products_ship_price_three, p.products_ship_price_four, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and p.manufacturers_id=m.manufacturers_id and pd.language_id = '" . $languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by pd.products_name"); // original } while ($products = tep_db_fetch_array($products_query)) { $products_count++; $rows++; Nevertheless to the right it is counted well, to the left = 0 produced (image below), by the blow impossible to duplicate the categories because there is nothing inside. Any messages of error but nothing is copied. there is insert: case 'link_to_confirm': foreach ($choose as $products_id) { $categories_id = tep_db_prepare_input($_REQUEST['categories_id']); if ($_REQUEST['categories_id'] != $current_category_id) { $check=tep_db_fetch_array(tep_db_query("select count(*) as total from ". TABLE_PRODUCTS_TO_CATEGORIES." where products_id='".tep_db_input($products_id) . "' and categories_id='". tep_db_input($categories_id) . "'")); if ($check['total']<'1') tep_db_query("insert into ".TABLE_PRODUCTS_TO_CATEGORIES. " (products_id, categories_id) values ('".tep_db_input($products_id)."', '".tep_db_input($categories_id)."')"); } else $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error'); if (USE_CACHE == 'true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath=' . $categories_id . '&pID=' . $products_id)); break; $description_query=tep_db_query("select language_id, products_name, products_description, products_url from ".TABLE_PRODUCTS_DESCRIPTION." where products_id='".$products_id."'"); while ($description = tep_db_fetch_array($description_query)) { tep_db_query("insert into ".TABLE_PRODUCTS_DESCRIPTION." (products_id, language_id, products_name, products_description, products_url, products_viewed) values ('".$dup_products_id."', '".$description['language_id'] . "', '" . tep_db_input($description['products_name']) . "', '" . tep_db_input($description['products_description']) . "', '" . tep_db_input($description['products_url']) . "', '0')"); } tep_db_query("insert into ".TABLE_PRODUCTS_TO_CATEGORIES." (products_id, categories_id) values ('". $dup_products_id."', '".$categories_id."')" ); if (USE_CACHE == 'true') {tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased');} } tep_redirect(tep_href_link(FILENAME_PRODUCTS_MULTI, 'cPath='.$categories_id.'&pID=' .$dup_products_id)); break; Sorry for my english i m a french guy :P Link to comment Share on other sites More sharing options...
NEMROD34 Posted February 13, 2007 Share Posted February 13, 2007 Check I reinstalled the contrib it still copies absolutely nothing. I want duplicate a categorie with all sub catégorie and products, or all the products, but not simply copy the link ! Duplicate realy ! Worse when I consult via the contrib, a category, her says to me that she is empty while it is not the case. In categories.php <?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++; In products_multi.php <?php $categories_count = 0; $rows = 0; if ($_REQUEST['search']) { if($cat_stat==1) { $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, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and cd.categories_name like '%" . $_REQUEST['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.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' and cd.categories_name like '%" . $_REQUEST['search'] . "%' order by c.sort_order, cd.categories_name"); } } else { if($cat_stat==1) { $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, c.categories_status from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' 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 = '" . $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . $languages_id . "' order by c.sort_order, cd.categories_name"); } } while ($categories = tep_db_fetch_array($categories_query)) { $categories_count++; $rows++; What may I make svp? Link to comment Share on other sites More sharing options...
NEMROD34 Posted February 13, 2007 Share Posted February 13, 2007 Ok if you have other contribs: in page products_multi.php Shearch : <?php} $products_count = 0; if ($_REQUEST['search']) { Shearch the same in categories.php Copy in categories.php and replace to products_multi.php (for me it's this, copy "$products_query = tep_db_query" TO "order by pd.products_name" after the "} else {" (for me it's): $products_query = tep_db_query("select p.products_id, p.products_ship_price_one,p.products_ship_price_two,p.products_ship_price_three,p.products_ship_price_four, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_sold, 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,p.products_ship_price_one,p.products_ship_price_two,p.products_shi p_price_three,p.products_ship_price_four, pd.products_name, p.products_quantity, p.products_image, p.products_pdfupload, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_sold, 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"); For categories: shearch in two pages : $categories_count = 0;$rows = 0; if ($_REQUEST['search']) { if($cat_stat==1) { Copy in categories.php "$products_query = tep_db_query" TO "order by pd.products_name" after the "} else {" and replace to products_multi.php : do this for two in produts-multi.php Warning: It is necessary to create the categories and the subcategories before the copy of products. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.