Jump to content
Latest News: (loading..)
Golden Boy

RMA Returns error for 2.2 MS2

Recommended Posts

Hi,

Anyone has solution for this problem?

thanks,

Anita

 

Hi , :'(

I have installed RMA return 2.4.1, i found that there is a bug existed on "Return Update" email.

The Order ID number included in the Return Update received email is incorrect after updated the return status form Admin.

I checked that the order ID number is replaced by Returns ID.

Such as below update email received , the real  Order ID should be 25 but not 3 , 3 is a return ID found in admin.

Anyone has this problem? How to fix it?

Thanks,

Anita.


Welcome to vist my Site:

Anita.

Share this post


Link to post
Share on other sites

Hello all,

 

i have installed RMA 2.4.1 and i have see, when a user use the RMA Number

what he has became over mail, and try to use it, the system say....

number not found.

 

It?s a bug, or we can i fix that ?

 

Greets

Hobbes

Share this post


Link to post
Share on other sites

Hey guys,

 

This contribution seems to work great. But after a RMA was submitted, I logged into the admin section and tried to accept it and send the new information to the customer. As soon as I clicked update I get this error:

 

Fatal error: Cannot instantiate non-existent class: mime in /home/zurv/public_html/store/admin/includes/classes/email.php on line 202

 

My code in the email.php file looks like this:

 

<?php

/*

$Id: email.php,v 1.8 2003/06/11 22:24:34 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

 

mail.php - a class to assist in building mime-HTML eMails

 

The original class was made by Richard Heyes <richard@phpguru.org>

and can be found here: http://www.phpguru.org

 

Renamed and Modified by Jan Wildeboer for osCommerce

*/

 

class email {

var $html;

var $text;

var $output;

var $html_text;

var $html_images;

var $image_types;

var $build_params;

var $attachments;

var $headers;

 

function email($headers = '') {

if ($headers == '') $headers = array();

 

$this->html_images = array();

$this->headers = array();

 

if (EMAIL_LINEFEED == 'CRLF') {

$this->lf = "\r\n";

} else {

$this->lf = "\n";

}

 

/**

* If you want the auto load functionality

* to find other mime-image/file types, add the

* extension and content type here.

*/

 

$this->image_types = array('gif' => 'image/gif',

'jpg' => 'image/jpeg',

'jpeg' => 'image/jpeg',

'jpe' => 'image/jpeg',

'bmp' => 'image/bmp',

'png' => 'image/png',

'tif' => 'image/tiff',

'tiff' => 'image/tiff',

'swf' => 'application/x-shockwave-flash');

 

$this->build_params['html_encoding'] = 'quoted-printable';

$this->build_params['text_encoding'] = '7bit';

$this->build_params['html_charset'] = constant('CHARSET');

$this->build_params['text_charset'] = constant('CHARSET');

$this->build_params['text_wrap'] = 998;

 

/**

* Make sure the MIME version header is first.

*/

 

$this->headers[] = 'MIME-Version: 1.0';

 

reset($headers);

while (list(,$value) = each($headers)) {

if (tep_not_null($value)) {

$this->headers[] = $value;

}

}

}

 

/**

* This function will read a file in

* from a supplied filename and return

* it. This can then be given as the first

* argument of the the functions

* add_html_image() or add_attachment().

*/

 

function get_file($filename) {

$return = '';

 

if ($fp = fopen($filename, 'rb')) {

while (!feof($fp)) {

$return .= fread($fp, 1024);

}

fclose($fp);

 

return $return;

} else {

return false;

}

}

 

/**

* Function for extracting images from

* html source. This function will look

* through the html code supplied by add_html()

* and find any file that ends in one of the

* extensions defined in $obj->image_types.

* If the file exists it will read it in and

* embed it, (not an attachment).

*

* Function contributed by Dan Allen

*/

 

function find_html_images($images_dir) {

// Build the list of image extensions

while (list($key, ) = each($this->image_types)) {

$extensions[] = $key;

}

 

preg_match_all('/"([^"]+\.(' . implode('|', $extensions).'))"/Ui', $this->html, $images);

 

for ($i=0; $i<count($images[1]); $i++) {

if (file_exists($images_dir . $images[1][$i])) {

$html_images[] = $images[1][$i];

$this->html = str_replace($images[1][$i], basename($images[1][$i]), $this->html);

}

}

 

if (tep_not_null($html_images)) {

// If duplicate images are embedded, they may show up as attachments, so remove them.

$html_images = array_unique($html_images);

sort($html_images);

 

for ($i=0; $i<count($html_images); $i++) {

if ($image = $this->get_file($images_dir . $html_images[$i])) {

$content_type = $this->image_types[substr($html_images[$i], strrpos($html_images[$i], '.') + 1)];

$this->add_html_image($image, basename($html_images[$i]), $content_type);

}

}

}

}

 

/**

* Adds plain text. Use this function

* when NOT sending html email

*/

 

function add_text($text = '') {

$this->text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);

}

 

