Re: Return Authorization mod issues...
Quote:
Originally Posted by
DivaVocals
xspresso --
Try this version of RMA I've attached here.. I installed this on my client's site a while back and really meant to submit it to the downloads section, but got too busy to package it up for submission.. I cleaned up some of Clyde's old code and removed all of the ordered lists from the returns form so it functions/looks like other default Zen Cart forms, I and also updated the graphics to much cleaner versions (no jagged edges)..
I took a quick look at the v3.0.0 files and part of the issue is the SQL file contains code that will create issues and is not recommended.. This might be part of the issues you are having with this version..
This version is SUPER simple to install since there is no external SQL file to run.. However, you will probably need to manually delete the entries created by the version you already installed BEFORE you install it or you WILL have errors when it attempts to create the database entries if ANY of the old stuff is still there...
All you need to do is the following:
- Rename the template and admin folders to match your store's template and admin folders
- Login to your store
- Open the "install_files" folder
- Copy the RMA files over to your store
- Once all the files are uploaded, click ANY link in your admin to activate the install..
That's it!! Easy Peezy!!
If you report no issues with this, I'll submit it to the downloads section.. I just did a quick re-check and had absolutely NO ISSUES installing this..
For the record, this section of the SQL is problematic
Code:
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
Re: Return Authorization mod issues...
Quote:
Originally Posted by
DivaVocals
xspresso --
Try this version of RMA I've attached here.. I installed this on my client's site a while back and really meant to submit it to the downloads section, but got too busy to package it up for submission.. I cleaned up some of Clyde's old code and removed all of the ordered lists from the returns form so it functions/looks like other default Zen Cart forms, I and also updated the graphics to much cleaner versions (no jagged edges)..
I took a quick look at the v3.0.0 files and part of the issue is the SQL file contains code that will create issues and is not recommended.. This might be part of the issues you are having with this version..
This version is SUPER simple to install since there is no external SQL file to run.. However, you will probably need to manually delete the entries created by the version you already installed BEFORE you install it or you WILL have errors when it attempts to create the database entries if ANY of the old stuff is still there...
All you need to do is the following:
- Rename the template and admin folders to match your store's template and admin folders
- Login to your store
- Open the "install_files" folder
- Copy the RMA files over to your store
- Once all the files are uploaded, click ANY link in your admin to activate the install..
That's it!! Easy Peezy!!
If you report no issues with this, I'll submit it to the downloads section.. I just did a quick re-check and had absolutely NO ISSUES installing this..
and so it's perfectly clear, when I say delete any previous version files Imean you need to delete ALL the files and ALL the database entries too (running the uninstall SQL MAY do the trick)
ETA:
Nevermind.. let me just give you the correct uninstall SQL to run BEFORE you install the version I posted:
Code:
SELECT @t4:=configuration_group_id
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_group_id = @configuration_group_id;
DELETE FROM configuration_group WHERE configuration_group_id = @configuration_group_id;
DELETE FROM configuration WHERE configuration_key = 'DEFINE_RETURNS_STATUS';
Re: Return Authorization mod issues...
Thank you so much DivaVocals I was on the edge of taking out my old cgi RMA script and incorporating that.
Re: Return Authorization mod issues...
Quote:
Originally Posted by
xspresso
Thank you so much DivaVocals I was on the edge of taking out my old cgi RMA script and incorporating that.
Sure thing glad it worked for ya..:smile: (it did work right??)
Re: Return Authorization mod issues...
Fast and so easy is how it worked!
While I have your attention.....
The success page after submission, is there a way to do something like this?
<?php if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
<h1>$order_number - $item_number</h1>
<h1>Thank you for completing the RMA <BR> Your RMA number is above. Follow these directions.............etc</h1>
<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
<?php } ?>
(on my form I changed Item number to Number of Items)
This way the rma would be the invoice number xxxxx a dash - and the total number of items being returned ie: 42545-2.
All the instructions would be on the success page and no further need to email customer.
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
steveyork136
Hi clydejones
I add a link from the customers account page, so on page tpl_account_default.php where a customer can view their orders, next to the view button there is a "return request button", clicking this button sends the customer (with the order_id in the url) to the return request page.
This is the code for the tpl_account_default.php page
The extra code is <th scope="col"><?php echo TABLE_HEADING_RMA; ?></th> which adds the column header
and
<td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>
which builds the link using the zen button scheme
Code:
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="prevOrders">
<caption><h2><?php echo OVERVIEW_PREVIOUS_ORDERS; ?></h2></caption>
<tr class="tableHeading">
<th scope="col"><?php echo TABLE_HEADING_DATE; ?></th>
<th scope="col"><?php echo TABLE_HEADING_ORDER_NUMBER; ?></th>
<th scope="col"><?php echo TABLE_HEADING_SHIPPED_TO; ?></th>
<th scope="col"><?php echo TABLE_HEADING_STATUS; ?></th>
<th scope="col"><?php echo TABLE_HEADING_TOTAL; ?></th>
<th scope="col"><?php echo TABLE_HEADING_VIEW; ?></th>
<th scope="col"><?php echo TABLE_HEADING_RMA; ?></th>
</tr>
<?php
foreach($ordersArray as $orders) {
?>
<tr>
<td width="80px"><?php echo zen_date_short($orders['date_purchased']); ?></td>
<td width="40px"><?php echo TEXT_NUMBER_SYMBOL . $orders['orders_id']; ?></td>
<td align="center"><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' . $orders['order_country']; ?></address></td>
<td width="80px"><?php echo $orders['orders_status_name']; ?></td>
<td width="80px" align="right"><?php echo $orders['order_total']; ?></td>
<td align="center"><?php echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_VIEW_SMALL, BUTTON_VIEW_SMALL_ALT) . '</a>'; ?></td>
<td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>
</tr>
<?php
}
?>
</table>
Hello
Can anyone tell me why this code does NOT return the Order ID to the RMA form?
2 Attachment(s)
Re: Return Authorization Module (RMA)
I separated the submit rma page from the success page.
I added a generated RMA number.
I would really like the invoice number included in that rma generation.
When the customer is logged in, they can click a button next to their "view" order button
in "View Account".
This should immediately forward you to the rma form with all your personal info fields populated.
Including your invoice order number.
It does carry in the url:
/index.php?main_page=returns&order_id=105308
But does not fill the order number field.
I will post all my upgrades once this is solved. Can anyone help solve this?
Attachment 12375Attachment 12376
Re: Return Authorization Module (RMA)
1. look at the returns page header_php.php file to see how it auto generates name, email, phone, ect.
2. look at the code for account > history info
just a suggestion and may lead you in the right direction
Re: Return Authorization Module (RMA)
So this was pretty easy and it's a great function.
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'); <-- Name of your button
define('BUTTON_RMA_REQUEST_ALT', 'Request an RMA'); <-- You buttons ALT (alternative text)
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>
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:
if (REGISTERED_RETURN == 'true'){
if (!$_SESSION['customer_id']) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
}
right below that add:
PHP Code:
if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));
}
towards the bottom find:
PHP Code:
$city = $check_customer->fields['entry_city'];
right 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'];
Thats it, now your customers "Order Number" text field on the returns page will be pre-populated by the order_id from within the My Account > History > Order Info page
Enjoy!
Re: Return Authorization Module (RMA)
Hi everyone,
rbarbour thank you very much. I will add that once I figure out why my page goes blank.
I hate to say it but it happened again, my "index.php?main_page=returns" page comes back blank.
Now I know I made a lot of changes but as before I rolled back my changes... nothing.
I deleted the entire script, removed all mysql entries.
Re-installed DivaVocals update (3.1) the database installed, double checked the database, all there...but still nothing just a blank page
The strange part is when I delete "returns.php" my "index.php?main_page=returns" page returns (no longer blank, just like 2.33 did).
But it is not reading the english file, the php is what is showing ie; ENTRY_REASON_TEXT etc
the only mod is fast and easy checkout 1.10.0
Thanks