Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RMA Returns error for 2.2 MS2


Guest

Recommended Posts

Ok - not sure if I'm doing something wrong here, but I don't see my return status anywhere in the processed source code on the returns_track.php page. Does anybody know how to write a query that says...

As I mentioned before, this has already been done. I'll post 2.4.1 as soon as I can. I can't promise anything, but hopefully I'll get the time to package it within a day or two.

Link to comment
Share on other sites

As I mentioned before, this has already been done. I'll post 2.4.1 as soon as I can. I can't promise anything, but hopefully I'll get the time to package it within a day or two.

 

Justin,

 

Oh, ok, my mistake. I thought you had said that there was a time/reward issue to get it to work right and that just having the status in the header was good enough for your purposes. Sorry for the confusion.

 

Jacob

Link to comment
Share on other sites

Oh, ok, my mistake. I thought you had said that there was a time/reward issue to get it to work right and that just having the status in the header was good enough for your purposes. Sorry for the confusion.

Well, now I'm the one who's confused. I do indeed think having the status in the page heading title is sufficient, so that's what's been done for 2.4.1. Since we seem to be crossing wires here, you can download 2.4.1 and see if it meets your needs. ;)

Link to comment
Share on other sites

Version 2.4.1 has been posted.

 

Changes from 2.4:

 

--- Enhancements ---

* To avoid multiple return request submissions, JavaScript enhancement was added to prevent customers from clicking the "Submit" button more than once. (catalog/return_product.php)

* Returns status added to heading title of Track Return page (catalog/returns_track.php, catalog/includes/languages/xxxxxx/returns_track.php)

 

--- Fixes ---

* Fixed missing error message if RMA was entered incorrectly (catalog/includes/filenames.php, catalog/includes/languages/xxxxxx/return_track.php was renamed to returns_track.php)

* Better rendering of account history page (catalog/account_history_info.php)

* Better rendering of RMA request page (catalog/return_product.php)

* Better rendering of return tracking page (catalog/includes/modules/returns_track.php)

* Fixed incorrect variable name in Addressbook Enhancer extra (catalog/return_product.php)

* Improved installation documentation

 

If you haven't changed any of the files specific to this contribution, you can just copy over the new RMA files, make the needed edits for two core OSC files (catalog/account_history_info.php and catalog/includes/filenames.php), and delete catalog/includes/languages/[english|german]/return_track.php.

 

As before, the best way to upgrade is to use a file comparison tool on the files listed above. If you're on Mac OS X and need help with file comparison tools such as BBEdit or FileMerge, I'd be happy to help. I'm not familiar with Beyond Compare or its ilk on Windows, so unfortunately I can't help there. ;)

 

Enjoy,

 

Justin

Link to comment
Share on other sites

Hi Justin,

 

Thanks for the great work, but I just have one question about the changes you have made:

 

Is your version of the RMA system capable of dealing with product attributes?

 

I am selling computer systems, and customers are able to change certain components in the system. The old version of RMA (which I tried to fix, unsuccessfully) did not recognise product attributes.

 

I am assuming that you have not implemented product attributes yet, as I have looked at your RMA files and there does not seem to be any code for product attirbutes, nor are there any tables for attributes in the database.

 

If you have any suggestion, or are likely to consider this (or not) for the future it would be much appreciated.

 

Thanks for all your hardwork, and of others in this thread!

 

Regards,

 

Unified

Link to comment
Share on other sites

Is your version of the RMA system capable of dealing with product attributes?

As far as I know, no version of this contribution has any code relating to product attributes.

 

While I can guess at what you're looking for, more detail would be helpful. You mention phrases like "dealing," "recognizing," and "implementing" product attributes without actually describing what you want the RMA Returns System to do with them. I assume you would like attributes for returned products to be recorded and displayed in the catalog/admin modules.

 

If this assumption is correct, this would probably be a non-trivial task, albeit not an impossible one. However, my company's current position regarding product attributes is that they are not very useful for our business until OSC can manage inventory counts by attribute. That leaves us with two options:

 

1. Separate every color/size/etc variation of a product into its own product (i.e., no attributes)

2. Hack the core OSC code to record inventory counts by attribute

 

If we decide to go the first route, there won't be much incentive for us to get the RMA Returns System to record attributes (since we won't be using attributes any longer). If we go the second route, we'd obviously have to complete that step before we even consider modifying RMA Returns System to record attributes.

 

As mentioned earlier in this thread, I don't know anything about PHP -- I'm just a tinkerer. So as far as suggestions are concerned, unfortunately I don't have too many. Trial and error are the only techniques I've mastered so far... ;)

 

Justin

Link to comment
Share on other sites

Thanks Justin for your prompt reply, and my apologies for being vague in my previous email regarding product attirbutes.

 

I assume you would like attributes for returned products to be recorded and displayed in the catalog/admin modules.

 

That is exactly what I want...

 

However, I appreciate what you mean by OSC not managing the inventory counts on attributes.

 

I myself have only recently started to use attributes with the products I sell, and so I had overlooked the inventory counts issue (a major oversight on my part, which could result in serious errors with my stock take!)

 

That leaves us with two options:

 

1. Separate every color/size/etc variation of a product into its own product (i.e., no attributes)

2. Hack the core OSC code to record inventory counts by attribute

 

I think I am going to stick with option 1 for the time being, but I may try, if I get any free time, to have a go at hacking the core OSC code to record inventory counts by attribute (on a trial & error basis!)

 