/**

* Adds a html part to the mail.

* Also replaces image names with

* content-id's.

*/

 

function add_html($html, $text = NULL, $images_dir = NULL) {

$this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '<br>', $html);

$this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);

 

if (isset($images_dir)) $this->find_html_images($images_dir);

}

 

/**

* Adds an image to the list of embedded

* images.

*/

 

function add_html_image($file, $name = '', $c_type='application/octet-stream') {

$this->html_images[] = array('body' => $file,

'name' => $name,

'c_type' => $c_type,

'cid' => md5(uniqid(time())));

}

 

/**

* Adds a file to the list of attachments.

*/

 

function add_attachment($file, $name = '', $c_type='application/octet-stream', $encoding = 'base64') {

$this->attachments[] = array('body' => $file,

'name' => $name,

'c_type' => $c_type,

'encoding' => $encoding);

}

 

/**

* Adds a text subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_text_part(&$obj, $text) {

function add_text_part(&$obj, $text) {

$params['content_type'] = 'text/plain';

$params['encoding'] = $this->build_params['text_encoding'];

$params['charset'] = $this->build_params['text_charset'];

 

if (is_object($obj)) {

return $obj->addSubpart($text, $params);

} else {

return new mime($text, $params);

}

}

 

/**

* Adds a html subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_html_part(&$obj) {

function add_html_part(&$obj) {

$params['content_type'] = 'text/html';

$params['encoding'] = $this->build_params['html_encoding'];

$params['charset'] = $this->build_params['html_charset'];

 

if (is_object($obj)) {

return $obj->addSubpart($this->html, $params);

} else {

return new mime($this->html, $params);

}

}

 

/**

* Starts a message with a mixed part

*/

 

/* HPDL PHP3 */

// function &add_mixed_part() {

function add_mixed_part() {

$params['content_type'] = 'multipart/mixed';

 

return new mime('', $params);

}

 

/**

* Adds an alternative part to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_alternative_part(&$obj) {

function add_alternative_part(&$obj) {

$params['content_type'] = 'multipart/alternative';

 

if (is_object($obj)) {

return $obj->addSubpart('', $params);

} else {

return new mime('', $params);

}

}

 

/**

* Adds a html subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_related_part(&$obj) {

function add_related_part(&$obj) {

$params['content_type'] = 'multipart/related';

 

if (is_object($obj)) {

return $obj->addSubpart('', $params);

} else {

return new mime('', $params);

}

}

 

/**

* Adds an html image subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_html_image_part(&$obj, $value) {

function add_html_image_part(&$obj, $value) {

$params['content_type'] = $value['c_type'];

$params['encoding'] = 'base64';

$params['disposition'] = 'inline';

$params['dfilename'] = $value['name'];

$params['cid'] = $value['cid'];

 

$obj->addSubpart($value['body'], $params);

}

 

/**

* Adds an attachment subpart to a mime_part object

*/

 

