Jump to content
Golden Boy

RMA Returns error for 2.2 MS2

Recommended Posts

Hello, I have just installed this contribution and everything seems to be working with the exception on this one small issue. After you hit submit after filling out the RMA request form I get this error.

 

Warning: Missing argument 7 for tep_mail() in /home/txcampin/public_html/includes/functions/general.php on line 961

Warning: Missing argument 7 for tep_mail() in /home/txcampin/public_html/includes/functions/general.php on line 961

Warning: Cannot modify header information - headers already sent by (output started at /home/txcampin/public_html/includes/functions/general.php:961) in /home/txcampin/public_html/includes/functions/general.php on line 29

 

But I still receive an email with the RMA number. Any ideas?

 

-Thanks


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites
Hello, I have just installed this contribution and everything seems to be working with the exception on this one small issue. After you hit submit after filling out the RMA request form I get this error.

 

Warning: Missing argument 7 for tep_mail() in /home/txcampin/public_html/includes/functions/general.php on line 961

Warning: Missing argument 7 for tep_mail() in /home/txcampin/public_html/includes/functions/general.php on line 961

Warning: Cannot modify header information - headers already sent by (output started at /home/txcampin/public_html/includes/functions/general.php:961) in /home/txcampin/public_html/includes/functions/general.php on line 29

 

But I still receive an email with the RMA number. Any ideas?

 

-Thanks

 

You misinstalled the part that has to do with includes/functions/general.php or misinstalled another contrib that modified includes/functions/general.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

I have fixed it now I think, thanks though.


Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Share this post


Link to post
Share on other sites

I installed "RMA Returns System" and "Monthly Sales/Tax Report" contributions on my website. But I find there is a problem between them.The problem is:If a customer orders $1,000 of stuff in May, then returns half of it ($500 worth) in June for a refund. And, if we process the return using the RMA system, this will not effect the monthly sales & tax report. It will not deduct the $500 from the May Total or deduct it from the June total. Anyone alos has this problem? How to fix this problem? Many thanks in advance.

Share this post


Link to post
Share on other sites

I hope somebody can help me with the following problem.

 

I removed (left colum and right colum) from the two files "return_product.php and returns_track.php". These two files are located in the root directory of the catalog.

 

