Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RMA Returns error for 2.2 MS2


Guest

Recommended Posts

Has anyone using this contrib noticed what happens to the coding on the pages when 'view source' is used on the browser?

It drastically changes the header info - mine before was : -

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>normal site info here</title>

<meta name="Description" content="normal description here." >

<meta name="Keywords" content="normal keywords here" >

<meta name="googlebot" content="normal intended info here" >

 

to this once contrib installed: -

 

<?

/*

$id author Puddled Internet - http://www.puddled.co.uk

email [email protected]

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

function tep_create_rma_value($length, $type = 'digits') {

if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) return false;

 

$rand_value = '';

while (strlen($rand_value)<$length) {

if ($type == 'digits') {

$char = tep_rand(0,9);

} else {

$char = chr(tep_rand(0,255));

}

if ($type == 'mixed') {

if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char;

} elseif ($type == 'chars') {

if (eregi('^[a-z]$', $char)) $rand_value .= $char;

} else if ($type == 'digits') {

if (ereg('^[0-9]$', $char)) $rand_value .= $char;

}

}

 

return $rand_value;

}

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

 

 

Anyone have any thoughts on this? Personally, I am unimpressed and have removed the contrib forthwith and will not be using it again.

Link to comment
Share on other sites

  • 5 months later...

Dunno if anyone can help me out..

 

I have successfully installed the RMA Returns system for my client's store but simply cannot get the returns system working with attributes. There are many products on the site that uses different attributes and options and I need to incorporate that when customers return a product. I have been tackling this project for quite some time and with no success I'm afraid. Would it be possible if someone could at least direct me on how to add such a thing to this contribution?

 

I also read a post a few pages back where someone had figured out a way to make the returns system pull attributes for that product. Could someone please share the wealth? I'll be your bestest bud! :thumbsup:

 

I am in same situation, in that RMA is working fine for standard products, but does not work properly if product has attributes. Any help would be greatly appreciated.

Link to comment
Share on other sites

  • 8 months later...

I know a few people have been asking weather or not this works with 2.3.1. I am currently working on modding the addon to do so. So far i have gotten the system to work on the customer side. I haven't gotten the admin side done yet. Once I am done, ill be sure to update the install instructions to reflect all the changes.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 1 month later...
I have modded it succesfully to work with OSC 2.3.1. the account_history_info.php page is really the only one that is an issue (it mangles the themes to hell). All the rest of the instructions are fine.

 

could you post this as an addon or forward the file to me? Really need to get this working.

Ah, the world wide web. What a wonderful place.

Link to comment
Share on other sites

  • 1 month later...

I installed this contrib yesterday to 2.3.3.It is faily staright forward on what needs to be done..

 

follow the following steps and you shoudl be okay. I am not a php coder and i wont be able to answer any coding questiosn.I made these changes and it works on my system.Stying is left as it is.That can be changed easily ..

 

1) In catalog files return_product.php and return_track.php Make the following chages

 

change

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

to

 require(DIR_WS_INCLUDES . 'template_top.php');

 

Remove

 

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

 

remove if exist

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

 

2) if you are using latest php you will get eregi deprecated messages in includes\funtions\refund_funtions.php.

In refund_functions.php change

 

if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char;
  } elseif ($type == 'chars') {
    if (eregi('^[a-z]$', $char)) $rand_value .= $char;
  } else if ($type == 'digits') {
    if (ereg('^[0-9]$', $char)) $rand_value .= $char;

 

to

 

		 if (preg_match('/^[a-z0-9]$/i', $char)) $rand_value .= $char;
	  } elseif ($type == 'chars') {
		    if (preg_match('/^[a-z]$/i', $char)) $rand_value .= $char;
	  } elseif ($type == 'digits') {
		    if (preg_match('/^[0-9]$/', $char)) $rand_value .= $char;

 

This sorts the catalog side

 

On admin side

 

3) You have to makie the same changes as step 1 above to

 

refund_methods.php

return_product.php

return_text.php

return.php

returns_invoice.php

return_packingslip.php

return_reasons.php

return_status.php

admin\includes\functions\refund_method.php

 

4) change the code in admin\includes\functions\refund_funtions.php as done on the catalog side.step 2.

 

5) In admin\includes\boxes\returns.php

 

Remove whats in the file and change it with

 

<?php
/*
 $Id$
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2010 osCommerce
 Released under the GNU General Public License
*/
 $cl_box_groups[] = array(
    'heading' => 'Customer Returns',
    'apps' => array(
  array(
		    'code' => FILENAME_RETURNS,
		    'title' => 'Returned Products',
		    'link' => tep_href_link(FILENAME_RETURNS)
	  ),
	  array(
		    'code' => FILENAME_RETURNS_REASONS,
		    'title' => 'Return Reasons',
		    'link' => tep_href_link(FILENAME_RETURNS_REASONS)
	  ),
	  array(
		    'code' => FILENAME_REFUND_METHODS,
		    'title' => 'Refund Methods',
		    'link' => tep_href_link(FILENAME_REFUND_METHODS)
	  ),
	  array(
		    'code' => FILENAME_RETURNS_STATUS,
		    'title' => 'Returns Status',
		    'link' => tep_href_link(FILENAME_RETURNS_STATUS)
	  ),
	  array(
		    'code' => FILENAME_RETURNS_TEXT,
		    'title' => 'Return Text Edit',
		    'link' => tep_href_link(FILENAME_RETURNS_TEXT)
	  )
    )
 );
?>

 

 

This should do it.It works on my site..You can go ahead and change the styling as you wish...

Link to comment
Share on other sites

  • 6 months later...

@@RobC1962

try these solutions:

1) remove from general.php and includes it in each archive manually:

 require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLE_INFO);
include(DIR_WS_FUNCTIONS . '/refund_functions.php');

 

2)put the doctype at begining of archive. before the includes

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<?php
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLE_INFO);
include(DIR_WS_FUNCTIONS . '/refund_functions.php');

 

or

3)refund_functions.php

at the begining change

<?
to
<?php

Edited by bhbilbao
Link to comment
Share on other sites

  • 10 months later...

Anyone got this working recently with 2.3.4? I've got most of it working (ignoring the cosmetics) but I can't get admin/returns.php to work. I get:

 

Parse error: syntax error, unexpected end of file in C:\websites\shop\docs\admin\returns.php on line 1057

 

The { and } appear to be equal in numbers plus the editor I use tends to pick errors up like that. The only changes I have done are to change all the <? to <?php. Using PHP 5.4.27.

 

I just can't work out what is wrong and the lack of errors mean I have little to work with.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Hi,

 

Does anyone have a solution on how to generate an RMA or handle a return with a PWA purchase? I have MS2.2 so this solution may already be in place for later versions. Any help would be greatly appreciated. Thanks.

 

Demitry

osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce

Link to comment
Share on other sites

  • 2 years later...

if your table returns_products_data is to big more that 3000 columns, in file admin/returns.php the query:

$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 o.returns_reason = s.return_reason_id and s.language_id = '" . $languages_id . "' and o.returns_status = rs.returns_status_id order by o.returns_id DESC";

is too slow about 5-6s, insert to table returns_products_data INDEX (name: idx_returns_products_data_returns_id || column: returns_id || UNIQUE) and your query time goes to 0.100 - 0.1500s, it is very god improvment to you query.

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