Fixed now...I should read things thoroughly before I post![]()
Fixed now...I should read things thoroughly before I post![]()
what if the customer place the order over the phone. how can we do an RMA for these situations from the admin panel?
thanks
bump, please help
This appears odd - the instructions with the RMA system ReadMe(RMA_SYSTEM_2.5h).txt says that it is possible to generate the RMA from the admin...
yet where in the admin is the proper link for order history in order to select any particular item to return???Code:-- Admin: Operation -- TO CREATE RMA REQUESTS FOR CUSTOMERS: 1) View the order history. 2) Click on the item you want to return. 3) Enter the QTY to return. 4) Enter the email address of the customer or gift receipent who is returning the item. 5) Enter the name of the customer or gift receipent who is returning the item. 6) Click Submit. 7) Then proceed to Edit the RMA Request under the Vouchers/Coupons category in Admin.
...I just checked out the files associated to this contribution and appears that admin/restore_order.php is missing. just FYI. it could be related to my issue...
Also the admin/return_product.php page is jacked up. limited fields on page and it gives you an error
When trying to generate an RMA codeCode:The quantity you entered is greater than the quantity originally ordered.
Last edited by blackhawk; 08-24-2009 at 12:47 PM.
Hey.. I have recently installed this contribution in my development environment and everything is working perfectly. Thank you so much for all the help everyone!
My question is, how can I make it so that the RMA number is created sequentially rather than a random 11 digit number? I am quite familiar with php and I believe I found the function that handles this.
In refund_functions.php:
I have been trying to take a crack at this for a couple of days and I admit that I am stumped.PHP Code:
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;
}
My client has somewhat of an RMA system already in place which is basically an excel spreadsheet of issued RMA numbers in sequential order. He would like it so that this contribution could provide a number where it starts where the spreadsheet left off, say 500, and continue on thereafter.
I am aware that there are two instances of this code so I would have to change both on the catalog and admin side.
Any help will be much appreciated! Thanks!
RMA is not something I have used before nor installed ...
But casting a quick look over the sql edits for this contribution ...
Could you not simply just change the refund_payment_id in the refund_payments table to be 500 and then it will auto_increment from there and not from 0.
Regards,
pgmarshall
_______________________________
I looked into the database tables and it doesn't seem that the refund_payment_id has anything to do with the random number generated. It looks like the function I provided creates the rma_value, which can be found in the returned_products table.
Do you know how I could make it so that the function generates a number sequentially?
Without installing this module I am not sure that I can help you much more.
But I would say that rather than changing the rma_value why not simply show the admin user the refund_payment_id as well as the rma_value as this will be easier than changing all the code.
The refund_payment_id can then be set to 500 and will auto-increment.
Again, having not installed this, I am guessing, but you could try changing this in admin/returns.php
to this<?php // ADDED BY BURT ?>
<td class="dataTableContent" align="center"><b><?php echo $orders['rma_value']; ?></b></a>
<?php // END BURT ?>
Might do the trick ...<?php // ADDED BY BURT ?>
<td class="dataTableContent" align="center"><b><?php echo $orders['returns_id']; ?></b></a>
<?php // END BURT ?>
Regards,
pgmarshall
_______________________________
Awesome, thanks for all the help! Because of some of your advice, I believe I figured it out.
In catalog/includes/functions/refund_functions and catalog/admin/includes/functions/refund_functions:
I changed this code:
PHP Code:
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;
}
To read:
What this basically does is that it looks for the rma_value in the returned_products table, finds the row number and adds 500, and then increments that value. So now each RMA is starting at 501 which is exactly what I wanted.PHP Code:
function tep_create_rma_value($length, $type = 'digits') {
if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false;
$rand_value = mysql_query("SELECT rma_value FROM returned_products");
$rand_value = mysql_num_rows($rand_value) + 500;
$rand_value++;
return $rand_value;
}
Bookmarks