Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Thenes

Archived
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Thenes

  1. I apologise if this has been asked somewhere before but I'm trying to set some costs for postage and insured postage. How is the Insurance Base Cost calculated for Postage with Insurance or rather Registered Post? How is the 4.35 calculated? I'm assuming these costs are input without GST, if so - eg. the Additional Insurance Cost is set at 1.15 (for a $1.25 per extra $100 value of an item sent?). I know it's just 0.01 out, but is this to do with rounding? I'm trying to understand the calculations as the price for Registered Post is different from what I'm calculating. Many Thanks :blush:
  2. How are you going with this? There are a couple of extra features that might be good to add to this Contribution without having to add it manually. Lifting the 9 pages restriction without having to add extra pages manually (like the addition shown on the previous page). Possibility of adding an (infobox) heading if you wanted to categorise or group your extra pages. Eg. If was selling DIY sewing project kits and I had my general information pertaining to the site, but then I wanted to add extra pages of information say under "Sewing Tips" and not show straight under "Information". In saying that - would anyone have any idea how to do this manually?
  3. I had this exact same problem and found the solution thanks to http://www.oscommerce.com/forums/index.php?showtopic=296135 You'll find around line 386 a series of about 4 or 5 additions that use <? instead of <?php - find them and change them to <?php and it should solve the issue. (All brackets/braces are closed.)
  4. Thank you, your code help part of my odd problem. I have the Admin Access Levels contribution working implementing it this way - http://www.oscommerce.com/forums/index.php?sho...00#entry1359160 The Admin Access Levels was working fine but strangely enough after I moved it to another computer - with same setup, I started getting errors. One was the dreaded Redirect Loop which your bit of code helped. The other occurred once I was able to log in - but this error appeared where the administration menu boxes were supposed to be: This code helped http://www.oscommerce.com/forums/index.php?sho...aded&start= Except that I placed the code: if (($PHP_SELF == '') || (strlen(trim($PHP_SELF)) == 0)) $PHP_SELF = rtrim(str_replace(array( getenv('PATH_INFO'),getenv('QUERY_STRING')) , '', $_SERVER['REQUEST_URI']), '?'); under this in /admin/includes/application_top.php // set php_self in the local scope $PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']); I'd greatly appreciate it if someone might be able provide permanent fixes for the /admin/includes/application_top.php file. I think we'll see more problems with PHP5+?
  5. I've run into the same problem. What version of PHP are you using? -- This worked for me - allowing me to run the SQL. The data is being cut off, and instead of MYSQL just cutting it off - it's returning the error that's it's being cut off. (Also apparently relates to MYSQL 5 not allowing a space in a float field.) In my.ini put sql-mode=MYSQL40, and restart the mysql server. I commented it out back out of my.ini after I ran the SQL.
  6. Sorry one more edit... I made an error - the No Rights Permission Error: You should probably put the administrators.php under the Administrator Box and not the Configuration Box.
  7. It wouldn't let me re-edit the post, but this is how it was supposed to read.
  8. Greetings, I am going to document what I have done to get the Administration Access Level Accounts 2.0 working so far. Please keep in mind that I am working on it locally and not live (EasyPHP 2.0, with Apache 2.2.3 and PHP 5.2.0). (I haven't come across major problems when uploading to a live environment, however I will post an update if I run into any major issues.) Also please note there is another thread which also deals with AALA - I haven't read all the way through it, but it may address any other problems you run into. It can be found here: http://www.oscommerce.com/forums/index.php?showtopic=51399 The latest version of Administration Access Level Accounts 2.0 has had a lot of work done to it. There has been a generous amount of time put into rolling several contributions and fixes into the latest version. It is supposed to have addressed the Register Globals issues and it also combines oliswiss' Category Extension (which I'm a big fan of, having used it in the past). I can only comment on what has worked for me. Why I have encountered some of the issues I have - for some of them - I'm not sure. Also please be aware this may be a long post. Please read through first - it's not an exact Step by Step, but more on what happened during the process. -- Firstly I installed the latest version of osCommerce (osCommerce Online Merchant v2.2 Release Candidate 2a). Then I installed Administration Access Level Accounts 2.0 - pparrilla 16 Oct 2008: http://www.oscommerce.com/community/contributions,1359 The first problem I ran into was the Register Globals issue when trying to acces catalog/admin/index.php -- So I downloaded the Register Globals addon - CMOTD 5 Sep 2006: http://addons.oscommerce.com/info/2097 I installed both contributions several times and kept coming back to an error which told me that trying to access the Administration area was resulting in a loop that would never resolve. Note: One of the biggest challenges of using osCommerce with addons/contributions is updates. It's a constant work in progress and with each update there is no guarantee that your selection of contributions that you have managed to get to work together will continue to work in the future, unless you have a sound knowledge of how to keep them updated or the contributor is continually maintaining the package. So in saying that - while some older contributions will still work - don't just blindy install a contribution, even if it is a clean install. Using several contributions will often mean that several additions are made to a single file as a result. It's good to know what is being added or removed and good practice to comment out rather than delete. -- So I kept coming across the same problem. I use WinMerge which I find invaluable. Notepad++ can also provide a similar layout where you can have both files side by side for comparison. In the end I came across this contribution Register Globals Patch Files - Vger 1 Aug 2005: http://www.oscommerce.com/community/contributions,2957 First I installed the contribution very carefully using WinMerge, and I made note of which files were affected in the Administration area. Then I went forth to install the Administration Access Level 2.0. Most files after comparing I just straight overwrote with the included contribution files. When it came to editing files that had been previously edited with the Register Global Patch Files - I did these manually. (I probably should've documented which files they were, but you'll know when you try to install them as there were only a couple.) -- So for that part - Success! I was able to see the login page (login_admin.php) and login. -- Common Problems: Error: administrators.php is not defined You will need to define administrators.php in /admin/includes/filenames.php - define('FILENAME_ADMINISTRATORS', 'administrators.php'); Error: No Rights Permissions You will need to go to menu boxes on the left side: Click Administrator then Click on File Access then Select Configuration. On the right hand side box you'll see Store Files and administrators.php should be in the pull down menu. You need to Select it and and click Save. Error: 1146 - TABLE 'your_dbname.table_administrators' doesn't exist select id, user_name from TABLE_ADMINISTRATORS order by user_name You will need to define 'TABLE_ADMINISTRATORS' in /admin/includes/database_table.php - define('TABLE_ADMINISTRATORS', 'administrators'); Error: Fatal Error: Call to undefined function tep_hide_session_id() in /.../... Clicking on the Administration link in the header brings up this error. I found a solution that's from another contribution: RC2 Admin Login for MS2 - http://addons.oscommerce.com/info/6203. In Step 8: Backup admin/includes/functions/html_output.php Add this function before the closing PHP tag ?> //// // Hide form elements function tep_hide_session_id() { $string = ''; if (defined('SID') && tep_not_null(SID)) { $string = tep_draw_hidden_field(tep_session_name(), tep_session_id()); } return $string; } When you click the Administration link in the header - unlike a clean install which shows a blank page with the Shop Title you'll see your Customers and Orders with no error. Other: You may want to edit /admin/includes/languages/english/admin_members.php - as the list at the bottom defines // BOF: KategorienAdmin / OLISWISS and the grammar and spelling needs a little cleaning up. (That's not a pick, but if you're pedantic like me and like for things to look uniform, you may want to fix it.) -- At this points - it works for me. I will be uploading it shortly once I make a few more GUI changes. I hope this helps address some issues - which of course in some previous posts - other osCers have provided support, so I am only reiterating some of those answers. As always use Contributions carefully and at your own risk - and if you can, give a little something back and Good Luck :)
  9. I have the exact same problem. I just tried again over a fresh install and the same issue. For those that have got it working on a fresh install - can you please tell me if you needed to install the Register Globals add-on or did it work without it?
  10. Fantastic! :thumbsup: Could've been anything - I did see the format of our files were a little different - it could've been a carriage return, which happens with some text editors. Glad I could help.
  11. Hi Joe, Sorry I haven't replied sooner. I compared the files earlier this week - unfortunately I didn't find any errors or discrepancies. I'm including the file that I'm using, just in case you want to try it out. Are you using any other contributions? Sometimes contributions & modifications can conflict with each other. <?php /* $Id: quick_updates.php 2005/09/14 13:55:34 HRB Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Based on the original script contributed by Burt ([email protected]) and by Henri Bredehoeft ([email protected]) Changelog: by Infobroker [email protected] Copyright (c) 2002 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); ($row_by_page) ? define('MAX_DISPLAY_ROW_BY_PAGE' , $row_by_page ) : $row_by_page = MAX_DISPLAY_SEARCH_RESULTS; define('MAX_DISPLAY_ROW_BY_PAGE' , MAX_DISPLAY_SEARCH_RESULTS ); //// Tax Row $tax_class_array = array(array('id' => '0', 'text' => NO_TAX_TEXT)); $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']); } ////Info Row pour le champ fabriquant $manufacturers_array = array(array('id' => '0', 'text' => NO_MANUFACTURER)); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } // Display the list of the manufacturers function manufacturers_list(){ global $manufacturer; $manufacturers_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m order by m.manufacturers_name ASC"); $return_string = '<select name="manufacturer" onChange="this.form.submit();">'; $return_string .= '<option value="' . 0 . '">' . TEXT_ALL_MANUFACTURERS . '</option>'; while($manufacturers = tep_db_fetch_array($manufacturers_query)){ $return_string .= '<option value="' . $manufacturers['manufacturers_id'] . '"'; if($manufacturer && $manufacturers['manufacturers_id'] == $manufacturer) $return_string .= ' SELECTED'; $return_string .= '>' . $manufacturers['manufacturers_name'] . '</option>'; } $return_string .= '</select>'; return $return_string; } ##// Uptade database switch ($HTTP_GET_VARS['action']) { case 'update' : $count_update=0; $item_updated = array(); if($HTTP_POST_VARS['product_new_model']){ foreach($HTTP_POST_VARS['product_new_model'] as $id => $new_model) { if (trim($HTTP_POST_VARS['product_new_model'][$id]) != trim($HTTP_POST_VARS['product_old_model'][$id])) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_model='" . $new_model . "', products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_name']){ foreach($HTTP_POST_VARS['product_new_name'] as $id => $new_name) { if (trim($HTTP_POST_VARS['product_new_name'][$id]) != trim($HTTP_POST_VARS['product_old_name'][$id])) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS_DESCRIPTION . " SET products_name='" . $new_name . "' WHERE products_id=$id and language_id=" . $languages_id); mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_sort_order']){ foreach($HTTP_POST_VARS['product_new_sort_order'] as $id => $new_sort_order) { if ($HTTP_POST_VARS['product_new_sort_order'][$id] != $HTTP_POST_VARS['product_old_sort_order'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_sort_order=$new_sort_order, products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_price']){ foreach($HTTP_POST_VARS['product_new_price'] as $id => $new_price) { if ($HTTP_POST_VARS['product_new_price'][$id] != $HTTP_POST_VARS['product_old_price'][$id] && $HTTP_POST_VARS['update_price'][$id] == 'yes') { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_price=$new_price, products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_weight']){ foreach($HTTP_POST_VARS['product_new_weight'] as $id => $new_weight) { if ($HTTP_POST_VARS['product_new_weight'][$id] != $HTTP_POST_VARS['product_old_weight'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_weight=$new_weight, products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_quantity']){ foreach($HTTP_POST_VARS['product_new_quantity'] as $id => $new_quantity) { if ($HTTP_POST_VARS['product_new_quantity'][$id] != $HTTP_POST_VARS['product_old_quantity'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_quantity=$new_quantity, products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_manufacturer']){ foreach($HTTP_POST_VARS['product_new_manufacturer'] as $id => $new_manufacturer) { if ($HTTP_POST_VARS['product_new_manufacturer'][$id] != $HTTP_POST_VARS['product_old_manufacturer'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET manufacturers_id=$new_manufacturer, products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_image']){ foreach($HTTP_POST_VARS['product_new_image'] as $id => $new_image) { if (trim($HTTP_POST_VARS['product_new_image'][$id]) != trim($HTTP_POST_VARS['product_old_image'][$id])) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_image='" . $new_image . "', products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_status']){ foreach($HTTP_POST_VARS['product_new_status'] as $id => $new_status) { if ($HTTP_POST_VARS['product_new_status'][$id] != $HTTP_POST_VARS['product_old_status'][$id]) { $count_update++; $item_updated[$id] = 'updated'; tep_set_product_status($id, $new_status); mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_last_modified=now() WHERE products_id=$id"); } } } if($HTTP_POST_VARS['product_new_tax']){ foreach($HTTP_POST_VARS['product_new_tax'] as $id => $new_tax_id) { if ($HTTP_POST_VARS['product_new_tax'][$id] != $HTTP_POST_VARS['product_old_tax'][$id]) { $count_update++; $item_updated[$id] = 'updated'; mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_tax_class_id=$new_tax_id, products_last_modified=now() WHERE products_id=$id"); } } } $count_item = array_count_values($item_updated); if ($count_item['updated'] > 0) $messageStack->add($count_item['updated'].' '.TEXT_PRODUCTS_UPDATED . " $count_update " . TEXT_QTY_UPDATED, 'success'); break; case 'calcul' : if ($HTTP_POST_VARS['spec_price']) $preview_global_price = 'true'; break; } //// explode string parameters from preview product if($info_back && $info_back!="-") { $infoback = explode('-',$info_back); $sort_by = $infoback[0]; $page = $infoback[1]; $current_category_id = $infoback[2]; $row_by_page = $infoback[3]; $manufacturer = $infoback[4]; } //// define the step for rollover lines per page $row_bypage_array = array(array()); for ($i = 10; $i <=100; $i=$i+5) { $row_bypage_array[] = array('id' => $i, 'text' => $i); } ##// Let's start displaying page with forms ?> <!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"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <script language="javascript"> <!-- var browser_family; var up = 1; if (document.all && !document.getElementById) browser_family = "dom2"; else if (document.layers) browser_family = "ns4"; else if (document.getElementById) browser_family = "dom2"; else browser_family = "other"; function display_ttc(action, prix, taxe, up){ if(action == 'display'){ if(up != 1) valeur = Math.round((prix + (taxe / 100) * prix) * 100) / 100; }else{ if(action == 'keyup'){ valeur = Math.round((parseFloat(prix) + (taxe / 100) * parseFloat(prix)) * 100) / 100; }else{ valeur = '0'; } } switch (browser_family){ case 'dom2': document.getElementById('descDiv').innerHTML = '<?php echo TOTAL_COST; ?> : '+valeur; break; case 'ie4': document.all.descDiv.innerHTML = '<?php echo TOTAL_COST; ?> : '+valeur; break; case 'ns4': document.descDiv.document.descDiv_sub.document.write(valeur); document.descDiv.document.descDiv_sub.document.close(); break; case 'other': break; } } --> </script> <!-- 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" colspan="3" valign="top"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"> <?php if($current_category_id != 0){ $image_query = tep_db_query("select c.categories_image from " . TABLE_CATEGORIES . " c where c.categories_id=" . $current_category_id); $image = tep_db_fetch_array($image_query); echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $image['categories_image'], '', 40); }else{ if($manufacturer){ $image_query = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id=" . $manufacturer); $image = tep_db_fetch_array($image_query); echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $image['manufacturers_image'], '', 40); } } ?> </td></tr> </table></td></tr> <tr><td align="center"> <table width="100%" cellspacing="0" cellpadding="0" border="1" bgcolor="#F3F9FB" bordercolor="#D1E7EF" height="100"><tr align="left"><td valign="middle"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr><td height="5"></td></tr> <tr align="center"> <td class="smalltext"><?php echo tep_draw_form('row_by_page', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id);?></td> <td class="smallText"><?php echo TEXT_MAXI_ROW_BY_PAGE . ' ' . tep_draw_pull_down_menu('row_by_page', $row_bypage_array, $row_by_page, 'onChange="this.form.submit();"'); ?></form></td> <?php echo tep_draw_form('categorie', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); ?> <td class="smallText" align="center" valign="top"><?php echo DISPLAY_CATEGORIES . ' ' . tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"'); ?></td></form> <?php echo tep_draw_form('manufacturers', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'cPath', $current_category_id);?> <td class="smallText" align="center" valign="top"><?php echo DISPLAY_MANUFACTURERS . ' ' . manufacturers_list(); ?></td></form> </tr> </table> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr align="center"> <td align="center"> <table border="0" cellspacing="0"> <form name="spec_price" <?php echo 'action="' . tep_href_link(FILENAME_QUICK_UPDATES, tep_get_all_get_params(array('action', 'info', 'pID')) . "action=calcul&page=$page&sort_by=$sort_by&cPath=$current_category_id&row_by_page=$row_by_page&manufacturer=$manufacturer" , 'NONSSL') . '"'; ?> method="post"> <tr> <td class="main" align="center" valign="middle" nowrap> <?php echo TEXT_INPUT_SPEC_PRICE; ?></td> <td align="center" valign="middle"> <?php echo tep_draw_input_field('spec_price',0,'size="5"'); ?> </td> <td class="smalltext" align="center" valign="middle"><?php if ($preview_global_price != 'true') { echo ' ' . tep_image_submit('button_preview.gif', IMAGE_PREVIEW, "page=$page&sort_by=$sort_by&cPath=$current_category_id&row_by_page=$row_by_page&manufacturer=$manufacturer"); } else echo ' <a href="' . tep_href_link(FILENAME_QUICK_UPDATES, "page=$page&sort_by=$sort_by&cPath=$current_category_id&row_by_page=$row_by_page&manufacturer=$manufacturer") . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';?></td> </tr> <tr> <td class="smalltext" align="center" valign="middle" colspan="3" nowrap> <?php if ($preview_global_price != 'true') { echo TEXT_SPEC_PRICE_INFO1; } else echo TEXT_SPEC_PRICE_INFO2;?> </td> </tr> </form> </table> </td> </tr> <tr><td height="5"></td></tr> </td></tr> <br> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr align="center"> <form name="update" method="POST" action="<?php echo "$PHP_SELF?action=update&page=$page&sort_by=$sort_by&cPath=$current_category_id&row_by_page=$row_by_page&manufacturer=$manufacturer"; ?>"> <td class="smalltext" align="middle"><?php echo WARNING_MESSAGE; ?> </td> <?php echo "<td class=\"pageHeading\" align=\"right\">" . '<script language="javascript"><!-- switch (browser_family) { case "dom2": case "ie4": document.write(\'<div id="descDiv">\'); break; default: document.write(\'<ilayer id="descDiv"><layer id="descDiv_sub">\'); break; } --> </script>' . "</td>\n"; ?> <td align="right" valign="middle"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE, "action=update&cPath=$current_category_id&page=$page&sort_by=$sort_by&row_by_page=$row_by_page");?></td> </tr> </table> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <!-- Arbeitsfarbe --> <td valign="top"><table border="0" bordercolor="#FF0000" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="left" valign="top"> <!-- Modell ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_MODEL == 'true')echo " <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_model ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_MODEL . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_model DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_MODEL . ' ' . TEXT_DESCENDINGLY)."</a> <br>" .TABLE_HEADING_MODEL; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"><?php echo " <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=pd.products_name ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_PRODUCTS . TEXT_ASCENDINGLY)."</a><a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=pd.products_name DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_PRODUCTS . ' ' . TEXT_DESCENDINGLY)."</a><br>" .TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="left" valign="top"><!-- Status ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_STATUT == 'true')echo " <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_status ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . 'OFF ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_status DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . 'ON ' . TEXT_ASCENDINGLY)."</a> <br>" .TABLE_HEADING_STATUS; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"><!-- Gewicht ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_WEIGHT == 'true')echo " <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_weight ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_WEIGHT . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_weight DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_WEIGHT . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_WEIGHT; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"><!-- Stück ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_QUANTITY == 'true')echo " <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_quantity ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_QUANTITY . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_quantity DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_QUANTITY . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_QUANTITY; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"><!-- Bild ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_IMAGE == 'true')echo "<a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_image ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_IMAGE . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_image DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_IMAGE . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_IMAGE; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"><!-- Hersteller ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_MANUFACTURER == 'true')echo "<a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=m.manufacturers_name ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_MANUFACTURERS . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=m.manufacturers_name DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_MANUFACTURERS . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_MANUFACTURERS; ?> </td> <td class="dataTableHeadingContent" align="left" valign="top"> <!-- Preis ++++++++++++++++++++++++++++++++++ --> <?php echo "<a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_price ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer) ."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_PRICE . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_price DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer) ."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_PRICE . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_PRICE;?> </td> <td class="dataTableHeadingContent" align="left" valign="top"> <!-- MwSt ++++++++++++++++++++++++++++++++++ --> <?php if(DISPLAY_TAX == 'true')echo "<a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_tax_class_id ASC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_up.gif', TEXT_SORT_ALL . TABLE_HEADING_TAX . ' ' . TEXT_ASCENDINGLY)."</a> <a href=\"" . tep_href_link( FILENAME_QUICK_UPDATES, 'cPath='. $current_category_id .'&sort_by=p.products_tax_class_id DESC&page=' . $page.'&row_by_page=' . $row_by_page . '&manufacturer=' . $manufacturer)."\" >".tep_image(DIR_WS_IMAGES . 'icon_down.gif', TEXT_SORT_ALL . TABLE_HEADING_TAX . ' ' . TEXT_DESCENDINGLY)."</a> <br>" . TABLE_HEADING_TAX; ?> </td> <td class="dataTableHeadingContent" align="center" valign="middle"> </td> <td class="dataTableHeadingContent" align="center" valign="middle"> </td> </tr><tr class="datatableRow"> <?php //// control string sort page if ($sort_by && !ereg('order by',$sort_by)) $sort_by = 'order by '.$sort_by; //// define the string parameters for good back preview product $origin = FILENAME_QUICK_UPDATES."?info_back=$sort_by-$page-$current_category_id-$row_by_page-$manufacturer"; //// controle lenght (lines per page) $split_page = $page; if ($split_page > 1) $rows = $split_page * MAX_DISPLAY_ROW_BY_PAGE - MAX_DISPLAY_ROW_BY_PAGE; //// select categories if ($current_category_id == 0){ if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = m.manufacturers_id and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and pd.language_id = '$languages_id' $sort_by "; } } else { // if($manufacturer){ // $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; // }else{ // $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; // } // } //Quick Price Update Manfacturers Patch if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, m.manufacturers_id, manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, ".TABLE_MANUFACTURERS." m where p.products_id = pd.products_id and m.manufacturers_id = p.manufacturers_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, m.manufacturers_id, manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc left join ". TABLE_MANUFACTURERS." m on m.manufacturers_id = p.manufacturers_id where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; } } //// page splitter and display each products info $products_split = new splitPageResults($split_page, MAX_DISPLAY_ROW_BY_PAGE, $products_query_raw, $products_query_numrows); $products_query = tep_db_query($products_query_raw); while ($products = tep_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } //// check for global add value or rates, calcul and round values rates if ($HTTP_POST_VARS['spec_price']){ $flag_spec = 'true'; if (substr($HTTP_POST_VARS['spec_price'],-1) == '%') { if($HTTP_POST_VARS['marge'] && substr($HTTP_POST_VARS['spec_price'],0,1) != '-'){ $valeur = (1 - (ereg_replace("%", "", $HTTP_POST_VARS['spec_price']) / 100)); $price = sprintf("%01.2f", round($products['products_price'] / $valeur,2)); }else{ $price = sprintf("%01.2f", round($products['products_price'] + (($spec_price / 100) * $products['products_price']),2)); } } else $price = sprintf("%01.2f", round($products['products_price'] + $spec_price,2)); } else $price = $products['products_price']; //// Check Tax_rate for displaying TTC $tax_query = tep_db_query("select r.tax_rate, c.tax_class_title from " . TABLE_TAX_RATES . " r, " . TABLE_TAX_CLASS . " c where r.tax_class_id=" . $products['products_tax_class_id'] . " and c.tax_class_id=" . $products['products_tax_class_id']); $tax_rate = tep_db_fetch_array($tax_query); if($tax_rate['tax_rate'] == '')$tax_rate['tax_rate'] = 0; if(MODIFY_MANUFACTURER == 'false'){ $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id=" . $products['manufacturers_id']); $manufacturer = tep_db_fetch_array($manufacturer_query); } //// display infos per row if($flag_spec){echo '<tr class="dataTableRow" onmouseover="'; if(DISPLAY_TVA_OVER == 'true'){echo 'display_ttc(\'display\', ' . $price . ', ' . $tax_rate['tax_rate'] . ');';} echo 'this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="'; if(DISPLAY_TVA_OVER == 'true'){echo 'display_ttc(\'delete\');';} echo 'this.className=\'dataTableRow\'">'; }else{ echo '<tr class="dataTableRow" onmouseover="'; if(DISPLAY_TVA_OVER == 'true'){echo 'display_ttc(\'display\', ' . $products['products_price'] . ', ' . $tax_rate['tax_rate'] . ');';} echo 'this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="'; if(DISPLAY_TVA_OVER == 'true'){echo 'display_ttc(\'delete\', \'\', \'\', 0);';} echo 'this.className=\'dataTableRow\'">';} if(DISPLAY_MODEL == 'true'){if(MODIFY_MODEL == 'true')echo "<td class=\"smallText\"><input type=\"text\" size=\"6\" name=\"product_new_model[".$products['products_id']."]\" value=\"".$products['products_model']."\"></td>\n";else echo "<td class=\"smallText\" align=\"left\">" . $products['products_model'] . "</td>\n";}else{ echo "<td class=\"smallText\" align=\"left\">";} if(MODIFY_NAME == 'true')echo "<td class=\"smallText\"><input type=\"text\" size=\"35\" name=\"product_new_name[".$products['products_id']."]\" value=\"".$products['products_name']."\"></td>\n";else echo "<td class=\"smallText\" align=\"left\">".$products['products_name']."</td>\n"; //// Product status radio button if(DISPLAY_STATUT == 'true'){ if ($products['products_status'] == '1') { echo "<td class=\"smallText\"><input type=\"radio\" name=\"product_new_status[".$products['products_id']."]\" value=\"0\" ><input type=\"radio\" name=\"product_new_status[".$products['products_id']."]\" value=\"1\" checked ></td>\n"; } else { echo "<td class=\"smallText\"><input type=\"radio\" style=\"background-color: #EEEEEE\" name=\"product_new_status[".$products['products_id']."]\" value=\"0\" checked ><input type=\"radio\" style=\"background-color: #EEEEEE\" name=\"product_new_status[".$products['products_id']."]\" value=\"1\"></td>\n"; } } if(DISPLAY_WEIGHT == 'true')echo "<td class=\"smallText\"><input type=\"text\" size=\"5\" name=\"product_new_weight[".$products['products_id']."]\" value=\"".$products['products_weight']."\"></td>\n";else echo "<td class=\"smallText\" align=\"center\"></td>"; if(DISPLAY_QUANTITY == 'true')echo "<td class=\"smallText\"><input type=\"text\" size=\"3\" name=\"product_new_quantity[".$products['products_id']."]\" value=\"".$products['products_quantity']."\"></td>\n";else echo "<td class=\"smallText\" align=\"center\"></td>"; if(DISPLAY_IMAGE == 'true')echo "<td class=\"smallText\"><input type=\"text\" size=\"8\" name=\"product_new_image[".$products['products_id']."]\" value=\"".$products['products_image']."\"></td>\n";else echo "<td class=\"smallText\" align=\"center\"></td>"; if(DISPLAY_MANUFACTURER == 'true'){if(MODIFY_MANUFACTURER == 'true')echo "<td class=\"smallText\">".tep_draw_pull_down_menu("product_new_manufacturer[".$products['products_id']."]\"", $manufacturers_array, $products['manufacturers_id'])."</td>\n";else echo "<td class=\"smallText\">" . $manufacturer['manufacturers_name'] . "</td>";}else{ echo "<td class=\"smallText\" align=\"center\"></td>";} //// get the specials products list $specials_array = array(); $specials_query = tep_db_query("select p.products_id, s.products_id, s.specials_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id"); while ($specials = tep_db_fetch_array($specials_query)) { $specials_array[] = $specials['products_id']; } //// check specials if ( in_array($products['products_id'],$specials_array)) { $spec_query = tep_db_query("select s.products_id, s.specials_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = " . (int)$products['products_id'] . ""); $spec = tep_db_fetch_array($spec_query); echo "<td class=\"smallText\" align=\"left\"><input type=\"text\" size=\"6\" name=\"product_new_price[".$products['products_id']."]\" value=\"".$products['products_price']."\" disabled > <a target=blank href=\"".tep_href_link (FILENAME_SPECIALS, 'sID='.$spec['specials_id']).'&action=edit'."\">". tep_image(DIR_WS_IMAGES . 'icon_info.gif', TEXT_SPECIALS_PRODUCTS) ."</a></td>\n"; } else { if ($flag_spec == 'true') { echo "<td class=\"smallText\" align=\"left\"><input type=\"text\" size=\"6\" name=\"product_new_price[".$products['products_id']."]\" "; if(DISPLAY_TVA_UP == 'true'){ echo "onKeyUp=\"display_ttc('keyup', this.value" . ", " . $tax_rate['tax_rate'] . ", 1);\"";} echo " value=\"".$price ."\">".tep_draw_checkbox_field('update_price['.$products['products_id'].']','yes','checked','no')."</td>\n"; } else { echo "<td class=\"smallText\" align=\"left\"><input type=\"text\" size=\"6\" name=\"product_new_price[".$products['products_id']."]\" "; if(DISPLAY_TVA_UP == 'true'){ echo "onKeyUp=\"display_ttc('keyup', this.value" . ", " . $tax_rate['tax_rate'] . ", 1);\"";} echo " value=\"".$price ."\">".tep_draw_hidden_field('update_price['.$products['products_id'].']','yes'). "</td>\n";} } if(DISPLAY_TAX == 'true'){if(MODIFY_TAX == 'true')echo "<td class=\"smallText\" align=\"left\">".tep_draw_pull_down_menu("product_new_tax[".$products['products_id']."]\"", $tax_class_array, $products['products_tax_class_id'])."</td>\n";else echo "<td class=\"smallText\" align=\"left\">" . $tax_rate['tax_class_title'] . "</td>";}else{ echo "<td class=\"smallText\" align=\"center\"></td>";} //// links to preview or full edit if(DISPLAY_PREVIEW == 'true')echo "<td class=\"smallText\" align=\"left\"><a href=\"".tep_href_link (FILENAME_CATEGORIES, 'pID='.$products['products_id'].'&action=new_product_preview&read=only&sort_by='.$sort_by.'&page='.$split_page.'&origin='.$origin)."\">". tep_image(DIR_WS_IMAGES . 'icon_info.gif', TEXT_IMAGE_PREVIEW) ."</a></td>\n"; if(DISPLAY_EDIT == 'true')echo "<td class=\"smallText\" align=\"left\"><a href=\"".tep_href_link (FILENAME_CATEGORIES, 'pID='.$products['products_id'].'&cPath='.$categories_products[0].'&action=new_product')."\">". tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', TEXT_IMAGE_SWITCH_EDIT) ."</a></td>\n"; //// Hidden parameters for cache old values if(MODIFY_NAME == 'true') echo tep_draw_hidden_field('product_old_name['.$products['products_id'].'] ',$products['products_name']); if(MODIFY_MODEL == 'true') echo tep_draw_hidden_field('product_old_model['.$products['products_id'].'] ',$products['products_model']); echo tep_draw_hidden_field('product_old_sort_order['.$products['products_id'].']',$products['products_sort_order']); echo tep_draw_hidden_field('product_old_make_an_offer['.$products['products_id'].']',$products['products_make_an_offer']); echo tep_draw_hidden_field('product_old_zusatz3['.$products['products_id'].']',$products['products_zusatz3']); echo tep_draw_hidden_field('product_old_status['.$products['products_id'].']',$products['products_status']); echo tep_draw_hidden_field('product_old_quantity['.$products['products_id'].']',$products['products_quantity']); echo tep_draw_hidden_field('product_old_image['.$products['products_id'].']',$products['products_image']); if(MODIFY_MANUFACTURER == 'true')echo tep_draw_hidden_field('product_old_manufacturer['.$products['products_id'].']',$products['manufacturers_id']); echo tep_draw_hidden_field('product_old_weight['.$products['products_id'].']',$products['products_weight']); echo tep_draw_hidden_field('product_old_base_price['.$products['products_id'].']',$products['products_base_price']); echo tep_draw_hidden_field('product_old_base_unit['.$products['products_id'].']',$products['products_base_unit']); echo tep_draw_hidden_field('product_old_price_ek['.$products['products_id'].']',$products['products_price_ek']); echo tep_draw_hidden_field('product_old_price['.$products['products_id'].']',$products['products_price']); if(MODIFY_TAX == 'true')echo tep_draw_hidden_field('product_old_tax['.$products['products_id'].']',$products['products_tax_class_id']); //// hidden display parameters echo tep_draw_hidden_field( 'row_by_page', $row_by_page); echo tep_draw_hidden_field( 'sort_by', $sort_by); echo tep_draw_hidden_field( 'page', $split_page); } echo "</table>\n"; ?> </td> </tr> </table></td> </tr> <tr> <td align="right"> <?php //// display bottom page buttons echo '<a href="java script:window.print()">' . tep_image_submit('button_print.gif', PRINT_TEXT) . '</a> '; echo tep_image_submit('button_update.gif', IMAGE_UPDATE); echo ' <a href="' . tep_href_link(FILENAME_QUICK_UPDATES,"row_by_page=$row_by_page") . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </form> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <td class="smallText" valign="top"><?php echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, $split_page, TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="smallText" align="right"><?php echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_ROW_BY_PAGE, MAX_DISPLAY_PAGE_LINKS, $split_page, '&cPath='. $current_category_id .'&sort_by='.$sort_by . '&row_by_page=' . $row_by_page); ?></td> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> </tr> </table> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  12. Hi Joe, Just out of curiousity, are you using any other Contributions or Mods? Also, just to double check, did you run the quick_update.sql? Lastly, I wouldn't mind taking a look at your quick_updates.php if you like. (Just copy & paste it into a msg for me.) Last year I had a problem with it working as well - but I had so many Contributions & Mods, my attention was too divided. Anyhow, I can't promise anything but I don't mind taking a look.
  13. Hi Joe, What version of Quick Price Updates are you using? I can only confirm that I've been able to get it to work with version 2.5b. This is using the latest osC 2.2 Release. I also realised I didn't specify which 2.5b version of Quick Price Updates I used. http://www.oscommerce.com/community/contributions,122 1. quick price update almost everything FULL from ledave 13 March 2007 2. Corrected quick_updates.php from ledave 19 March 2007 Also - the Manufacturer Patch (I know you know this, but I might not have been clear for others.) needs to be applied to quick_updates.php. I'm hope that this helps. I have read this 1054 can be caused by different MYSQL versions but, that's to do with another contribution. Please let me know how you go.
  14. Just in case anyone is looking for the Manufacturer's Patch for Quick Price Update: If you install Quick Price Update you may find if your products aren't linked to a Manufacturer or don't have a Manufacturer the products will not show up in Quick Price Update. With this, you will be able to see all products, including those that do not have Manufacturers. Find: } else { if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_MANUFACTURERS . " m where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; } } Comment out & add or replace with: //Quick Price Update Manfacturers Patch } else { if($manufacturer){ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, m.manufacturers_id, manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, ".TABLE_MANUFACTURERS." m where p.products_id = pd.products_id and m.manufacturers_id = p.manufacturers_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' and p.manufacturers_id = " . $manufacturer . " $sort_by "; }else{ $products_query_raw = "select p.products_id, p.products_image, p.products_model, pd.products_name, p.products_status, p.products_weight, p.products_quantity, p.manufacturers_id, p.products_price, p.products_tax_class_id, m.manufacturers_id, manufacturers_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc left join ". TABLE_MANUFACTURERS." m on m.manufacturers_id = p.manufacturers_id where p.products_id = pd.products_id and pd.language_id = '$languages_id' and p.products_id = pc.products_id and pc.categories_id = '" . $current_category_id . "' $sort_by "; } } I can confirm it works with Quick Price Update 2.5b & Quick Add Product & Ajax Attribute Manager. Using Spaceboy's (Didier Debbaut) initial patch, I only removed p.products_price1 - p.products_price8 because it was causing a 1054 error. Seems to work well, Quick Price Updates is a real time saver & this patch saves having to go back & link products to Manufacturers to get it to work - which would be double the work! Thanks to Spaceboy.
  15. Fantastic! - replaced 6 instances for sprint_f with sprintf in attributeManagerPrompts.inc.php & it appears to have fixed the problem of being unable to remove Option Attribute. Thank you very much :thumbsup:
  16. I am getting this error as well. Fatal error: Call to undefined function: sprint_f() in ...\catalog\admin\attributeManager\includes\attributeManagerPrompts.inc.php on line 147 It occurs when trying to Remove an Option Value. It has to do with this line: $amPopup->setHeader(sprint_f(AM_AJAX_PROMPT_REMOVE_OPTION, $arrExtraValues['option_value_name'])); Has anyone else encountered this & found a solution? It would be much appreciated. -- Also was wondering if anyone has noticed (I couldn't quite get Attribute Sort to work properly) when you enter the options using Ajax Attribute Manager that they will order correctly but you have to enter them in reverse? (Eg. In Sizes I had to enter the largest size first in order for them to show from smallest to largest.)
  17. I'm using Featured Products v1.5.6. Thanks to JanZ's code on page 112 for the Featured Products, (and the Hide SPPC for Best Sellers Mod and new_products.php) I was able to get the Featured Products on index.php to hide the Wholesale products as before it was showing all products. (Then obviously show products for Wholesalers when logged in.) (catalog/includes/modules/featured.php) While it appears to be working, I'm no expert, these are the only changes that have been made using the more elaborate code on page 112: $featured_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, NULL as specstat, NULL as specials_new_products_price, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_FEATURED . " f using(products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id) where p.products_status = '1' and f.status = '1' and find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0 and find_in_set('" . $customer_group_id . "', products_hide_from_groups) = 0 and pd.language_id = '" . (int)$languages_id . "' order by rand($mtm) DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } else { $info_box_contents[] = array('align' => 'left', 'text' => sprintf(TABLE_HEADING_FEATURED_PRODUCTS_CATEGORY, $cat_name)); $featured_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, NULL as specstat, NULL as specials_new_products_price, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_FEATURED . " f using(products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd using(products_id), " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) and find_in_set('".$customer_group_id."', products_hide_from_groups) = 0 order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS); } I'm hoping that this is correct. (If so, perhaps it can be added as a Contrib like the Best Sellers Content Box for SPPC with Hide Products.)
  18. I'm having this exact same problem, plus it's a little worse now, nothing seems to work - it won't navigate through the pages nor can I use a pull down menu, sort or anything - either it does nothing or takes me back to the login page. (I also installed the Register Globals fix after it.) I've got a few contribs, and I've tried checking them but to no avail - :( I think I've just about given up trying to make it work. aapinen: Just use altavista.com they have a translator called Babble Fish, it's not perfect but it will give you the general idea of what they are talking about. I use it all the time.
  19. Thanks Billsoft, that's a good point to make, I wouldn't have realised that. At the moment I've solved quite a few problems but also encountered others, the one I cannot work out to date is that the Administration Access Level sessions do not appear to be timing out. I've got a few mods and I've been over and over the installations to check if I missed or modified or could notice anything conflicting but I cannot. Has anyone else encountered sessions not timing out. (I wish I noticed when it had stopped working - it was working previously but when I purchased SSL certs the site had to be moved, I think it might've stopped working around then.) My current Contribs are: SPPC Hide Products for SPPC v103a Admin Access Level Acc with the Category Ext. & Oliswiss Fix Specials Module Best Sellers & Best Seller for SPPC with Hide Featured Products 1.5.6 Product Description v1.5 Card Zapper v1.13 I have Quick Updates for SPPC but that is not working at all. (Everytime I try to do something it takes me back to the Admin Login Page) :( (Plus I've made various edits to change the way things look. Fingers crossed most of it was aesthetic. :blush: ) Has anyone come across this endless session or not timing out in the Admin Levels? :sweating:
  20. :blush: Okay I think I have it worked out (I probably should've listened to my administrator to begin with!). It will be something in the admin/includes/configure.php For myself I had to replace values with the absolute path. Eg. The original configure.php is something like this: define('HTTP_SERVER', 'https://www.yourdomain.com/catalog'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com'); define('HTTPS_CATALOG_SERVER', ''http://www.yourdomain.com); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); Edited configure.php define('HTTP_SERVER', 'https://www.yourdomain.com/catalog'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.yourdomain.com'); define('HTTPS_CATALOG_SERVER', 'https://www.yourdomain.com'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/var/www/vhosts/youdomain/httpdocs/catalog/'); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', '/var/www/vhosts/yourdomain/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/var/www/vhosts/yourdomain/httpdocs/catalog/'); Of course you'll have to use your own paths, and it may differ, so the above is just for example. :) Hope my fumbling through it helps!
  21. Hi, thanks for that - that actually fixed another problem I had with File Access in Admin Levels, however I'm still getting bounced out, and I have no idea what it is. On Quick Updates, I can click the sorting or the arrow to go to the product etc, but still all the pull down menus, and the Update button - all take me to the Admin Login page.
  22. Hi, I've just installed Quick Updates for SPPC and I've encountered a strange problem. (I have a small problem with my Admin Access Level Contrib - so I'm not sure if that's affecting that...) I got it installed with a few minor problems and then when I was using Quick Updates, everytime I selected a value in the pull down menus along the top it would take me back into the Admin Login Page. If someone could shed some light on this it would be much appreciated.
  23. Okay, that is not a fix. While it does stop the error under Administrator > File Access - the path brings up the wrong folder in the pull down menu - meaning you'll see all the files in /catalog - instead of /catalog/admin. This will cause issue if you accidentally remove files. The only way to get them back is to edit admin/includes/configure.php and put the local path in $Document_Root (in my case I had to add /catalog on the end of it.) This will show the correct files in the pulldown menu and allow you to store the files once again - however I found, that this breaks other things in admin such as the path to images etc. Setting the path back to $Document_Root returns Admin back to normal but File Access doesn't function properly. Mind you this is with the original setting of $file_dir = array(); $dir = dir(DIR_FS_ADMIN); and not the change I suggested before. :( I'll keep working on it.
  24. :blush: Ok, fix one problem encounter another. I'm concerned about the change because there files that are in /catalog appearing in the pulldown menu. There must be problem in admin_files.php or another file to do with the Contribution (or a conflict or Contribs).
×
×
  • Create New...