Jump to content
Golden Boy

RMA Returns error for 2.2 MS2

Recommended Posts

As for the 2nd part with the SQL values, not sure what you are getting at. The values you added: 222111, 222112 etc......what do they represent? Is it something that needs changed in the SQL or something an individual would do on their own after installation.

 

Those are the configuration_id values in table_configuration. I used those numbers because I felt they are unique and wont interfere with other present and future contributions trying to add the same values and getting SQL error.

Share this post


Link to post
Share on other sites

I am having a problem with this great contribution. The problem is, is that when I change the refund method to anything and then click on update, it will not save the setting I changed it to. Additionally, above the listed products to return it does not show anything to the right of Refund Method.

 

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

Hi, Doing,

 

Thank you with your help ont the RMA. I have one more question need your help.

 

I want to sort the items displayed in invoice by model #. Curently the items is not sorted. How could I make this possible.

 

Thank you for your help in advance.

Share this post


Link to post
Share on other sites

sionus:

 

I just did another clean install with the RMA contribution and all went fine. I would suggest double checking that all the steps in the notes are completed and the sql statement uploaded properly. Be sure to use 2.3 version as this is the most recent but does not include johnny's clean up work, but will not affect the operation of the contribution.

Share this post


Link to post
Share on other sites
Hi, Doing,

 

Thank you with your help ont the RMA. I have one more question need your help.

 

I want to sort the items displayed in invoice by model #. Curently the items is not sorted. How could I make this possible.

 

Thank you for your help in advance.

Hi, Cathy,

 

I still not received the answer from doing yet. Would you review my request and give me some suggestion?

 

Hope you don't mind that I ask both of you to work on my problem, since both of you work so close with the RMA system.

 

Thank you and hope to hear from you soon.

Share this post


Link to post
Share on other sites

@kkkqqq

 

Did I get you right - you would like to sort the items on your invoice by model nr. ? This is not a RMA question :)

 

It should be something like 'order by products_model' within the sql query collecting the order details from the table 'oders_products' ... I don't have the correct file and line in mind but I will have a look at it.

 

@cathy

 

Thanks again for your work on this contribution and for the credit :)

 

Sebastian

Share this post


Link to post
Share on other sites

@kkkqqq

 

It's simple - I've just tested it

 

Open up /admin/includes/classes/order.php and look for the following line:

 

      $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "'");

 

should be at line 84 ...

 

change it to the following code:

 

      $orders_products_query = tep_db_query("select orders_products_id, products_name, products_model, products_price, products_tax, products_quantity, final_price from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$order_id . "' order by products_model");

 

That should be it - it works on my system :)

 

Sebastian

Share this post


Link to post
Share on other sites

Hi folks,

 

thanks for this useful mod. I just wanted to drop a quick line to let everyone know that this mod DOES work. I have a heavily moded site and had only a few simple problems. After a hour or so I had it all sorted out. Install only took 20 minutes or so.

 

After looking at catalog>returns_track.php for a while, I decided to clean it up a bit. I don't think this calls for a new version or to upload it to the contrib site but if anyone would like a copy I can pass a link. The file still displays the same but the code is just cleaned up. If you use this code you will also need the catalog>includes>modules>returns_track.php as well since I modified some of the html...

 

Cathy, if you would like these files to take a look or possibly pass them on to the next version just let me know.

 

I will say though that I did have a double login problem when visiting the catalog>returns_track.php which is now fixed with this new code.

 

Mac

Share this post


Link to post
Share on other sites

I would like to give it a try, how do I get the files?.

Edited by Tranbo

Share this post


Link to post
Share on other sites

hi folks,

 

i am currently out of the country and the internet is terrible slow. i will be back within the next week. once i get settled i will upload everything. i few more changes have taken place so i think i new upload to the contrib area would now suffice.

 

in the meantime, i am curious to why the code did not use the tep_image_submit function for return_track.php ??? i have added this to the code but i am not sure if this will cause a problem with most rma users.

 

thanks,

mac

Share this post


Link to post
Share on other sites

This is a sollution to the anoying 're-login' after posting a RMA on the return_product.php page to get your RMA Nr ...

 

First Step - Backup your file !

 

Second Step - open up your retun_product.php file and look for the following lines:

 

// redirect to confirmation
tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id));

 

should be at lines 208 / 209 in the current RMA system v2.3

 

Change this code to the following :

 

