Dragonkeeper Posted February 14, 2007 Share Posted February 14, 2007 hi all,i've developped a simple tool to move, delete and copy multiple products in one step. Anybody interested? Where can i send it to for public download? sr Outstanding tool! Saved me hours and hours of admin time moving stuff around. Many thanks! Link to comment Share on other sites More sharing options...
data2700 Posted February 22, 2007 Share Posted February 22, 2007 Link to comment Share on other sites More sharing options...
con4mity Posted February 22, 2007 Share Posted February 22, 2007 Installed 2.5, and it seems to work great. Except if I upload bulk listings with easypopulate, they do not show up in the products_multi.php. All the products I've added manually show up, but the page products_multi.php apparently doesn't even see these uploaded listings. Yet they show up in the normal product view. Any idea what I might have missed? Link to comment Share on other sites More sharing options...
paq1200 Posted February 28, 2007 Share Posted February 28, 2007 I have over 2600 items and was wanting to find out if there is a way to limit the number of items shown at one time. Thanks Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2007 Share Posted March 4, 2007 Installed 2.5, and it seems to work great. Except if I upload bulk listings with easypopulate, they do not show up in the products_multi.php. All the products I've added manually show up, but the page products_multi.php apparently doesn't even see these uploaded listings. Yet they show up in the normal product view. Any idea what I might have missed? I have tried a number of things, and the easiest that I have found is to set up a new manufacture, such as "Unknown", and add it to the manufacture's list. Next, using an MySQL browser, like myPHPadmin, look in the manufacturers table, and find the id for the manufacture you just added, for me it is 10. Here is an example SELECT * FROM manufacturers; or even SELECT * FROM manufactuer WHERE manufacturers_name = 'Unknown'; Now, just issue the following command UPDATE products SET manufacturers_id = '10'; It works for me - and I tried a lot over the past couple evenings, short of the code listed above. When I added items using EP that did have a manufacture in the files I didn't have a problem, so I was able to eliminate everything that the files had in common. I have over 2600 items and was wanting to find out if there is a way to limit the number of items shown at one time. Thanks I have used the community contribution "Admin Products Paging" with good results for the regular products/categories, and no luck in MPM <_< I have not tried modifying anything, yet since the code is out there for all to see, it should not be overly difficult (I hope). Link to comment Share on other sites More sharing options...
ctroyp Posted March 25, 2007 Share Posted March 25, 2007 I have used the community contribution "Admin Products Paging" with good results for the regular products/categories, and no luck in MPM <_< I have not tried modifying anything, yet since the code is out there for all to see, it should not be overly difficult (I hope). I do have success in using MPM with Admins Product Paging (both great contribs), but when I have more than one page showing, I cannot move anything. If there is only one page showing (meaning that there are 500 items or less in the category which is my per page limit) I can move products. I am looking into this problem now and will let you guys know if I find the solution... Link to comment Share on other sites More sharing options...
ctroyp Posted March 26, 2007 Share Posted March 26, 2007 For those looking to utilize Admin Products Paging with this mod, try the following as a full replacement to your products_multi.php. You may consider using a comparison tool like winmerge to compare this to the original file. This is certainly work in progress... Be sure to backup your original file and database before trying this. Although it worked for me, I cannot guarantee it will for you. <?php /* $Id: products_multi.php, v 2.3 autor: sr, 2003-07-31 / [email protected] 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 */ 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, [email protected] $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> <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']) { $prod_sql = "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 } else { $prod_sql = "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, " . 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 } //BOF Admin product paging $prod_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_PROD_ADMIN_SIDE, $prod_sql, $prod_query_numrows); //EOF Admin product paging $products_query = tep_db_query($prod_sql); 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> <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; ?>"> </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" checked> <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"> <?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> <!-- BOF Admin product paging --> <tr> <td colspan="3"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" ><?php echo $prod_split->display_count($prod_query_numrows, MAX_PROD_ADMIN_SIDE, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo $prod_split->display_links($prod_query_numrows, MAX_PROD_ADMIN_SIDE, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page'))); ?></td> </tr> </table> </td> </tr> <!-- EOF Admin product paging --> <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"; $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'); ?> Link to comment Share on other sites More sharing options...
ioasw Posted March 27, 2007 Share Posted March 27, 2007 I installed this contrib, and only some of my products show in it, there is actually a lot of prodcuts not being shown. Has this happened to anyone? Can anyone help me out, its a great tool, and it works really good, its just not showing all of my products. Link to comment Share on other sites More sharing options...
MooseFruit Posted March 28, 2007 Share Posted March 28, 2007 Does anyone know why no products show up in this tool if your products are uploaded using Easy Populate? Here is a sample of one product I upload using Easy Populate: v_products_model v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_products_price v_products_weight v_date_avail v_date_added v_products_quantity v_attribute_options_id_1 v_attribute_options_name_1_1 v_manufacturers_name v_categories_name_1 v_categories_name_2 v_categories_name_3 v_tax_class_title v_status EOREOR ACHBB02AB products/achbb02ab.jpg "Achla 13"" Antique Brass Bird Bath W/metal Birds" "<B>Antique Brass Birdbath</B><BR> 13"" diameter bath includes decorative metal birds on the rim. Features a threaded housing at the bottom for use with the Achla Wrought Iron Twist Stakes (ACBBS02 and ACBBS02C), the Black Iron Leaf Stand (item # ACBBS03) or the Copper Rail and Post Mount Stand (item # ACBBS05). " 63.95 4.30 2007-03-1 12:00 2007-03-1 12:00 50 Bird Baths EOREOR Thx, Moose Link to comment Share on other sites More sharing options...
Guest Posted March 29, 2007 Share Posted March 29, 2007 Hi I have no products showing, categories show fine, just no products inside them. Any assistance would be very much appreciated. Many thanks Katie Link to comment Share on other sites More sharing options...
Kilaz Posted April 2, 2007 Share Posted April 2, 2007 I also have a problem were not all the products are being displayed in multiple categories. (I'm not using easypopulate). Link to comment Share on other sites More sharing options...
cooldo Posted April 3, 2007 Share Posted April 3, 2007 I also have a problem were not all the products are being displayed in multiple categories. (I'm not using easypopulate). First of all - sorry for my English My easy solution for display products if no manufacturer is there: In MySQL (you can use phpMy Admin or another db manager, for example www.navicat.com) and change: 1) in products table - manufacturers_id - AllowNull change to No and Default set to 0 2) in manufacturers table add new manufacturer with id 0 3) in manufacturers_info table ad new manufacturers_id 0 and set your languages_id That's all. GOD Bless You! Link to comment Share on other sites More sharing options...
Guest Posted April 11, 2007 Share Posted April 11, 2007 EP 2.74d STS 4.5 PHP version 4.4.4 MySQL version 4.1.21-standard I uploaded 30 or so products via easy populate. 10 of which had categories attached. I figured I could just move the product without assigned category to its category with this great contribution on the admin page. It does move them. But it doesn't seem to delete them from the previous table/category after I have moved them. Also, when working in the multiple product manager, when I use the "goto" pulldown at the top right, to drill down to a specific category/subcat, it defaults to the top. Is there a fix? Ideas? Thanks. dano Link to comment Share on other sites More sharing options...
grotius Posted May 4, 2007 Share Posted May 4, 2007 Is there a way to delete ghost product. I made mistake with deleting. Now the item still appears in my shop but it doesn't show up in my admin where i can delete the item. Is there a way to delete the ghost item? thanks in advance. Link to comment Share on other sites More sharing options...
shiftlocked Posted May 9, 2007 Share Posted May 9, 2007 Hi All, GREAT CONTRIB. Saving me many hours of hard work with a botched Easy Populate, population. However Im getting the following error after installing this mod Warning: Cannot modify header information - headers already sent by (output started at /home/specialt/public_html/thermaltech/shop/admin/includes/languages/english.php:669) in /home/specialt/public_html/thermaltech/shop/admin/includes/functions/general.php on line 52 Things still to do before going "live" in no real order... Change "buy now buttons" css styles Change "lets see what we have here" into something meaningfull Main logo of the website Sort out currency to make site UK only (at present) Remove "xx requests since" stuff Update mainpage :D Move shopping cart status into header Add in stock status to product listing page Define styles for product listing standardisation Change CSS background for Headings Increase Category size headings Used mods so far:- basic_design_pack1mk7 | Google XML sitemap w admin | Paypal IPN v 1.2 | Feedmachine | pricematch_1_3_1 | Dynamic Sitemap 1.6 | Whos online Enhancement | Easypopulate 2.72 Each one that I solve I;ll be putting a post on the forum in a "completed shop" thread that Im writing up Link to comment Share on other sites More sharing options...
shiftlocked Posted May 9, 2007 Share Posted May 9, 2007 Hi All,GREAT CONTRIB. Saving me many hours of hard work with a botched Easy Populate, population. However Im getting the following error after installing this mod Warning: Cannot modify header information - headers already sent by (output started at /home/specialt/public_html/thermaltech/shop/admin/includes/languages/english.php:669) in /home/specialt/public_html/thermaltech/shop/admin/includes/functions/general.php on line 52 Just done a bit of searching and I thought that it would be the "whitespace" problem that ive googled and search for however its having a problem at // Redirect to another page or site function tep_redirect($url) { global $logger; header('Location: ' . $url); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; $logger->timer_stop(); } exit; } in particular header('Location: ' . $url); I am using ultimate SEO so is that causing a problem. The error only occours when its done its work but then wont take me back to the starting page. Things still to do before going "live" in no real order... Change "buy now buttons" css styles Change "lets see what we have here" into something meaningfull Main logo of the website Sort out currency to make site UK only (at present) Remove "xx requests since" stuff Update mainpage :D Move shopping cart status into header Add in stock status to product listing page Define styles for product listing standardisation Change CSS background for Headings Increase Category size headings Used mods so far:- basic_design_pack1mk7 | Google XML sitemap w admin | Paypal IPN v 1.2 | Feedmachine | pricematch_1_3_1 | Dynamic Sitemap 1.6 | Whos online Enhancement | Easypopulate 2.72 Each one that I solve I;ll be putting a post on the forum in a "completed shop" thread that Im writing up Link to comment Share on other sites More sharing options...
♥stubbsy Posted May 9, 2007 Share Posted May 9, 2007 Hi there, I have header tags controller installed and when i copy a product it doesn't duplicate any of the header tag information over to the new product. Can anyone suggest a fix for this? Cheers Dave Link to comment Share on other sites More sharing options...
Guest Posted May 9, 2007 Share Posted May 9, 2007 Hi there, I have header tags controller installed and when i copy a product it doesn't duplicate any of the header tag information over to the new product. Can anyone suggest a fix for this? Cheers Dave It won't by default, as the header tags is a different contribution. So custom fields need to be processed separately by adding extra code, also depending what other modules you have installed that need to be copied over to the products related tables. Link to comment Share on other sites More sharing options...
sunitha Posted May 14, 2007 Share Posted May 14, 2007 Hi ! Just installed this contribution, it works well and it is very usefull. Great work at putting it together, apreciated a lot! Thank you! I did all the steps u told me to follow to install this, i can c the all button like move to,copy to and delete but once i try to move or delete anything the changes r not taking place.... Link to comment Share on other sites More sharing options...
auto1059 Posted May 18, 2007 Share Posted May 18, 2007 1366 - Incorrect integer value: '' 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 ('', '230', 'HZ', 'nopic.jpg', '10.0000', '2007-04-18 16:21:36', '2007-04-18 16:21:46', '', '10.00', '1', '0', '5', '0') [TEP STOP] i did everything and got this :( Link to comment Share on other sites More sharing options...
auto1059 Posted May 18, 2007 Share Posted May 18, 2007 help Link to comment Share on other sites More sharing options...
coelroy Posted May 23, 2007 Share Posted May 23, 2007 Hi there I need some assistance please. I have the Header Tags contrib installed. I wanted to delete products from the admin panel via the MultProdMan feature but I get the following error message: "Warning: Invalid argument supplied for foreach() in public_html/admin/products_multi.php on line 28 Warning: Cannot modify header information - headers already sent by (output started at public_html/admin/products_multi.php:28) in public_html/admin/includes/functions/general.php on line 30" Here follows an excerpt of admin/products_multi.php code 26-37: 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); } admin/includes/functions/general.php on line 30 excerpt of code lines 26-35: // Redirect to another page or site function tep_redirect($url) { global $logger; header('Location: ' . $url); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) $logger = new logger; $logger->timer_stop(); } Any help with be appreciated. Regards Elroy Link to comment Share on other sites More sharing options...
nafri Posted May 28, 2007 Share Posted May 28, 2007 hi guys got a strange problem. i can delete single items but not categories..Get this error message Warning: Invalid argument supplied for foreach() in /homepages/17/d189999914/htdocs/admin/products_multi.php on line 43 any idea thanks Link to comment Share on other sites More sharing options...
shaine Posted May 30, 2007 Share Posted May 30, 2007 Please help! I installed the 20th may version and got the following when i try and click catergories: Error! Unable to determine connection method on a link! Known methods: NONSSL SSL Function used: tep_href_link('products_attributes.php', '', 'Multiple Products Manager NONSSL') Please help its stopping my sales!!!! Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2007 Share Posted August 1, 2007 I followed all the instructions step by step but im getting this error: Fatal error: Call to undefined function: tep_array_merge() in html/shop/admin/products_multi.php on line 233 Can someone help, please advise, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.