/* HPDL PHP3 */

// function &add_attachment_part(&$obj, $value) {

function add_attachment_part(&$obj, $value) {

$params['content_type'] = $value['c_type'];

$params['encoding'] = $value['encoding'];

$params['disposition'] = 'attachment';

$params['dfilename'] = $value['name'];

 

$obj->addSubpart($value['body'], $params);

}

 

/**

* Builds the multipart message from the

* list ($this->_parts). $params is an

* array of parameters that shape the building

* of the message. Currently supported are:

*

* $params['html_encoding'] - The type of encoding to use on html. Valid options are

* "7bit", "quoted-printable" or "base64" (all without quotes).

* 7bit is EXPRESSLY NOT RECOMMENDED. Default is quoted-printable

* $params['text_encoding'] - The type of encoding to use on plain text Valid options are

* "7bit", "quoted-printable" or "base64" (all without quotes).

* Default is 7bit

* $params['text_wrap'] - The character count at which to wrap 7bit encoded data.

* Default this is 998.

* $params['html_charset'] - The character set to use for a html section.

* Default is iso-8859-1

* $params['text_charset'] - The character set to use for a text section.

* - Default is iso-8859-1

*/

 

/* HPDL PHP3 */

// function build_message($params = array()) {

function build_message($params = '') {

if ($params == '') $params = array();

 

if (count($params) > 0) {

reset($params);

while(list($key, $value) = each($params)) {

$this->build_params[$key] = $value;

}

}

 

if (tep_not_null($this->html_images)) {

reset($this->html_images);

while (list(,$value) = each($this->html_images)) {

$this->html = str_replace($value['name'], 'cid:' . $value['cid'], $this->html);

}

}

 

$null = NULL;

$attachments = ((tep_not_null($this->attachments)) ? true : false);

$html_images = ((tep_not_null($this->html_images)) ? true : false);

$html = ((tep_not_null($this->html)) ? true : false);

$text = ((tep_not_null($this->text)) ? true : false);

 

switch (true) {

case (($text == true) && ($attachments == false)):

/* HPDL PHP3 */

// $message =& $this->add_text_part($null, $this->text);

$message = $this->add_text_part($null, $this->text);

break;

case (($text == false) && ($attachments == true) && ($html == false)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($text == true) && ($attachments == true)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

$this->add_text_part($message, $this->text);

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($html == true) && ($attachments == false) && ($html_images == false)):

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $message =& $this->add_alternative_part($null);

$message = $this->add_alternative_part($null);

$this->add_text_part($message, $this->html_text);

$this->add_html_part($message);

} else {

/* HPDL PHP3 */

// $message =& $this->add_html_part($null);

$message = $this->add_html_part($null);

}

break;

case (($html == true) && ($attachments == false) && ($html_images == true)):

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $message =& $this->add_alternative_part($null);

$message = $this->add_alternative_part($null);

$this->add_text_part($message, $this->html_text);

/* HPDL PHP3 */

// $related =& $this->add_related_part($message);

$related = $this->add_related_part($message);

} else {

/* HPDL PHP3 */

// $message =& $this->add_related_part($null);

// $related =& $message;

$message = $this->add_related_part($null);

$related = $message;

}

$this->add_html_part($related);

 

for ($i=0; $i<count($this->html_images); $i++) {

$this->add_html_image_part($related, $this->html_images[$i]);

}

break;

case (($html == true) && ($attachments == true) && ($html_images == false)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $alt =& $this->add_alternative_part($message);

$alt = $this->add_alternative_part($message);

$this->add_text_part($alt, $this->html_text);

$this->add_html_part($alt);

} else {

$this->add_html_part($message);

}

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

case (($html == true) && ($attachments == true) && ($html_images == true)):

/* HPDL PHP3 */

// $message =& $this->add_mixed_part();

$message = $this->add_mixed_part();

 

