Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RMA Returns error for 2.2 MS2


Guest

Recommended Posts

Help!

After countless hrs of work done on this contribution... I've finally been able to modify most if not all of the RMA admin/catalog files to display attributes and final_prices with tax and/or discounts in the RMA system. I will post all the changes and modified files up as soon as I can. Hope it helps those in need... I haven't had sufficient time for bug checks but I'm sure someone will help revise my work.

 

C U Soon...

 

 

~Hit ManJuice~

 

Rick Rossin' It!!! PHP Style!!

 

Hi,

 

Hoping you can post up for us an updated contrib based on what you have learned. How is that coming?

 

Regards,

 

David

Edited by davlun
Link to comment
Share on other sites

  • 2 months later...

After having used this contrib since 2004, I just wanted to post a few comments/requests (sorry to say I didn't read all 27 pages of this thread to see if they have been said already). Also apologize if some of these features have been implemented as I am not using the latest release:

 

  1. Pretty please implement a way to handle multiple returns of the same product, it would make life great!
  2. Make it possible to return an entire order, or select multiple products from the same order to be on the same RMA instead of requiring the customer to initiate separate RMAs for each product.
  3. If the customer updates their shipping/billing address they cannot select these when requesting a RMA. Therefore when I send the return I may be sending it to the incorrect address. Currently I confirm with the customer but many times they are angry and post in the comments that there should be a way to change this.
  4. When I look at the RMA in the admin panel I can see what order the product came from, however when I search the orders log I cannot see if an RMA has been requested/completed. Would be nice to see if a RMA has been made for a particular order in the 'Orders' (orders.php) screen.
  5. Would be nice to re-open an RMA to add comments or change things if an accidental click has been made before the correct info has been input, or if something changes in the future. I can do this now if I go into the MySQL and do it manually but it is time consuming sometimes. Also if another user who is not as good with (read: can't use) MySQL wants to reopen a closed RMA they cannot do it.

 

Thank you for a great contribution, hope it can become even better!

Link to comment
Share on other sites

  • 4 weeks later...

"If anyone knows why Refund Method: will not change when updating it in the admin of RMA Returns please let me know, it's driving me nuts I have installed the contrib 3 times freshly and I have read this WHOLE! thread and only see one mention with NO answer "

 

It's a bug, it's not just you. I will attempt to fix it today, because it's bothering me too. If I can find a fix I will post it otherwise assume I was unable to fix it.

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

Link to comment
Share on other sites

The 2.5H Repackaged seemed to miss password_forgotten.php for admin side. Am I supposed to copy the one from catalog or what? :)

 

LOL password forgotten was not missed it was never supposed to be there, the original contrib had a lot of junk and unused files like that so I removed some of them!

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

Link to comment
Share on other sites

After having used this contrib since 2004, I just wanted to post a few comments/requests (sorry to say I didn't read all 27 pages of this thread to see if they have been said already). Also apologize if some of these features have been implemented as I am not using the latest release:

 

  1. Pretty please implement a way to handle multiple returns of the same product, it would make life great!
  2. Make it possible to return an entire order, or select multiple products from the same order to be on the same RMA instead of requiring the customer to initiate separate RMAs for each product.
  3. If the customer updates their shipping/billing address they cannot select these when requesting a RMA. Therefore when I send the return I may be sending it to the incorrect address. Currently I confirm with the customer but many times they are angry and post in the comments that there should be a way to change this.
  4. When I look at the RMA in the admin panel I can see what order the product came from, however when I search the orders log I cannot see if an RMA has been requested/completed. Would be nice to see if a RMA has been made for a particular order in the 'Orders' (orders.php) screen.
  5. Would be nice to re-open an RMA to add comments or change things if an accidental click has been made before the correct info has been input, or if something changes in the future. I can do this now if I go into the MySQL and do it manually but it is time consuming sometimes. Also if another user who is not as good with (read: can't use) MySQL wants to reopen a closed RMA they cannot do it.

 

Thank you for a great contribution, hope it can become even better!

 

Agreed... Unfortunately everyone has feature requests and suggestions but no one has updated the contrib except me in a couple of years.... Time someone else steps up and starts helping too!

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

Link to comment
Share on other sites

v2.6

 

Basically just some fixes but the Security fix is big, I recommend everyone upgrades.

 

- SQL bug fix as posted in forum

- Fixed major Security hole in return_product.php using a modification of the code posted by Demoalt to account for oID as well.

- Fixed the incorrect "bug fix" by tocpcs back to the original format.

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

Link to comment
Share on other sites

"If anyone knows why Refund Method: will not change when updating it in the admin of RMA Returns please let me know, it's driving me nuts I have installed the contrib 3 times freshly and I have read this WHOLE! thread and only see one mention with NO answer "

 

It's a bug, it's not just you. I will attempt to fix it today, because it's bothering me too. If I can find a fix I will post it otherwise assume I was unable to fix it.

 

Mis-read your statement that should not be happing, you are missing a piece of code, download the newest version and try it.

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

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

This is what i was looking for! Full RMA Application!

 

But, i got a problem, dont know if it chould look like this:

 

2xtext.JPG

 

Anyway i can make the product name once? Anyone?

 

Working on a Norwegian translation to :)

Link to comment
Share on other sites

Hello,

 

This is what i was looking for! Full RMA Application!

 

But, i got a problem, dont know if it chould look like this:

 

2xtext.JPG

 

Anyway i can make the product name once? Anyone?

 

Working on a Norwegian translation to :)

 

 

Looks like you have some sort of multiple product contrib you're using and uses the same sku to create multiple variations of the product... This contrib is not designed for that sort of contrib as your contribution that is causing the problem uses non-standard formating of the product ids so you will need to consult that discussion group for the other contrib for help on how to modify your install to make it compatible, it's likely a known issue with that other contribution you are using....

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

Link to comment
Share on other sites

  • 4 weeks later...

i got a problem....

when someone logs in...and then hit "Show all orders" or "View the orders I have made". and click on a order thats what they the system returns a error saying

 

Parse error: syntax error, unexpected $end in /homepages/16/d240832293/htdocs/osc/account_history_info.php on line 296

 

what should i do?!?!?!

 

thank you for your help!!!

Edited by pouyak
Link to comment
Share on other sites

i got a problem....

when someone logs in...and then hit "Show all orders" or "View the orders I have made". and click on a order thats what they the system returns a error saying

 

Parse error: syntax error, unexpected $end in /homepages/16/d240832293/htdocs/osc/account_history_info.php on line 296

 

what should i do?!?!?!

 

thank you for your help!!!

 

Go back through your code, you missed or mistyped something. Alternatively revert to your backup and reinstall the contrib.

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

Link to comment
Share on other sites

ok i got it work..but now here is two things...

 

it shows the product name TWICE

 

"1 x Farvahar

1 x Farvahar

[Need to return this product?] $28.80"

 

and then

 

in payment section...there is no gift certificate....do i need to install CCGV?? cause i thought it was included with it!

Link to comment
Share on other sites

ok i got it work..but now here is two things...

 

it shows the product name TWICE

 

"1 x Farvahar

1 x Farvahar

[Need to return this product?] $28.80"

 

and then

 

in payment section...there is no gift certificate....do i need to install CCGV?? cause i thought it was included with it!

 

Yes you will need to install CCGV if you want to use gift certificates. Dunno about your double product thing, maybe you installed that part of the code twice or maybe the product has attributes?

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

Link to comment
Share on other sites

Yes you will need to install CCGV if you want to use gift certificates. Dunno about your double product thing, maybe you installed that part of the code twice or maybe the product has attributes?

 

 

 

homewetbar

do you have the most updated version of CCGV? my os commerce story is fully customized, so i need the custom installation instruction as well.

 

 

also the tracking system and the return form is being displayed on the right side of the pages, do you know how i can get it to come to center part of the page??

Link to comment
Share on other sites

can someone tell me why my RMA return page is showing my RMA form on right side? i did put this "<table border="0" class="col_center">" in the body text. but no luck...

 

<?php
/*
 $id author Puddled Internet - http://www.puddled.co.uk
 email [email protected]
  osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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');
 //check if order ID belongs to current customer!
 $order_and_customer_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS . " where  customers_id = '".$customer_id."' and orders_id = '".$HTTP_GET_VARS['order_id']."' OR orders_id = '".$HTTP_GET_VARS['oID']."'");
  if (tep_db_num_rows($order_and_customer_query)==0) {
	tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
  }
  //eof check
 $order = new order($HTTP_GET_VARS['order_id']);
// check to find out what thedefault 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 (!$HTTP_GET_VARS['action']){
  $HTTP_GET_VARS['action'] = 'new';
 }

 if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
  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 = '" . $HTTP_GET_VARS['oID'] . " ' and op.products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
	 $orders_return = tep_db_fetch_array($order_returns_query);

	 if ($HTTP_POST_VARS['returns_quantity'] > $orders_return['products_quantity']) {
		 tep_redirect(tep_href_link(FILENAME_RETURN, 'error=yes&order_id=' . $HTTP_GET_VARS['oID'] . '&products_id=' . $HTTP_GET_VARS['products_id']));
	 }

	 $customers_id = $orders_return['customers_id'];
	 $rma_value = tep_db_prepare_input($rma_create);
	 $order_id = $HTTP_GET_VARS['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_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 = $HTTP_POST_VARS['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_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_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_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'];
	 $billing_address_format_id = $orders_return['billing_address_format_id'];
	 $comments = tep_db_prepare_input($HTTP_POST_VARS['support_text']);
	 $returns_status =  $default_return['configuration_value'];
	 $returns_reason = tep_db_prepare_input($HTTP_POST_VARS['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 * $HTTP_POST_VARS['returns_quantity'];
	 $final_price =  $price_inc_quantity;
	 $products_quantity = $HTTP_POST_VARS['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 = $HTTP_POST_VARS['refund_method'];
	 $support_error = false;
// error checking goes in here
// not present at moment
  $support_error = false;

  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_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_suburb' => $delivery_suburb,
							  'delivery_city' => $delivery_city,
							  'delivery_postcode' => $delivery_postcode,
							  'delivery_state' => $delivery_state,
							  'delivery_country' => $delivery_country,
							  '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_suburb' => $billing_suburb,
							  'billing_city' => $billing_city,
							  'billing_postcode' => $billing_postcode,
							  'billing_state' => $billing_state,
							  'billing_country' => $billing_country,
							  '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 ($HTTP_GET_VARS['action'] == 'insert') {
		$insert_sql_data = array('date_purchased' => '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' => $HTTP_GET_VARS['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 = '" . $HTTP_GET_VARS['oID'] . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");

	  }

	  // Add returns status to returns status history table added 12-22-05
	  tep_db_query("insert into " . TABLE_RETURNS_STATUS_HISTORY . " (returns_id , returns_status, date_added, customer_notified, comments) values ('" . $ticket_id . "','" .   $returns_status . "', now(), 1,'" . tep_db_input($comments) . "')");

	  // 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_OWNER, STORE_OWNER_EMAIL_ADDRESS);
	  // 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_OWNER, STORE_OWNER_EMAIL_ADDRESS);
		 }

	  // 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 = '" . $HTTP_GET_VARS['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_OWNER, STORE_OWNER_EMAIL_ADDRESS , EMAIL_SUBJECT_ADMIN .' #' . $rma_value, nl2br($email_text), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

	  // redirect to confirmation
		tep_redirect(tep_href_link(FILENAME_RETURN . '?action=sent&rma_value='. $rma_value . '&return_id=' . $ticket_id . '&order_id=' . $order_id));
	} else {
	  $HTTP_GET_VARS['action'] = 'new';
	}
	break;
   case 'default':
   tep_redirect(tep_href_link(FILENAME_DEFAULT));
   break;
}
 }
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_RETURN);
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_RETURN, '', 'NONSSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>
<script>
var submitDone = false;

function submitForm(myForm, button) {

  if (!submitDone) {
	 submitDone = true;
	 button.value = 'Please Wait';
	 button.disabled = true;
	 myForm.submit();
  }
  else {
	alert ("Already submitted, please wait!");
  }
  return true;
}
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" class="col_center">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td align="right">

</td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '15', '15'); ?></td>
</tr>
<?php
if ($HTTP_GET_VARS['action'] == 'sent'){
	   $text_query = tep_db_query("SELECT * FROM " . TABLE_RETURNS_TEXT . " where return_text_id = '1' and language_id = '" . $languages_id . "'");
	   $text = tep_db_fetch_array($text_query);

	//   tep_db_query("INSERT into " . TABLE_RETURN_PAYMENTS . " values ('', '" . $HTTP_GET_VARS['id'] . "', '', '', '', '', '')");
		 ?>
	  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><?php new infoBox(array(array('text' => '<center><font color=cc0000 size=3px><b>' . TEXT_YOUR_RMA_NUMBER . $HTTP_GET_VARS['rma_value'] . '</b></font></center>'))); ?></td>
	  </tr>
	   <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '20', '20'); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php new infoBox(array(array('text' => nl2br($text['return_text_one'])))); ?></td>
	  </tr>

	 <tr>
		<td align="right" vlaign=bottom><br><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
	 </tr>
	</table></td>
  </tr>


	  <?
} else// if ($HTTP_GET_VARS['action'] == 'new')
{
	 $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);
	 // query the order table, to get all the product details
	 $returned_products_query = tep_db_query("SELECT * FROM " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where o.orders_id = op.orders_id and op.orders_id = '" . $HTTP_GET_VARS['order_id'] . "' and products_id = '" . $HTTP_GET_VARS['products_id'] . "'");
	 $returned_products = tep_db_fetch_array($returned_products_query);
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr><form name="longsubmit" action="return_product.php?action=insert&oID=<? echo $HTTP_GET_VARS['order_id'] . '&products_id=' . $HTTP_GET_VARS['products_id']; ?>" method=post>
	<td><table border="0" cellspacing="0" cellpadding="2" width=100%>
		 <?
			  if (isset($error)=='yes') {
			   ?> <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><? echo TEXT_ERROR; ?></b></td>
		  </tr>

	   </table></td>
		<td width="60%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
	 <?
echo '			  <tr>' . "\n" .
	 '				<td class="main" align="left" width="100%">'. TEXT_ERROR_QUANTITY .'</td>' . "\n" .

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

	   ?>
		</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="0" cellpadding="2">
	  <tr>
		<td class="main" colspan="2"><b><?php echo TEXT_SUPPORT_RETURN_HEADING; ?></small></b></td>
	  </tr>

	</table></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="main"><b><?php echo TEXT_SUPPORT_PRODUCT_RETURN; ?></b><BR></td>
		  </tr>



		</table></td>
		<td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 if (sizeof($order->info['tax_groups']) > 1) {
?>
			  <tr>
				<td class="main" colspan="2"><b>Qty</b></td>

				<td class="smallText" align="right"><b><?php echo HEADING_PRODUCTS; ?></b></td>
				<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>
			  </tr>
<?php
 } else {
?>
			  <tr>
				<td class="main"> </td>
				<td class="main" colspan="2">    <b><?php echo HEADING_PRODUCTS; ?></b></td>
			  </tr>
<?php
 }

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


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


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">
	 <?
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, 1, ' ', '<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">
	 <?
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, 1, ' ', '<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">
	 <?
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>
	   </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'); ?>
	  <?
		$priority_query = tep_db_query("select return_reason_id, return_reason_name from ". TABLE_RETURN_REASONS . " where language_id = '" . $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;
	  ?>
		</td>
	  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<!-- Begin refund method selection -->
  <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><? 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'); ?>
	  <?
		$refund_query = tep_db_query("select refund_method_id, refund_method_name from ". TABLE_REFUND_METHOD . " where language_id = '" . $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;
	  ?>
	  <br><br>
	  <?
	 $charge_query = tep_db_query("SELECT configuration_value FROM " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_RESTOCK_VALUE'");
	 $charge = tep_db_fetch_array($charge_query);
// Don't show re-stocking info if it's set to zero in Admin > Configuration > Stock
	  if ($charge['configuration_value'] != 0) {
		echo TEXT_SUPPORT_SURCHARGE . $charge['configuration_value'] .'%' . TEXT_SUPPORT_SURCHARGE_TWO;
		} ?>
		</td>
	  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<!-- End refund method selection -->
			<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">
	 <?
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><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td colspan="2" class="main" valign="top" nowrap align="center">



		<input type=submit value="Submit" onClick="return submitForm(document.longsubmit, this)"></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'); ?>

Link to comment
Share on other sites

Duplication in the RMA list

 

Hi guys

 

In the admin/returns.php

 

in The list of RMA's it generates not one, byt two lines with the same information except the last "status" column".

 

i have narrowed it down to this code:

 

<?php // ADDED BY BURT ?>

<td class="dataTableContent" align="center"><b><?php echo $orders['rma_value']; ?></b></a>

<?php // END BURT ?>

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_RETURNS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['returns_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . ' ' . $order_done . $return_customer_name . '</font></a>' ; ?></td>

<td class="dataTableContent" align="right"><?php echo $currencies->format($orders['final_price']); ?></td>

<td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>

<td class="dataTableContent" align="right"><?php echo $orders['return_reason_name']; ?></td>

<td class="dataTableContent" align="right"><?php echo $orders['returns_status_name'];?></td>

</tr><?php

} // WHILE LOOP

?>

 

But what do i need to do in order for it to only generate one line instead of two. if you do not catch the meaning of this, here is a SC:

 

sc.jpg

Link to comment
Share on other sites

Duplication in the RMA list

 

Hi guys

 

In the admin/returns.php

 

in The list of RMA's it generates not one, byt two lines with the same information except the last "status" column".

 

i have narrowed it down to this code:

 

<?php // ADDED BY BURT ?>

<td class="dataTableContent" align="center"><b><?php echo $orders['rma_value']; ?></b></a>

<?php // END BURT ?>

<td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_RETURNS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['returns_id'] . '&action=edit') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . ' ' . $order_done . $return_customer_name . '</font></a>' ; ?></td>

<td class="dataTableContent" align="right"><?php echo $currencies->format($orders['final_price']); ?></td>

<td class="dataTableContent" align="center"><?php echo tep_datetime_short($orders['date_purchased']); ?></td>

<td class="dataTableContent" align="right"><?php echo $orders['return_reason_name']; ?></td>

<td class="dataTableContent" align="right"><?php echo $orders['returns_status_name'];?></td>

</tr><?php

} // WHILE LOOP

?>

 

But what do i need to do in order for it to only generate one line instead of two. if you do not catch the meaning of this, here is a SC:

 

sc.jpg

 

Your table/screen size is not large enough so it is having to use two lines to fit the rma info.

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

Link to comment
Share on other sites

Hi

 

I have installed the contrib but I get the login page errors. In account_histoty_info I click the return link, make the changes, submit and I get logged out and go back to the front page with no sign of RMA number. I do get the email with RMA info in tho.

 

The next prob is with track return. I copy and paste the RMA number from the email into the form and pick track. I get asked to login twice and then the error "The details you entered do not match any of our records. Please try again or contact us for further assistance."

 

I have searched this forum and tried several suggested fixes but non have worked.

 

Is there anyone that can help me.

 

Cheers

 

Ian

 

 

Hello Ian and everybody,

Did you found ? I have the same problem especially with the track return page. If someone know the solution will be great ;)

Edited by rico76
Link to comment
Share on other sites

anyone can help me with my problem of having my form showing on the right side rather then center??

i have attached a image.

 

picture1bp6.th.png

 

You messed up your tables... Reinstall or manually go back through the code and find where you made the mistake when you modified it.

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

Link to comment
Share on other sites

You messed up your tables... Reinstall or manually go back through the code and find where you made the mistake when you modified it.

 

i didn't modify the code. i have attached the code on my couple post ago. and i did put in center_col but that has no luck in it? can you explain in more details what i should do?

Link to comment
Share on other sites

i didn't modify the code. i have attached the code on my couple post ago. and i did put in center_col but that has no luck in it? can you explain in more details what i should do?

It's just a simple html coding issue, you have an extra <table> <tr> or <td> where there should not be one or are missing a </table> </tr> </td> . This may be time consuming to diagnoise but very basic stuff...

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

Link to comment
Share on other sites

  • 4 weeks later...

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...