Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jfkafka

Pioneers
  • Posts

    161
  • Joined

  • Last visited

Everything posted by jfkafka

  1. Hi Jim, When you say "it works" do you mean that, given the $module['id'] array is empty, the code is still able to go into the If Statement in vendor_shipping.php: if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { I suspect that because the $module['id'] array is empty, the if statement is failing and going to the else portion, in other words not reassigning the $include_modules[] I came to this conclusion by adding an echo statement inside the if statement in vendor_shipping.php on the webhost which is running <php5.3 and doesn't generate warnings like the localhost, the result was the order confirmation page came up with no warnings and no echo statement or exit so either the code is bypassing the top portion of the If Statement and going to the else or echo statements are being ignored but the if statement is resolving to true and entering the top portion (not going to the else) in short, I'm wondering if the $module['id'] array needs to be assigned values in order to go into: if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { echo 'in vendor_shipping.php inside if'; exit; $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1))); ------------------------------- 1. Is it necessary for that portion to execute? (Maybe I'm just presuming it needs to) 2. If your code is going into the portion above, what would a printout of includes_modules[] look like (with multiple vendors) Thanks once more. I hope all this testing I'm doing does not include your patience. John
  2. Hi Jim, Howbout this: could you post the results of what the correct printout of print 'shipping: <pre>'; print_r ($shipping); print '</pre>'; should look like- (it would help to know exactly what results are being sought) specifically in classes/checkout shipping php approx line 140 AFTER $shipping = array('id' => $shipping, 'title' => $shipping_title, 'cost' => $total_shipping_cost, 'shipping_tax_total' => $total_ship_tax, 'vendor' => $output ); print ' in classes/checkout shipping php line 146 ' . "<br />\n"; print 'shipping: <pre>'; print_r ($shipping); print '</pre>'; ---------------------------------------- I think with that info I should be able to find some way to make id happen! Thanks a lot for all your input, John
  3. just did another test of shipping data --------CODE----------------------------------- $shipping_data = $_POST['shipping_' . $vendor_id]; print ' in classes/checkout shipping php line 96 ' . "<br />\n"; print 'shipping data: <pre>'; print_r ($shipping_data); print '</pre>'; --------END CODE------------------- ----------ECHO PRINTOUT------------------- in classes/checkout shipping php line 96 shipping data: freeamount_freeamount_0 in classes/checkout shipping php line 96 shipping data: usps_PARCEL_0 ---------END ECHO PRINTOUT------------------ that looks correct, I'm gonna run a few more tests
  4. scratch #3. it looks like $vendor_id should be a number hmmm... (3. would using the vendor array to retrieve the info be a viable solution since it contains the two pieces of the shipping string ($_POST['shipping_' . $vendor_id])
  5. Hi Jim, Thanks for your patience. -----------SNIPPET FROM CHECKOUT_SHIPPING.PHP------------------- // 2-19-10 original used below as potential fix $shipping = array('id' => $shipping, $shipping = array('id' => $SESSION['shipping'], 'title' => $shipping_title, 'cost' => $total_shipping_cost, 'shipping_tax_total' => $total_ship_tax, 'vendor' => $output ); print ' in classes/checkout shipping php line 146 ' . "<br />\n"; print 'module[id]: <pre>'; print_r ($module['id']); print 'vendor[id]: <pre>'; print_r ($output[$vendor_id]); print 'shipping: <pre>'; print_r ($shipping); print '</pre>'; ------------END OF SNIPPET------------------------------- ------------ECHO PRINTOUT------------------------------ in classes/checkout shipping php line 146 module[id]: uvendor[id]: Array ( [id] => usps_PARCEL [title] => Parcel Post (3 Days) [ship_tax] => 0 [products] => Array ( [0] => 1{4}3{3}6 ) [cost] => 12.18 ) shipping: Array ( [id] => [title] => Combined Shipping [cost] => 12.1801 [shipping_tax_total] => 0 [vendor] => Array ( [1] => Array ( [id] => freeamount_freeamount [title] => Economy (9 - 14 Days) [ship_tax] => 0 [products] => Array ( [0] => 20 [1] => 8 [2] => 11 [3] => 7 ) [cost] => 0.0001 ) [3] => Array ( [id] => usps_PARCEL [title] => Parcel Post (3 Days) [ship_tax] => 0 [products] => Array ( [0] => 1{4}3{3}6 ) [cost] => 12.18 ) ) ) -----------END OF ECHO PRINTOUT---------------------- Additional info yes, register globals is off 1. Also did a printout of: $shipping_data = $_POST['shipping_' . $vendor_id]; print ' $shipping_data: <pre>'; print_r ($shipping_data); -----------ECHO PRINTOUT---------------------- u $shipping_data: usps_PARCEL_0vendor[id]: -----------END OF ECHO PRINTOUT---------------------- 1. not sure where the u comes from in the above printout unless because it's not an array 2. would renaming shipping to something else be a solution 3. would using the vendor array to retrieve the info be a viable solution since it contains the two pieces of the shipping string ($_POST['shipping_' . $vendor_id];) Really appreciate your time and expertise, John
  6. Here is the status report, Captain. Based on your advice to "You'll need to look through the code to find where that is happening. Insert that block of code anywhere you suspect something might be changing the value." I started at what appears to be the beginning - checkout_shipping.php, where I found no occurrences of $module['id'], nor in checkout_confirmation.php. Next, I traced the sequence in checkout_shipping looking for what might be calling function shipping($module = '') (in vendor_shipping.php) since that is where the module['id'] is referenced. Boing back to checkout_+shipping.php, I plugged that printout code at the end of the section: if (SELECT_VENDOR_SHIPPING == 'true') { $total_shipping_cost = 0; $shipping_title = MULTIPLE_SHIP_METHODS_TITLE; $vendor_shipping = $cart->vendor_shipping; $shipping = array(); foreach ($vendor_shipping as $vendor_id => $vendor_data) { $products_shipped = $_POST['products_' . $vendor_id]; $products_array = explode ("_", $products_shipped); $shipping_data = $_POST['shipping_' . $vendor_id]; $shipping_array = explode ("_", $shipping_data); $module = $shipping_array[0]; $method = $shipping_array[1]; $ship_tax = $shipping_array[2]; print ' in classes/checkout shipping php line 97 ' . "<br />\n"; print 'shipping: <pre>'; print_r ($shipping); print '</pre>'; ------------------------- ECHO RESULT: in classes/checkout shipping php line 97 shipping: Array ( ) ---------------------------- The point is maybe the $module['id'] value, rather than overwritten is not ever being written and because prior to php5.3 Warnings were not being given to indicate this. what makes troubleshooting this so tricky is identifying how/where the $module['id'] array is being populated and with what values. 1. What elements should be shown when the array is printed? Array ( [id] => Array ( ) --------------- 2. in checkout_shipping.php, is this where the above array is populated? $shipping = array('id' => $shipping, 'title' => $shipping_title, 'cost' => $total_shipping_cost, 'shipping_tax_total' => $total_ship_tax, 'vendor' => $output ); ---------------------------- this particular line: $shipping = array('id' => $shipping, the second $shipping (=> $shipping )doesn't show any values using the printout code (modified) inserted at this point in checkout_shipping.php: if (SELECT_VENDOR_SHIPPING == 'true') { $total_shipping_cost = 0; $shipping_title = MULTIPLE_SHIP_METHODS_TITLE; $vendor_shipping = $cart->vendor_shipping; $shipping = array(); foreach ($vendor_shipping as $vendor_id => $vendor_data) { $products_shipped = $_POST['products_' . $vendor_id]; $products_array = explode ("_", $products_shipped); $shipping_data = $_POST['shipping_' . $vendor_id]; $shipping_array = explode ("_", $shipping_data); $module = $shipping_array[0]; $method = $shipping_array[1]; $ship_tax = $shipping_array[2]; print ' in classes/checkout shipping php line 97 ' . "<br />\n"; print 'shipping: <pre>'; print_r ($shipping); print '</pre>'; -------------ECHO RESULTS:-------------- in classes/checkout shipping php line 97 shipping: Array ( ) ---------END ECHO RESULTS:-------------- this is the only place $shipping is mentioned prior to: $shipping = array('id' => $shipping, so how is: $shipping = array('id' => $shipping, supposed to work (when $shipping is empty? 2.It seems to be a javascript radiobutton technique, true? Could that be the source of the malfunction? Sorry for being so long winded but I wanted to provide as much feedback and give you a sense of how I'm attempting to solve this. Hope it is coherent. John
  7. Thanks for isolating the snafu. I've been so busy adding code that I haven't had time to figure out what it means! I'll get back with the results. John
  8. Hi Jim, Thanks for the swift response. Ok, the results of adding the print code (before the: if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { $module[id]: Array ( ) =============================== also did another printout in case it might help... This is going from checkout payment to checkout confirmation using: print ' in classes/vendor shipping php line 81 ' . "<br />\n"; // print 'Array Vendor Shipping: <pre>'; print_r ($module); print_r ($module['id']); print_r ($modules_array); print_r ($include_modules); print '</pre>' . "<br />\n"; print 'class = ' . $class . "<br />\n"; print 'file = ' . $value . "<br />\n"; ECHO RESULTS: in classes/vendor shipping php line 81 Array Vendor Shipping: Array ( [id] => Array ( ) [title] => Combined Shipping [cost] => 3.0002 [shipping_tax_total] => 0 [vendor] => Array ( [1] => Array ( [id] => freeamount_freeamount [title] => Economy (9 - 14 Days) [ship_tax] => 0 [products] => Array ( [0] => 8 [1] => 11 ) [cost] => 0.0001 ) [3] => Array ( [id] => freeamount_freeamount [title] => Economy (9 - 14 Days) [ship_tax] => 0 [products] => Array ( [0] => 1{4}3{3}6 [1] => 22{5}10 [2] => 22{5}13 ) [cost] => 3.0001 ) ) ) Array ( ) Array ( [0] => freeamount.php [1] => usps.php ) Array ( ) class = file = Warning: strpos() expects parameter 1 to be string, array given in C:\server\xampp\htdocs\public_html\includes\classes\vendor_shipping.php on line 95 Warning: substr() expects parameter 1 to be string, array given in C:\server\xampp\htdocs\public_html\includes\classes\vendor_shipping.php on line 95 Warning: strpos() expects parameter 1 to be string, array given in C:\server\xampp\htdocs\public_html\includes\modules\order_total\ot_shipping.php on line 57 Warning: substr() expects parameter 1 to be string, array given in C:\server\xampp\htdocs\public_html\includes\modules\order_total\ot_shipping.php on line 57 End echo ============================================ Thanks again for your patience and wisdom, John p.s. I mentioned PHP5.3 because the code works fine on the webhost using <5.3
  9. perhaps this is a php 5.3 "issue" (subtitled "how to lose your hair in 5 easy handfuls") when checking out Warning: substr() expects parameter 1 to be string, array given in C:\server\xampp\htdocs\public_html\includes\classes\vendor_shipping.php on line 64 line 64 is: if ( (tep_not_null($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $modules_array)) ) { some troubleshooting info: echo ' in classes/vendors_shipping php line 63 ' . '<br />' . ' and module = ' . $module (PRODUCES - module = Array) . '<br />' . ' and modules_id = ' . $module['id'] (PRODUCES - modules_id = Array) . '<br />' . ' and PHP_SELF = ' . $PHP_SELF; (PRODUCES - PHP_SELF = checkout_confirmation.php) then it reproduces eerily similar warnings in ot_shipping.php (or is that errorly) anyway, from my extensively limited grasp of php, it seems that shipping array needs to be extracted somehow to retrieve the id - am I getting warm? Thanks for any guidance, John
  10. You're right, it is - function confirmation() - to be specific. global $shipping; - now added and sailing full steam ahead! eg. saving to TABLE_ORDERS_SHIPPING Thank you, it's a huge relief to move forward. Gratefully, John
  11. still pressing on, having a bit of trouble incorporating this part into paypal.ipn: ============================================= if (SELECT_VENDOR_SHIPPING == 'true') { // Insert data into new orders_shipping table $shipping_array = $shipping['vendor']; foreach ($shipping_array as $vendors_id => $shipping_data) { =============================================== this generates Warning: Invalid argument supplied for foreach() in /public_html/includes/modules/payment/paypal_ipn.php on line 347 wondering if there is a conflict with $shipping in paypal.ipn? (I am able to successfully print out using the code snippet "print 'Array Vendor Shipping: <pre>'; ..." in checkout_confirmation.php but receive no values for "print_r ($shipping);" when trying the same code snippet in paypal.ipn) does anyone have any suggestions on how to access the $shipping array values in paypal.ipn? thanks for your insight jk
  12. here tis... the best thing to do is use something like winmerge to compare these files to yours and bear in mind that i don't claim to be the brightest bulb on the shelf so take the usual precaution of making a backup copy (i rename the old files with a date at the end, for example prods_by_vendor21510.php so it shows when the file was changed) ============================================================================== <?php /* $ID: prods_by_vendor.php (for use with MVS) by Craig Garrison Sr, BluCollar Sales $Loc: /catalog/admin/ $ $Mod: MVS V1.2 2009/02/28 JCK/CWG $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2006 osCommerce Released under the GNU General Public License */ require_once ('includes/application_top.php'); require_once (DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); // Test changes 01-19-2008 $line_filter = ''; if (isset ($_GET['line']) && $_GET['line'] != '') { $line_filter = $_GET['line']; $line_filter = preg_replace("(\r\n|\n|\r)", '', $line_filter); // Remove CR &/ LF $line_filter = preg_replace("/[^a-z]/i", '', $line_filter); // strip anything we don't want } // echo 'in admin/prodss by vendor php line 27 and post vendors id = ' . $_POST['vendors_id']; // echo 'in admin/prodss by vendor php line 28 and get vendors id = ' . $_GET['vendors_id']; // echo 'in admin/prodss by vendor php line 28 and var vendors id = ' . $vendors_id; // if (isset ($_GET['vendors_id']) && $_GET['vendors_id'] != '') { if (isset ($vendors_id)) { // $vendors_id = (int) $_GET['vendors_id']; // $vendors_id = $_POST['vendors_id']; } else { $vendors_id = 1; } $show_order = ''; if (isset ($_GET['show_order']) && $_GET['show_order'] != '') { $show_order = $_GET['show_order']; $show_order = preg_replace("(\r\n|\n|\r)", '', $show_order); // Remove CR &/ LF $show_order = preg_replace("/[^a-z]/i", '', $show_order); // strip anything we don't want } switch ($line_filter) { case 'prod' : $sort_by_filter = 'pd.products_name'; break; case 'vpid' : $sort_by_filter = 'p.vendors_prod_id'; break; case 'pid' : $sort_by_filter = 'p.products_id'; break; case 'qty' : $sort_by_filter = 'p.products_quantity'; break; case 'vprice' : $sort_by_filter = 'p.vendors_product_price'; break; case 'price' : case '' : default : $sort_by_filter = 'p.products_price'; break; } ?> <!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> </head> <body bgcolor="#FFFFFF"> <!-- header //--> <?php require_once(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_once(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; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php $vendors_query = tep_db_query ("select vendors_id, vendors_name from " . TABLE_VENDORS . " order by vendors_id "); while ($vendors = tep_db_fetch_array ($vendors_query) ) { $vendors_array[] = array ( 'id' => $vendors['vendors_id'], 'text' => $vendors['vendors_name'] ); } ?> <td class="main" align="left"><?php echo TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_form ('vendors_report', FILENAME_PRODS_VENDORS) . tep_draw_pull_down_menu ('vendors_id', $vendors_array,'','onChange="this.form.submit()";');?></form></td> <td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS) . '"><b>Go To Vendors List</a>';?><td> </tr> <tr> <td class="main" align="left"> <?php // $vendors_id = $_POST['vendors_id']; if ($show_order == 'desc') { // Test code -- 3 lines echo 'Click for <a href="' . tep_href_link (FILENAME_PRODS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&show_order=asc') . '"><b>ascending order</b></a>'; } else { echo 'Click for <a href="' . tep_href_link (FILENAME_PRODS_VENDORS, '&vendors_id=' . $vendors_id . '&line=' . $line_filter . '&show_order=desc') . '"><b>descending order</b></a>'; } ?> </td> </tr> </table></td> </tr> <?php if (isset ($vendors_id)) { // $vendors_id = $_POST['vendors_id']; $vend_query_raw = "select vendors_name as name from " . TABLE_VENDORS . " where vendors_id = '" . $vendors_id . "'"; $vend_query = tep_db_query ($vend_query_raw); $vendors = tep_db_fetch_array ($vend_query); ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_VENDOR; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=prod') . '">' . TABLE_HEADING_PRODUCTS_NAME . '</a>'; ?> </td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=vpid') . '">' . TABLE_HEADING_VENDORS_PRODUCT_ID . '</a>'; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=pid') . '">' . TABLE_HEADING_PRODUCTS_ID . '</a>'; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=qty') . '">' . TABLE_HEADING_QUANTITY . '</a>'; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=vprice') . '">' . TABLE_HEADING_VENDOR_PRICE . '</a>'; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_PRODS_VENDORS, 'vendors_id=' . $vendors_id . '&line=price') . '">' . TABLE_HEADING_PRICE . '</a>'; ?></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS, '&vendors_id=' . $vendors_id . '&action=edit') . '" TARGET="_blank"><b>' . $vendors['name'] . '</a></b>'; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <?php // if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS; $rows = 0; if ($show_order == 'desc') { $products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . " desc"; } elseif ($show_order == 'asc') { $products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . " asc"; } else { $products_query_raw = "select p.products_id, p.vendors_id, pd.products_name, p.products_quantity , p.products_price, p.vendors_product_price, p.vendors_prod_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.vendors_id = " . $vendors_id . " and pd.language_id = " . $languages_id . " order by " . $sort_by_filter . ""; } /* $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_query_raw, $products_query_numrows); Decide not to use SPLIT pages for the $vendors_id variable not being maintained. */ $products_query = tep_db_query ($products_query_raw); while ($products = tep_db_fetch_array ($products_query)) { $rows++; if (strlen ($rows) < 2) { $rows = '0' . $rows; } ?> <tr class="dataTableRow"> <?php if ($products['vendors_prod_id'] == '') { $products['vendors_prod_id'] = 'None Specified'; } ?> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product&pID=' . $products['products_id']) . '" TARGET="_blank"><b>' . $products['products_name'] . '</a></b>'; ?></td> <td class="dataTableContent"><?php echo $products['vendors_prod_id']; ?></td> <td class="dataTableContent"><?php echo $products['products_id']; ?></td> <td class="dataTableContent" align="left"><?php echo $products['products_quantity']; ?> </td> <td class="dataTableContent"><?php echo $products['vendors_product_price']; ?></td> <td class="dataTableContent"><?php echo $products['products_price']; ?></td> </tr> <?php } } ?> </table></td> </tr> <tr> <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"> <?php // echo $products_split->display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> </td> <td class="smallText" align="right"> <?php // echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'].$vendors_id); ?> </td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require_once(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require_once(DIR_WS_INCLUDES . 'application_bottom.php'); ?> =================================================================== <?php /* $Id: $orders_by_vendor.php V1.0 2006/03/25 by Craig Garrison Sr www.blucollarsales.com $Loc: /catalog/admin/ $ $Mod: MVS V1.2 2009/02/28 JCK/CWG $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2006 osCommerce Released under the GNU General Public License */ require_once ('includes/application_top.php'); require_once (DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); /* 2-15-10 commented out used below " jk fix" $vendors_id = 0; if (isset ($_GET['vendors_id'])) { $vendors_id = (int) $_GET['vendors_id']; } X 2-15-10 commented out used below "jk fix" */ // echo 'in admin/prodss by vendor php line 27 and post vendors id = ' . $_POST['vendors_id']; // echo 'in admin/prodss by vendor php line 28 and get vendors id = ' . $_GET['vendors_id']; // echo 'in admin/prodss by vendor php line 28 and var vendors id = ' . $vendors_id; // if (isset ($_GET['vendors_id']) && $_GET['vendors_id'] != '') { // 2-15-10 "jk fix" if (isset ($vendors_id)) { // $vendors_id = (int) $_GET['vendors_id']; // $vendors_id = $_POST['vendors_id']; } else { $vendors_id = 1; } // X 2-15-10 "jk fix" // $line_filter = 'desc'; // if (isset ($_GET['line_filter']) && $_GET['line_filter'] == 'asc') { if (isset ($_GET['line_filter'])) { $line_filter == $_GET['line_filter']; } else { $line_filter = 'desc'; } // echo 'in admin/orders by vendor php line 35 and line = ' . $_GET['line_filter']; $sort_by_filter = 'orders_id'; if (isset ($_GET['by']) && $_GET['by'] != '') { switch ($_GET['by']) { case 'date': $sort_by_filter = 'date_purchased'; break; case 'customer': $sort_by_filter = 'customers_id'; break; case 'status': $sort_by_filter = 'status'; break; case 'sent': $sort_by_filter == 'sent'; break; default: $sort_by_filter = 'orders_id'; break; } } // 2-15-10 commented out because was resetting status to nothing - $status = ''; if (isset ($_POST['status']) && $_POST['status'] != '') { // echo 'in admin/orders by vendor php line 79 and status = ' . $status; $status = preg_replace("(\r\n|\n|\r)", '', $status); // Remove CR &/ LF $status = preg_replace("/[^A-Za-z0-9]/i", '', $status); // strip everthing except alphanumerics // echo 'in admin/orders by vendor php line 83 and status = ' . $status; } $sent = ''; if (isset ($_GET['sent']) && ($_GET['sent'] == 'yes' || $_GET['sent'] == 'no') ) { $sent == $_GET['sent']; } ?> <!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> </head> <body bgcolor="#FFFFFF"> <!-- header //--> <?php require_once(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_once(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; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <?php // $vendors_array = array (array ('id' => '1', // 'text' => 'NONE' // ) // ); $vendors_array = array(); $vendors_query = tep_db_query ("select vendors_id, vendors_name from " . TABLE_VENDORS . " order by vendors_id "); while ($vendors = tep_db_fetch_array ($vendors_query) ) { $vendors_array[] = array ('id' => $vendors['vendors_id'], 'text' => $vendors['vendors_name'] ); // correct echo 'in orders by vendor php line 115 id = ' . $vendors['vendors_id'] . 'and name = '. $vendors['vendors_name']; } ?> <td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id) . '"><b>Click to reset form</a></b>';?></td> <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS) . '"><b>Go To Vendors List</a>';?><td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif','1','5'); ?></td> <tr> <td colspan="3"><?php echo tep_black_line(); ?></td> </tr> <tr> <td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif','1','5'); ?></td> </tr> <tr> <td class="main" align="left"><?php echo tep_draw_form('vendors_report', FILENAME_ORDERS_VENDORS) . TABLE_HEADING_VENDOR_CHOOSE . ' '; ?><?php echo tep_draw_pull_down_menu('vendors_id', $vendors_array,'','onChange="this.form.submit()";');?></form></td> <td class="main" align="left"><?php echo 'Filter by email sent: <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line_filter=' . $line_filter . '&sent=yes') . '"><b>YES</a></b> <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line_filter=' . $line_filter . '&sent=no') . '"><b>NO</a></b>'; ?></td> <?php // echo 'in admin/orders by vendor php line 140 vendors id = ' . $vendors_id . ' and line filter = ' . $line_filter . ' and status = ' . $status; if ($line_filter == 'asc') { if (isset ($status) ) { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link (FILENAME_ORDERS_VENDORS, 'vendors_id=' . $vendors_id . '&line_filter=desc' . '&sent=' . $sent . '&status=' . $status) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } else { ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link (FILENAME_ORDERS_VENDORS, 'vendors_id=' . $vendors_id . '&line_filter=desc' . '&sent=' . $sent) . '"><b>DESCENDING</a></b> order'; ?></td> <?php } } else { if (isset ($status) ) { // echo 'in admin/orders by vendor php line 157 vendors id = ' . $vendors_id . ' and line filter = ' . $line_filter . ' and status = ' . $status; ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line_filter=asc' . '&sent=' . $sent . '&status=' . $status) . '"><b>ASCENDING</a></b> order'; ?></td> <?php } else { // echo 'in admin/orders by vendor php line 164 vendors id = ' . $vendors_id . ' and line filter = ' . $line_filter . ' and status = ' . $status; ?> <td class="main" align="right"><?php echo 'Change to <a href="' . tep_href_link(FILENAME_ORDERS_VENDORS, '&vendors_id=' . $vendors_id . '&line_filter=asc' . '&sent=' . $sent) . '"><b>ASCENDING</a></b> order'; ?></td> <?php } } $orders_statuses = array (); $orders_status_array = array (); $orders_status_query = tep_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . (int) $languages_id . "'"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_statuses[] = array ('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name'] ); $orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name']; } ?> <td class="main" align="right"><?php echo tep_draw_form('status_report', FILENAME_ORDERS_VENDORS . '?&vendors_id=' . $vendors_id) . HEADING_TITLE_STATUS . ' '; echo tep_draw_pull_down_menu('status', $orders_statuses, '','onChange="this.form.submit()";');?></form></td> </tr> </table> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_VENDOR; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_ID; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_CUSTOMERS; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_ORDER_TOTAL; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_DATE_PURCHASED; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_SENT; ?> </td> </tr> <?php $vend_query_raw = "select vendors_name as name from " . TABLE_VENDORS . " where vendors_id = '" . $vendors_id . "'"; $vend_query = tep_db_query($vend_query_raw); $vendors = tep_db_fetch_array($vend_query); ?> <tr class="dataTableRow"> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS, '&vendors_id=' . $vendors_id . '&action=edit') . '" TARGET="_blank"><b>' . $vendors['name'] . '</a></b>'; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent"><?php echo ''; ?></td> <td class="dataTableContent" align="right">Click To<br />Send Email</td> </tr> <?php // $index1 = 0; if ($sent == 'yes') { $vendors_orders_data_query = tep_db_query ("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='yes' group by orders_id " . $line_filter . ""); } elseif ($sent == 'no') { $vendors_orders_data_query = tep_db_query ("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' and vendor_order_sent='no' group by orders_id " . $line_filter . ""); } else { $vendors_orders_data_query = tep_db_query ("select distinct orders_id, vendor_order_sent from " . TABLE_ORDERS_SHIPPING . " where vendors_id='" . $vendors_id . "' group by orders_id " . $line_filter . ""); // echo 'in admin/orders by vendor php line 224 line filter = ' . $line_filter . ' and orders id = ' . $vendors_orders_data['orders_id']; } while ($vendors_orders_data = tep_db_fetch_array ($vendors_orders_data_query)) { if (isset ($status)) { // $status = '1'; $orders_query = tep_db_query ("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from (" . TABLE_ORDERS . " o) left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = '" . $status . "' and o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $sort_by_filter . " ASC"); // comes here but status is blank echo 'in admin/orders by vendor php line 219 vendors id = ' . $vendors_id . ' and orders id = ' . $vendors_orders_data['orders_id']. ' and status = ' . $status; } else { $orders_query = tep_db_query ("select distinct o.customers_id, o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from (" . TABLE_ORDERS . " o) left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' and o.orders_id = '" . $vendors_orders_data['orders_id'] . "' order by o." . $sort_by_filter . " ASC"); // echo 'in admin/orders by vendor php line 223 vendors id = ' . $vendors_id . ' and orders id = ' . $vendors_orders_data['orders_id']; } while ($vendors_orders = tep_db_fetch_array ($orders_query) ) { // echo 'in admin/orders by vendor php line 227 vendors id = ' . $vendors_id . ' and orders id = ' . $vendors_orders_data['orders_id']; $date_purchased = $vendors_orders['date_purchased']; ?> <tr class="dataTableRow"> <td class="dataTableContent" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $vendors_orders_data['orders_id'] . '&action=edit') . '" TARGET="_blank"><b>View this order</b></a>'; ?></td> <td class="dataTableContent" align="left"><?php echo $vendors_orders['orders_id']; ?></td> <!-- <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'action=new_product&pID=' . $vendors_orders_data['v_products_id']) . '" TARGET="_blank"><b>' . $vendors_products_data['products_name'] . '</a>'; ?></td> --> <td class="dataTableContent"><?php echo ' from <a href="' . tep_href_link(FILENAME_CUSTOMERS, tep_get_all_get_params(array('cID', 'action')) . 'cID=' . $vendors_orders['customers_id'] . '&action=edit') . '" TARGET="_blank"><b>' . $vendors_orders['customers_name'] . '</b></a>'; ?></td> <td class="dataTableContent" align="left"><?php echo strip_tags($vendors_orders['order_total']); ?></td> <td class="dataTableContent" align="left"><?php echo tep_date_short ($date_purchased); ?></td> <td class="dataTableContent" align="left"><?php echo $vendors_orders['orders_status_name']; ?></td> <td class="dataTableContent" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_VENDORS_EMAIL_SEND, '&vID=' . $vendors_id . '&oID=' . $vendors_orders_data['orders_id'] . '&vOS=' . $vendors_orders_data['vendor_order_sent']) . '"><b>' . $vendors_orders_data['vendor_order_sent'] . '</a></b>'; ?></td> </tr> <?php } } ?> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require_once (DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require_once (DIR_WS_INCLUDES . 'application_bottom.php'); ?> ======================================================================== good luck, jk
  13. Hi Jim, Hope all is excellent with you, thanks for this awesome achievement (to all involved), yeah, now i'm about to pester you for some clues in regards to integrating MVS with paypal ipn, i searched the thread before resorting to the dreaded 'asking for directions', but couldn't seem to locate any definitive set of details, only vague references that they were compatible, thanks again for both the contribution and ongoing support... jk ps - also had a problem similar to the above post (Products Reports and Vendors Orders List) made some changes to admin/prods_by_vendors.php and admin/orders_by_vendors.php that managed to get them to work - could post those 2 files if it might help...
  14. it's in the mindsparx admin/template/whicheveroneyou'reusing folder you knucklehead
  15. Hi Jane and company, Thanks for sharing this contrib, really enhances the admin! one slight puzzlement... I noticed the background, as well as, all the buttons, for instance: 10 best viewed products Viewed are black and cannot manage to figure out where this is set. Thanks for any help shedding some light on this dark mystery jk
  16. I'm thoroughly impressed with and appreciative of your knowledgeable, quick feedback. That aforementioned query is remarkably elusive (for moi) (sure would be expedient if those sql errors identified their location, where's the suggestion box?) anyway adding (int) to those 2 instances in catalog/shopping_cart.php does manage to be an interim remedy to wit, it does bring up the product info page just as items without attributes albeit with the default options, which might be standard operating procedure in short, the code now gets to the right place, due primarily to your pinpointing the need for (int), thanks for your beacon of brlliance, Robert jk
  17. Bingo! (tentatively) What I found was in shopping_cart.php, there were 2 instances of $products[$i]['id'] without (int) once (int) was inserted in front of both, the URL changed from: http://www.localdev.com/public_html/product_info.php?products_id=22{5}10 to: http://www.localdev.com/public_html/unreal-tournament-p-22.html here is the modified code block from catalog/shopping_cart.php: $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], CART_IMAGE_WIDTH, CART_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; I realize this may not be germane to this forum but wanted to follow-up in case this info may be beneficial to anyone (if this solution is somehow unwittingly futzed, please feel free to call me a knucklehead) jk
  18. Hi Robert, When adding an item with attributes to the cart, then going to cart contents and clicking on it, this is the resulting url: http://www.localdev.com/public_html/product_info.php?products_id=1{4}1{3}5 which produces this error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{4}1{3}5' at line 1 select * from products as p, products_description as pd where p.products_id = pd.products_id and pd.products_id = 1{4}1{3}5 [TEP STOP] I did manage to find a "solution" from a google search but this was for SEO Urls 5 Pro for osCommerce (beta?) involving: Step 1: add a new true/false to the USU-init file... @define('SEO_URLS_CART_RETURN', 'true'); // true or false (and an additional change in shopping cart.php) it didn't seem to work after implementing the code changes, resetting the cache in admin/seo urls 5, and really crossing my fingers same url and sql error only posting because the above "solution" suggested a possible connection thanks for any guidance jk
  19. WATSON: Good heavens, Holmes, you never cease to amaze me! That was it... phpinfo arg_separator.input & & arg_separator.output & & 1. changed arg_separator.output = "&" (in C:\server\xampp\php\php.ini) 2. changed code back to original in catalog/includes/modules/product_listing.php: (from code taken shopping cart) $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; 3. restarted apache 4. querystring no longer has the amp; and WORKS CORRECTLY (adds products to cart) Thank you for your steadfast resolve in working this out jk
  20. okay, here are the two versions I have: ORIGINAL tep_get_all_get_params //// // Return all HTTP GET variables, except those passed as a parameter function tep_get_all_get_params($exclude_array = '') { global $HTTP_GET_VARS; if (!is_array($exclude_array)) $exclude_array = array(); $get_url = ''; if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) { reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) { $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&'; } } } return $get_url; } X ORIGINAL tep_get_all_get_params =================================== CURRENT tep_get_all_get_params //// // Return all HTTP GET variables, except those passed as a parameter function tep_get_all_get_params($exclude_array = '') { global $_GET; if (!is_array($exclude_array)) $exclude_array = array(); $get_url = ''; if (is_array($_GET) && (sizeof($_GET) > 0)) { reset($_GET); while (list($key, $value) = each($_GET)) { if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) { $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&'; } } } // testing echo ' in ' . $PHP_SELF . ' line 183 get_url = ' . $get_url; // my test echo to keep track of where it emanates from $get_url = str_replace('&', '&', $get_url); (I added this is a futile attempt to remove the amp;) return $get_url; } X CURRENT tep_get_all_get_params =================================== alas, no hardcoded amp; in: $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&'; jk
  21. Well, I may have stumbled onto an ersatz solution for the amp; cramp, all I did was replace the code in product_listing with code from shopping_cart.php which had a buy now button that worked and products are now added to the cart (except products that have attributes) Here is what the code change looks like: in catalog/includes/modules/product_listing.php (the second instance of: case 'PRODUCT_LIST_BUY_NOW':) //1-5-10 original this code adds amp; to querystring $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; // modified code from shopping cart $lc_text = '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; as you can see, I simply replaced tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) . 'action=buy_now&products_id=' . with tep_href_link(FILENAME_SHOPPING_CART, 'action=buy_now&products_id=' . (by the way, this only occurs on localhost using xampp, php5.3 and usu5 r141, on the hosted site, there are no amp; occurrences in the querystring- using php<5.3 and usu5 r84) hopefully this sheds some light on the pesky amp; situation incidently regarding the other problem with: Warning: Usu_Articles Incorrect tPath presented: in C:\server\xampp\htdocs\public_html\includes\modules\ultimate_seo_urls5\modules\Usu_Articles.php on line 126 I replaced the entire folder- ultimate_seo_urls5 with the one in ULTIMATE_Seo_Urls_5_r141_stable\uploads\catalog\includes\modules and renamed the hyphenated articles-topics.php to articles_topics.php and the problem has resolved itself, doubtless I messed up when upgrading from r84 to each newer version preceding r141 jk
  22. Yes, happy to... which ones? Just a wild guess, should there be something in htaccess to remove amp; for manufacturers page? Also noticed a problem with hyphenated names (eg all-products.php) I changed the name to all_products_seo.php and it works. Also getting an error for articles box Warning: Usu_Articles Incorrect tPath presented: in C:\server\xampp\htdocs\public_html\includes\modules\ultimate_seo_urls5\modules\Usu_Articles.php on line 126 (this is the code block in Usu_Articles.php that includes line 126) // Sanity check - if the $base_path is not numeric then we dump it if ( false === is_numeric( $base_path ) ) { (line 126) trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING ); return false; } I suspect it may be due to another hyphenated name: articles-topics.php and rather than changing that name, thought there might be a more all-encompassing solution to accommodate hyphenated names. If there are any specific tests, please let me know, meanwhile I'll continue to look for a remedy on my end and in case of a miracle will post tout suite also can r84 be updated to r141 without, as the hitchhikers guide puts it, "all the tedious mucking about in hyperspace" ? jk
  23. Hi Robert, Thanks for your invaluable contributions and concise instructions. The unexpected tidbit on adding www.localdev.com to host was very astute and makes me ironically grateful for the snafu that led me here, which is, when testing locally, (using rc2a and SEO 5 r141) on the manufacturers page, the buy now button generates this querystring: http://www.localdev.com/public_html/microsoft-m-2.html?products_id=26&action=buy_now&sort=2a. This fails to add the product to the cart. When the amp; is removed from the string (both), it does work. When SEO 5 is disabled, the querystring does not have the amp; occurences. Is this because xampp uses php 5.3 or did I goof up somewhere? (I've made a career of doing that!) Also in regards to updating from r84, is it necessary to do it incrementally r84 to r89 to r96 to r119 to r141 or can it be done in one fell swoop, r84 to r141? Having taken the scenic route for the localhost site, I'm wondering if I could have taken the Express. Thanks for your insight. jk
  24. Hi Sam, Thanks for your swift reply. Just to recap: 1. Use ftp to delete auto db backups. affirmative 2. It says in instructions! little fuzzy on this... Here are the last two instructions (5 + 6) on my copy of (Auto Backup Install V2.8) 5. In /admin/includes/languages/english.php before the last ?> add: define('ERROR_BACKUP_DIRECTORY_DOES_NOT_EXIST','Error, Backup Directory Does Not Exist, please create it or run "auto_backup_setup.php"'); 6. ensure you have already logged into your site, then goto the setup page by pasting into the url something like www.mysite.com/catalog/admin/auto_backup_setup.php it will add the settings to the database & create the backup directory if needed. its normally at catalog/admin/backups. The defined variable in auto_backup_db.php are standard, so nothing further needed. - end of instructions I mention this in case my copy of the instructions is somehow different and missing the part about deleting auto_backup_setup.php after executing the sql insert- I had theorized that maybe it was needed in the course of doing the periodic automatic backups- glad to have clarified that it should be deleted once configured. 3. "sorry wrong number" that only leaves the last bit regarding a code update and if I did somehow not get the complete instructions on deleting the auto_backup_setup.php maybe other parts are missing as well like the segment below $messageStack->add('', 'none'); $messageStack->add('Deleted expired backup from ' . $filename, 'warning'); replace with: if ($cron) { echo 'Deleted expired backup from ' . $filename . " \n\n"; } else {$messageStack->add('', 'none'); $messageStack->add('Deleted expired backup from ' . $filename, 'warning'); } (I looked in includes/auto_backup_db.php but the closest I could find was: $messageStack->add_session('', 'none'); $messageStack->add_session('Deleted expired backup from ' . $filename, 'warning'); NOTE: $messageStack->add_session (NOT $messageStack->add like your code) In which file is: $messageStack->add('', 'none'); $messageStack->add('Deleted expired backup from ' . $filename, 'warning'); located? Or should the code be modified replacing the instances of $messageStack->add with $messageStack->add_session? Thanks for your understanding and assistance, jk
  25. Hi Sam, (I consolidated three areas of confusion so as to expedite any solutions- hope you don't mind this shopping list) Firstly, Thanks very much for the auto db backup contribution- it works flawlessly and provides welcome peace of mind- the only snafu is that the old backups are accumulating and I haven't managed to pinpoint where I messed up- 1. Does anything suggest itself as to how to remedy accumulating db backups? 2. Should auto_backup_setup.php be deleted after running it (some contributions mention removing similar types of sql install files and I've learned not to assume too often) Question regarding Database_backup_manager, is the screen supposed to go blank after making a backup? specifically after hitting the backup button in Database Backup Manager and waiting a few seconds the url adds NOW to the end of the querystring; https://mysite.com/admin folder/backup.php?action=backupfilesnow and the screen goes blank, in the bottom left corner is the word: Done 3. Should there be something displayed in the blank area? (I just hit the back button to return to the Database Backup Manager) Before asking that question I tried your link from the install text of Database_backup_manager_v1.4 but it appears to be a DEAD LINK? "At the moment (June 2008) there appears to be a problem in certain situations where the list of checkboxes with all the tables you want to backup is not completely transfered by the post protocol (see Sam/spooks post: http://www.oscommerce.com/forums/index.php?s=&showtopic=293949&view=findpost&p=1256514 ). I haven't been able to replicate that error on my computer so don't know if it is an issue with either the PHP version, server, or browser." - from Database_backup_manager_v1.4 INSTALL TEXT Lastly regarding the code update quoted at the top of the post: find: $messageStack->add('', 'none'); $messageStack->add('Deleted expired backup from ' . $filename, 'warning'); replace with: if ($cron) { echo 'Deleted expired backup from ' . $filename . " \n\n"; } else {$messageStack->add('', 'none'); $messageStack->add('Deleted expired backup from ' . $filename, 'warning'); } 3. Where is this code located? (I looked in includes/auto_backup_db.php but the closest I could find was: $messageStack->add_session('', 'none'); $messageStack->add_session('Deleted expired backup from ' . $filename, 'warning'); ($messageStack->add_session NOT $messageStack->add) Thanks for your patience and expertise regarding any of the above, jk
×
×
  • Create New...