if (tep_not_null($this->html_text)) {

/* HPDL PHP3 */

// $alt =& $this->add_alternative_part($message);

$alt = $this->add_alternative_part($message);

$this->add_text_part($alt, $this->html_text);

/* HPDL PHP3 */

// $rel =& $this->add_related_part($alt);

$rel = $this->add_related_part($alt);

} else {

/* HPDL PHP3 */

// $rel =& $this->add_related_part($message);

$rel = $this->add_related_part($message);

}

$this->add_html_part($rel);

 

for ($i=0; $i<count($this->html_images); $i++) {

$this->add_html_image_part($rel, $this->html_images[$i]);

}

 

for ($i=0; $i<count($this->attachments); $i++) {

$this->add_attachment_part($message, $this->attachments[$i]);

}

break;

}

 

if ( (isset($message)) && (is_object($message)) ) {

$output = $message->encode();

$this->output = $output['body'];

 

reset($output['headers']);

while (list($key, $value) = each($output['headers'])) {

$headers[] = $key . ': ' . $value;

}

 

$this->headers = array_merge($this->headers, $headers);

 

return true;

} else {

return false;

}

}

 

/**

* Sends the mail.

*/

 

function send($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {

$to = (($to_name != '') ? '"' . $to_name . '" <' . $to_addr . '>' : $to_addr);

$from = (($from_name != '') ? '"' . $from_name . '" <' . $from_addr . '>' : $from_addr);

 

if (is_string($headers)) {

$headers = explode($this->lf, trim($headers));

}

 

for ($i=0; $i<count($headers); $i++) {

if (is_array($headers[$i])) {

for ($j=0; $j<count($headers[$i]); $j++) {

if ($headers[$i][$j] != '') {

$xtra_headers[] = $headers[$i][$j];

}

}

}

 

if ($headers[$i] != '') {

$xtra_headers[] = $headers[$i];

}

}

 

if (!isset($xtra_headers)) {

$xtra_headers = array();

}

 

if (EMAIL_TRANSPORT == 'smtp') {

return mail($to_addr, $subject, $this->output, 'From: ' . $from . $this->lf . 'To: ' . $to . $this->lf . implode($this->lf, $this->headers) . $this->lf . implode($this->lf, $xtra_headers));

} else {

return mail($to, $subject, $this->output, 'From: '.$from.$this->lf.implode($this->lf, $this->headers).$this->lf.implode($this->lf, $xtra_headers));

}

}

 

/**

* Use this method to return the email

* in message/rfc822 format. Useful for

* adding an email to another email as

* an attachment. there's a commented

* out example in example.php.

*

* string get_rfc822(string To name,

* string To email,

* string From name,

* string From email,

* [string Subject,

* string Extra headers])

*/

 

function get_rfc822($to_name, $to_addr, $from_name, $from_addr, $subject = '', $headers = '') {

// Make up the date header as according to RFC822

$date = 'Date: ' . date('D, d M y H:i:s');

$to = (($to_name != '') ? 'To: "' . $to_name . '" <' . $to_addr . '>' : 'To: ' . $to_addr);

$from = (($from_name != '') ? 'From: "' . $from_name . '" <' . $from_addr . '>' : 'From: ' . $from_addr);

 

if (is_string($subject)) {

$subject = 'Subject: ' . $subject;

}

 

if (is_string($headers)) {

$headers = explode($this->lf, trim($headers));

}

 

for ($i=0; $i<count($headers); $i++) {

if (is_array($headers[$i])) {

for ($j=0; $j<count($headers[$i]); $j++) {

if ($headers[$i][$j] != '') {

$xtra_headers[] = $headers[$i][$j];

}

}

}

 

if ($headers[$i] != '') {

$xtra_headers[] = $headers[$i];

}

}

 

if (!isset($xtra_headers)) {

$xtra_headers = array();

}

 

$headers = array_merge($this->headers, $xtra_headers);

 

return $date . $this->lf . $from . $this->lf . $to . $this->lf . $subject . $this->lf . implode($this->lf, $headers) . $this->lf . $this->lf . $this->output;

}

}

