Jump to content
Golden Boy

RMA Returns error for 2.2 MS2

Recommended Posts

Hi,

 

Whenever I try to send a refund using a gift voucher and click on the link, I get sent to gv_redeem.php, but it says that the gv is invalid or has already been redeemed. Even if I try to put the code in during checkout, it's says invalid coupon code.

 

 

Thanks for any help

 

Tim

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.

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

 

I had the same problem, until i took out the exit();

 

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

Share this post


Link to post
Share on other sites

Tapakah: Right now I don't believe the creators of the contribution have figured that out. Currently, I use a different type of form and have it stated in my Returns policy that if you use Quick Checkout (same as PWA) the form they are to use for their returns. And if they are a registered customer it expains where to go in there account to process for an RMA number.

 

As for the others and their errors, not sure how to help, since I don't get any errors using the current version of the RMA contribution. Even had a friend load it on his site and he reported all went well. He used and did exactly what it said with no problems or errors.

Edited by only2empires

Share this post


Link to post
Share on other sites
Tapakah: Right now I don't believe the creators of the contribution have figured that out. Currently, I use a different type of form and have it stated in my Returns policy that if you use Quick Checkout (same as PWA) the form they are to use for their returns. And if they are a registered customer it expains where to go in there account to process for an RMA number.

 

As for the others and their errors, not sure how to help, since I don't get any errors using the current version of the RMA contribution. Even had a friend load it on his site and he reported all went well. He used and did exactly what it said with no problems or errors.

What kind of form do you use? is there a contribution for it?

 

RMA works great, i just restarted the server and everything is working... i dont know why it was acting out. Great contribution! :)

Share this post


Link to post
Share on other sites

Hi,

 

I have just installed v2.3 and have applied all this patches up to this point. Two questions:

 

Whenever I send a refund via gift voucher and follow the link in the email, it says that the gv code is invalid or has already been redeemed.

 

Why can I return the same product more than once? The earlier versions replaced the link to return a product with the RMA number sent, so this could not happen. Did I miss something?

Share this post


Link to post
Share on other sites

Here's my code that places the return link under the product in account_history_info.php

 

//RMA returns 2.3
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 = '<font color=cc0000><b>' . TEXT_RMA . ' # <a href="' . tep_href_link('returns_track.php', 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a>';
} else {
$return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><font color=cc0000><b>' . TEXT_RETURN_PRODUCT .'</a></b></font>';
}
   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'] . '   ' . $return_link  .'<br><small><i>' . $desc['products_description'] . '</i></small>';
//RMA returns end

 

The values called for are in the database. I don't understand why this doesn't work.

 

 

The only other difference between your account_history_info.php and mine is:

  $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");

 

has been changed to:

//rmh M-S_multi-stores edited next line
 $customer_info_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "' and orders_stores_id = '" . STORES_ID . "'");

 

But, that just calls the customer_id number and really shouldn't affect RMA.

 

Thanks for any help

 

Tim

Share this post


Link to post
Share on other sites
Whenever I send a refund via gift voucher and follow the link in the email, it says that the gv code is invalid or has already been redeemed.

Sorry, I don't know what happened, but I don't have this problem anymore. Prob something with my database. But, still having the problem addressed in previous post.

 

Thanks

 

Tim

Share this post


Link to post
Share on other sites

TAPAKAH: No, there isn't a contribution for it. Its using a formmail type. I'll PM you with the link.

 

 

nyderrn: I just did a test transaction, and when I return the product, get the RMA number and go back to my account activity all I show is the Return (words) and the link is on the RMA number for that product that was returned for the customer to view the status online. I've gone into my admin and completed the return and still the same. Mine does not give them the option to return it again, but only the link to the RMA number to view what they already returned online.

 

Not sure if it has something to do with your multi-stores or not that is causing it.

Share this post


Link to post
Share on other sites

Sorry, it's working on my live server, but I have other contribs that are conflicting with ccgv 5.10. So, I've decided to start over and this is the problem I'm having. I will upload my fresh install to my live server so you can see what I'm talking about.

 

Thanks for the fast response

 

I'll let you know when it's ready for a test

 

Tim

Share this post


Link to post
Share on other sites

Ok it's ready. Sorry it took so long I had a empty shopping cart issue that I had to take care of first.

 

 

Test Store

 

Test as much as you want ;)

 

 

Thanks for helping

 

Tim

Share this post


Link to post
Share on other sites
nyderrn: I just did a test transaction, and when I return the product, get the RMA number and go back to my account activity all I show is the Return (words) and the link is on the RMA number for that product that was returned for the customer to view the status online. I've gone into my admin and completed the return and still the same. Mine does not give them the option to return it again, but only the link to the RMA number to view what they already returned online.
Sorry, it's working on my live server, but I have other contribs that are conflicting with ccgv 5.10.  So, I've decided to start over and this is the problem I'm having.  I will upload my fresh install to my live server so you can see what I'm talking about. 

 

