Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 2 votes

RMA Returns error for 2.2 MS2


653 replies to this topic

#641 dickie

  • Community Member
  • 9 posts
  • Real Name:Richard Else

Posted 13 January 2010, 23:24

Quote

I am having trouble with the 2.6 Version.

The problem arises from the customer side when a return is requested. Similar to the above post when a customer completes the return request and clicks submit, a blank page is produced.

No RMA number is produced (as a customer).

If I do it through the Admin side (on the invoice) I can produce an RMA number no problem.

Im afraid im not an expert in coding and lack the knowledge to rectify the issue.

If anybody can help in any way I would be grateful

Dickie

Found the problem was with the order status. An RMA number will not be made if the customer has not completed the order. The page will just appear blank!

#642 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 18 January 2010, 21:47

Anybody knows what is this function for??

            <td class="main" width=95%>Url<?php // echo tep_draw_input_field('link_url'); ?>

If not comented appears a white box on the rma returns page.

#643 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010, 04:03

If anyone knows why Refund Method: will not change when updating it in the admin of RMA Returns please let me know, it's driving me nuts I have installed the contrib 3 times freshly and I have read this WHOLE! thread and only see one mention with NO answer

I have the same problem!

This line:
$return_link = '<b>' . TEXT_RMA . ' #&nbsp;<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>';

It not show any number (blank) after customer ask for RMA.

#644 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010, 05:42

Please help with account_history_info.php
RMA Returns + CCC + MVS

All works fine if I remove the new queries and the return_number echo.


My code:
// JLM: BEGINS
     for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
     
// EXPRESION SI ES UN CCC 
  if ($order->products[$i]['model'] == "Custom") {


//SENTENCIA CCC + DESCRIPTION   
    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'] . '<small><i>' . $order->products[$i]['description'] . '</small></i>';


//  echo $return_link;
echo $return_number;  
// echo $rma_number['rma_value'];



 // EXPRESION PARA QUE APAREZCA EL NUMERO DE TICKET O EL LINK A RMA
if ($order->products[$i]['return'] == '1') {
// si hay número RMA asignado
// QUERIES
//  $rma_info_query = tep_db_query("select orders_product_id, products_returned from " . TABLE_ORDERS_PRODUCTS . " o where orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and products_returned = '1'");
$rma_info_query = tep_db_query("select p.returns_id, p.rma_value from " . TABLE_RETURNED_PRODUCTS . " p, " . TABLE_ORDERS_PRODUCTS . " o where o.orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and o.products_returned = '1'");
$rma_info = tep_db_fetch_array($rma_info_query);
$rma_number = $rma_info['products_returned'];

//SENTENCIA NUMERO RMA
$return_number = '<b>' . TEXT_RMA . ' #&nbsp;<u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_number['rma_value'], 'NONSSL') . '">' . $rma_number['rma_value'] . '</a></u></b>';
//$return_number = $rma_number['rma_value'];


// CONDICIONAL si NO hay número RMA asignado y el pedido se ha enviado y cobrado
} elseif ($orders_status == '3') {

// si NO hay número RMA asignado
// QUERIES
$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);

//SENTENCIA LINK
$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>';
}



echo $return_number;  




//CONDICIONAL DE LO CONTRARIO 
             }else{



//SENTENCIA PRODUCTO + OPCIONES 
    echo ' <tr>' . 
         ' <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>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
        
      }

    }


 
//  echo $return_link; 
  echo $return_number;  
 // echo $rma_number['rma_value'];



 // EXPRESION PARA QUE APAREZCA EL NUMERO DE TICKET O EL LINK A RMA