I don't want to have the colums and I also don't see them anymore but unfortunatly I only keep getting a small colum (url: http://www.gebruiktelaptop.info/returns_tr...ma=22283605537). I have put all tables on 100% width but unfortunalty that does not help.

Share this post


Link to post
Share on other sites

Hi, I am having a problem. It is taking me to the login page when I submit a request for a return from /store/return_product.php. I have looked through the forums but could not get any of the solutions to work fo r me. Maybe I missed something? I have checked the install a number of times.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites

Look for this or similar:

 

$email_text_admin = EMAIL_TEXT_TICKET_ADMIN;

$email_text_admin .= EMAIL_THANKS_ADMIN . EMAIL_TEXT_ADMIN . EMAIL_CONTACT_ADMIN . EMAIL_WARNING_ADMIN;

tep_mail(STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL , EMAIL_SUBJECT_ADMIN . ' #' . $rma_value, nl2br($email_text), STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL);

 

 

And directly after it try this :

 

// redirect to confirmation // OLD CODE

// tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id));

 

// redirect to confirmation // do not change ... modded this line so as customer will not get kicked out

tep_redirect(tep_href_link(FILENAME_RETURN, 'action=sent&rma_value=' . $rma_value . '&return_id=' . $ticket_id));

Share this post


Link to post
Share on other sites

Hello:

 

I have noticed several previous posts with the same problem that has gone unanswered. Does anyone have a fix for this problem.

 

My retrun_product.php page loads fine except for the billing and delivery addresses have this error:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

I looked over the code in general.php and don't see the error.

 

Thanks,

R

Share this post


Link to post
Share on other sites

More: I am confused as to the layout of the return_product page as well. I get the following below, there is a table surrounding "Product to Return", but no input box, the next box has "Product Name" and a box 5px in size (I am guessing this is for the quantity #) Then the price is at $0.00 and never updates (is it suppose to?) I copied the file direct from the download. Also I have the issue with the Billing and Delivery addresses as mentioned above....any help would be lifesaving.

 

Rod

 

 

 

Please complete the form below to request an RMA number

 

Product to Return

Product Name

$0.00

 

 

 

 

Billing Address

 

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

 

 

 

Delivery Address

 

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

Share this post


Link to post
Share on other sites

returns_track.php, when some one visits that page and enters the RMA Number, all they get is a redirect to the same page with an error in the URL

 

returns_track.php/error/yes?osCsid=bdcd3f182ffbd9aae235add172c51d73

 

the RMA Number is exsistanct, i tested it out my self... is this function working right? or did i miss something in the installation?

Share this post


Link to post
Share on other sites

All version of this contrib are full of coding errors. Here is my return product.php code so that you can try it or compare. It has been modified a bit and you may have to take out a few things ... but it works.

 

<?php

/*

$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

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order($_GET['order_id']); // disabled for check below

 

/* // Does Not Work

// BEGIN check if order ID belongs to current customer and return product matches! might have a hack

$order_and_customer_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op where o.orders_id = op.orders_id and o.orders_id = '" . (int)$_GET['order_id'] . " ' and op.products_id = '" . (int)$_GET['products_id'] . "' and o.customers_id = '" . (int)$customer_id . "'");

 

if (tep_db_num_rows($order_and_customer_query) > 0)

$order = new order($_GET['order_id']);

else {

tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, '', 'SSL'));

 

$order = '';

}

// END check

*/

 

// added to get customer id for show invoice number

//$customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($_GET['order_id'])) . "'");

//$customer_number = tep_db_fetch_array($customer_number_query);

 

// check to find out what the default reason for returning a product is

$default_priority_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RETURN_REASON'");

$default_priority = tep_db_fetch_array($default_priority_query);

$default_refund_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_REFUND_METHOD'");

$default_refund = tep_db_fetch_array($default_refund_query);

 

if (!$_GET['action']) {

$_GET['action'] = 'new';

}

 

if ($_GET['action']) {

switch ($_GET['action']) {

case 'sent':

 

break;

case 'insert':

case 'update':

// carry out a query on all the existing orders tables, to get the required information

$rma_create = tep_create_rma_value(11);

$returns_status_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RETURN_STATUS_ID'");

$default_return = tep_db_fetch_array($returns_status_query);

$order_returns_query = tep_db_query("select * from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op where o.orders_id = op.orders_id and o.orders_id = '" . (int)$_GET['oID'] . " ' and op.products_id = '" . (int)$_GET['products_id'] . "'");

$orders_return = tep_db_fetch_array($order_returns_query);

 

if ($_POST['returns_quantity'] > $orders_return['products_quantity']) {

tep_redirect(tep_href_link(FILENAME_RETURN, 'error=yes&order_id=' . (int)$_GET['oID'] . '&products_id=' . (int)$_GET['products_id']));

}

 

// Added to give an error message if the customer trys to return 0 products or less or more than original order quantitiy

if ($_POST['returns_quantity'] <= 0) {

tep_redirect(tep_href_link(FILENAME_RETURN, 'error=yes&order_id=' . (int)$_GET['oID'] . '&products_id=' . (int)$_GET['products_id']));

}

 

$customers_id = $orders_return['customers_id'];

$rma_value = tep_db_prepare_input($rma_create);

$order_id = $_GET['oID'];

$customers_name = $orders_return['customers_name'];

$customers_acct = $orders_return['customers_acct'];

$customers_company = $orders_return['customers_company'];

$customers_street_address = $orders_return['customers_street_address'];

$customers_street_address2 = $orders_return['customers_street_address2']; // Ryan Hobbs Address Enhancer

$customers_suburb = $orders_return['customers_suburb'];

$customers_city = $orders_return['customers_city'];

$customers_postcode = $orders_return['customers_postcode'];

$customers_state = $orders_return['customers_state'];

$customers_country = $orders_return['customers_country'];

$customers_telephone = $orders_return['customers_telephone'];

$customers_fax = $orders_return['customers_fax'];

$customers_email = $_POST['support_user_email'];

$customers_address_format_id = $orders_return['customers_address_format_id'];

$delivery_name = $orders_return['delivery_name'];

$delivery_company = $orders_return['delivery_company'];

$delivery_street_address = $orders_return['delivery_street_address'];

$delivery_street_address2 = $orders_return['delivery_street_address2']; // Ryan Hobbs Address Enhancer

$delivery_suburb = $orders_return['delivery_suburb'];

$delivery_city = $orders_return['delivery_city'];

$delivery_postcode = $orders_return['delivery_postcode'];

$delivery_state = $orders_return['delivery_state'];

$delivery_country = $orders_return['delivery_country'];

$delivery_telephone = $orders_return['delivery_telephone']; // Ryan Hobbs Address Enhancer

$delivery_address_format_id = $orders_return['delivery_address_format_id'];

$billing_name = $orders_return['billing_name'];

$billing_acct = $orders_return['billing_acct'];

$billing_company = $orders_return['billing_company'];

$billing_street_address = $orders_return['billing_street_address'];

$billing_street_address2 = $orders_return['billing_street_address2']; // Ryan Hobbs Address Enhancer

$billing_suburb = $orders_return['billing_suburb'];

$billing_city = $orders_return['billing_city'];

$billing_postcode = $orders_return['billing_postcode'];

$billing_state = $orders_return['billing_state'];

$billing_country = $orders_return['billing_country'];

$dilling_telephone = $orders_return['billing_telephone']; // Ryan Hobbs Address Enhancer

$billing_address_format_id = $orders_return['billing_address_format_id'];

$comments = tep_db_prepare_input($_POST['support_text']);

$returns_status = $default_return['configuration_value'];

$returns_reason = tep_db_prepare_input($_POST['support_priority']);

$products_model = $orders_return['products_model'];

$products_name = $orders_return['products_name'];

$products_price = $orders_return['products_price'];

$products_tax = $orders_return['products_tax'];

$discount_made = $orders_return['products_discount_made'];

 

// work out price with tax

$price_inc_tax = $products_price + tep_calculate_tax($products_price, $products_tax);

$price_inc_quantity = $price_inc_tax * $_POST['returns_quantity'];

$final_price = $price_inc_quantity;

$products_quantity = $_POST['returns_quantity']; // $orders_return['products_quantity'];

$serial_number = $orders_return['products_serial_number'];

$currency = $orders_return['currency'];

$currency_value = $orders_return['currency_value'];

$refund_method = $_POST['refund_method'];

 

// error checking goes in here

// not present at moment

$support_error = false;

 

// None currently Email, name and qty are checked above

if (!$support_error) {

$sql_data_array = array('customers_id' => $customers_id,

'rma_value' => $rma_value,

'order_id' => $order_id,

'customers_name' => $customers_name,

'customers_acct' => $customers_acct,

'customers_company' => $customers_company,

'customers_street_address' => $customers_street_address,

'customers_street_address2' => $customers_street_address2, // Address Book Enhancer

'customers_suburb' => $customers_suburb,

'customers_city' => $customers_city,

'customers_postcode' => $customers_postcode,

'customers_state' => $customers_state,

'customers_country' => $customers_country,

'customers_telephone' => $customers_telephone,

'customers_fax' => $customers_fax,

'customers_email_address' => $customers_email,

'customers_address_format_id' => $customers_address_format_id,

'delivery_name' => $delivery_name,

'delivery_company' => $delivery_company,

'delivery_street_address' => $delivery_street_address,

'delivery_street_address2' => $delivery_street_address2, // Address Book Enhancer

'delivery_suburb' => $delivery_suburb,

'delivery_city' => $delivery_city,

'delivery_postcode' => $delivery_postcode,

'delivery_state' => $delivery_state,

'delivery_country' => $delivery_country,

'delivery_telephone' => $delivery_telephone, // Address Book Enhancer

'delivery_address_format_id' => $delivery_address_format_id,

'billing_name' => $billing_name,

'billing_acct' => $billing_acct,

'billing_company' => $billing_company,

'billing_street_address' => $billing_street_address,

'billing_street_address2' => $billing_street_address2, // Address Book Enhancer

'billing_suburb' => $billing_suburb,

'billing_city' => $billing_city,

'billing_postcode' => $billing_postcode,

'billing_state' => $billing_state,

'billing_country' => $billing_country,

'billing_telephone' => $billing_telephone, // Address Book Enhancer

'billing_address_format_id' => $billing_address_format_id,

'comments' => $comments,

'returns_status' => $returns_status,

'returns_reason' => $returns_reason,

'currency' => $currency,

'currency_value' => $currency_value,);

 

if ($_GET['action'] == 'insert') {

$insert_sql_data = array('date_submitted' => 'now()',);

 

// returns information table updated,

tep_db_perform(TABLE_RETURNS, $sql_data_array);

$ticket_id = tep_db_insert_id();

 

// tep_db_query("insert into " . TABLE_RETURN_PAYMENTS . " values ('', '" . $ticket_id . "', '', '', '', '', '0.00')");

 

tep_db_perform(TABLE_RETURNS, $insert_sql_data, 'update', "returns_id = '" . $ticket_id . "'");

 

// now update returns products, and history tables

$data_insert_sql = array('returns_id' => $ticket_id,

'order_id' => $order_id,

'products_id' => $_GET['products_id'],

'products_model' =>$products_model,

'products_name' => $products_name,

'products_price' => $products_price,

'products_discount_made' => $discount_made,

'final_price' => $final_price,

'products_tax' => $products_tax,

'products_quantity' => $products_quantity,

'products_serial_number' => $serial_number,);

 

$returns_payment_sql = array('returns_id' => $ticket_id,

'refund_payment_name' => $refund_method,

'refund_payment_value' => $final_price,);

 

tep_db_perform(TABLE_RETURN_PAYMENTS, $returns_payment_sql);

tep_db_perform(TABLE_RETURNS_PRODUCTS_DATA, $data_insert_sql);

tep_db_query("update " . TABLE_ORDERS_PRODUCTS . " set products_returned = 1 where orders_id = '" . (int)$_GET['oID'] . "' and products_id = '" . (int)$_GET['products_id'] . "'");

}

 

// now send email to customer

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN_EMAILS);

 

$email_text = EMAIL_TEXT_TICKET_OPEN;

$email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;

tep_mail($support_user_name, $support_user_email, EMAIL_SUBJECT_OPEN . ' #' . $rma_value, nl2br($email_text), STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL);

 

// send email to alternate address

if (strlen($support_alternate_email) > 0) {

$email_text = EMAIL_TEXT_TICKET_OPEN;

$email_text .= EMAIL_THANKS_OPEN . EMAIL_TEXT_OPEN . EMAIL_CONTACT_OPEN . EMAIL_WARNING_OPEN;

tep_mail($support_user_name, $support_alternate_email, EMAIL_SUBJECT_OPEN . ' #' . $rma_value, nl2br($email_text), STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL);

}

 

// now send an email to the default administrator to let them know of new ticket

// $default_admin_email = tep_db_query("SELECT admin_id FROM " . TABLE_SUPPORT_TICKETS . " where ticket_id = '" . $_GET['ticket_id'] . "' and customers_id = '" . $customer_id . "'");

// $default_email = tep_db_fetch_array($default_admin_email);

// $admin_email_query = tep_db_query("SELECT support_assign_email, support_assign_name FROM " . TABLE_SUPPORT_ASSIGN . " where support_assign_id = '" . $default_email['admin_id'] . "' and language_id = '" . $languages_id . "'");

// $admin_email = tep_db_fetch_array($admin_email_query);

$email_text_admin = EMAIL_TEXT_TICKET_ADMIN;

$email_text_admin .= EMAIL_THANKS_ADMIN . EMAIL_TEXT_ADMIN . EMAIL_CONTACT_ADMIN . EMAIL_WARNING_ADMIN;

tep_mail(STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL , EMAIL_SUBJECT_ADMIN . ' #' . $rma_value, nl2br($email_text), STORE_EMAIL_HEADER, STORE_RMA_DEPT_EMAIL);

 

// redirect to confirmation // do not change ... modded this line so as customer will not get kicked out

tep_redirect(tep_href_link(FILENAME_RETURN, 'action=sent&rma_value=' . $rma_value . '&return_id=' . $ticket_id));

 

} else {

$_GET['action'] = 'new';

}

break;

case 'default':

tep_redirect(tep_href_link(FILENAME_DEFAULT));

break;

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);

$breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_ORDERS_PRINTABLE, 'order_id=' . (int)$_GET['order_id'], 'SSL') . '\')">' . (int)$order_id . '</a>'; ?></small></td>

 

<td class="main" align="right"><?php echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_RETURNS) . '\')">' . TEXT_RETURNS_HELP_LINK . '</a>'; ?> <img src="images/icons/button_more_info.gif" alt="Returns Information" valign="bottom"></td>

