Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hade

Members
  • Content count

    99
  • Joined

  • Last visited

About Hade

  • Birthday 09/18/1983

Profile Information

  1. Hade

    RMA Returns help!

    someone here must have RMA returns installed!!!
  2. I'm having trouble installing RMA returns 2.6 In particular, the edit to account_history_info.php. (I also have an attibutes contrib installed) If anyone can share the contents of their file, I'd be very grateful. Or at least the area of the file with the merged code. The instructions are as follows: Find this text: <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { Further below is another line (if you haven't customised your install!, otherwise, the first if statement, then the else!)... Note also, that appears more then once in the file: if (sizeof($order->info['tax_groups']) > 1) { Replace the text, looking for the corresponding } to the above statement, insert the following, comparing the text below with any other customisations. This is the tricky bit, look carefully at the changes, you'll be able to match the echos somewhere in the file. // Begin RMA Returns if ($order->products[$i]['return'] == '1') { $rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'"); $rma_query = tep_db_fetch_array($rma_query_one); $rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'"); $rma_result = tep_db_fetch_array($rma_number_query); $return_link = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a></u></b>'; } else { $return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>'; } // Don't show Return link if order is still pending or processing // You can change this or comment it out as best fits your store configuration // My first contribution to anything open source, a bug fix to a long running RMA system. These were the changes I had to make to get it to work with a 2.2MS2 install. if (($orders_status == '1') OR ($orders_status == '2') ) { $return_link = ''; } echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo $return_link; // JLM: End RMA Returns echo '</td>' . "\n"; The relevant area in my file is: <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo '</td>' . "\n"; if (sizeof($order->info['tax_groups']) > 1) { echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n"; } echo ' <td class="main" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" . ' </tr>' . "\n"; } ?>
  3. I had the same problem. It seems that the problem happens for me as I don't use manufacturers. My manufacturers table is blank. IF this is the case with you, find the following line in admin/stats_products.php $products_query_raw = "select p.products_id, p.products_model, p.products_date_added, ps.products_trans_20, ps.products_trans_60, ps.products_sales_60, ps.products_trans_120, ps.products_sales_365, m.manufacturers_name as suppliername, p.products_model, pd.products_name, p.products_quantity, p.products_price, l.name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_YEARLY_SALES . " ps, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and p.products_id = pd.products_id and ps.products_id = p.products_id and l.languages_id = pd.language_id group by p.products_id order by $db_orderby $sorted"; And replace with: $products_query_raw = "select p.products_id, p.products_model, p.products_date_added, ps.products_trans_20, ps.products_trans_60, ps.products_sales_60, ps.products_trans_120, ps.products_sales_365, p.products_model, pd.products_name, p.products_quantity, p.products_price, l.name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_YEARLY_SALES . " ps, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and ps.products_id = p.products_id and l.languages_id = pd.language_id and p.products_id = ps.products_id group by p.products_id order by $db_orderby $sorted"; Delete this row: <td class="main"><?php if (!isset($orderby) or ($orderby == "manu" and $sorted == "ASC")) $to_sort = "DESC"; else $to_sort = "ASC"; echo '<a href="' . tep_href_link('stats_products.php', 'orderby=manu&sorted='. $to_sort) . '" class="main"><b>' . 'Manufacture' . '</b></a>'; ?></td> Delete this row: <td class="list" valign="top"><?php echo substr($products['suppliername'], 0, 20); ?></td> Replace this: <td colspan="12"><?php echo tep_draw_separator(); ?></td> With this: <td colspan="11"><?php echo tep_draw_separator(); ?></td> That sorted it for me! I added some row striping to pretty the page up and it's looking good.
  4. Hade

    Official PayPal IPN Support Thread

    Hi, I have a problem, I imagine it's quite simple to fix. When I receive a pending Paypal eCheck payment, the status is set to 'Downloads Now Available', as if they are a completed payment. When the eCheck clears, again the status is set to 'Downloads Now Available'. I need eCheck payments to set the status to 'Preparing [PayPal IPN]' or 'Pending' Everything else works 100% properly. Thanks for any help!!!
  5. Hade

    PHPList integration to OsCommerce

    When users check/uncheck the subscribe option in account_newsletters.php I'd like it to insert/delete from the phplist database. How can I achieve this? At the moment, subscribing/unsubscribing on that page doesn't effect the phplist user table.
  6. I've got a fix. I've inserted code which hides the payment selection table if the box is checked, unhiding it when you uncheck. It does this dynamically, only when there's enough points to pay for the whole order and I'm very proud of it! If anyone wants info on this let me know. Although I won't have chance to do anything until tuesday.
  7. If the customer checks the box to use points to cover their total amount, and they accidentally select a payment method, perhaps Paypal for instance, then they get sent to Paypal, which won't allow a payment of £0.00. So is there any way of getting OSC to ignore the selected payment method if points are used to cover the total cost? Thanks
  8. If the customer checks the box to use points to cover their total amount, and they accidentally select a payment method, perhaps Paypal for instance, then they get sent to Paypal, which won't allow a payment of £0.00. So is there any way of getting OSC to ignore the selected payment method if points are used to cover the total cost? Thanks
  9. I've narrowed it down. checkout_confirmation.php has the following code: if (isset($HTTP_POST_VARS['customer_referred']) && tep_not_null($HTTP_POST_VARS['customer_referred'])) { $valid_referral_query = tep_db_query("SELECT customers_id FROM " . TABLE_CUSTOMERS . " WHERE customers_email_address = '" . $HTTP_POST_VARS['customer_referred'] . "'"); $valid_referral = tep_db_fetch_array($valid_referral_query); if (!tep_db_num_rows($valid_referral_query)) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REFERRAL_ERROR_NOT_FOUND), 'SSL')); } if ($HTTP_POST_VARS['customer_referred'] == $order->customer['email_address']) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(REFERRAL_ERROR_SELF), 'SSL')); } else { $customer_referral = $valid_referral['customers_id']; if (!tep_session_is_registered('customer_referral')) tep_session_register('customer_referral'); } So I'm thinking there is a problem with the redirect. Does anyone know what this problem could be? is there an issue with PHP5? Windows?
  10. Hi, This problem only occurs on my XP testing server with Apache 2.0.59 & PHP 5. It does not occur on my live linux server, which I think is PHP4 When the customer enters an incorrect coupon code or referral email (points & rewards contrib) they are asked to login, even though they are already logged in. So the problem seems to be that when order total modules should be stopping the checkout process and asking to re-enter the values, the user is just getting logged out. Thanks for any help.
  11. I've found that in my_points.php, the script checks to find the status of the order for which points were gained, here: $orders_status_query = tep_db_query("SELECT o.orders_id, o.orders_status, s.orders_status_name FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_STATUS . " s WHERE o.customers_id = '" . (int)$customer_id . "' AND o.orders_id = '" . $pending_points['orders_id'] . "' AND o.orders_status = s.orders_status_id AND s.language_id = '" . (int)$languages_id . "'"); $orders_status = tep_db_fetch_array($orders_status_query); But with product reviews, the product ID is stored in the orders_id field of the customers_points_pending table. So the o.orders_id = '" . $pending_points['orders_id'] bit of the code above incorrectly checks a product ID agains order IDs. Am I correct? is this a bug? Also, my reviews are adding 125 points to the users account instead of the 25 I've set it to. Anyone know why?
  12. Hade

    Auto Login BUG

    Right I need to get this sorted. I'm still getting redirected to logoff.php when I revisit my site. Also, when returning to the site root, I'm faced with the 'please log in' message. I think catalog/includes/modules/autologon.php is to blame. The end of the file is as follows: } else { if($autologon_executed != 'true'){ $autologon_page = '<html><head><meta http-equiv="Refresh" content="0;URL=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '"></head><body></body></html>'; $autologon_link = ((getenv('HTTPS') == 'on') ? 'https://' : 'http://') . $SERVER_NAME . $REQUEST_URI . (strpos($REQUEST_URI, "?") ? '&' : '?') . SID; $autologon_executed = 'true'; if(!tep_session_is_registered('autologon_link')) tep_session_register('autologon_link'); if(!tep_session_is_registered('autologon_executed')) tep_session_register('autologon_executed'); tep_session_close(); exit($autologon_page); } } if (tep_session_is_registered('autologon_link')) { $x = $autologon_link; tep_session_unregister('autologon_link'); tep_redirect($x); } ?> Should the else condition be fired when returning to the site? The if condition is this: if (($email_address != "") && ($password != "")) { Should that be returning false? Any help greatly appreciated.
  13. Hade

    Auto Login BUG

    Same here. When I check the autologin box and leave the site and come back, it goes straight to the log off page (logoff.php) It's exactly the same for firefox and IE. Any ideas anyone?
  14. Hade

    PHPList integration to OsCommerce

    I found that within the customer list, the "Subscribed" fields on each row were not based on checks performed within the PHPlist database, but rather the Customers table of the OSC database. Specifically, the table's 'Newsletter' field. It seems this bit was not updated (which is the bit I added)
  15. Hade

    PHPList integration to OsCommerce

    I've spotted an error. In admin/customers.php the newsletter field still reads from the old database. Add this line below Below: while ($customers = tep_db_fetch_array($customers_query)) { Add: // PHPlist PHPlist Newsletter add-on require(DIR_WS_INCLUDES . '/phplist_define.php'); //get the phplist specifics $existing_email_query = tep_db_query("select id, email, foreignkey from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where email = '" . $customers['customers_email_address'] . "'"); //check for existing by email address $existing_user_query = tep_db_query("select id, foreignkey, email from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where foreignkey = " . $customers['customers_id'] . ""); //check for existing by phplist userid in case they subscribed using another method. $existing_email = tep_db_fetch_array($existing_email_query); $existing_user = tep_db_fetch_array($existing_user_query); if (tep_db_num_rows($existing_user_query) > 0) //check for user subscription $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser where listid = " . PHPLIST_LISTNO . " and userid = " . $existing_user['id'] . ""); else $newsletter_query = tep_db_query("select userid from " . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "listuser," . PHPLIST_DB . "" . PHPLIST_TABLE_PREFIX . "user_user where listid = " . PHPLIST_LISTNO . " and userid = id and email = '" . $customers['customers_email_address'] . "'"); $customers['customers_newsletter'] = ((tep_db_num_rows($newsletter_query) < 1) ? '0' : '1'); // End PHPlist Newsletter add-on
×