if ($order->products[$i]['return'] == '1') {
// si hay número RMA asignado
// QUERIES
$rma_info_query = tep_db_query("select p.returns_id, p.rma_value from " . TABLE_RETURNED_PRODUCTS . " p, " . TABLE_ORDERS_PRODUCTS . " o where o.orders_product_id = '". (int)$HTTP_GET_VARS['orders_product_id'] . "' and o.products_returned = '1'");
$rma_info = tep_db_fetch_array($rma_info_query);
$rma_number = $rma_info['products_returned'];

//SENTENCIA NUMERO RMA
// $return_number = '<b>' . TEXT_RMA . ' #&nbsp;<u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_number['rma_value'], 'NONSSL') . '">' . $rma_number['rma_value'] . '</a></u></b>';
$return_number = $rma_number['rma_value'];


// CONDICIONAL si NO hay número RMA asignado y el pedido se ha enviado y cobrado
} elseif ($orders_status == '3') {

// si NO hay número RMA asignado
// QUERIES
$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);

//SENTENCIA LINK
$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>';
}
echo $return_number;  



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

// JLM: End RMA Returns


    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="price" 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";
  }
//MVS
  }
?>


#645 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010, 06:00

Now I changed TABLE_PRODUCTS_RETURNS for TABLE_RETURNS and nothing.

All works except didnt show the RMA Number.

Fix for the Admin Refund Method:
add:
'customer_method' => $refund_method,
after:
'refund_payment_value' => $final_price,

#646 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010, 18:49

Looking the database, the contrib acts in extrange maner when recors the status

returns_status

Quote

returns_status_id language_id returns_status_name
1 1 Pending
2 1 Awaiting Return
3 1 Cancelled
4 1 Complete
5 3 Enviado al fabricante.
5 1 Enviado al fabricante.
5 2 Enviado al fabricante.
6 3 Recibido del fabricante.
6 1 Recibido del fabricante.
6 2 Recibido del fabricante.
7 3 En reparación.
7 1 En reparación.
7 2 En reparación.

The first column is not autoincremented. The IDs are duplicating.


This should be fine:

Quote

returns_status_id language_id returns_status_name
1 3 Pendiente
2 1 Pending
3 2 Pending
4 3 Esperando devolución
5 1 Awaiting Return
6 2 Awaiting Return
7 3 Cancelada
8 1 Cancelled
9 2 Cancelled
10 3 Completada
11 1 Complete
12 2 Complete
13 3 Enviado al fabricante.
14 1 Send to vendor
15 2 Send to vendor
16 3 Recibido del fabricante.
17 1 Awaiting return from vendor
18 2 Awaiting return from vendor
19 3 En reparación.
20 1 Testing and Repairing
21 2 Testing and Repairing
22 3 Reparado.
23 1 Repaired
24 2 Repaired
25 3 Cambiado por Vale Descuento
26 1 Changed for Gift Vounche
27 2 Changed for Gift Vounche


#647 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 21 January 2010, 12:31

Forget last post.

Returns_status_id must be the same.

Quote

returns_status_id language_id returns_status_name
1 3 Petición de cambio recibida
1 1 Refund Returns Received
1 2 Refund Returns Received
2 3 A la espera de recibir su envio
2 1 Awaiting to receive your ship
2 2 Awaiting to receive your ship
3 3 En reparación.
3 1 Testing and Repairing
3 2 Testing and Repairing
4 3 Reparado.
4 1 Repaired
4 2 Repaired
5 3 Pendiente
5 1 Pending
5 2 Pending
6 3 En espera de contestación
6 1 Waiting for response
6 2 Waiting for response
7 3 Enviado al fabricante
7 1 Shipped to manufacturer
7 2 Shipped to manufacturer
8 3 Recibido del fabricante.
8 1 Received from manufacturer
8 2 Received from manufacturer
9 3 Cambiado por Vale Descuento
9 1 Changed by Gift Vounche
9 2 Changed by Gift Vounche
10 3 Devuelto. Fuera de Garantia.
10 1 Shipped. Out of Warranty.
10 2 Shipped. Out of Warranty.
11 3 Cambiado y Enviado.
11 1 Changed and Shipped.
11 2 Changed and Shipped.
12 3 Cancelada
12 1 Cancelled
12 2 Cancelled
13 3 Completada
13 1 Complete
13 2 Complete