</tr>

 

</table></td>

</tr>

 

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

 

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

 

<tr>

<td class="smallText"><b><?php echo TEXT_SUPPORT_PRODUCT_RETURN; ?></b><br></td>

</tr>

 

<?php

if (sizeof($order->info['tax_groups']) > 1) {

?>

 

<?php

} else {

?>

 

<?php

}

 

echo ' <tr>' . "\n" .

' <td class="main" valign="top">' . $returned_products['products_name'];

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

?>

</table></td>

<td width="45%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

 

<tr>

<td class="smallText" colspan="1"><b><?php echo HEADING_QUANTITY; ?></b></td>

<td class="smallText" align="left"> <b><?php echo HEADING_PRODUCTS; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>

</tr>

 

<?php

if (sizeof($order->info['tax_groups']) > 1) {

?>

 

<?php

} else {

?>

 

<?php

}

// $ordered_product_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " where order_id = '" . $_GET

 

echo ' <tr>' . "\n" .

' <td class="main" align="right" valign="top" width="30">' . tep_draw_input_field('returns_quantity', $returned_products['products_quantity'], 'size=5') . '  x</td>' . "\n" .

' <td class="main" valign="top"> ' . $returned_products['products_model'];

 

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

echo ' <td class="main" align="right" valign="top">' . $currencies->format(($returned_products['products_price'] + (tep_calculate_tax(($returned_products['products_price']), ($returned_products['products_tax'])))) * ($returned_products['products_quantity'])) . '</td>' . "\n" .

