Jump to content



Latest News: (loading..)

* * * * - 2 votes

RMA Returns error for 2.2 MS2


  • Please log in to reply
658 replies to this topic

#641   dickie

dickie
  • Members
  • 9 posts
  • Real Name:Richard Else

Posted 13 January 2010 - 11:24 PM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 18 January 2010 - 09:47 PM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010 - 04:03 AM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010 - 05:42 AM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010 - 06:00 AM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010 - 06:49 PM

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

bhbilbao
  • Members
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 21 January 2010 - 12:31 PM

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

SpongeMaximus
  • Members
  • 11 posts
  • Real Name:Geoff
  • Gender:Male

Posted 12 April 2010 - 08:59 PM

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

jeeperz
  • Members
  • 30 posts
  • Real Name:Kevin

Posted 17 December 2010 - 04:31 PM

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

Drnil
  • Members
  • 1 posts
  • Real Name:Nacho

Posted 21 December 2010 - 09:43 PM

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

leungda
  • Members
  • 9 posts
  • Real Name:daniel

Posted 25 January 2011 - 11:58 PM

Does it work on 2.3.1 ?

#652   RobC1962

RobC1962
  • Members
  • 40 posts
  • Real Name:Rob Clements

Posted 23 March 2011 - 12:05 AM

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

achieve
  • Members
  • 37 posts
  • Real Name:Declan Connolly

Posted 21 September 2011 - 09:31 AM

View PostSpongeMaximus, on 12 April 2010 - 08:59 PM, 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

calimeo
  • Members
  • 1 posts
  • Real Name:Luca

Posted 25 September 2011 - 08:13 AM

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



#655   shaggy2dope2125

shaggy2dope2125
  • Members
  • 23 posts
  • Real Name:Kevin

Posted 25 June 2012 - 04:03 AM

I know a few people have been asking weather or not this works with 2.3.1. I am currently working on modding the addon to do so. So far i have gotten the system to work on the customer side. I haven't gotten the admin side done yet. Once I am done, ill be sure to update the install instructions to reflect all the changes.

#656   cpt0562

cpt0562
  • Members
  • 1 posts
  • Real Name:Cindy Thomas

Posted 04 August 2012 - 02:15 AM

@shaggy2dope2125 - did you ever get this working for 2.31?  I would love to use it if it works...please advise.

#657   rbrookstx

rbrookstx
  • Members
  • 13 posts
  • Real Name:Robert Brooks

Posted 01 January 2013 - 12:15 AM

I have modded it succesfully to work with OSC 2.3.1.  the account_history_info.php page is really the only one that is an issue (it mangles the themes to hell).  All the rest of the instructions are fine.

#658   freakystreak

freakystreak
  • Members
  • 110 posts
  • Real Name:Richard Jones

Posted 28 February 2013 - 02:35 PM

Quote

I have modded it succesfully to work with OSC 2.3.1.  the account_history_info.php page is really the only one that is an issue (it mangles the themes to hell).  All the rest of the instructions are fine.

could you post this as an addon or forward the file to me? Really need to get this working.
Ah, the world wide web. What a wonderful place.

#659   nafri

nafri
  • Members
  • 133 posts
  • Real Name:naf

Posted 09 April 2013 - 09:21 AM

I  installed this contrib yesterday to 2.3.3.It is faily staright forward on what needs to be done..

follow the following steps and you shoudl be okay. I am not a php coder and i wont be able to answer  any coding questiosn.I made these changes and it works on my system.Stying is  left as it is.That can be changed easily ..

1) In  catalog  files return_product.php and return_track.php Make the following chages

change
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
to
  require(DIR_WS_INCLUDES . 'template_top.php');

Remove

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

remove if exist
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

2) if you  are using latest php you will get eregi deprecated messages in includes\funtions\refund_funtions.php.
In refund_functions.php change

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;

to

  
			 if (preg_match('/^[a-z0-9]$/i', $char)) $rand_value .= $char;
		  } elseif ($type == 'chars') {
				if (preg_match('/^[a-z]$/i', $char)) $rand_value .= $char;
		  } elseif ($type == 'digits') {
				if (preg_match('/^[0-9]$/', $char)) $rand_value .= $char;

This sorts the catalog side

On admin side

3) You have to makie the same changes  as step 1 above to

refund_methods.php
return_product.php
return_text.php
return.php
returns_invoice.php
return_packingslip.php
return_reasons.php
return_status.php
admin\includes\functions\refund_method.php

4) change the code in admin\includes\functions\refund_funtions.php  as done on the catalog side.step 2.

5) In admin\includes\boxes\returns.php

Remove whats in the file and change it with

<?php
/*
  $Id$
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
  Copyright (c) 2010 osCommerce
  Released under the GNU General Public License
*/
  $cl_box_groups[] = array(
		'heading' => 'Customer Returns',
		'apps' => array(
   array(
				'code' => FILENAME_RETURNS,
				'title' => 'Returned Products',
				'link' => tep_href_link(FILENAME_RETURNS)
		  ),
		  array(
				'code' => FILENAME_RETURNS_REASONS,
				'title' => 'Return Reasons',
				'link' => tep_href_link(FILENAME_RETURNS_REASONS)
		  ),
		  array(
				'code' => FILENAME_REFUND_METHODS,
				'title' => 'Refund Methods',
				'link' => tep_href_link(FILENAME_REFUND_METHODS)
		  ),
		  array(
				'code' => FILENAME_RETURNS_STATUS,
				'title' => 'Returns Status',
				'link' => tep_href_link(FILENAME_RETURNS_STATUS)
		  ),
		  array(
				'code' => FILENAME_RETURNS_TEXT,
				'title' => 'Return Text Edit',
				'link' => tep_href_link(FILENAME_RETURNS_TEXT)
		  )
		)
  );
?>


This should do it.It works on my site..You can go ahead and change the styling as you wish...