-
Re: Return Authorization Module (RMA)
Indeed.. regarding item #4.. I think that what would be better and keep folks out of the code is to add this to the admin menu where folks can select from existing statuses in their store. This would keep folks "out of the code" and make it easier to implement.. I know the change to make in the install SQL to add this option..
something like this should do the trick:
Code:
INSERT INTO configuration VALUES (NULL, 'Auto Status - RMA', 'AUTO_STATUS_RMA', '2', 'Number of the order status assigned when an RMA is submitted.', @t4, 5, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
Not so sure what the code below have to look like to use the selected status.. HELP!!
Quote:
Originally Posted by
rbarbour
So many changes - for the better, Yes?
1> I re-wrote the code to do-away with the random 3 digit numbers and added customer id in its place.
2> I added a hidden input field to the stores returns page for the RMA#
3> I added the RMA# to the email
4> I added a sql query to the success page to update the order status via admin (),
I am thinking this should have a ADMIN control where the status_id can be entered for all sites will differ depending on how many order statuses they currently have.
Here is the UPDATED and at the moment FINAL CODE
1.) lets create a button
1.A) /includes/languages/english/YOUR_TEMPLATE_NAME/button_names.php
ADD:
PHP Code:
define('BUTTON_RMA_REQUEST', 'button_rma_request.png');
define('BUTTON_RMA_REQUEST_ALT', 'Request an RMA#');
1.b) upload your button
/includes/templates/YOUR_TEMPLATE_NAME/buttons/english
2. lets add the button to the My Account > History > Order Info page
2.A) /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_account_history_info_default.php
I added my button at the end of the file right after the <br class="clearBoth" /> and closing </div>
ADD:
PHP Code:
<div class="rmaRequestButton"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">' . zen_image_button(BUTTON_RMA_REQUEST) . '</a>'; ?></div>
3.) /includes/modules/pages/returns/header_php.php
find:
PHP Code:
$order_number = zen_db_prepare_input($_POST['order_number']);
below that
ADD:
PHP Code:
$rma_number = zen_db_prepare_input($_POST['rma_number']);
then find:
PHP Code:
"Order Number:" . "\t" . $order_number . "<br />" .
below that
ADD:
PHP Code:
"RMA Number:" . "\t" . $rma_number . "<br />" .
then find:
zen_redirect(zen_href_link(FILENAME_RETURNS, 'action=success'));
CHANGE TO:
PHP Code:
zen_redirect(zen_href_link(FILENAME_RETURNS, 'action=success' . '&order_id=' . $order_number));
then find:
PHP Code:
$city = $check_customer->fields['entry_city'];
below that
ADD:
PHP Code:
$cID = $check_customer->fields['customers_id'];
then find:
PHP Code:
$postcode = $check_customer->fields['entry_postcode'];
}
below that
ADD:
PHP Code:
$customer_info_query = "SELECT customers_id
FROM " . TABLE_ORDERS . "
WHERE orders_id = :ordersID";
$customer_info_query = $db->bindVars($customer_info_query, ':ordersID', $_GET['order_id'], 'integer');
$customer_info = $db->Execute($customer_info_query);
$order_number = $_GET['order_id'];
$rma_request_date = date('mdY');
$rma_number = $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
Now in /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 {
?>
CHANGE TO:
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 . $rma_number . '</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
$orderID = $_GET['order_id'];
$db->Execute("update " . TABLE_ORDERS . " set orders_status = '5', last_modified = now() where orders_id = '" . (int)$orderID . "'");
?>
<?php
} else {
?>
The Number 5 represents the order status ID in ADMIN > LOCALIZATION > ORDERS STATUS
ADD "Pending Return", look at your browser page link - you will see oID=#, that # needs to replace the above 5
then find:
PHP Code:
<br class="clearBoth" />
<?php
if (RETURN_ITEM_NAME == 'true') {
?>
ABOVE the <br class="clearBoth" />
ADD:
PHP Code:
<?php echo '<input type="hidden" name="rma_number" value="'.$rma_number.'">'; ?>
then open /includes/languages/english/YOUR_TEMPLATE_NAME/returns.php
DID NOT CHANGE FROM PREVIOUS POSTS
PHP Code:
define('TEXT_SUCCESS', 'Your request has been successfully submitted.');
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
DID NOT CHANGE FROM PREVIOUS POSTS
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;}
I hope this helps and I haven't completely confused everyone.
-
Re: Return Authorization Module (RMA)
<?php
$autoRMA = AUTO_STATUS_RMA;
$orderID = $_GET['order_id'];
$db->Execute("update " . TABLE_ORDERS . " set orders_status = $autoRMA, last_modified = now() where orders_id = '" . (int)$orderID . "'");
?>
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
<?php
$autoRMA = AUTO_STATUS_RMA;
$orderID = $_GET['order_id'];
$db->Execute("update " . TABLE_ORDERS . " set orders_status = $autoRMA, last_modified = now() where orders_id = '" . (int)$orderID . "'");
?>
Now we're cookin' with Crisco!!! I'll bundle this up and submit.. BTW.. If I haven't said it... you're awesome. Been stalking..err.. I mean watching all the helpful stuff you've been posting.. good stuff..
-
Re: Return Authorization Module (RMA)
Believe it or not, I do allot if searching and reading to "mainly" find easy and simple solution to incorporate into client websites to efficiently create the functions they require to successfully operate their e-commerce website.
Along the way, I add my two cents and if I think an idea or suggestion will enhance zen cart functionality for the vast majority, I will take the time to help make it work (where I can). Their are far more knowledgeable on this forum than I.
And thank you, it is good to hear a fellow contributor appreciate another.
Now stop stalking me, I mean watching. JUST KIDDING :blush:
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
And thank you, it is good to hear a fellow contributor appreciate another.
Now stop stalking me, I mean watching. JUST KIDDING :blush:
I will not I will not I will not!!!:laugh:
-
Re: Return Authorization Module (RMA)
Glad that you were able to use all my rough code and ideas and turn them into useful code for others to use.
I noticed a problem,
when it is set to allow logged-in users only it works fine.
When not logged in it will not show the order_id or customer_id in the email, and no customer_id in the success page.
Now in my case I take phone orders and I don't add that customer to zen cart. But if a phone customer wants to return
an item I send them to the RMA form. Of course they don't have a customer number.
So I changed the following line in tpl_returns_default.php
Code:
'<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID . $rma_number . '</div>'
To:
Code:
'<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID; $order_number = $_GET['order_id']; echo $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . date('mdY') . '</div>'
And added:
Code:
<?php echo '<input type="hidden" name="cID" value="'.$cID.'">'; ?>
Just under this line:
Code:
<?php echo '<input type="hidden" name="rma_number" value="'.$rma_number.'">'; ?>
In: header_php.php I added
Code:
// Prepare extra-info details
// Admin email returned after submission
$extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email, $telephone);
// Prepare Text-only portion of message
$text_message = OFFICE_FROM . "\t" . $name . "\n<br />" .
OFFICE_EMAIL . "\t" . $email_address . "\n<br />" .
"Phone Number:" . "\t" .$telephone . "\n<br />" .
"Address:" . "\t" . $address . "\n<br />" .
"City:" . "\t" . $city . "\n<br />" .
"State:" . "\t" . $state . "\n<br />" .
"Post Code:" . "\t" . $postcode . "\n<br />" .
"Country:" . "\t" . $country . "\n<br />" .
"Order Number:" . "\t" . $order_number . "\n<br />" .
"Customer ID:" . "\t" . $cID . "\n<br />" .
"Total Value:" . "\t" . $value . "\n<br />" .
"Number of Items:" . "\t" . $item_number . "\n<br />" .
"Item(s) Name:" . "\t" . $item_name . "\n<br />" .
"Action Requested:" . "\t" . $action . "\n\n<br />" .
"RMA Number:" . "\t" . $order_number . "-". $cID . "-". date('mdY') . "\n<br />" .
'------------------------------------------------------<br />' .
"\n\n<br />Reason:". "\n\n<br />" .
"" . $reason . "\n\n<br />" .
'------------------------------------------------------<br />' .
"" . "\n<br />" .
// Stop admin email
// Begin customer email returned after submission
$extra_info['TEXT'];
$email_text = sprintf(EMAIL_GREET_NONE, $name );
$email_text .= "\n <br />";
$email_text .= EMAIL_WELCOME;
$email_text .= "\n\n" . "Request Date:" . "\t" . date('m/d/Y') . "<br />" ;
$email_text .= "\n" . "Customer ID:" . "\t" . $cID . "\n<br />";
$email_text .= "\n" . "Invoice Number:" . "\t" . $order_number . "<br />" ;
$email_text .= "\n" . "Item(s)You Are Returning:" ."\n (as you entered it)" . "\t" . $item_name . "\n\n<br />";
$email_text .= "\n" . "RMA Number:" . "\t" . $order_number . "-". $cID . "-". date('mdY') . "\n<br />";
$email_text .= "\n\n" . EMAIL_TEXT . "<br />";
$email_text .= "\n" . EMAIL_CONTACT . "<br />";
$email_text .= "\n" . EMAIL_WARNING. "\n<br />";
At the bottom of header_php.php
I removed this line
Code:
$rma_number = $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
and added this line in it's place
Code:
$rma_number = $order_number . TEXT_SUCCESS_DASH . $rma_request_date;
it is just my idea of a work around, maybe you have something better?
Now when not logged in, the rma looks like this (2 dashes in center, missing customer_id)
Your RMA# is: 2425--04292013 and has the order_id in the email.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Now we're cookin' with Crisco!!! I'll bundle this up and submit.. BTW.. If I haven't said it... you're awesome. Been stalking..err.. I mean watching all the helpful stuff you've been posting.. good stuff..
Was this ever packaged and submitted?
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
Was this ever packaged and submitted?
It's on my plan for this Friday when I am working from home.. I actually have three add-ons to update and upload..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
It's on my plan for this Friday when I am working from home.. I actually have three add-ons to update and upload..
I made a few changes per the "glitch" xspresso found if customer is not logged in. I will try to post it here today, been so busy lately.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
I made a few changes per the "glitch" xspresso found if customer is not logged in. I will try to post it here today, been so busy lately.
Tell me about it.. Cool.. I'll wait for you new code..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Tell me about it.. Cool.. I'll wait for you new code..
Sorry, this completely got overlooked over the weekend.
Here is the update.
in /includes/modules/pages/returns/header_php.php
find:
PHP Code:
"RMA Number:" . "\t" . $rma_number . "<br />" .
change to:
PHP Code:
"RMA Number:" . "\t" . $order_number . $rma_number . "<br />" .
then find:
PHP Code:
$rma_number = $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
change to:
PHP Code:
if($_SESSION['customer_id']) {
$rma_number = TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
} else {
$rma_number = TEXT_SUCCESS_DASH . $rma_request_date;
}
now in /includes/templates/YOUR_TEMPLATE/templates/tpl_returns_default.php
find:
PHP Code:
<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 . $rma_number . '</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>'; ?>
change to:
PHP Code:
<div class="mainContent success">
<?php
if($_SESSION['customer_id']) {
$order_number = $_GET['order_id'];
}
?>
<?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 . $rma_number . '</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>'; ?>
Changes above are for the code in post #600
if a customer is logged in
RMA = order_number-customer_id-date on success page and email
if a return is requested without being logged in
RMA - order_number-date on success page and email
-
Re: Return Authorization Module (RMA)
Cool beans.. I'll package this all up and get it submitted this week..:smile:
Quote:
Originally Posted by
rbarbour
Sorry, this completely got overlooked over the weekend.
Here is the update.
in
/includes/modules/pages/returns/header_php.php
find:
PHP Code:
"RMA Number:" . "\t" . $rma_number . "<br />" .
change to:
PHP Code:
"RMA Number:" . "\t" . $order_number . $rma_number . "<br />" .
then find:
PHP Code:
$rma_number = $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
change to:
PHP Code:
if($_SESSION['customer_id']) {
$rma_number = TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
} else {
$rma_number = TEXT_SUCCESS_DASH . $rma_request_date;
}
now in
/includes/templates/YOUR_TEMPLATE/templates/tpl_returns_default.php
find:
PHP Code:
<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 . $rma_number . '</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>'; ?>
change to:
PHP Code:
<div class="mainContent success">
<?php
if($_SESSION['customer_id']) {
$order_number = $_GET['order_id'];
}
?>
<?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 . $rma_number . '</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>'; ?>
Changes above are for the code in post #600
if a customer is logged in
RMA = order_number-customer_id-date on success page and email
if a return is requested without being logged in
RMA - order_number-date on success page and email
-
Re: Return Authorization Module (RMA)
For ease of reference, I also append the order number to the email subject by adding the following to includes\modules\pages\returns\header_php.php
Code:
// adds order number to email subject
$email_subject = EMAIL_SUBJECT . ' #' . $order_number;
// Send message
zen_mail($name, $email_address, $email_subject, $email_text, $send_to_name, $send_to_email, $html_msg, 'returns');
$html_msg['EMAIL_MESSAGE_HTML'] = $text_message;
$html_msg['EMAIL_GREETING'] = '';
$html_msg['EMAIL_WELCOME'] = '';
$html_msg['CONTACT_US_OFFICE_FROM'] = OFFICE_FROM . ' ' . $name . '<br />' . OFFICE_EMAIL . '(' . $email_address . ')';
$html_msg['EXTRA_INFO'] = '';
zen_mail($send_to_name, $send_to_email, $email_subject, $text_message, $name, $email_address, $html_msg, 'returns');
One could also append an RMA number to the email subject as per the following:
Code:
$email_subject = EMAIL_SUBJECT . ' #' . $order_number . ' - ' . $rma_number;
which would appear as:
Subject: RMA #1234 - 1
Cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
For ease of reference, I also append the order number to the email subject by adding the following to includes\modules\pages\returns\header_php.php
That's a great idea, I have been playing with this mod for awhile, mainly the admin & catalog side of it.
I have managed to per the post - update the order_status within the admin with help from @DivaVocals.
I have added additional features that I haven't posted such as:
1.) posting the "reasons text" back to admin>customers>orders>customers_comments
2.) posting the "RMA#" back to admin>customers>orders
3.) re-wrote the code for the entire "email sent" to both admin & customer to better display form fields
Curious if these functions would be useful to anyone else?
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
That's a great idea, I have been playing with this mod for awhile, mainly the admin & catalog side of it.
I have managed to per the post - update the order_status within the admin with help from @DivaVocals.
I have added additional features that I haven't posted such as:
1.) posting the "reasons text" back to admin>customers>orders>customers_comments
2.) posting the "RMA#" back to admin>customers>orders
3.) re-wrote the code for the entire "email sent" to both admin & customer to better display form fields
Curious if these functions would be useful to anyone else?
Ummm HELLS yeah!!! Share.. Let's make Clyde proud and take this module to the next level!!!
-
Re: Return Authorization Module (RMA)
A few more suggestions
1) Return Button
Actually, the need for a button, and hence edits to button_names.php, can be dispensed with by replacing the following line in includes\templates\YourTemplate\templates\tpl_account_history_info_default.php
Code:
<div class="rmaRequestButton"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">' . zen_image_button(BUTTON_RMA_REQUEST) . '</a>'; ?></div>
with something similar to:
Code:
<!-- bof RMA Button #600 -->
<p><?php echo '<strong>Returns</strong><br />If you wish to return any of the above items to us, please do not send any items before <a href="' . zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">obtaining our authorisation</a>.'; ?></p>
<!-- bof RMA Button #600 -->
Of course, the text component could be turned into a define placed in \includes\languages\english\YourTemplate\account_history_info.php (override file).
2) In includes\templates\YourTemplate\templates\tpl_returns_default.php,
a)the "required" options can be dispensed with in favour of the more simple approach (ie input is either required or not)
Compare this
Code:
<label class="inputLabel" for="contactname"><?php echo (($error == true && $entry_name_error == true) ? ENTRY_NAME . zen_image($template->get_template_dir(RETURN_WARNING_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . RETURN_WARNING_IMAGE, RETURN_WARNING_IMAGE_ALT, RETURN_WARNING_IMAGE_WIDTH, RETURN_WARNING_IMAGE_HEIGHT) : ENTRY_NAME . zen_image($template->get_template_dir(RETURN_REQUIRED_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . RETURN_REQUIRED_IMAGE, RETURN_REQUIRED_IMAGE_ALT, RETURN_REQUIRED_IMAGE_WIDTH, RETURN_REQUIRED_IMAGE_HEIGHT)); ?></label>
<?php echo (($error == true && $entry_name_error == true) ? zen_draw_input_field('contactname', $name, ' size="20" id="contactname"') . ENTRY_NAME_ERROR : zen_draw_input_field('contactname', $name, ' size="20" id="contactname"')); ?>
to this
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
The latter even includes code from the Capitalize_Signup_Fields mod, although IIRC Plugins mispells capitalize.
b) the send button can be replaced by the submit button as per the following:
Code:
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
c) the following success message was way too much work for me
Code:
<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 . $rma_number . '</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>'; ?>
which I simplified to
Code:
<?php echo TEXT_SUCCESS . TEXT_SUCCESS_RMA_REFERENCE . '<strong>' . $order_number . $rma_number . '</strong><br /><br /><br />' . TEXT_SUCCESS_RMA_THANKS; ?>
with corresponding defines in \includes\languages\english\YourTeplate\returns.php reduced to:
Code:
define('TEXT_SUCCESS', 'Your request was successfully submitted and a confirmation email has been sent to your email address.<br /><br />We will review your request and respond as soon as practicable. If you do not hear from us within seven (7) days, please <a href="index.php?main_page=contact_us">prompt us</a> before re-submitting your request.<br /><br />Our Returns Policy is contained in our <a href="index.php?main_page=terms_of_sale">Terms of Sale</a>.<br /><br />If you have any comments, queries or concerns regarding our Returns Policy, please <a href="index.php?main_page=contact_us">let us know</a>.<br /><br /><br />');
define('TEXT_SUCCESS_RMA_REFERENCE', 'Your reference number for this request is: ');
define('TEXT_SUCCESS_RMA_THANKS', 'Thank you for your feedback.<br /><br />');
3) In \includes\modules\pages\returns\header_php.php, the date format "mdY" can be changed as commented in the following snippet
Code:
$rma_request_date = date('mdY'); // Ymd or even Ymd H:i:s
Cheers
-
Re: Return Authorization Module (RMA)
Some of your suggestions removes some of the flexibility Clyde was trying to build in..
- Button versus a link on the account histroy page, the inclusion of this code should be a flexible admin configurable choice IMHO. I'll take a look at how to make that so.. Anfd the text should DEFINITELY not be hard coded in.. It should be in a proper language definition file.
- Regarding item #2 (mods to includes\templates\YourTemplate\templates\tpl_returns_default.php, and \includes\languages\english\YourTeplate\returns.php)
- The extra code Clyde included is for form error validation. Not sure from a usability POV that this should change. Clyde is not here to confirm this, but from a usability POV, I can only assume he felt that it made more sense to put the field level error messages next to each field versus including them all in the message stack. He opted instead for a simpler single message stack error message with field level error messages.
- It would be a less than satisfying user experience to present the shopper with only one error message "Errors have occured on your submission! Please correct and re-submit" without indicating WHICH field is in error, and HOPING they will "figure it out" based on a simple "Required" symbol. Clyde's approach eliminates the possiblity of user frustration and lends to a better user experience.
- I'm not sure that the the code from the Capitalize_Signup_Fields mod should be included.. Seems more of a personal choice and as much as possible I'm a BIG proponent that modules should be flexible. Not sure it's practical to make this an admin configurable option either, but I will take a look.. Honestly if folks want this feature they really should just install the Capitalize_Signup_Fields mod themselves
- Replacing the send button with the submit button.. I'll have to look at this and see how the contact form is configure.. at the very LEAST the RMA form and the contact form should use the same submit/send button.
- Will take a look at the returns message.. Again, Clyde is not here to confirm what he did, but given the code, it appears he was leaning towards a more flexible solution by giving the admin more options to control the look and feel.. Your changes are a personal choice, and while I don't think they should be part of the codebase, perhaps I could take a look to see if the current options could allow a shopowner to make similar changes without removing ALL of the current code as you have done or provide the means for shopowners to make similar changes if the current codebase won't accomodate this. there are folks who have been using this module who LIKE the returns message the way it is.. This module should support choices and flexibility with regards to look and feel.
- Adding the comment is a good idea.. I will also include this in the readme as not all shopowners (especially the DIYers) are going to KNOW to look for this comment. It might even be a BETTER idea to try and make this an admin configurable option so that DIYer shopowners don't HAVE to mess with the code to make this change..
Quote:
Originally Posted by
dw08gm
A few more suggestions
1) Return Button
Actually, the need for a button, and hence edits to button_names.php, can be dispensed with by replacing the following line in includes\templates\YourTemplate\templates\tpl_account_history_info_default.php
Code:
<div class="rmaRequestButton"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">' . zen_image_button(BUTTON_RMA_REQUEST) . '</a>'; ?></div>
with something similar to:
Code:
<!-- bof RMA Button #600 -->
<p><?php echo '<strong>Returns</strong><br />If you wish to return any of the above items to us, please do not send any items before <a href="' . zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $_GET['order_id'], 'SSL') . '">obtaining our authorisation</a>.'; ?></p>
<!-- bof RMA Button #600 -->
Of course, the text component could be turned into a define placed in \includes\languages\english\YourTemplate\account_history_info.php (override file).
2) In includes\templates\YourTemplate\templates\tpl_returns_default.php,
a)the "required" options can be dispensed with in favour of the more simple approach (ie input is either required or not)
Compare this
Code:
<label class="inputLabel" for="contactname"><?php echo (($error == true && $entry_name_error == true) ? ENTRY_NAME . zen_image($template->get_template_dir(RETURN_WARNING_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . RETURN_WARNING_IMAGE, RETURN_WARNING_IMAGE_ALT, RETURN_WARNING_IMAGE_WIDTH, RETURN_WARNING_IMAGE_HEIGHT) : ENTRY_NAME . zen_image($template->get_template_dir(RETURN_REQUIRED_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . RETURN_REQUIRED_IMAGE, RETURN_REQUIRED_IMAGE_ALT, RETURN_REQUIRED_IMAGE_WIDTH, RETURN_REQUIRED_IMAGE_HEIGHT)); ?></label>
<?php echo (($error == true && $entry_name_error == true) ? zen_draw_input_field('contactname', $name, ' size="20" id="contactname"') . ENTRY_NAME_ERROR : zen_draw_input_field('contactname', $name, ' size="20" id="contactname"')); ?>
to this
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
The latter even includes code from the Capitalize_Signup_Fields mod, although IIRC Plugins mispells capitalize.
b) the send button can be replaced by the submit button as per the following:
Code:
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SUBMIT, BUTTON_SUBMIT_ALT); ?></div>
c) the following success message was way too much work for me
Code:
<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 . $rma_number . '</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>'; ?>
which I simplified to
Code:
<?php echo TEXT_SUCCESS . TEXT_SUCCESS_RMA_REFERENCE . '<strong>' . $order_number . $rma_number . '</strong><br /><br /><br />' . TEXT_SUCCESS_RMA_THANKS; ?>
with corresponding defines in \includes\languages\english\YourTeplate\returns.php reduced to:
Code:
define('TEXT_SUCCESS', 'Your request was successfully submitted and a confirmation email has been sent to your email address.<br /><br />We will review your request and respond as soon as practicable. If you do not hear from us within seven (7) days, please <a href="index.php?main_page=contact_us">prompt us</a> before re-submitting your request.<br /><br />Our Returns Policy is contained in our <a href="index.php?main_page=terms_of_sale">Terms of Sale</a>.<br /><br />If you have any comments, queries or concerns regarding our Returns Policy, please <a href="index.php?main_page=contact_us">let us know</a>.<br /><br /><br />');
define('TEXT_SUCCESS_RMA_REFERENCE', 'Your reference number for this request is: ');
define('TEXT_SUCCESS_RMA_THANKS', 'Thank you for your feedback.<br /><br />');
3) In \includes\modules\pages\returns\header_php.php, the date format "mdY" can be changed as commented in the following snippet
Code:
$rma_request_date = date('mdY'); // Ymd or even Ymd H:i:s
Cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Some of your suggestions removes some of the flexibility Clyde was trying to build in..
- Button versus a link on the account histroy page, the inclusion of this code should be a flexible admin configurable choice IMHO. I'll take a look at how to make that so.. Anfd the text should DEFINITELY not be hard coded in.. It should be in a proper language definition file.
- Regarding item #2 (mods to includes\templates\YourTemplate\templates\tpl_returns_default.php, and \includes\languages\english\YourTeplate\returns.php)
- The extra code Clyde included is for form error validation. Not sure from a usability POV that this should change. Clyde is not here to confirm this, but from a usability POV, I can only assume he felt that it made more sense to put the field level error messages next to each field versus including them all in the message stack. He opted instead for a simpler single message stack error message with field level error messages.
- It would be a less than satisfying user experience to present the shopper with only one error message "Errors have occured on your submission! Please correct and re-submit" without indicating WHICH field is in error, and HOPING they will "figure it out" based on a simple "Required" symbol. Clyde's approach eliminates the possiblity of user frustration and lends to a better user experience.
- I'm not sure that the the code from the Capitalize_Signup_Fields mod should be included.. Seems more of a personal choice and as much as possible I'm a BIG proponent that modules should be flexible. Not sure it's practical to make this an admin configurable option either, but I will take a look.. Honestly if folks want this feature they really should just install the Capitalize_Signup_Fields mod themselves
- Replacing the send button with the submit button.. I'll have to look at this and see how the contact form is configure.. at the very LEAST the RMA form and the contact form should use the same submit/send button.
- Will take a look at the returns message.. Again, Clyde is not here to confirm what he did, but given the code, it appears he was leaning towards a more flexible solution by giving the admin more options to control the look and feel.. Your changes are a personal choice, and while I don't think they should be part of the codebase, perhaps I could take a look to see if the current options could allow a shopowner to make similar changes without removing ALL of the current code as you have done or provide the means for shopowners to make similar changes if the current codebase won't accomodate this. there are folks who have been using this module who LIKE the returns message the way it is.. This module should support choices and flexibility with regards to look and feel.
- Adding the comment is a good idea.. I will also include this in the readme as not all shopowners (especially the DIYers) are going to KNOW to look for this comment. It might even be a BETTER idea to try and make this an admin configurable option so that DIYer shopowners don't HAVE to mess with the code to make this change..
Clyde added a whole lot of things more to satisfy requests from individuals rather than as great leaps forwards. The error messaging and required options thingies should also be considered personal choice things, as neither really improved existing functionality. As I am not into change for change sake, and prefer simplicity over bells and whistles, I begrudgingly had to spend a few days restoring the latest offerings of this mod to what I had and liked with RMA 2.3.2/2.3.3.
Yes, Capitalize_Signup_Fields is entirely optional. It was only included in my post because it was already in my code. I tend to fill out and send forms all in lowercase, and find auto-capitalisation helpful in scanning for input errors.
One thing I would like to know, however, is whether the following highlighted code is entirely necessary, as I cannot recall exactly where it came from, except that it was around 139h days.
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
Cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Some of your suggestions removes some of the flexibility Clyde was trying to build in..
- Button versus a link on the account histroy page, the inclusion of this code should be a flexible admin configurable choice IMHO. I'll take a look at how to make that so.. Anfd the text should DEFINITELY not be hard coded in.. It should be in a proper language definition file.
- Regarding item #2 (mods to includes\templates\YourTemplate\templates\tpl_returns_default.php, and \includes\languages\english\YourTeplate\returns.php)
- The extra code Clyde included is for form error validation. Not sure from a usability POV that this should change. Clyde is not here to confirm this, but from a usability POV, I can only assume he felt that it made more sense to put the field level error messages next to each field versus including them all in the message stack. He opted instead for a simpler single message stack error message with field level error messages.
- It would be a less than satisfying user experience to present the shopper with only one error message "Errors have occured on your submission! Please correct and re-submit" without indicating WHICH field is in error, and HOPING they will "figure it out" based on a simple "Required" symbol. Clyde's approach eliminates the possiblity of user frustration and lends to a better user experience.
- I'm not sure that the the code from the Capitalize_Signup_Fields mod should be included.. Seems more of a personal choice and as much as possible I'm a BIG proponent that modules should be flexible. Not sure it's practical to make this an admin configurable option either, but I will take a look.. Honestly if folks want this feature they really should just install the Capitalize_Signup_Fields mod themselves
- Replacing the send button with the submit button.. I'll have to look at this and see how the contact form is configure.. at the very LEAST the RMA form and the contact form should use the same submit/send button.
- Will take a look at the returns message.. Again, Clyde is not here to confirm what he did, but given the code, it appears he was leaning towards a more flexible solution by giving the admin more options to control the look and feel.. Your changes are a personal choice, and while I don't think they should be part of the codebase, perhaps I could take a look to see if the current options could allow a shopowner to make similar changes without removing ALL of the current code as you have done or provide the means for shopowners to make similar changes if the current codebase won't accomodate this. there are folks who have been using this module who LIKE the returns message the way it is.. This module should support choices and flexibility with regards to look and feel.
- Adding the comment is a good idea.. I will also include this in the readme as not all shopowners (especially the DIYers) are going to KNOW to look for this comment. It might even be a BETTER idea to try and make this an admin configurable option so that DIYer shopowners don't HAVE to mess with the code to make this change..
Agree - and easily accomplished as an admin setting.
Agree - customer friendly and no "guessing" involved.
Agree - it is a separate mod, let's keep it that way.
Agree - the send button is "stock code" on the contact us page, shows consistency between form pages.
100% Agree - Every module can be changed to the users personal preference but the "core" should serve the vast majority.
Agree - any text that the module creates whether it be on the order-history, returns or success pages can be easily added as an admin option where it can be changes to the users personal preference.
This mod in the last week or so has came along way and suggestions and opinions will only make it that much greater.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
This mod in the last week or so has came along way and suggestions and opinions will only make it that much greater.
I agree..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
Clyde added a whole lot of things more to satisfy requests from individuals rather than as great leaps forwards. The error messaging and required options thingies should also be considered personal choice things, as neither really improved existing functionality. As I am not into change for change sake, and prefer simplicity over bells and whistles, I begrudgingly had to spend a few days restoring the latest offerings of this mod to what I had and liked with RMA 2.3.2/2.3.3.
After looking at a dozen or so RMA Request forms, IMHO, I would say Clyde nailed it with his choices as to which fields needed to be required and which should be optional.
Quote:
Originally Posted by
dw08gm
One thing I would like to know, however, is whether the following highlighted code is entirely necessary, as I cannot recall exactly where it came from, except that it was around 139h days.
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
I don't recall ever seeing that code in any version.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
Clyde added a whole lot of things more to satisfy requests from individuals rather than as great leaps forwards. The error messaging and required options thingies should also be considered personal choice things, as neither really improved existing functionality.
Respectfully I do disagree with you..
Clyde had had solid knowledge of what makes for good usability. It is reflected in his choice to make the validation errors appear at the field level instead of the message stack.
In form validation it IMPROVES usability if you INFORM users of WHICH fields they missed in filling out a form.. Your proposed changes will REMOVE that functionality leaving them to GUESS which field they missed.. There are 10 required fields on an RMA form.. Adding multiple error messages to the message stack is not a good option from a usability POV. Highlighting the MISSED fields with a clear on-screen message is following good usability practices. I believe this is what Clyde was attempting to achieve. Your suggested code not only removes the usability aspect, but it leaves the customer guessing which field is the offending field. Do not assume that it's OBVIOUS. It's only somewhat obvious which fields are required.. what's not obvious is which field failed the validation.. and without a specific error message guiding the end user, this will lead to a frustrating user experience..
Clearly you do not agree, and that's fine..
Quote:
Originally Posted by
dw08gm
As I am not into change for change sake, and prefer simplicity over bells and whistles, I begrudgingly had to spend a few days restoring the latest offerings of this mod to what I had and liked with RMA 2.3.2/2.3.3.
It's your choice of course..
Quote:
Originally Posted by
dw08gm
Yes, Capitalize_Signup_Fields is entirely optional. It was only included in my post because it was already in my code. I tend to fill out and send forms all in lowercase, and find auto-capitalisation helpful in scanning for input errors.
Right.. again it's a seperate mod and if someone really wants the feature, they should install the mod..
Quote:
Originally Posted by
dw08gm
One thing I would like to know, however, is whether the following highlighted code is entirely necessary, as I cannot recall exactly where it came from, except that it was around 139h days.
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
Cheers
At work.. can't see this.. don't recall this code specifically..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
One thing I would like to know, however, is whether the following highlighted code is entirely necessary, as I cannot recall exactly where it came from, except that it was around 139h days.
Code:
<label class="inputLabel" for="contactname"><?php echo ENTRY_NAME . '<span class="reqd">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?></label>
<?php echo zen_draw_input_field('contactname', zen_output_string_protected($name), ' size="46" id="contactname" onchange="capitalize(this,1);"'); ?>
Cheers
I've looked at both v2.3.3 and v2.3.3a and v2.3.2. This code doesn't exist in any of these versions.. Given that you cherrypicked out the changes you wanted and customized RMA, it's seems likely that this is possibly code you introduced into your files..
-
Re: Return Authorization Module (RMA)
Re: zen_output_string_protected
The function has to do with averting "sql-injection" and "XSS vulnerability" in Zen Cart.
The function is still widely used in 151 on both admin and catalog sides, including a small number of header_php.php and tpl_whatever_default.php files on catalog side, including tpl_account_history_info_default.php.
However I remain unsure whether it should be applied to the RMA files, or any form-producing files for that matter, but suspect it should where inputs are extracted from or written to the database by the form files, or where other interacting files or mod, such as tpl_account_history or Email_Archive_Manager, are involved. However, its presence does not seem to affect the processing of the forms.
I found this thread dating from 25 October 2008, although it is unclear to me whether the parts highlighted are relevant to RMA.
http://www.zen-cart.com/showthread.p...ring_protected
Post 3 Dr Byte
Quote:
If the customer has entered text information for an attribute field such as a filename or a text-input field, if that information is to be displayed again for verification/edit, you certainly want that information sanitized before it's displayed.
Would the redisplay of inputs (eg info inserted into RMA form fields from database, eg oID, name), say in going from the account_history_info_default to the RMA page, or proceeding from input to error checking to error correction in the RMA page, constitute a "displayed again for verification/edit" case?
Post 7 Dr Byte
Quote:
I would think that the output-protected approach should be run anytime the content of user-collected data is being re-displayed, so that if any sql-injection or other attack would be averted.
Would the redisplay of inputs (eg info inserted into RMA form fields from database, eg oID, name), say in going from the account_history_info_default to the RMA page, or proceeding from input to error checking to error correction in the RMA page, constitute an "output-protected approach should be run anytime the content of user-collected data is being re-displayed" case?
Post 9 Dr Byte
This last thread dates from 25 April 2007 and specifically refers to XSS vulnerability in and provides fixes for Zen Cart 1.3.7 (and prior versions).
Re: error messaging
I found displaying error messaging within the form, as opposed to displaying same within a message stack, disrupts the layout of the form - with longer error messages causing greater disruption - which can make the overall form difficult to rescan for errors or alterations.
As online forms and associated error message stacks have been around for ages, I am sure the majority of internet users are quite familiar with navigating their way through them. So from my long experience, displaying error messaging within the form is just a change for change sake.
Let us not lose sight of the fact that we are only talking about a Returns form that is applied post-purchase. Sure, it may be convenient for customer relations, but displaying error messaging within a form does not provide for greater sales.
cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
As online forms and associated error message stacks have been around for ages, I am sure the majority of internet users are quite familiar with navigating their way through them. So from my long experience, displaying error messaging within the form is just a change for change sake.
Let us not lose sight of the fact that we are only talking about a Returns form that is applied post-purchase. Sure, it may be convenient for customer relations, but displaying error messaging within a form does not provide for greater sales.
cheers
It does provide for BETTER usability.. It's a frustrating user experience to fill out a form only to find out that it's missing data, and to have NO indication what the issue is... You cannot assume that people will just KNOW and figure it out because you assume that they SHOULD know.
Again we'll have to agree to disagree.. A returns form by it's very nature isn't helping sales, so I fail to see how providing the end user some indication that the form is not filled out correctly correlates to sales.. Displaying a generic validation message without ANY indication where the error in fact lies is not a great user experience.. In my long experience working in software development, when a form is submitted without all the required information you do need to display some indication to the end user where that error lies.. You call it change for change sake, but improving user experience is not in my opinion a bad thing..
Again clearly you do not agree with this logic..
-
Re: Return Authorization Module (RMA)
Whether it be via message-stack or inline form error messages, these error messages need to be displayed one way or another (if you want required fields).
This mod uses inline error messages, IMHO, i do not think this was change for change sake, with so many forms using CSS tool-tips and jQuery to display inline error messages, I think it was to give the form a more up-to-date presence.
If one chooses to convert to message-stack by all means, try my MessageStack LightAlert Light Box.
I have to agree with @DivaVocals, the inline error messages do provide better usability hence all the new CSS tool-tips and jQuery form builders.
A Return form DOES help sales and confidence with a customer IMHO.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
you do need to display some indication to the end user where that error lies
But error messages should provide for that:
eg Postcode input requires a minimum of 3 characters,
where "Postcode", in this instance, is the name of the input field.
Cheers
-
Re: Return Authorization Module (RMA)
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
A Return form DOES help sales and confidence with a customer IMHO.
We are not disputing the value of Return forms, but rather only where the error messages in the updated mod are to be placed.
My comment regarding form layout dirsuption seems to have been overlooked.
cheers
-
1 Attachment(s)
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
But error messages should provide for that:
eg Postcode input requires a minimum of 3 characters,
where "Postcode", in this instance, is the name of the input field.
Cheers
and those error messages are what is displayed in the current RMA form.. Why is this a BAD thing???:
Attachment 12470
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
Whether it be via message-stack or inline form error messages, these error messages need to be displayed one way or another (if you want required fields).
This mod uses inline error messages, IMHO, i do not think this was change for change sake, with so many forms using CSS tool-tips and jQuery to display inline error messages, I think it was to give the form a more up-to-date presence.
If one chooses to convert to message-stack by all means, try my MessageStack LightAlert Light Box.
I have to agree with @DivaVocals, the inline error messages do provide better usability hence all the new CSS tool-tips and jQuery form builders.
A Return form DOES help sales and confidence with a customer IMHO.
I agree.. inline messages are used more often in applications these days because they ensure that end users have fewer issues understanding EXACTLY what is required when a form fails validation on submit. It's not change for change sake at all.. it is IMPROVED usability, and I don't understand how that is a BAD thing..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
We are not disputing the value of Return forms, but rather only where the error messages in the updated mod are to be placed.
My comment regarding form layout dirsuption seems to have been overlooked.
cheers
Not overlooked, I ran into the same issue on a site I updated - def something to reconsider as far as adding constraints for the displayed (span) error which should be easily accomplished as I used css.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
My comment regarding form layout dirsuption seems to have been overlooked.
cheers
Not sure what you are referring to here.. what layout "disruption" (not sure if this is misspelled or not in your post) are you referring to???
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
I seem to have misplaced by reading glasses.
Cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
I seem to have misplaced by reading glasses.
Cheers
If you are referring to the size of the error message font, you do realize that the forum software shrinks these inline images.. the actual page is not unreadable or microscopic by any means..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
It does provide for BETTER usability.. It's a frustrating user experience to fill out a form only to find out that it's missing data, and to have NO indication what the issue is... You cannot assume that people will just KNOW and figure it out because you assume that they SHOULD know.
Again we'll have to agree to disagree.. A returns form by it's very nature isn't helping sales, so I fail to see how providing the end user some indication that the form is not filled out correctly correlates to sales.. Displaying a generic validation message without ANY indication where the error in fact lies is not a great user experience.. In my long experience working in software development, when a form is submitted without all the required information you do need to display some indication to the end user where that error lies.. You call it change for change sake, but improving user experience is not in my opinion a bad thing..
Again clearly you do not agree with this logic..
to add to this wanted to quote something I read that torvista posted this morning in a completely different thread, but it is applicable to this discussion:
Quote:
I subscribe to the design theory: "Don't make me think" (or rather "...assume I cannot think").
Exactly!!
-
Re: Return Authorization Module (RMA)
So, I have made tremendous headway with this mod, to many new features to list but I will list a few:
Admin option for every field:
0 = Display as Optional
1 = Display as Required
2 = Do not Display
Admin option for error display
true = Inline Display
false = Messagestack Display
Admin option to display Store Name & Address on returns page
Admin option to display Store Name & Address on returns success page
true
false
Admin option to display Different Store Name & Address on returns success page (if a different address is used to process returns)
Admin Order History Info RMA Button/Link Display options
0 = Display as Button
1 = Display as Link
Admin controlled text for above Link Display
And many many more options!!!
I am going to package and forward the files to @DivaVocal to test and make necessary changes. Due to the many features and flexibility I think a new upload and thread should be started.
Flexible Return Authorization (RMA) for Zen Cart 1.5.x
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
So, I have made tremendous headway with this mod, to many new features to list but I will list a few:
Admin option for every field:
0 = Display as Optional
1 = Display as Required
2 = Do not Display
Admin option for error display
true = Inline Display
false = Messagestack Display
Admin option to display Store Name & Address on returns page
Admin option to display Store Name & Address on returns success page
true
false
Admin option to display Different Store Name & Address on returns success page (if a different address is used to process returns)
Admin Order History Info RMA Button/Link Display options
0 = Display as Button
1 = Display as Link
Admin controlled text for above Link Display
And many many more options!!!
I am going to package and forward the files to @DivaVocal to test and make necessary changes. Due to the many features and flexibility I think a new upload and thread should be started.
Flexible Return Authorization (RMA) for Zen Cart 1.5.x
Wow.. you are awesome!!:clap: I'll PM you my e-mail address.. I totally agree about the new support thread as well..
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Wow.. you are awesome!!:clap: I'll PM you my e-mail address.. I totally agree about the new support thread as well..
Flexible Return Authorization has been submitted to downloads.. the support thread for the new Module is here: http://www.zen-cart.com/showthread.p...Support-Thread..
I'll post updates when the module is available for download..
-
Re: Return Authorization Module (RMA)
can anyone post a link to this mod working? I would like to see a demo before i install. sounds like just what I need though :)
-
Re: Return Authorization Module (RMA)
Installed this mod on a 1.3.9h site. Configuration page shows and works in admin. The returns page appears to collect all the data but the email lacks all the data collected on the Returns page. It's as though the $EXTRA_INFO field doesn't make it to the email.
Other install mods are FEC.
Thanks in advance to an insight as to solving this.
-
Re: Return Authorization Module (RMA)
Just tried to install RMA mod on a new 1.5.4 install and getting the following error: Column count doesn't match value count at row 1
After a little research it seems if the installer for this module shortcuts explicitly naming the columns it will spit out the column count error when run.. Is there a updated install script that I can try?
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
marcopolo
Just tried to install RMA mod on a new 1.5.4 install and getting the following error: Column count doesn't match value count at row 1
After a little research it seems if the installer for this module shortcuts explicitly naming the columns it will spit out the column count error when run.. Is there a updated install script that I can try?
Which specific RMA mod are you trying to install?
What other mods do you have installed? Specifically anything by Numinix? Many numinix mods break other mods' install logic because of the changes Numinix made to database tables. To work around that you may need to alter your install scripts to specifically list all the column names for which it is inserting data.
ie: change the install.sql from
Code:
INSERT INTO `configuration` VALUES .....
to
Code:
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES .....
-
Re: Return Authorization Module (RMA)
Hello DrByte, thanks for responding to my issue. Yes I have a few Numinix modules installed and figured it was because of them. It's the regular RMA module not the flexible one. I will try your solution later this evening when I'm able to work on the site and report back.
-
Re: Return Authorization Module (RMA)
Ok it worked!
Here is the original code:
Code:
#Return Authorization SQL Install
# For Zen-Cart 1.3.9
# Last Updated: 4/13/2010
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Return Authorization';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_RETURNS_STATUS';
INSERT INTO configuration_group VALUES (NULL, 'Return Authorization', 'Return Authorization Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Return Authorization';
INSERT INTO `configuration` VALUES (NULL, 'Phone Number', 'RETURN_PHONE', 'true', 'Display phone number field', @t4, 1, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` VALUES (NULL, 'Item Name', 'RETURN_ITEM_NAME', 'true', 'Display Item Name field', @t4, 2, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` VALUES (NULL, 'Item Number', 'RETURN_ITEM_NUMBER', 'true', 'Display Item Number field', @t4, 3, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` VALUES (NULL, 'Total Value', 'RETURN_VALUE', 'true', 'Display Total Value', @t4, 4, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` VALUES (NULL, 'Only registered customers may submit a return request', 'REGISTERED_RETURN', 'false', 'Only registered customers may submit a return request', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES (NULL, 'Set "Return Action" Dropdown List', 'RETURN_ACTION_LIST', 'Refund, Replacement, Repair', 'On the "Return Authorization" Page, set the list of actions , in this format: Action 1, Action 2', @t4, 6, NULL, now(), NULL, 'zen_cfg_textarea(');
INSERT INTO `configuration` VALUES (NULL, 'Return - Show Store Name and Address', 'RETURN_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 7, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` VALUES (NULL, 'Define Return Authorization', 'DEFINE_RETURNS_STATUS', '1', 'Enable the Defined Return Authorization Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO `configuration` VALUES (NULL, 'Return Authorization Version', 'RA_VERSION', '2.3.3', 'Return Authorization version', @t4, 9, NULL, now(), NULL, NULL);
Here is what I changed it to:
Code:
#Return Authorization SQL Install
# For Zen-Cart 1.3.9
# Last Updated: 4/13/2010
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Return Authorization';
DELETE FROM configuration WHERE configuration_group_id = @t4;
DELETE FROM configuration_group WHERE configuration_group_id = @t4;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_RETURNS_STATUS';
INSERT INTO configuration_group VALUES (NULL, 'Return Authorization', 'Return Authorization Display Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Return Authorization';
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Phone Number', 'RETURN_PHONE', 'true', 'Display phone number field', @t4, 1, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Item Name', 'RETURN_ITEM_NAME', 'true', 'Display Item Name field', @t4, 2, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Item Number', 'RETURN_ITEM_NUMBER', 'true', 'Display Item Number field', @t4, 3, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Total Value', 'RETURN_VALUE', 'true', 'Display Total Value', @t4, 4, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''), ');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Only registered customers may submit a return request', 'REGISTERED_RETURN', 'false', 'Only registered customers may submit a return request', @t4, 5, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Set "Return Action" Dropdown List', 'RETURN_ACTION_LIST', 'Refund, Replacement, Repair', 'On the "Return Authorization" Page, set the list of actions , in this format: Action 1, Action 2', @t4, 6, NULL, now(), NULL, 'zen_cfg_textarea(');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Return - Show Store Name and Address', 'RETURN_STORE_NAME_ADDRESS', 'true', 'Include Store Name and Address', @t4, 7, NULL, now(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Define Return Authorization', 'DEFINE_RETURNS_STATUS', '1', 'Enable the Defined Return Authorization Link/Text?<br />0= Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link OFF, Define Text OFF', @t4, 8, NULL, now(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
INSERT INTO `configuration` (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Return Authorization Version', 'RA_VERSION', '2.3.3', 'Return Authorization version', @t4, 9, NULL, now(), NULL, NULL);
-
Re: Return Authorization Module (RMA)
Just a small change to your installation SQL, so you're not deleting elements in configuration_group_id = 0 on the initial install:
Code:
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Return Authorization';
DELETE FROM configuration WHERE configuration_group_id = @t4 AND @t4 != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @t4 AND @t4 != 0;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_RETURNS_STATUS';
.
.
.
-
Re: Return Authorization Module (RMA)
Thanks but I ran the install script already do you think it deleted something it was not suppose to? I have backup of course so I can restore if I have to.
-
Re: Return Authorization Module (RMA)
Check out this (http://www.thatsoftwareguy.com/blog/...t-not-working/) entry in swguy's blog; it tells you how to get those values back ... if you're running a Zen Cart version prior to v1.5.4.
-
Re: Return Authorization Module (RMA)