Thanks for the fast response

 

I'll let you know when it's ready for a test

 

Tim

Ha,

 

I totally misread your post. I thought you went to my website and tested it. DOH!

 

Anyway I can't see anything thats wrong. It seems like

if ($order->products[$i]['return'] == '1') {

isn't being satisfied, but the value is in the database and it works perfectly on my other stores. The return link is showing up its just not changing after returning the product.

 

If you have any ideas, I'm open at this point.

 

Thanks

 

Tim

Share this post


Link to post
Share on other sites
There will be additional entries in ccgv's tables coupon and coupon_email_tack WHEN finishing an RMA (complete this return checkbox enabled) AND doing this refund with a voucher (refunded by gift voucher checkbox enabled).

 

You will have this voucher sent by the RMA System on your CCGV adminscreen if you surf to ccgv's gv_sent.php page and there will be some data about this voucher ... if it was used (and by which ip adress - gv routines) or not ;-)

 

Sebastian

 

Doing,

 

I've followed your instructions on page 16 of this thread re. CCGV and RMA, but I'm having a problem with it. My CCGV-5.10c works correctly and my RMA_returns_2.13 works correctly, but when I approve a refund via Gift Voucher and complete the refund, the Voucher is not sent to the customer. Everything else seems to work. The coupons, coupon_email_track, gv_tracking tables are all updated and the coupon shows up in Gift Vouchers Sent, but the email sent to the customer does not show any voucher or coupon. I am able to send Gift Vouchers and Coupons from admin without any problems.

 

Any idea how I can fix this?

 

Thanks,

Rick Knight

Share this post


Link to post
Share on other sites
The coupons, coupon_email_track, gv_tracking tables are all updated and the coupon shows up in Gift Vouchers Sent, but the email sent to the customer does not show any voucher or coupon.

 

Sebastian,

 

I've done some more testing and still everything works except that the email that's sent to the customer. It not only doesn't include the gift voucher information, any comments I enter into the comments block in the admin window also don't show up. I tried the returns.php file from IceTheNet, it made no diferrence.

 

Anyone have any idea what's wrong?

 

Thanks again,

Rick Knight

Share this post


Link to post
Share on other sites

Just installed but I have 3, hopefully small, problems:

 

First, in Admin, when I click on 'Returned Products' I get:

 

Parse error: parse error, unexpected $ in /home/hardware/web/Merchant2/catalog/admin/returns.php on line 908

 

Secondly, in the main catalog, I get the following at the top of the page:

 

Warning: Cannot send session cache limiter - headers already sent (output started at /home/hardware/web/Merchant2/catalog/includes/functions/refund_functions.php:1) in /home/hardware/web/Merchant2/catalog/includes/functions/sessions.php on line 67

 

Finally, in the catalog, if I click on the 'Account' button I get the following error:

 

Warning: Cannot send session cache limiter - headers already sent (output started at /home/hardware/web/Merchant2/catalog/includes/functions/refund_functions.php:1) in /home/hardware/web/Merchant2/catalog/includes/functions/sessions.php on line 67

 

Warning: Failed opening 'includes/application_top_refund.php' for inclusion (include_path='.:/usr/share/pear') in /home/hardware/web/Merchant2/catalog/includes/application_top.php on line 535

 

Warning: Cannot add header information - headers already sent by (output started at /home/hardware/web/Merchant2/catalog/includes/functions/refund_functions.php:1) in /home/hardware/web/Merchant2/catalog/includes/functions/general.php on line 29

 

Any help would be most appreciated

 

Cheers

Share this post


Link to post
Share on other sites

I don't know if anyone else has experienced this problem, but I'm hoping someone can help.

 

Doing some more testing of this contrib, I've noticed that tax is not being added to the return total. In Returned Products there is a column for tax and it shows the correct rate, but the column is empty. I have the current version of this contrib installed in a test environment and also an older version installed in a live store and in neither installation is the tax added to the return amount.

 

I also have a couple of other problems I can live with, but it would be nice if they can be fixed.

 

First, the Gift Voucher number is not being sent to the customer, but is being created and inserted in the coupuns table.

 

Second, the Gift Voucher Comments are not being sent to the customer and are not being save to any table (I think I can fix this one).

 

Is anyone else having these problems? Can anyone offer a suggestion for fixing any or all of them?

 

Thanks,

Rick Knight

Share this post


Link to post
Share on other sites

i had a similar problem with the tax not being added when returning a product.

Try this:

Catalog>return_product.php

Find approx line 380

//  $ordered_product_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " where order_id = '" . $HTTP_GET_VARS

 

 

    echo '          <tr>' . "\n" .

        '            <td class="main" align="right" valign="top" width="30">' . tep_draw_input_field('returns_quantity', $returned_products['products_quantity'], 'size=5') . '  x</td>' . "\n" .

        '            <td class="main" valign="top">    ' . $returned_products['products_name'];

 

 

echo '</td>' . "\n";

echo '            <td class="main" align="right" valign="top">' . $currencies->format(($returned_products['final_price']+$returned_products['final_price']/100*17.5) * ($returned_products['products_quantity'])) . '</td>' . "\n" .

        '          </tr>' . "\n";

If you look at this

echo '            <td class="main" align="right" valign="top">' . $currencies->format(($returned_products['final_price']+$returned_products['final_price']/100*17.5) * ($returned_products['products_quantity'])) . '</td>' . "\n" .

in the above statement it has been coded to get the final product price & add 17.5% which is my tax rate. It works for me

Share this post


Link to post
Share on other sites
i had a similar problem with the tax not being added when returning a product.

Try this:

Catalog>return_product.php

Find approx line 380

 

 

echo '</td>' . "\n";

echo '            <td class="main" align="right" valign="top">' . $currencies->format(($returned_products['final_price']+$returned_products['final_price']/100*17.5) * ($returned_products['products_quantity'])) . '</td>' . "\n" .

        '          </tr>' . "\n";

 

Martinmacca,

 

Thanks for the tip. That won't work well for me as I have to charge (and refund) tax only in California and that's only about 10% - 15% of my sales.

 

Looking at the code in catalog/admin/returns.php, tax should be added, but something is preventing it from working and in fact, it looks like there is a substantial chunk of code missing or just not working. In the returns screen, just below the line item in the return it looks like there should be a subtotal like in the catalog/admin/orders.php and this subtotal area would have the tax calculation. Can someone with more php skills than me take a look at this? Sebastion?

 

Thanks,

Rick Knight

Share this post


Link to post
Share on other sites
Looking at the code in catalog/admin/returns.php, tax should be added, but something is preventing it from working and in fact, it looks like there is a substantial chunk of code missing or just not working. In the returns screen, just below the line item in the return it looks like there should be a subtotal like in the catalog/admin/orders.php and this subtotal area would have the tax calculation

 

OK, I think I found something. Now if I only knew what to do with it.

 

In catlog/admin/returns.php at around line 649...

 

<?php

    for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {

  echo '              <tr>' . "\n" .

          '                <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .

          '                <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .

          '              </tr>' . "\n";

    }

?>

 

This code doesn't seem to be doing anything, but I think it should be printing a total for the return line item above it, including tax if applicable. Looking at catalog/admin/orders.php there is similar code that prints order total, extra charges, shipping, tax and total. It seems returns.php should behave similarly. Any ideas anyone?

 

Thanks,

Rick Knight

Share this post


Link to post
Share on other sites

When i return a product & click the request button to complete the return & get an RMA number, the page gets redirected to the login screen. The user then has to login to get the RMA number. Does this happen to your stores or has anyone made a fix to skip the login page?

Share this post


Link to post
Share on other sites

Martinmacca,

 

No, I don't have that problem, but I have seen a lot of posts about it. I think it was fixed some time ago by Sebastian (Doing). Search back in this thread for posts by Doing.

 

When I complete an RMA request, I'm directed to a new window that shows the RMA number and has instructions for using it.

 

Rick Knight

Share this post


Link to post
Share on other sites

Hi again,

 

just to let you know - I am alive and well ;-)))

 

