Re: Return Authorization Module (RMA)
THANK YOU THANK YOU
rbarbour
The code below (mostly html) I placed in my tpl_returns_default.php
it brings back an rma# like below after the submission of the form.
Your RMA# is: 105309-31-5232013
(invoice no)-(random)-(date)
PHP Code:
<!-- HERE-->
<?php
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<br class="clearBoth" />
<div class="mainContent success"><!--HERE--><?php echo 'Your Invoice Order No.# is: '; $order_number = $_GET['order_id']; echo $order_number;?><h1>
<BR><font size="4"><BR>Your RMA number is listed below.
<BR><BR>Please include the RMA No. on the outside of the box to prevent delays in your RMA request.
<BR><BR>Please read the
<a target="_blank" href="/index.php?main_page=shippinginfo#returns">RMA Return Policy</a>.
</font>
<div align="center"></H1><BR><BR><BR><BR>
<table border="0" width="60%" bgcolor="#FFFFCC">
<tr>
<td>
<i>
<h3 align="center"><font color="#008000">Return the package to this address:</font><br>
Healthy Symptoms, inc.
<br>
789 Any Street Unit 129 <br>
Port, Florida 34688
<br>
800-220-3130</h3>
<p align="center"><a target="_blank" href="/index.php?main_page=shippinginfo#returns">RMA RETURN POLICY</font></a> listed here.<br>
</H3>
</font>
</i>
</p>
</td>
</tr>
</table>
</div>
</i>
<BR><BR><BR>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="prevOrders">
<caption><h2><?php echo 'Your RMA# is: '; $order_number = $_GET['order_id']; echo $order_number;?>-<?php
srand(5);
echo(rand(1, 10));
echo(rand(1, 10));
?>-<script language="javascript">
<!--
today = new Date().add({days: 31});
document.write("", today.getMonth()+1,"",today.getDate(),"",today.getFullYear());
//document.write("", today.getMonth()+1,"/",today.getDate(),"/",today.getFullYear()); //-->
</script>
</h2></caption>
<tr class="tableHeading">
<th scope="col">Please read the RMA return policy before mailing package.</th>
</tr>
</table>
<!--HERE--></div>
<?php
} else {
?>
<?php if (DEFINE_RETURNS_STATUS >= '1' and DEFINE_RETURNS_STATUS <= '2') { ?>
<div id="pageThreeMainContent">
<?php
/**
* require html_define for the Returns page
*/
require($define_page);
?>
</div>
<br class="clearBoth" />
<?php } ?>
<?php if ($messageStack->size('returns') > 0) echo $messageStack->output('returns'); ?>
<div class="content">
<h1>
<BR>
<BR><BR>Please complete ALL information below to prevent delays in your RMA request.
<BR><BR>Please read the RMA Return Policy.
<div align="center"></H1><BR><BR><BR><BR>
<table border="0" width="60%" bgcolor="#FFFFCC">
<tr>
<td>
<i>
<h3 align="center">To obtain an RMA No.<br>complete this form.</h3>
<p align="center"><a target="_blank" href="/index.php?main_page=shippinginfo#returns">RMA RETURN POLICY</font></a> listed here.</H3>
</font>
</i>
</p>
<p> </td>
</tr>
</table>
</div>
</i>
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="prevOrders">
<caption><h2> </h2></caption>
<tr class="tableHeading">
<th scope="col">Submit this form to receive your RMA number.</th>
</tr>
</table>
<!--HERE-->
<fieldset id="personal">
<legend><?php echo CONTACT_INFORMATION; ?></legend>
I kept getting errors when I included the address code in the success section so I removed it:
Code:
<?php if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
Re: Return Authorization Module (RMA)
Your very welcome,
As far as the address code, you shouldn't have to display it within the success statement, it should automatically be there as long as your admin value = true
Re: Return Authorization Module (RMA)
I see why you want the address there
get rid of the javascript, replace with:
PHP Code:
<?php echo date('mdY'); ?>
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
How could you miss that? JUST KIDDING :P
Awesome job on the update, I am positive the zen community is grateful for all your hard work in updating Clyde's mods.
hahahahaha!!!:laugh:
Thanks..:blush: To be honest I felt weird updating it.. Clyde was such a big contributor to the community.. So I was hesitant step my little feet into his BIG shoes..
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
hahahahaha!!!:laugh:
Thanks..:blush: To be honest I felt weird updating it.. Clyde was such a big contributor to the community.. So I was hesitant step my little feet into his BIG shoes..
Big shoes indeed, as the original author, his contributions will continue to serve and evolve with the community!
Re: Return Authorization Module (RMA)
Reading his posts I could tell he is a really cool guy.
These days it seems rare to have caring, sharing people.
I never had the pleasure of meeting Clyde, but personally
I think Clyde would love the thought of his work making people happy.
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
Big shoes indeed, as the original author, his contributions will continue to serve and evolve with the community!
Quote:
Originally Posted by
xspresso
Reading his posts I could tell he is a really cool guy.
These days it seems rare to have caring, sharing people.
I never had the pleasure of meeting Clyde, but personally
I think Clyde would love the thought of his work making people happy.
**nods in agreement**:yes:
Re: Return Authorization Module (RMA)
OK, so I put together code to display the success page.
WHAT THE FOLLOWING DOES
using the code from post#579
1.) I add a RMA Request button on the MY ACCOUNT > HISTORY > ORDER INFO page
2.) When clicked it sends that $orders_id to the returns page and populates the Order Number Field
3.) Send the same $orders_id to the returns success page
Now this code recreates and does away with the HTML from @xspresso post#581
Screenshot:
Attachment 12384
First lets add the code to /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_returns_default.php
find:
PHP Code:
<?php if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
<?php
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<br class="clearBoth" />
<div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div>
<?php
} else {
?>
Replace with:
PHP Code:
<?php if (RETURN_STORE_NAME_ADDRESS == 'true' && ($_GET['action'] == 'success')) { ?>
<?php
/**
show nothing
*/
} else if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
<?php
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<br class="clearBoth" />
<div class="mainContent success">
<?php echo '<div id="returnSuccess">' . TEXT_SUCCESS . '</div>' . '<div id="returnRequired">'. TEXT_SUCCESS_RMA_REQUIRED . '</div>' . '<div id="returnPolicy">'. TEXT_SUCCESS_RMA_POLICY_BOF . '<a href="' . zen_href_link(FILENAME_SHIPPING, '', 'SSL') . '">' . TEXT_SUCCESS_RMA_POLICY_LINK . '</a>' . TEXT_SUCCESS_RMA_POLICY_EOF . '</div>' . '<div id="returnAddressWrapper">' . '<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID; $order_number = $_GET['order_id']; echo $order_number . TEXT_SUCCESS_DASH; srand(5); echo(rand(1, 10)); echo(rand(1, 10)) . TEXT_SUCCESS_DASH . date('mdY') . '</div>' . '<div id="returnAddress">' . TEXT_SUCCESS_RMA_RETURN_ADDRESS . '</div>'; if (RETURN_STORE_NAME_ADDRESS == 'true') { echo '<address>' . nl2br(STORE_NAME_ADDRESS) . '</address>'; } echo '<div id="returnPhone">' . TEXT_SUCCESS_RMA_RETURN_PHONE . '</div>' . '</div>'; ?>
<?php
} else {
?>
then open /includes/languages/english/YOUR_TEMPLATE_NAME/returns.php
and add:
PHP Code:
define('TEXT_SUCCESS_RMA_REQUIRED', 'The below RMA# is required for all Returns');
define('TEXT_SUCCESS_RMA_POLICY_BOF', 'You can view our ');
define('TEXT_SUCCESS_RMA_POLICY_LINK', 'Returns Policy');
define('TEXT_SUCCESS_RMA_POLICY_EOF', ' here.');
define('TEXT_SUCCESS_RMA_ID', 'Your RMA# is: ');
define('TEXT_SUCCESS_DASH', '-');
define('TEXT_SUCCESS_RMA_RETURN_ADDRESS', 'Please ship all returns to this address:');
define('TEXT_SUCCESS_RMA_RETURN_PHONE', 'Phone: 1.111.111.1111');
and the CSS rules can be added to /includes/templates/YOUR_TEMPLATE_NAME/css/returns.css
Code:
div#returnAddressWrapper {border:1px solid #E9E9E9;background:#FFE573;text-align:center;}
div#returnSuccess {font-size:1.2em;padding:5px;color:#606060;}
div#returnAddressWrapper, div#returnRequired, div#returnPolicy, div#returnRMA, div#returnAddress, div#returnPhone {font-size:1.5em;font-weight:bold;padding:5px; }
div#returnRequired, div#returnAddress {color:#FF0000;}
That should be it, Enjoy!
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
OK, so I put together code to display the success page.
WHAT THE FOLLOWING DOES
using the code from
post#579
1.) I add a RMA Request button on the MY ACCOUNT > HISTORY > ORDER INFO page
2.) When clicked it sends that $orders_id to the returns page and populates the Order Number Field
3.) Send the same $orders_id to the returns success page
Now this code recreates and does away with the HTML from @xspresso post#581
Screenshot:
Attachment 12384
First lets add the code to /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_returns_default.php
find:
PHP Code:
<?php if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
<?php
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<br class="clearBoth" />
<div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div>
<?php
} else {
?>
Replace with:
PHP Code:
<?php if (RETURN_STORE_NAME_ADDRESS == 'true' && ($_GET['action'] == 'success')) { ?>
<?php
/**
show nothing
*/
} else if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
<?php
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<br class="clearBoth" />
<div class="mainContent success">
<?php echo '<div id="returnSuccess">' . TEXT_SUCCESS . '</div>' . '<div id="returnRequired">'. TEXT_SUCCESS_RMA_REQUIRED . '</div>' . '<div id="returnPolicy">'. TEXT_SUCCESS_RMA_POLICY_BOF . '<a href="' . zen_href_link(FILENAME_SHIPPING, '', 'SSL') . '">' . TEXT_SUCCESS_RMA_POLICY_LINK . '</a>' . TEXT_SUCCESS_RMA_POLICY_EOF . '</div>' . '<div id="returnAddressWrapper">' . '<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID; $order_number = $_GET['order_id']; echo $order_number . TEXT_SUCCESS_DASH; srand(5); echo(rand(1, 10)); echo(rand(1, 10)) . TEXT_SUCCESS_DASH . date('mdY') . '</div>' . '<div id="returnAddress">' . TEXT_SUCCESS_RMA_RETURN_ADDRESS . '</div>'; if (RETURN_STORE_NAME_ADDRESS == 'true') { echo '<address>' . nl2br(STORE_NAME_ADDRESS) . '</address>'; } echo '<div id="returnPhone">' . TEXT_SUCCESS_RMA_RETURN_PHONE . '</div>' . '</div>'; ?>
<?php
} else {
?>
then open /includes/languages/english/YOUR_TEMPLATE_NAME/returns.php
and add:
PHP Code:
define('TEXT_SUCCESS_RMA_REQUIRED', 'The below RMA# is required for all Returns');
define('TEXT_SUCCESS_RMA_POLICY_BOF', 'You can view our ');
define('TEXT_SUCCESS_RMA_POLICY_LINK', 'Returns Policy');
define('TEXT_SUCCESS_RMA_POLICY_EOF', ' here.');
define('TEXT_SUCCESS_RMA_ID', 'Your RMA# is: ');
define('TEXT_SUCCESS_DASH', '-');
define('TEXT_SUCCESS_RMA_RETURN_ADDRESS', 'Please ship all returns to this address:');
define('TEXT_SUCCESS_RMA_RETURN_PHONE', 'Phone: 1.111.111.1111');
and the CSS rules can be added to /includes/templates/YOUR_TEMPLATE_NAME/css/returns.css
Code:
div#returnAddressWrapper {border:1px solid #E9E9E9;background:#FFE573;text-align:center;}
div#returnSuccess {font-size:1.2em;padding:5px;color:#606060;}
div#returnAddressWrapper, div#returnRequired, div#returnPolicy, div#returnRMA, div#returnAddress, div#returnPhone {font-size:1.5em;font-weight:bold;padding:5px; }
div#returnRequired, div#returnAddress {color:#FF0000;}
That should be it, Enjoy!
Fantastic! Now so I'm CLEAR.. this DOES NOT add the order number to the RMA success page if one accesses the RMA form directly correct?? If one accesses the RMA form directly they must enter the order number manually correct??
Re: Return Authorization Module (RMA)