strictlypc Posted June 20, 2004 Share Posted June 20, 2004 Hi Cathy, Thanks for your reply. Yes, I have added that code to account_history_info.php. But it still would not display the quantity, product name, and price. Please help, StrictlyPC Quote Link to comment Share on other sites More sharing options...
strictlypc Posted June 20, 2004 Share Posted June 20, 2004 Sorry for the bump, Cathy, I was wondering if you can email me a copy of your account_history_info.php and your classes\order.php file? My email address is: dbphung@yahoo.com. I want to do a diff so that I can see what is wrong. Thanks in advance, StrictlyPC Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 20, 2004 Share Posted June 20, 2004 David: The files are on the way to your email. I'm trying to think what else could be wrong. I just installed on another store that I created for someone and it works fine. :blink: So baffling! Cathy Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 21, 2004 Share Posted June 21, 2004 One more TYPO correction needs to be done that I found today while installing. Under catalog/includes/modules/returns_track.php <td class="main" colspan="2"><b>Retruns status</small></b></td> should be Returns status Quote Link to comment Share on other sites More sharing options...
strictlypc Posted June 21, 2004 Share Posted June 21, 2004 Thanks Cathy for your files. I just compared them with mine and they are similar. I don't know why the quantity, product name, and price is not showing up. Anyone have any clues? Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 21, 2004 Share Posted June 21, 2004 :huh: Well, all I can say is to double check that you uploaded each NEW file and added in any additionals from existing files. Like I stated, I just installed it again from scratch on another site, step by step, with no errors. Another question: did you manually key in the SQL statement or used the Browse feature and upload directly? I'm not sure if the returns_products_data might have anything to do with it. It has products_id in the statement. Just another thought maybe. Quote Link to comment Share on other sites More sharing options...
crash3903 Posted June 22, 2004 Share Posted June 22, 2004 Guys A small problem here I have searched the forums but no good I get this error when trying to view an order in admin? 1146 - Table 'db89517659.TABLE_RETURNS' doesn't exist Is the table returns missing - if so does someone have the sql file that has it incuded pls thanks mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
crash3903 Posted June 23, 2004 Share Posted June 23, 2004 any ideas pls mark Quote Regards Mark A Reynolds Link to comment Share on other sites More sharing options...
only2empires Posted June 23, 2004 Share Posted June 23, 2004 (edited) Is this error after you installed the RMA Returns contribution? Looks like you missed a step somewhere if you did. The RMA Return contribution includes a file that needs to be uploaded to your database. Make sure that is uploaded. Edited June 23, 2004 by only2empires Quote Link to comment Share on other sites More sharing options...
doing Posted June 24, 2004 Share Posted June 24, 2004 Hi After working out most of the problems with this contribution (this is what I thought :( ) I am getting two errors in the Admin Area stating : 1) returns_reasons.php : Fatal error: Call to undefined function: tep_get_return_reason_name() ... I found another posting within this thread quoting the same problem. Is there any solution to this ? The function itself is present in the functions directory - in : admin/includes/functions/refund_functions.php 2) refund_methods.php Fatal error: Call to undefined function: tep_get_refund_method_name() ... Looks like the same error as above - calling a different function which is also present - in : admin/includes/functions/refund_functions.php Any hint on these errors would make my day ;-) Sebastian P.S. Sorry for my english ... I'm from 'old europe' (Germany) :D Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 24, 2004 Share Posted June 24, 2004 If you are trying to change or add any return reasons, return refund methods or the like, you cannot do this from the Admin area. You have to go through your database and manually change or add them from there. There is a code that is incorrect somewhere, and since I didn't create the contribution and not a php expert by far, I have no clue where to fix this. Until an expert looks the codes over, this is the way it will have to be done. HTH Quote Link to comment Share on other sites More sharing options...
doing Posted June 24, 2004 Share Posted June 24, 2004 Hi Cathy, thank you for your reply. Since I like contributions which work the way they are supposed to work (I tried the 'workaround' on this problem by editing the DB tables by hand and of course it works) I gave it another try and here is the sollution: The file refund_functions.php seems to be a 'relict' of the old MS1 logic. Since all functions for MS2 are collected in the file general.php within the admin/includes/functions directory just go and copy the php code lines from refund_functions.php into general.php (at the very bottom - just before the ending ?>) and there you are. No more errors and no more editing the DB tables by hand. I reorganized the whole RMA System for my needs (methods, reasons) using the admin area and there was no Fatal Error left. Everything works out fine now :D Enjoy it ! Sebastian P.S. No, I am not going to call myself an 'expert' ... :rolleyes: Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 25, 2004 Share Posted June 25, 2004 (edited) just go and copy the php code lines from refund_functions.php into general.php (at the very bottom - just before the ending ?>) and there you are Cool! But.....exactly which codes starting where and ending where? If I get it to work on mine, I'll update the contribution again. Thanks! Edited June 25, 2004 by only2empires Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 25, 2004 Share Posted June 25, 2004 (edited) Ok...after some very serious thinking on this, I found this reply that I must have missed along the way ( sorry Sam!): Someone said earlier in this post that they are having problems inserting new refund methods and reasons. This is because in the contribution there are two lines (that i could find) that use the old tep_array_merge function. This was droped in 2.2 and is now just array_merge So, I went in and took out the tep and by george! It worked! I did this in all 3 files. admin/refund_methods.php admin/returns_reasons.php admin/returns_status.php Find this simular code within all 3 near the top, the bold is the error, delete out the tep_: $insert_sql_data = array('refund_method_id' => $refund_method_id, 'language_id' => $language_id); $sql_data_array = tep_array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_REFUND_METHOD, $sql_data_array); } elseif ($HTTP_GET_VARS['action'] == 'save') { tep_db_perform(TABLE_REFUND_METHOD, $sql_data_array, 'update', "refund_method_id = '" . tep_db_input($refund_method_id) . "' and language_id = '" . $language_id . "'"); } } I'll update the contribution once more for new comers. :D Edited June 25, 2004 by only2empires Quote Link to comment Share on other sites More sharing options...
strictlypc Posted June 25, 2004 Share Posted June 25, 2004 Hi Cathy, just wanted to let you know that I still cannot get this thing to work. I have tried installing it 3 times, and all 3 times, the quantity, product description and price would not show up. However, in reviewing the files, I have found a bug: In Catalog\return_product.php (Line 215) BAD CODE: tep_redirect(tep_href_link(FILEANME_DEFAULT)); GOOD CODE: tep_redirect(tep_href_link(FILENAME_DEFAULT)); If you look closely, the word FILENAME is spelled incorrectly. Hope this helps for you guys and hopefully I can get this module to work for me. Thanks, StrictlyPC Quote Link to comment Share on other sites More sharing options...
doing Posted June 25, 2004 Share Posted June 25, 2004 Hi again, here is the code (from the file admin/includes/functions/refund_functions.php) which you should copy to admin/includes/functions/general.php to make this contribution work in therms of using returns_reasons.php and refund_methods.php through die Admin Area with osCom 2.2 MS2: //RMA System function tep_get_return_reason() { global $languages_id; $orders_status_array = array(); $orders_status_query = tep_db_query("select return_reason_id, return_reason_name from " . TABLE_RETURN_REASONS . " where language_id = '" . $languages_id . "' order by return_reason_id"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_status_array[] = array('id' => $orders_status['return_reason_id'], 'text' => $orders_status['return_reason_name'] ); } return $orders_status_array; } function tep_get_return_reason_name($return_reason_id, $language_id = '') { global $languages_id; if ($return_reason_id < 1) return TEXT_DEFAULT; if (!is_numeric($language_id)) $language_id = $languages_id; $status_query = tep_db_query("select return_reason_name from " . TABLE_RETURN_REASONS . " where return_reason_id = '" . $return_reason_id . "' and language_id = '" . $language_id . "'"); $status = tep_db_fetch_array($status_query); return $status['return_reason_name']; } function tep_calculate_deduct($price, $tax) { global $currencies; return (($price / 100) * $tax); } function tep_get_returns_status() { global $languages_id; $orders_status_array = array(); $orders_status_query = tep_db_query("select returns_status_id, returns_status_name from " . TABLE_RETURNS_STATUS . " where language_id = '" . $languages_id . "' order by returns_status_id"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_status_array[] = array('id' => $orders_status['returns_status_id'], 'text' => $orders_status['returns_status_name'] ); } return $orders_status_array; } function tep_get_returns_status_name($returns_status_id, $language_id = '') { global $languages_id; if ($returns_status_id < 1) return TEXT_DEFAULT; if (!is_numeric($language_id)) $language_id = $languages_id; $status_query = tep_db_query("select returns_status_name from " . TABLE_RETURNS_STATUS . " where returns_status_id = '" . $returns_status_id . "' and language_id = '" . $language_id . "'"); $status = tep_db_fetch_array($status_query); return $status['returns_status_name']; } function tep_get_refund_method() { global $languages_id; $orders_status_array = array(); $orders_status_query = tep_db_query("select refund_method_id, refund_method_name from " . TABLE_REFUND_METHOD . " where language_id = '" . $languages_id . "' order by refund_method_id"); while ($orders_status = tep_db_fetch_array($orders_status_query)) { $orders_status_array[] = array('id' => $orders_status['refund_method_id'], 'text' => $orders_status['refund_method_name'] ); } return $orders_status_array; } function tep_get_refund_method_name($refund_method_id, $language_id = '') { global $languages_id; if ($refund_method_id < 1) return TEXT_DEFAULT; if (!is_numeric($language_id)) $language_id = $languages_id; $status_query = tep_db_query("select refund_method_name from " . TABLE_REFUND_METHOD . " where refund_method_id = '" . $refund_method_id . "' and language_id = '" . $language_id . "'"); $status = tep_db_fetch_array($status_query); return $status['refund_method_name']; } function tep_remove_return($order_id, $restock = false) { if ($restock == 'on') { $order_query = tep_db_query("select products_id, products_quantity from " . TABLE_RETURNS_PRODUCTS_DATA . " where returns_id = '" . tep_db_input($order_id) . "'"); while ($order = tep_db_fetch_array($order_query)) { tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = products_quantity + " . $order['products_quantity'] . " where products_id = '" . $order['pr?????e???A??oducts_id'] . "'"); tep_db_query("update " . TABLE_PRODUCTS . " set products_status = 1 where products_quantity > 0 and products_id = '" . $order['products_id'] . "'"); } } tep_db_query("delete from " . TABLE_RETURNS . " where returns_id = '" . tep_db_input($order_id) . "'"); tep_db_query("delete from " . TABLE_RETURNS_PRODUCTS_DATA . " where returns_id = '" . tep_db_input($order_id) . "'"); tep_db_query("delete from " . TABLE_RETURN_PAYMENTS . " where returns_id = '" . tep_db_input($order_id) . "'"); } Just copy it to the very bottom of general.php - right before the ending ?> And here is my version of the file catalog/returns_track.php which is working fine - without bringing you back to the login.php when tracking a existing RMA Nr. PLEASE NOTE: This is NOT the complete code for retuns_track.php. It is the part of the code in between the <!-- body --> .... <!-- body EOF --> tags which is rewritten. AND: I added osC's countinue button to make to file 'skin' look like the rest of the catalog files ;-) <!-- body_text //--> <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_image(DIR_WS_IMAGES . 'table_background_reviews_new.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($HTTP_GET_VARS['action'] == 'returns_show') { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php include(DIR_WS_MODULES . 'returns_track.php'); ?> </table></td> </tr> <?php } else { ?> <tr> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="5" class="infoBox"> <form name="track" method="post" action=" <?php echo tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show', 'SSL'); ?>"> <?php if (isset($error)=='yes') { ?> <tr> <td colspan="3" class="main"><div align="justify"><?php echo TEXT_TRACK_DETAILS_1; ?></div></td> <tr> <tr> <td colspan="3" class="main" width="100%"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php } ?> <tr> <td colspan="3" class="main" align="center"><?php echo TEXT_TRACK_DETAILS_2; ?></td></tr> <tr> <td width="100%" colspan="3" class="main"> </td> </tr> <tr> <td width="50%" height="30" align="right" class="main"><?php echo TEXT_YOUR_RMA_NUMBER; ?> </td> <td width="50%" height="30" align="left" class="main" colspan="2"><font color="CC0000"><input type="text" name="rma" value="" size="20"></font></td> </tr> <tr> <td width="100%" colspan="3" class="main"> </td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="100%" colspan="3" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'SSL'); ?></td> </tr> </table></td> </tr> </form> </table></td> </tr> <? } ?> <!-- body_text_eof //--> It WILL bring you back to the login.php IF you are trying to track some not existing RMA Nr. (like 123456). On my point of view this is correct. Sebastian Quote Link to comment Share on other sites More sharing options...
doing Posted June 25, 2004 Share Posted June 25, 2004 (edited) Here is one more tiny little BUG fix : If you want to set the Default RMA Status on admin/returns_status.php you might notice that this is NOT possible due to another misspelling within the code. Open up returns_status.php and search for DEFAULT_RETURNS_STATUS_ID The correct DB table field in Table 'configuration' controlling this default value is called DEFAULT_RETURN_STATUS_ID with NO 'S' at 'RETURNS'. After removing a couple of 'S' within this file you are there. Now you can set the default value in the admin area using returns_status.php :) Sebastian P.S. Cathy - if you are going to update this contribution again - please wait a while ... there is ONE bug left (dealing with closing a RMA). I am working on this ... all the rest of this contribution iss OK - so we are at about 99% of having a version working with osC 2.2 MS2 Edited June 25, 2004 by doing Quote Link to comment Share on other sites More sharing options...
doing Posted June 25, 2004 Share Posted June 25, 2004 And one more :rolleyes: If you are about to complete a RMA (finish it) you might have noticed, that finishing is not working the way it should ... :angry: Here's the fix for that item: 1.) Open up catalog/admin/returns.php 2.) Search for if ($HTTP_POST_VARS['complete'] == 'on') { $notify_comments = ''; tep_db_query("UPDATE " . TABLE_RETURNS . " set returns_date_finished = '1' where returns_id = '" . $oID . "'"); $order_update = true; $return_complete = true; at line 150 in the original file Change this to the following code if ($HTTP_POST_VARS['complete'] == 'on') { $notify_comments = ''; tep_db_query("UPDATE " . TABLE_RETURNS . " set returns_date_finished = now(), date_finished = now() where returns_id = '" . $oID . "'"); $order_update = true; $return_complete = true; } these lines will store the actual DateTime in the DB - you simply CAN'T write a '1' in a DateTime field ! 3.) Search for if ($return_complete['returns_date_finished'] == '1') { within the same file (returns.php) - at line 266 Change this to the following code if ($return_complete['returns_date_finished'] != '0000-00-00 00:00:00') { You are there ! NOW you will see a different listing for closed (finished) RMA's instead of open RMA's. The purpose is : You may edit OPEN RMA's - but once the RMA is finished (DateTime Stamp) you should NOT be able to edit it any more. If you could do so it might confuse your customers. Sebastian P.S. Still counterchecking this contribution for more errors ... Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 26, 2004 Share Posted June 26, 2004 OOOPS! Already updated it! But I can do it again. What I will do is start implementing your fixes on my site first, to make sure it goes smoothly, then put all the changes into the RMA files. Let me know when you are done and I will then upload the newest version shortly after that. Thanks! Quote Link to comment Share on other sites More sharing options...
doing Posted June 26, 2004 Share Posted June 26, 2004 I am currently working on the GV coupon (TABLE gv_tracking within the RMA package). The rest of the contribution is fine to me - no more problems with osC 2.2 MS2 ... but I would like to get feedback if my fixes are OK to your system. I would love to post my files, but they are heavily modified with my own admin layout and additional codes (contributions) - so there is nearly no use for the files to anyone using a different installation. I'll post any news dealing with the GVC part of the RMA package ... got corrent db table entries for gv_tracking but I am working on the gv system integration. Sebastian Quote Link to comment Share on other sites More sharing options...
zaps Posted June 27, 2004 Share Posted June 27, 2004 I have installed the RMA Returns System 2.2d. http://www.oscommerce.com/community/contributions,1136 But I don't understand how it works. I can only see the RMA tracking link for the customer. How does a customer request for an RMA No.? How do we receive it ? Any help will be greatly appreciated. P S :- I think every contribution should have some instructions on how to use it. Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 27, 2004 Share Posted June 27, 2004 Zap: Good thinking...I will try to do that when I update it again. Sent you a reply in the PM. I'm going in now to change what doing has stated to make sure its operational on my end. Will keep you posted! Quote Link to comment Share on other sites More sharing options...
mijman2 Posted June 28, 2004 Share Posted June 28, 2004 I too am confused on how to use this... When I am in admin, I have no idea what i am supposed to do... I click on the return request and there are no fields for me to edit... how do you use this? Quote Link to comment Share on other sites More sharing options...
only2empires Posted June 28, 2004 Share Posted June 28, 2004 This will add text to the box when a customer clicks on Track A Return (after logged in that is) instead of just showing the box and the button: Approximately around line 130: Find: <td colspan=3 class=main><? echo TEXT_TRACK_DETAILS_2; ?></td> and replace with: <td colspan=3 class=main><center>If you have previously requested an RMA Number from us,<br>enter the number received in the box to review the status of your return.<br><br><? echo TEXT_TRACK_DETAILS_2; ?></td> Change the text to what you want it to read. Will also add this to the contribution on update. Thanks Steve for the suggestion! Quote Link to comment Share on other sites More sharing options...
mijman2 Posted June 28, 2004 Share Posted June 28, 2004 I cant wait for this to become a final release. I once again installed and unistalled this contribute. When it becomes totally completed, I will give it another try! Keep up the good work! I still couldnt figure out what you were supposed to do with the RMA, Is there supposed to be editable fields in RMA for admin? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.