#648 SpongeMaximus

  • Community Member
  • 9 posts
  • Real Name:Geoff
  • Gender:Male

Posted 12 April 2010, 20:59

Dunno if anyone can help me out..

I have successfully installed the RMA Returns system for my client's store but simply cannot get the returns system working with attributes. There are many products on the site that uses different attributes and options and I need to incorporate that when customers return a product. I have been tackling this project for quite some time and with no success I'm afraid. Would it be possible if someone could at least direct me on how to add such a thing to this contribution?

I also read a post a few pages back where someone had figured out a way to make the returns system pull attributes for that product. Could someone please share the wealth? I'll be your bestest bud! :thumbsup:

#649 jeeperz

  • Community Member
  • 30 posts
  • Real Name:Kevin

Posted 17 December 2010, 16:31

I've searched the old files and the forum posts, but I just can't find the answer to this:

Where is "TEXT_DISPLAY_NUMBER_OF_TICKET_STATUS" defined?

Thx!

#650 Drnil

  • Community Member
  • 1 posts
  • Real Name:Nacho

Posted 21 December 2010, 21:43

The RMA Returns system, has support for Spanish language? I have installed version 2.2 RC2.
I would be good this contribution, I thank anyone who can tell me.

Greetings...Drnil from Argentina

#651 leungda

  • Community Member
  • 9 posts
  • Real Name:daniel

Posted 25 January 2011, 23:58

Does it work on 2.3.1 ?

#652 RobC1962

  • Community Member
  • 40 posts
  • Real Name:Rob Clements

Posted 23 March 2011, 00:05

Has anyone using this contrib noticed what happens to the coding on the pages when 'view source' is used on the browser?
It drastically changes the header info - mine before was : -

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>normal site info here</title>
<meta name="Description" content="normal description here." >
<meta name="Keywords" content="normal keywords here" >
<meta name="googlebot" content="normal intended info here" >

to this once contrib installed: -

<?
/*
$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
*/

function tep_create_rma_value($length, $type = 'digits') {
if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false;

$rand_value = '';
while (strlen($rand_value)<$length) {
if ($type == 'digits') {
$char = tep_rand(0,9);
} else {
$char = chr(tep_rand(0,255));
}
if ($type == 'mixed') {
if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char;
} elseif ($type == 'chars') {
if (eregi('^[a-z]$', $char)) $rand_value .= $char;
} else if ($type == 'digits') {
if (ereg('^[0-9]$', $char)) $rand_value .= $char;
}
}

return $rand_value;
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>


Anyone have any thoughts on this? Personally, I am unimpressed and have removed the contrib forthwith and will not be using it again.

#653 achieve

  • Community Member
  • 37 posts
  • Real Name:Declan Connolly

Posted 21 September 2011, 09:31

View PostSpongeMaximus, on 12 April 2010, 20:59, said:

Dunno if anyone can help me out..

I have successfully installed the RMA Returns system for my client's store but simply cannot get the returns system working with attributes. There are many products on the site that uses different attributes and options and I need to incorporate that when customers return a product. I have been tackling this project for quite some time and with no success I'm afraid. Would it be possible if someone could at least direct me on how to add such a thing to this contribution?

I also read a post a few pages back where someone had figured out a way to make the returns system pull attributes for that product. Could someone please share the wealth? I'll be your bestest bud! :thumbsup:

I am in same situation, in that RMA is working fine for standard products, but does not work properly if product has attributes. Any help would be greatly appreciated.

#654 calimeo

  • Community Member
  • 1 posts
  • Real Name:Luca

Posted 25 September 2011, 08:13

hi, i'm news user, i have one problem in catalog/account_history_info

i have try to insert the modify but the script donìt work. if a customer log in your account and see one order, the description of goods are x. help me please

Attached Files