This forum kicks you out of the posting notification function if you have not been here for a couple of days (weeks?) and I haven't - I am terribly busy :( / :)

 

@CatDadRick - I love cat's ;) this is why I will come back to your question als soon as possible !

 

Sebastian

Share this post


Link to post
Share on other sites

Sebastian,

 

I'm glad to hear you are still alive and kicking and that you are busy. That is a very good thing indeed.

 

Also, nice to know another Cat lover.

 

Thanks

Rick Knight

Share this post


Link to post
Share on other sites

Hello

 

In my case, everything is fine except Track a Return; when user add RMA number and try to find a return nothing happend, submit function resend all data to the same page. Here is my catalog/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 © 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><?php echo TITLE; ?></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 = tep_draw_form('rma_find', tep_href_link('returns_track.php', '', 'NONSSL'), 'post');

$returns .= tep_draw_hidden_field('action', 'returns_show');

$returns .= tep_hide_session_id();

$returns .= '<tr>

<td colspan=3 class=main>Please enter the RMA number you recieved when you placed you item for return.</td>

</tr>

<tr>

<td width=100& colspan=3 class=main> </td>

</tr>

<tr>

<td width="25%" height="30" align="left" class="main">Your <b><i>RMA</i></b> Number</td>

<td width="5%" height="30" align="center" class="main"> </td>

<td width="75%" height="30" align="left" class="main"><font color=red><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="Find Return ->">   </td>

</tr>

';

 

 

 

 

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'); ?>

 

 

Thanks


Carpe Diem

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

×