mcmannehan Posted August 28, 2017 Share Posted August 28, 2017 (edited) Admin click configuration -> RMA Returns Change Use the RMA returns system? to true, than i think you will know what i mean. Your value in the database table is 1. After you change this the value is 'true', than the link in the admin "customer returns" show start all the links after the install are gone. I am working on it to fix this, but until now did not find the code for that. Also i did find a lot table colspan issues. I will fix it too. If i finish i will send u a complett new add-on also with German languages, because your add-on is very good to use for revocation in the EU/DE. Edited August 28, 2017 by mcmannehan Quote The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
LeeFoster Posted August 28, 2017 Share Posted August 28, 2017 1 hour ago, frankl said: @LeeFoster Hi Lee, can you try uploading this file to your admin directory and seeing if it works. return_create.php Nope still not working. Also @mcmannehan is right, under admin/configuration/RMA Returns the first option 'use the rma system' is set to 1 but if you change it then it switches to true and false. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted August 28, 2017 Share Posted August 28, 2017 (edited) @mcmannehan In admin/returns_configuration.php change $rma_value_query = tep_db_query("select * from configuration where configuration_key = 'RMA_RETURN_SYSTEM'"); if (!tep_db_num_rows($rma_value_query)) { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Use the RMA returns system?', 'RMA_RETURN_SYSTEM', '1', 'Turn the RMA System on or off', '" . $insert_id . "', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } to $rma_value_query = tep_db_query("select * from configuration where configuration_key = 'RMA_RETURN_SYSTEM'"); if (!tep_db_num_rows($rma_value_query)) { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Use the RMA returns system?', 'RMA_RETURN_SYSTEM', 'On', 'Turn the RMA System on or off', '" . $insert_id . "', '1','tep_cfg_select_option(array(\'On\', \'Off\'), ', now())"); } Then in admin/includes/boxes/returns.php change if (RMA_RETURN_SYSTEM == '1') { $cl_box_groups[] = array( 'heading' => BOX_RETURNS_HEADING, to if (RMA_RETURN_SYSTEM == 'On') { $cl_box_groups[] = array( 'heading' => BOX_RETURNS_HEADING, Edited August 28, 2017 by LeeFoster kgtee 1 Quote Link to comment Share on other sites More sharing options...
mcmannehan Posted August 28, 2017 Share Posted August 28, 2017 @LeeFoster you are faster ;-) !!! but i did change like that in admin/includes/boxes/returns.php change if (RMA_RETURN_SYSTEM == '1') { $cl_box_groups[] = array( 'heading' => BOX_RETURNS_HEADING, to if (RMA_RETURN_SYSTEM == 'true') { $cl_box_groups[] = array( 'heading' => BOX_RETURNS_HEADING, In admin/returns_configuration.php change $rma_value_query = tep_db_query("select * from configuration where configuration_key = 'RMA_RETURN_SYSTEM'"); if (!tep_db_num_rows($rma_value_query)) { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Use the RMA returns system?', 'RMA_RETURN_SYSTEM', '1', 'Turn the RMA System on or off', '" . $insert_id . "', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } to if (!tep_db_num_rows($rma_value_query)) { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ( 'Use the RMA returns system?', 'RMA_RETURN_SYSTEM', 'true', 'Turn the RMA System on or off', '" . $insert_id . "', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); } kgtee 1 Quote The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥frankl Posted August 28, 2017 Author Share Posted August 28, 2017 Thank you chaps. @mcmannehan are you having the same problems as @LeeFoster with return_create.php in admin? Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
mcmannehan Posted August 29, 2017 Share Posted August 29, 2017 (edited) @frankl at this moment i can't say that, because i still check the admin area and change the function tep_image_button, to the tep_draw_button function in some files. And clear the mess with the table colspan. Also there are some problems with different languages. If i am finish with all fixes and with the translation for German languages, i will give you Information. But need a litte bit time. BTW i did hidden from the admin the "Configuration -> RMA Returns". I think it's not nessecary to configure that, your returns_configuration.php do all the stuff. Edited August 29, 2017 by mcmannehan Quote The clever one learn from everything and from everybody The normal one learn from his experience The silly one knows everything better [socrates, 412 before Christ] Computers help us with the problems we wouldn't have without them! 99.9% of the bugs sit in front of the computer! My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0 if(isset($this) || !isset($this)){ // that's the question... Link to comment Share on other sites More sharing options...
♥frankl Posted August 29, 2017 Author Share Posted August 29, 2017 @mcmannehan Cheers, let me know. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
joe122joe Posted August 31, 2017 Share Posted August 31, 2017 @frankl thank your for this addon. Will this addon work with QTPRO bs? Joe Quote Link to comment Share on other sites More sharing options...
♥frankl Posted August 31, 2017 Author Share Posted August 31, 2017 @joe122joe Hi Joe. I don't know anything about QTPRO. What is it? Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
joe122joe Posted September 1, 2017 Share Posted September 1, 2017 @frankl Quantity Tracking Professional Module QTpro BS Quote Link to comment Share on other sites More sharing options...
♥frankl Posted September 1, 2017 Author Share Posted September 1, 2017 @joe122joe I'm not familiar with how that addon works but you would only need to make some modifications for when products are returned to stock (or just return items to stock manually) by the looks of it. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
LeeFoster Posted September 7, 2017 Share Posted September 7, 2017 @frankl did the issue with returns in the admin section get fixed? Quote Link to comment Share on other sites More sharing options...
♥frankl Posted September 8, 2017 Author Share Posted September 8, 2017 @LeeFoster I was waiting for @mcmannehan to get back to me but he must be busy. I'll send you a PM. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
CGhoST Posted September 9, 2017 Share Posted September 9, 2017 In /admin/returns.php Find: <td><? echo tep_draw_input_field('refund_reference', $return->info['payment_reference']); ?></td> Replace With: <td><?php echo tep_draw_input_field('refund_reference', $return->info['payment_reference']); ?></td> Quote Link to comment Share on other sites More sharing options...
Quark Posted September 22, 2017 Share Posted September 22, 2017 While deleting reasons from returns_reasons.php I get the following error: Quote 1054 - Unknown column 'returns_reason' in 'where clause' select count(*) as count from returned_products where returns_reason = '5' I can, however, create new reason entries wich get correctly listed afterwards. Default 4 reasons (Faulty, Damaged, Incorrect Item and Warranty) are NOT being listed either, although contained in the return_reasons table after setup. Quote Link to comment Share on other sites More sharing options...
♥frankl Posted September 22, 2017 Author Share Posted September 22, 2017 Thanks for the bug report @Quark. In admin/returns_reasons.php change case 'delete': $oID = tep_db_prepare_input($_GET['oID']); $status_query = tep_db_query("select count(*) as count from returned_products where returns_reason = '" . tep_db_input($oID) . "'"); $status = tep_db_fetch_array($status_query); $remove_status = true; if ($oID == DEFAULT_RETURN_REASON) { $remove_status = false; $messageStack->add(ERROR_REMOVE_DEFAULT_RETURN_REASON, 'error'); } elseif ($status['count'] > 0) { $remove_status = false; $messageStack->add(ERROR_REASON_USED_IN_RETURNS, 'error'); } else { $history_query = tep_db_query("select count(*) as count from returns_status_history where '" . tep_db_input($oID) . "' in (new_value, old_value)"); $history = tep_db_fetch_array($history_query); if ($history['count'] > 0) { $remove_status = false; $messageStack->add(ERROR_REASON_USED_IN_HISTORY, 'error'); } } break; to case 'delete': $oID = tep_db_prepare_input($_GET['oID']); $status_query = tep_db_query("select count(*) as count from returned_products where return_reason_id = '" . tep_db_input($oID) . "'"); $status = tep_db_fetch_array($status_query); $remove_status = true; if ($oID == DEFAULT_RETURN_REASON) { $remove_status = false; $messageStack->add(ERROR_REMOVE_DEFAULT_RETURN_REASON, 'error'); } elseif ($status['count'] > 0) { $remove_status = false; $messageStack->add(ERROR_REASON_USED_IN_RETURNS, 'error'); } break; 13 hours ago, Quark said: Default 4 reasons (Faulty, Damaged, Incorrect Item and Warranty) are NOT being listed either, although contained in the return_reasons table after setup. I don't understand this, could you elaborate. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
Quark Posted September 25, 2017 Share Posted September 25, 2017 Hi @frankl. Thanks for your prompt response. Patch is working fine for me, and deleting reasons issue has been fixed. Regarding the 4 default reasons (Faulty, Damaged, Incorrect Item and Warranty) not being listed, I have found entries in DB are being setup for language_id = 1 only. As my store uses other default language_id value I was unable to get them listed. While not a bug itself, a suggestion here would be to setup default reasons DB entries for every language_id in the system or listing entries for all languages in the system, showing blanks for those not defined. for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { // juicy code here... } frankl 1 Quote Link to comment Share on other sites More sharing options...
reflex-ocasion Posted November 4, 2017 Share Posted November 4, 2017 Sorry for my bad English. I changed the buttons tep_image_button by tep_draw_button in admin/returns_reasons.php and admin/refund_methods.php In admin/returns_reasons.php you can not delete a reason, it gives an error and I have solved it in another way. I was looking for an erroneous table in the database. On line 68: $status_query = tep_db_query("select count(*) as count from returned_products where returns_status = '" . tep_db_input($oID) . "'"); Line 79 and successive still continues and is corrected as well: $history_query = tep_db_query("select count(*) as count from returns_status_history where returns_status_id = '" . (int)$oID . "'"); I include the modified files for verification. I have also translated it into the Spanish language, in case someone is interested. They are not included here. returns_reasons.php refund_methods.php Quote Link to comment Share on other sites More sharing options...
reflex-ocasion Posted November 4, 2017 Share Posted November 4, 2017 I am sorry for my bad english. I have corrected another error in the admin/returns.php file. When you have more than one return and you edit the first one, there is no problem. The problem occurs when you have to select another return from the list and click on the edit button. Log in by repeating over and over again the store header below the tabs. To solve search (line 809) $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('returns.php', tep_get_all_get_params(array('rID', 'action')) . 'rID=' . $rInfo->returns_id . '&action=edit&oID=' . $rInfo->orders_id)) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('returns.php', tep_get_all_get_params(array('rID', 'action')) . 'rID=' . $rInfo->returns_id . '&action=delete'))); and replace with this $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('returns.php', 'rID=' . $rInfo->returns_id . '&action=edit&oID=' . $rInfo->orders_id)) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('returns.php', tep_get_all_get_params(array('rID', 'action')) . 'rID=' . $rInfo->returns_id . '&action=delete'))); Actually what we have done is eliminate tep_get_all_get_params(array('rID', 'action')) that was over and is what causes the loop. Quote Link to comment Share on other sites More sharing options...
reflex-ocasion Posted December 4, 2017 Share Posted December 4, 2017 More errors. When creating a return from the admin there are two errors in the email that is sent to the client. Edit catalog/admin/return_create.php Search $email_link = tep_href_link('returns_track.php', '', 'SSL', false); Replace the part that says tep_href_link by tep_catalog_href_link Not making this change causes the email to leave the access path to our admin. In the same file search $email_text .= EMAIL_TEXT_RETURNS_THANKS . EMAIL_TEXT_RETURNS_SENT . EMAIL_TEXT_RETURNS_CLOSE . EMAIL_TEXT_RETURNS_CONTACT_OPEN . EMAIL_TEXT_RETURNS_WARNING; eliminate the part that says EMAIL_TEXT_RETURNS_CONTACT_OPEN, that definition does not exist anymore Do exactly the same in the file catalog/return_product.php I have not found more errors. That does not mean that there are not. Quote Link to comment Share on other sites More sharing options...
tmcca Posted January 14, 2018 Share Posted January 14, 2018 Can this be configured for certain products not returnable? Some products on my store cant be returned. Quote Link to comment Share on other sites More sharing options...
♥frankl Posted January 14, 2018 Author Share Posted January 14, 2018 (edited) 7 hours ago, tmcca said: Can this be configured for certain products not returnable? Some products on my store cant be returned. I can see a use for this, for clearance, second hand, open box, or runout items. However, I am not doing any more coding for my addons until osC 2.3.6 is released. You would need to get this custom coded for your store. Post in the commercial section if you need this in a hurry. Edited January 14, 2018 by frankl Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
dculley Posted March 11, 2018 Share Posted March 11, 2018 I just installed this. Looking at the functions, I clicked on "Returned Products" received the following error:Fatal error: Call to a member function register() on a non-object in /admin/returns.php on line 17 How to correct? Quote Link to comment Share on other sites More sharing options...
♥frankl Posted March 11, 2018 Author Share Posted March 11, 2018 @dculley You will need to install the hook system, which comes with the Paypal app. See 2. Hooks for the Administration Tool and Catalog on this page: http://library.oscommerce.com/Package&en&paypal&oscom23&installation Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
dculley Posted March 12, 2018 Share Posted March 12, 2018 That was it thank you. 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.