Thanks Justin for saving me a lot of trouble, and the great work you have done with the RMA system.

 

Jiten (Unified)

Link to comment
Share on other sites

Rather than try to re-invent the wheel, I poked around the contributions list and downloaded an attribute-aware inventory management module called Quantity Tracking Pro. After installing it yesterday and doing some initial testing, it seems to do a solid job of storing and subtracting inventory counts even when multiple attributes are used per product.

 

The only issue is that the code doesn't use many functions, so it's not easy to integrate it with RMA Returns. For example, when you process a return, the item is supposed to be added back to inventory. At the moment, RMA Returns is not attribute-aware (as we have discussed), nor are there any functions available to easily ensure that products with attributes get added back to the correct place in the database.

 

In short, it should be possible to modify QTPro and RMA Returns so that they are interoperable. It will be no small task, however, and will take a significant amount of effort. I'll let you once I have something available for testing.

 

Justin

Link to comment
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

Link to comment
Share on other sites

Is anyone out there interested in testing the new code I have written to integrate attribute-level inventory tracking with the RMA Returns contribution? I have not received any responses from people regarding my previous request for testers, so I thought I would post another note and see if anyone is willing to lend a hand. The sooner I get some testing feedback, the sooner I can wrap up the code and release the next version of RMA Returns.

 

If you can help with testing, please PM me as soon as you can. It would be nice to release this code to the general public.

 

Thanks!

 

Justin

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Ive got a problem heres the summary:

 

Version: Version 2.4.1

 

Error:

Parse error: parse error in /www/link/shop/account_history_info.php on line 351

 

Line 351:

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

 

Line 129-197:

<?php
 if (sizeof($order->info['tax_groups']) > 1) {
?>
                 <TR>
                   <TD CLASS="main" COLSPAN="2"><B><?php echo HEADING_PRODUCTS; ?></B></TD>
                   <TD CLASS="smallText" ALIGN="right"><B><?php echo HEADING_TAX; ?></B></TD>
                   <TD CLASS="smallText" ALIGN="right"><B><?php echo HEADING_TOTAL; ?></B></TD>
                 </TR>
<?php
 } else {
?>
                 <TR>
                   <TD CLASS="main" COLSPAN="3"><B><?php echo HEADING_PRODUCTS; ?></B></TD>
                 </TR>
<?php
 }

 for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
   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'];

   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> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
     }
   }

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

   if (sizeof($order->info['tax_groups']) > 1) {
// Begin RMA Returns
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 = '<b>' . TEXT_RMA . ' # <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>';
} else {
$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>';
}
// 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 = '';
}
   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'];
   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> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';
     }
   }
echo $return_link;
// JLM: End RMA Returns

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

//Maz

Link to comment
Share on other sites

  • 1 month later...

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!

Link to comment
Share on other sites

  • 2 weeks later...

Hello, i'm french contributor of french creload community, my english is uncool :) but i try to tell you my problem

 

I'have install your contrib to creload, and I have adapted somes files but the code is intact.

 

I have one probleme with returns_track.php, when i enter RMA number, valid or not, i'am ever redirected to loggin page... I dont understand the problem, can you help me to solve ?

 

Before RMA works on my version, I install QTpro and I test your RMA with QTpro :) but first, i have to repair Rma in my osc ;)

 

thanks

Link to comment
Share on other sites

i'm in include/module/returns_track.php

 

i've

         $account_query = tep_db_query("SELECT customers_firstname, customers_lastname, customers_email_address FROM " . TABLE_CUSTOMERS . " where customers_id = '" . $customer_id . "'");
        $account = tep_db_fetch_array($account_query);

        [B]// query the order table, to get all the product details[/B]

 

he billing and shipping adress not appear

 

 

Have you made the line bold ?

 

I try some slutions, but i you have the good solution I prefer :)

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I like to make a manual RMA form where customer feed all the necessary fileds to receive a RMA number. I just not feel to give the RMA form link to customer's account_history_info.php. Of course, customer can see the RMA number (if generated) in account_history_info.php. This form's link can be added in the information box and customer has to log in to fill the form. All other features can be same as it is.

 

I tried (with the idea of create_account.php) but could not make it work as it does not insert anything but giving me a blank page!

 

Just wondering, has anyone made like the same! Or any pointer? Please, suggest me something.

 

-PeeJay

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I have a problem whit this contribution.

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in ***/catalog/includes/functions/database.php:13) in /***/catalog/includes/functions/database.php on line 13

 

  function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
   global $$link;

 

Can anyone help me?

Thanks,

PiCiui

Link to comment
Share on other sites

  • 3 weeks later...

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.

XXXe Shop Product Returns Status

------------------------------------------------------

Return Request Date: Thursday 24 March, 2005

Details:

http://www.XXXe.com/shop/account_history_info.php?order_id=3

 

Your return has been updated to the following status:

 

New status: Awaiting Return

 

Please reply to this email if you have any questions.

 

Comments for your return:

 

Anyone has this problem? How to fix it?

Thanks,

Anita.

Welcome to vist my Site:

Anita.

Link to comment
Share on other sites

Hi Anita. I noticed the same problem myself a few days ago. I will try to fix this as soon as I can, although I can't make any promises. It may take several days or even weeks, but I'll post a note here when it's ready.

Link to comment
Share on other sites

I was wondering if it is at all possible to manually return an item from admin on behalf of a customer...and if so, how would you do that?

Teresa

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...