// redirect to confirmation
header('Location: return_product.php?osCsid='.$_GET['osCsid'].'&action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id);
exit();      

 

Third Step - save your file and test it. I've tested it on my System and it works fine. :)

 

 

@Cathy

This is simple but very nice change to the RMA System. ATTENTION: It may cause happy users of the upcoming RMA v 2.3b in the near future :D

 

@ kkkqqq

Did you try my code change to solve your problem with the listed product models ? There was no reply within the last days :(

 

 

Sebastian

Share this post


Link to post
Share on other sites

Hi, Doing,

 

I am so sorry that I missed your reply.

 

You are so great, the order now is sorted by the model # just like a magic. Thank you, thank you, thank you.

 

osC community is such a great community. Thank you again Doing.

Share this post


Link to post
Share on other sites

Oops i posted this as a new topic. I will add it here also.

 

I have a problem with this contribution. I know there is an easy solution to all of this.

 

I have a clean installation of osCommerce latest version (MS2). I installed ccgv-510c and just installed the latest RMA version.

 

There are no other mofifications to the site at all.

 

The problem is that i can now no longer see anything in relation to the CCGV installation on the client side and admin side of the website. And when logged in as a customer i have this error in my colum right:

 

1146 - Table 'xxxxx_osc1.TABLE_COUPON_GV_CUSTOMER' doesn't exist

 

select amount from TABLE_COUPON_GV_CUSTOMER where customer_id = '2'

 

[TEP STOP]

 

I installed the RMA using the included readme. The RMA system works fine but it looks like my CCGV system has gone haywire.

 

I must mention that when i did install the RMA the last thing i did was upload the included system files. This overwrote the versions i already had. Was i supposed to do this or is there a step that i left out? A set of instructions missed?

 

the site in question is www.templegroove.com.au

 

thanks for helping (if you do)!

Share this post


Link to post
Share on other sites

It's ok i sorted out the problem. There was an error with my application_top file.

 

Excellent contribution well done.

Share this post


Link to post
Share on other sites

hi doing......

 

I still have the errors while i got the version 2.3 and the code u posted...when requesting it will throw me to the login page and also the returns_track.php still wont work as when I enter a correct/exist RMA number it will throw me back to login screen again. I got all the codes and the newest version already. By the way my site is www.ctdigital.net, you can go do a test if u like.

Share this post


Link to post
Share on other sites

@ Tom

 

I just had a short test on your site ... it looks like you are still using the form button instead of the tep function in file return_product.php. I've posted a change to an osC Button using tep a while ago but I did not check if was added to the current version 2.3.

 

Backup your file !

 

Have a look for the following code in return_product.php

 

<td colspan="2" class="main" valign="top" nowrap align="center"><input type=submit value=Request Returns Number></td>

 

and replace it with this one

 

 <td colspan="2" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE, 'NONSSL'); ?></td>

 

 

Make shure you have my

 

// redirect to confirmation

 

code built in (few postings ago) an give it a try ...

 

 

Sebastian

Edited by doing

Share this post


Link to post
Share on other sites

Dear Doing

 

I changed the code with the 1's u provided (including the //redirect confirmation change). But its still redirecting me to the login page when I try to request a RMA. Please visit the site again and have a test. By the way you didn't post any change for the returns_track.php error....simply visit my site @ www.ctdigital.net and add returns_track.php at the very end of the address after the site loads. :(

Share this post


Link to post
Share on other sites

By the way Doing, when I use the new //redirection confirmation code, it still gets me to the login page but it won't show me the RMA # after I login. The old 1 gets me to the login page too, but right after I login, it will then show me the RMA # i requested.

Share this post


Link to post
Share on other sites

@ Tom

 

Hmmm - I am sorry if this does not work for you. You can test it out on my Demo Shop (German) if you click on the www button below - it works 100% there.

 

I posted a corrected returns_track.php on page 16 of this thread:

 

http://forums.oscommerce.com/index.php?sho...ic=61077&st=150

 

So give this one a try ... OR (better) have a look for the changes to your file with a program like WinMerge to compare the codes.

 

Basicly - it is again changing the form button in returns_track.php to an osC Button using the tep function. The problem using the form button is that it is not passing the osCsid which you need. My code change is asking for the osCsid - this is the code again:

 

// redirect to confirmation
header('Location: return_product.php?osCsid='.$_GET['osCsid'].'&action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id);
exit();  

 

osCsid='.$_GET['osCsid']. - this is where the code is asking for the correct session id (osCsid).

 

I've checked your site again an it is NOT working the way it should :(

 

If you post your return_product.php code I'll have a look at it ...

 

Sebastian

Share this post


Link to post
Share on other sites

Dear doing I've change the code to the 1 u provided same as above reply, still not working. Anyway, here is the returns_track.php:

 

<?php
/*
$id author Puddled Internet - http://www.puddled.co.uk
 email support@puddled.co.uk
  osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');
     if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

 if (!$HTTP_GET_VARS['action']){
     $HTTP_GET_VARS['action'] = 'returns_track';
 }
 if ($HTTP_GET_VARS['action']) {
   switch ($HTTP_GET_VARS['action']) {
   case 'returns_show':

      // first carry out a query on the database to see if there are any matching tickets
      $database_returns_query = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS . " where customers_id = '" . $customer_id . "' and rma_value = '" . $HTTP_POST_VARS['rma'] . "' or rma_value = '" . $HTTP_GET_VARS['rma'] . "'");
      if (!tep_db_num_rows($database_returns_query)) {
          tep_redirect(tep_href_link('returns_track.php?error=yes'));
      } else {
         $returns_query = tep_db_fetch_array($database_returns_query);
         $returns_id = $returns_query['returns_id'];
         $returned_products_query = tep_db_query("SELECT * FROM " . TABLE_RETURNS_PRODUCTS_DATA . " op, " . TABLE_RETURNS . " o where o.returns_id = op.returns_id and op.returns_id = '" . $returns_id . "'");
         $returned_products = tep_db_fetch_array($returned_products_query);

             require(DIR_WS_CLASSES . 'order.php');
          $order = new order($returned_products['order_id']);

      }

   break;

}
}

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURN, '', 'NONSSL'));
?>
<!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>Track Your Return Status - CT Digital</title>   
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td align="right">
</td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>

 <td width="100%" valign="top">
	 <table border="0" width="100%" cellspacing="0" cellpadding="0">

         <?
     if ($HTTP_GET_VARS['action'] == 'returns_show') {
         include(DIR_WS_MODULES . 'returns_track.php');
    // }

     ?>
<?php
//
?>
 <tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '20', '20'); ?><br</td>
 </tr>

<?php
//}
?>

   <table></td>
     <!-- end new insert here --//-->
   <?
} else {
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <tr>
      	 <td width="100%" valign="top">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                <?
                 if (isset($error)=='yes') {
                  $error_message = '<tr>
                                    <td colspan=3 class=main><? echo TEXT_TRACK_DETAILS_1; ?></td>
                                    </tr>
                                    <tr>';
                   new infoBox(array(array('text' => $error_message)));
                 // }
                   echo '<br><BR>';
             }
                   $returns = '<form action="' . $PHP_SELF . '?action=returns_show" method=post>
                            <tr>
                            <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><? echo TEXT_TRACK_DETAILS_2; ?></td>
                            </tr>
                            <tr>
                            <td width=100& colspan=3 class=main> </td>
                            </tr>
                            <tr>
                            <td width="33%" 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>
                            <tr>
                            <td width=100% colspan=3 align=right><input type=submit name="submit" value=Track Return<? echo TEXT_FIND_RETURN; ?>   </td>
                            </tr>
                            </form>


                            ';



                new infoBox(array(array('text' => $returns)));



                ?>

            <!--  </table></td></tr>-->
           </table></td></tr>
          </table></td></tr>
<?
}

?>


           </td>
         </tr>
       </table></td>
     </tr>

   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

when ever i go 2 return_product.php for the RMA return system I get this error:

 

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /usr/local/apache/htdocs/includes/functions/general.php on line 42

 

It appears in the billing address box and the mailing address box.

How can i fix this?

Thanks

Share this post


Link to post
Share on other sites

Why is the RMA system not intergrated with the admin/customer/order module.

Like when a user goes into their account and sees a list of their recent order it will say deliverd even thou the order has been returend, and the admin can not see from all compleated orders if any have been returned from the orders page.

It would be great if it was intergrated into os more rather than a module.

Any way, how do i change it sothat the users do not have to login when they have just filled in the return product form?

 

How about adding a cancell link, if the order status says "waiting" then the return a product link does not show, but a cancell one does.

When the order status is changed to dispach or prosessing then the cancell link should change to return.

 

Anyway great contribution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×