?>

 

I was about to go live with my site until I noticed this problem. Any help would be great!!!

 

Thank you,

Griffe

Edited by zurv

Share this post


Link to post
Share on other sites

YEEEHAAA!!

 

 

For some reason my mime.php file had 0k and nothing in it. Restored an original and everythings working fine!!

 

Thanks!

Share this post


Link to post
Share on other sites
Hello all,

 

i have installed RMA 2.4.1 and i have see, when a user use the RMA Number

what he has became over mail, and try to use it, the system say....

number not found.

 

It?s a bug, or we can i fix that ?

 

Greets

Hobbes

 

 

Hmmmm, nobody answer me ?

 

Greets

Hobbes

Share this post


Link to post
Share on other sites
I'm happy to report an initial bout of success in my efforts to make QTPro and RMA Returns interoperate. I've added an SKU field to QTPro's products_stock table. This SKU field ties the two contributions together. When an order is placed for a product with attributes, the new products_stock SKU is inserted in the order's products_model field instead of the value that would normally come from the products table. When an item with attributes is returned, the SKU is used to add the stock back to the products_stock table instead of the products table. For items without attributes, everything is handled the way it always was: returned items are added back to the products table.

 

Get all that? ;) In any case, now I need testers. Please IM me if you are interested in managing your inventory for products with attributes and are willing to help out with testing.

 

Justin

 

Hi, I would like to implement this. I'll also send you the IM.

 

tom

Share this post


Link to post
Share on other sites
Hi,

 

I have been trying this great contribution (latest version) to my site. When I am trying to return any product from account_history_info.php, I am redirected to return_product.php which gets the right order_id and products_id but does not show the product name and price. Product name field is empty and price is 0,00.

 

Where I made wrong?

 

Thanx in advance!

 

 

Did you get this fixed, I have the same problem.

Share this post


Link to post
Share on other sites

Has anyone found a way to return items from the same order more than once.

 

For example. Customer orders 3 of one item. Customer requests to return 2 items. Then the customer wants to return the final 1 item. But RMA returns doesn't allow this. Has anyone figured out a solution.

 

Thank you

Share this post


Link to post
Share on other sites
Hi,

Hi , 

I have installed RMA return 2.4.1, i found that there is a bug existed on "Return Update" email.

The Order ID number included in the Return Update received email is incorrect after updated the return status form Admin.

I checked that the order ID number is replaced by Returns ID.

Such as below update email received , the real Order ID should be 25 but not 3 , 3 is a return ID found in admin.

 

This is not a bug per-say it is a alternative way of invoicing. The rma system creates its own RMA invoices so that #3 you see is the rma return # not the customer order #.

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

I had a couple of ideas after using this contribution for awhile that could really make this contribution incredible.

 

1. Being able to return the entire order, not just item by item.

2. Being able to manually create RMA tickets for the customer, for those customers who can not figure it out themselves or for people who got them item as gifts and cannot enter a return themselves because it is under another person's account.

 

Has anyone added these features to their site, and can anyone suggest how to go about doing these modifications? Thanks!


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Is there someone that has the updated RMA systems to put online ?

 

I am a translator in some projects ( YaBB being one of them ) and we make it a habit of posting the tested files in our forum so others can benefit from them.

 

Perhaps this is possible here also ?

 

gr. Jans

Share this post


Link to post
Share on other sites

almost done, most ofit works by now I guess

 

only thing is ater refunding and mailing the customer, customer gets an mail with a possibility to et some kinda voucher from the website called gv_redeem and something.

 

if I click it I get an error saying: 404 file not found.

 

If I look at the locale folder I can not find the GV_REDEEM.PHP file that should be there according to the mail sent.

 

someone please ? were can I find tis file ?

Share this post


Link to post
Share on other sites

Hello all,

 

I am getting this error when updatign the rma request:

 

