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
Bookmarks