' </tr>' . "\n";

 

?>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

 

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '15'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_SUPPORT_BILLING_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

echo ' <tr>' . "\n" .

' <td class="main" align="left" width="5%"> </td>' . "\n" .

' <td class="main" align="left" width=95%>' . tep_address_format($order->billing['format_id'], $order->billing, true, '', '<br>') . '</td>' . "\n" .

' </tr>' . "\n";

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_SUPPORT_DELIVERY_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

echo ' <tr>' . "\n" .

' <td class="main" align="left" width="5%"> </td>' . "\n" .

' <td class="main" align="left" width=95%>' . tep_address_format($order->delivery['format_id'], $order->delivery, true, '', '<br>') . '</td>' . "\n" .

' </tr>' . "\n";

?>

</table></td>

</tr>

</table></td>

</tr>

 

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_SUPPORT_USER_EMAIL; ?></b></td>

</tr>

 

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

echo ' <tr>' . "\n" .

' <td class="main" align="left" width="5%"> </td>' . "\n" .

' <td class="main" align="left" width=95%>' . $account['customers_email_address'] . tep_draw_hidden_field('support_user_email', $account['customers_email_address']) . '</td>' . "\n" .

' </tr>' . "\n";

 

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_WHY_RETURN; ?></b></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" width="5%"> </td>

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