Fatal error: Cannot instantiate non-existent class: order in /home/villadec/public_html/dev1/admin/returns.php on line 163

 

Thanks,

Help help is appreciated,

Danny

 

Also where is the fix to this issue:

After customers submit a return request on the return_product.php page to get an RMA number, customers are sometimes prompted to log in again. This does not happen for everyone, and it's not clear what causes this. If you are having this problem, look for Sebastian Krupp's suggested fix for this at: http://forums.oscommerce.com/index.php?sho...ndpost&p=412825

 

The code on that page isnt working for me

Share this post


Link to post
Share on other sites

I'm working on the ability to create RMA requests from admin for customers who can't figure out the form and for customers who got the item as a gift.

Basically what I'm trying to do is create a link next to each product that will take me the the return_product.php for admin (basically a modified version of the regular catalog one). I've got the link down fine but I'm having trouble displaying the dropdown fields in on the admin side. I'll post more when I have something that works correctly.

Edited by homewetbar

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Ok as far as the ability to create RMAs in admin I've gotten to the point you can enter everything into the form but it is not processing for some reason. I need someone with a little better php skills to look this over and tell me whats causing the problem.

 

Insert into your admin filenames.php

    define('FILENAME_RETURN', 'return_product.php');

 

Then change your in orders.php right after

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

 

FROM:

$returns_check_query = tep_db_query("SELECT r.rma_value, rp.products_id FROM " . TABLE_RETURNS . " r, " . TABLE_RETURNS_PRODUCTS_DATA . " rp where r.returns_id = rp.returns_id and r.order_id = '" . $oID . "' and rp.products_id = '" . $order->products[$i]['id'] . "' ");
if (!tep_db_num_rows($returns_check_query)){
$return = ' ';
} else {
$returns = tep_db_fetch_array($returns_check_query);
$return_link = '<a href=' . tep_href_link(FILENAME_RETURNS, 'cID=' . $returns['rma_value']) . '><font color=red><b><i>Returns</b></i></font></a>';
}

 

TO:

    //BEGIN RMA MODULE
   $returns_check_query = tep_db_query("SELECT r.rma_value, rp.products_id FROM " . TABLE_RETURNS . " r, " . TABLE_RETURNS_PRODUCTS_DATA . " rp where r.returns_id = rp.returns_id and r.order_id = '" . $oID . "' and rp.products_id = '" . $order->products[$i]['id'] . "' ");
if (!tep_db_num_rows($returns_check_query)){

if ($order->products[$i]['return'] != '1') {
$return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $oID . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><u>' . '<font color="818180">Schedule Return</font>' .'</a></u>';
}
// Don't show Return link if order is still pending or processing
// You can change this or comment it out as best fits your store configuration
if (($orders_status == '1') OR ($orders_status == '2') ) {
 $return_link = '';
}
} else {
$returns = tep_db_fetch_array($returns_check_query);
$return_link = '<a href=' . tep_href_link(FILENAME_RETURNS, 'cID=' . $returns['rma_value']) . '><font color=red><b><i>Returns</b></i></font></a>';
}
//END RMA MODULE

 

Then copy both your return_product.php and return_emails.php language files to the admin language files directory.

 

Upload this return_product.php into your admin directory. So you can see it all appears to be working great but is hanging on something when you submit the form. Can anyone tell me how to fix this? I've almost got it, but just can't see what is causing the hang! :blink:

 

Attached is the return_product.php

return_product.php


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Just posted a new version 2.5

 

Upgrade instructions included. I hardcoded a few things to save time, but not much, hopefully this will be very useful to everyone!

 

--- New Features ---

* Ability to create RMAs from admin.

* Shows RMAs that have not been completed in Red in Admin now.

* Can list different contact email and contact name when creating from admin for customers who received item as a gift!

 

--- Fixes ---

* Clean up of some unrelated contribs in the install

* Incorporated order # fix by Sean Stewart

* Incorporated clickable url fix by Taryn Young

* Improved layout in Product Returns edit section

 

Enjoy! :thumbsup:


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Thank you so much, but how can i easily upgrade from the previous version? Is there any extra coding on shared files? Or can i just drop the new individual files?

 

Thanks,

Danny

Share this post


Link to post
Share on other sites

Disreguard the post before, i didnt read the instructions. Before I upgrade i'd like to know if this will affect any other contribution i might have. Also i think there is something wrong with the upgrade instructions for the new file porduct_returns.php or something similar. Check the filenames.php, there isnt a define for it.........

 

Danny

Share this post


Link to post
Share on other sites
Disreguard the post before, i didnt read the instructions. Before I upgrade i'd like to know if this will affect any other contribution i might have. Also i think there is something wrong with the upgrade instructions for the new file porduct_returns.php or something similar. Check the filenames.php, there isnt a define for it.........

 

Danny

 

 

It should not affect any other contributions, I have dozens installed and it affects none of them....

 

You are correct Step 3 should be, I'll correct the upload with a new version tommorrow after a couple more people have checked the instructions

 

3) admin/includes/filenames.php

 

ADD:

define('FILENAME_RETURN', 'return_product.php');


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

installed the 2.5 version ( update )

 

Now get this error in admin section,if I click anything but returns.php link

 

 

 

1109 - Onbekende tabel 'returns_status_ido' in field list

 

select o.returns_id, returns_status_ido.customers_name, o.contact_user_name, o.rma_value, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.return_reason_name, op.final_price, o.returns_date_finished from returned_products o left join returns_products_data op on (o.returns_id = op.returns_id), return_reasons s where o.returns_reason = s.return_reason_id and s.language_id = '4' and o.returns_status = '10' order by o.returns_id DESC limit -20, 20

 

 

Nice update, hmmm ? seems tables are missing in the SQL update file ?

Share this post


Link to post
Share on other sites
installed the 2.5 version ( update )

 

Now get this error in admin section,if I click anything but returns.php link

1109 - Onbekende tabel 'returns_status_ido' in field list

 

select o.returns_id, returns_status_ido.customers_name, o.contact_user_name, o.rma_value, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.return_reason_name, op.final_price, o.returns_date_finished from returned_products o left join returns_products_data op on (o.returns_id = op.returns_id), return_reasons s where o.returns_reason = s.return_reason_id and s.language_id = '4' and o.returns_status = '10' order by o.returns_id DESC limit -20, 20

Nice update, hmmm ? seems tables are missing in the SQL update file ?

 

I must be getting crazy here, now it's OK and no error is shown.

 

 

I can not find the admin function to create an RMA though, lead me to it if you can ;-)

Share this post


Link to post
Share on other sites

typo error in one of the files, I can find the schedule return link now but it calls return.php where it should be returns.php in orders.php

 

 

//BEGIN RMA MODULE

$returns_check_query = tep_db_query("SELECT r.rma_value, rp.products_id FROM " . TABLE_RETURNS . " r, " . TABLE_RETURNS_PRODUCTS_DATA . " rp where r.returns_id = rp.returns_id and r.order_id = '" . $oID . "' and rp.products_id = '" . $order->products[$i]['id'] . "' ");

if (!tep_db_num_rows($returns_check_query)){

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

$return_link = '<a href="' . tep_href_link(FILENAME_RETURNs, 'order_id=' . $oID . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><u>' . '<font color="818180">Schedule Return</font>' .'</a></u>';

}

// Don't show Return link if order is still pending or processing

// You can change this or comment it out as best fits your store configuration

if (($orders_status == '1') OR ($orders_status == '2') ) {

$return_link = '';

}

} else {

$returns = tep_db_fetch_array($returns_check_query);

$return_link = '<a href=' . tep_href_link(FILENAME_RETURNS, 'cID=' . $returns['rma_value']) . '><font color=red><b><i>Returns</b></i></font></a>';

}

//END RMA MODULE

 

 

Jan

Edited by jans

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

×