<?php

$priority_query = tep_db_query("select return_reason_id, return_reason_name from ". TABLE_RETURN_REASONS . " where language_id = '" . (int)$languages_id . "' order by return_reason_id desc");

$select_box = '<select name="support_priority" size="' . MAX_MANUFACTURERS_LIST . '">';

if (MAX_MANUFACTURERS_LIST < 2) {

}

while ($priority_values = tep_db_fetch_array($priority_query)) {

$select_box .= '<option value="' . $priority_values['return_reason_id'] . '"';

if ($default_priority['configuration_value'] == $priority_values['return_reason_id']) $select_box .= ' SELECTED';

$select_box .= '>' . substr($priority_values['return_reason_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '</option>';

}

$select_box .= "</select>";

$select_box .= tep_hide_session_id();

echo $select_box;

?>

<br><br>

<?php

 

$charge_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RESTOCK_VALUE'");

$charge = tep_db_fetch_array($charge_query);

// Do not show re-stocking info if it's set to zero in Admin > Configuration > Stock

if ($charge['configuration_value'] != 0) {

echo TEXT_SUPPORT_SURCHARGE . '<font color="FF0000">' . $charge['configuration_value'] . '%</font>' . ' ' . TEXT_SUPPORT_SURCHARGE_TWO;

}

echo TEXT_DO_NOT_RETURN;

?>

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_PREF_REFUND_METHOD; ?></b></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" width="5%"> </td>

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

<?php

$refund_query = tep_db_query("select refund_method_id, refund_method_name from ". TABLE_REFUND_METHOD . " where language_id = '" . (int)$languages_id . "' order by refund_method_id asc");

$select_box = '<select name="refund_method" size="' . MAX_MANUFACTURERS_LIST . '">';

if (MAX_MANUFACTURERS_LIST < 2) {

}

while ($refund_values = tep_db_fetch_array($refund_query)) {

$select_box .= '<option value="' . $refund_values['refund_method_name'] . '"';

if ($default_refund['configuration_value'] == $refund_values['refund_method_id']) $select_box .= ' SELECTED';

$select_box .= '>' . substr($refund_values['refund_method_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '</option>';

}

$select_box .= "</select>";

$select_box .= tep_hide_session_id();

echo $select_box;

?>

 

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="40%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo TEXT_SUPPORT_TEXT; ?></b></td>

</tr>

<tr>

<td class="main"> </td>

</tr>

</table></td>

<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

echo ' <tr>' . "\n" .

' <td class="main" align="left" width="5%"> </td>' . "\n" .

' <td class="main" align="left" width=95%>' . tep_draw_textarea_field('support_text', 'soft', '40', '7') . '</td>' . "\n" .

' </tr>' . "\n";

 

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

 

</table></td>

</tr>

 

<tr>

<td><table border="0" width="99%" align="center" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table background="images/backgrounds/fineline.gif" border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

 

<!--<td align="left"> <?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, tep_get_all_get_params(array('order_id')), 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>-->

<td class="main" align="left">  <a href="java script:history.back(-1);"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<!--<td align="right"><input type="image" src="includes/languages/english/images/buttons/button_submit" value=<? echo TEXT_REQUEST_RMA; ?>></td>-->

<td align="right"><?php echo tep_image_submit('button_submit.gif', TEXT_REQUEST_RMA, 'NONSSL'); ?></td>

 

 

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

 

</table></td>

</tr>

</table></td>

</form></tr>

<?php

}

?>

</td>

</tr>

</table></td>

</tr>

 

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

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

<!-- footer_eof //-->

<br>

</body>

</html>

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

Share this post


Link to post
Share on other sites

Mike1985 ... here is my returns_track.php so that you may try it. It has been modified but should work. You will need to change and add language definitions as I have altered wording / messages etc.

 

 

<?php

/*

$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

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

if (!$_GET['action']) {

$_GET['action'] = 'returns_track';

}

 

if ($_GET['action']) {

switch ($_GET['action']) {

case 'returns_show':

 

// first carry out a query on the database to see if there are any matching tickets

$database_returns_query = tep_db_query("select customers_id, order_id, returns_id, rma_value, returns_status from " . TABLE_RETURNS . " where customers_id = '" . (int)$customer_id . "' and rma_value = '" . $_POST['rma'] . "' or rma_value = '" . $_GET['rma'] . "'");

 

if (!tep_db_num_rows($database_returns_query)) {

tep_redirect(tep_href_link(FILENAME_RETURNS_TRACK, 'error=yes'));

} else {

$returns_query = tep_db_fetch_array($database_returns_query);

$returns_id = $returns_query['returns_id'];

$returns_status_id = $returns_query['returns_status'];

$returns_status_query = tep_db_query("select returns_status_name from " . TABLE_RETURNS_STATUS . " where returns_status_id = " . $returns_status_id . " and language_id = '" . (int)$languages_id . "'");

$returns_status_array = tep_db_fetch_array($returns_status_query);

$returns_status = $returns_status_array['returns_status_name'];

$returned_products_query = tep_db_query("select * from " . TABLE_RETURNS_PRODUCTS_DATA . " op, " . TABLE_RETURNS . " o where o.returns_id = op.returns_id and op.returns_id = '" . (int)$returns_id . "'");

$returned_products = tep_db_fetch_array($returned_products_query);

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order($returned_products['order_id']);

}

break;

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURNS_TRACK);

 

$breadcrumb->add(NAvb script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_RETURNS) . '\')">' . TEXT_RETURNS_HELP_LINK . '</a>'; ?> <img src="images/icons/button_more_info.gif" alt="Returns Information" valign="bottom"></td>

</tr>

</table></td>

</tr>

 

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<tr>

<td align="left" class="main">    <?php echo TEXT_YOUR_RMA_NUMBER; ?> 

<input type="text" name="rma" value="" size="15">  <?php echo tep_image_submit('button_track.gif', IMAGE_BUTTON_TRACK_RMA); ?></td>

</tr>

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

</table></td>

</tr>

</table></td>

</tr>

 

<tr>

<td align="left" class="main">

</td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

 

<?php

}

?>

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

<tr>

<td><table border="0" align="center" width="98%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table background="images/backgrounds/fineline.gif" border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

 

<!--<?php

if ($navigation->path[sizeof($navigation->path)-2]) {

?>

<td class="main" align="right">  <?php echo '<a href="' . tep_href_link($navigation->path[sizeof($navigation->path)-2]['page'], tep_array_to_string($navigation->path[sizeof($navigation->path)-2]['get'], array('action')), $navigation->path[sizeof($navigation->path)-2]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<?php

}

?>-->

<td class="main" align="right">    <a href="java script:history.back(-1);"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<!--<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>-->

 

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></form></td>

 

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

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

<!-- footer_eof //-->

<br>

</body>

</html>

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

Share this post


Link to post
Share on other sites

I get the following error after processing the RMA:

 

1136 - Column count doesn't match value count at row 1

 

INSERT into refund_payments values ('', '', '', '', '', '', '')

 

[TEP STOP]

 

The following is in my browser:

 

.../catalog/return_product.php?action=sent&rma_value=91467459805&return_id=4

 

Thanks. RMA number is generated and visible on the admin side and emailsa re sent to the customer with correct info.

 

Thanks

R

Share this post


Link to post
Share on other sites

I followed all instructions for a new install, since I never installed this mod before.

I do not have the CCGV mod installed either.

 

First, I cannot create the RMA return from the account_history_info.php form.

I click on the link and I get a blank page. I also noticed that the product_id is missing from the line.

If you add the correct product_id and refresh the browser, it still displays a blank page.

 

Second.

I can return an item throught the Admin panel, but no RMA number shows up in account_history_info.

It just Says "RMA #"

 

Any help would be appreciated.

 

Thanks.

 

Jamie.

Share this post


Link to post
Share on other sites

Hi all..

 

 

I get this error when trying to create RMA.

 

Fatal error: Call to undefined function: tep_create_rma_value() in /home/rezolles/public_html/admin/return_product.php on line 35

 

What should i do?

Share this post


Link to post
Share on other sites

Fatal error: Call to undefined function: tep_get_return_reason_name() in /home/craftyli/public_html/craftstore/admin/returns_reasons.php on line 223

 

Fatal error: Call to undefined function: tep_get_refund_method_name() in /home/craftyli/public_html/craftstore/admin/refund_methods.php on line 223

 

Fatal error: Call to undefined function: tep_get_returns_status_name() in /home/craftyli/public_html/craftstore/admin/returns_status.php on line 224

 

I'm getting these errors can anyone help me out?

Share this post


Link to post
Share on other sites

Hi,

 

I have a problem with RMA in the multilingual store. When RMA is created, it reflects in admin/Customer Returns three times for each language. It's enough to list it just once on the language it was created. Is there any solution to this?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

After spending some time trying to modify the code to work in multilingual store, I finally found the golden mean by just modifying the $orders_query_raw in the following manner:

$orders_query_raw = "select o.returns_id, o.returns_status, o.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, rs.returns_status_name from " . TABLE_RETURNS . " o left join " . TABLE_RETURNS_PRODUCTS_DATA . " op on (o.returns_id = op.returns_id), " . TABLE_RETURN_REASONS . " s, " . TABLE_RETURNS_STATUS . " rs where s.language_id = rs.language_id and o.returns_reason = s.return_reason_id and s.language_id = '" . (int)$languages_id . "' and o.returns_status = rs.returns_status_id order by o.returns_id DESC";

} elseif ($HTTP_GET_VARS['status']) {

$status = tep_db_prepare_input($HTTP_GET_VARS['status']);

$orders_query_raw = "select o.returns_id, o.returns_status, o.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, rs.returns_status_name from " . TABLE_RETURNS . " o left join " . TABLE_RETURNS_PRODUCTS_DATA . " op on (o.returns_id = op.returns_id), " . TABLE_RETURN_REASONS . " s, " . TABLE_RETURNS_STATUS . " rs where s.language_id = rs.language_id and o.returns_reason = s.return_reason_id and s.language_id = '" . (int)$languages_id . "' and o.returns_status = '" . $status . "' and o.returns_status = rs.returns_status_id order by o.returns_id DESC";

} else {

$orders_query_raw = "select o.returns_id, o.returns_status, o.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, rs.returns_status_name from " . TABLE_RETURNS . " o left join " . TABLE_RETURNS_PRODUCTS_DATA . " op on (o.returns_id = op.returns_id), " . TABLE_RETURN_REASONS . " s, " . TABLE_RETURNS_STATUS . " rs where s.language_id = rs.language_id and o.returns_status = rs.returns_status_id and o.returns_reason = s.return_reason_id and s.language_id = '" . (int)$languages_id . "' order by o.returns_id DESC";

Wow, another problem is sorted out.

Share this post


Link to post
Share on other sites
Hello:

 

I have noticed several previous posts with the same problem that has gone unanswered. Does anyone have a fix for this problem.

 

My retrun_product.php page loads fine except for the billing and delivery addresses have this error:

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/functions/general.php on line 42

 

I looked over the code in general.php and don't see the error.

 

Thanks,

R

 

I am having the same problem. is there a cure for this yet.


REMEMBER BACKUP, BACKUP AND BACKUP

Share this post


Link to post
Share on other sites

This contr. doesn't work on my Update 060817 (sql problem and other bugs) does somebody have the same problem or a solution?

Share this post


Link to post
Share on other sites
This contr. doesn't work on my Update 060817 (sql problem and other bugs) does somebody have the same problem or a solution?

 

Hello,

 

Yes, Ive updated my site to 060817 every time I try and import the sql I get this lovely message:

 

 

Error

SQL query:

 

ALTER TABLE orders_products ADD products_returned tinyint( 2 ) unsigned default '0';

 

 

 

MySQL said: b_help.png

 

#1060 - Duplicate column name 'products_returned' :blink:

 

Any ideas as to why?

 

Thanks

Share this post


Link to post
Share on other sites

Hello,

 

Could someone please explain why this is happening and how to fix it.

 

Im on PHP Version 5.1.6 and have done the 060817 update, if that may help with my problem.

 

Thanks

 

:)

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

×