-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
clydejones
You're duplicating functionality that should be (and is) handled by web browsers.
Users can click the "file" in the browser tool bar and select "print" and the page will be printed.
Adding/duplicating this functionality requires using javascript. If a user has java turned off, then of course the functionality disappears.
I'm not saying it can't be done; I'm just pointing out that the functionality already exists and can be handled by the browser.
Hi! clyde,
Thank you again for your response! I knew that the "print" funcion has already exsits on the browser, but I just want to add the java code to the RMA form, so my customer can print them easily and they can also send a "RMA request" e-mail to me! I want to know which file i can edit the code to! Here is my RMA page!
Please Help me figure out! Thank you so much for your help!
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
zfw88788301
Hi! clyde,
Thank you again for your response! I knew that the "print" funcion has already exsits on the browser, but I just want to add the java code to the RMA form, so my customer can print them easily and they can also send a "RMA request" e-mail to me! I want to know which file i can edit the code to! Here is my
RMA page!
Please Help me figure out! Thank you so much for your help!
You can edit includes/templates/YOUR_TEMPLATE/templates/tpl_returns_default.php
find the following section of code
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
and insert your javascript
Be aware that if a user clicks the "send now" button before clicking the "print page" link then there will be nothing to print.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
clydejones
You can edit includes/templates/YOUR_TEMPLATE/templates/tpl_returns_default.php
find the following section of code
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
and insert your javascript
Be aware that if a user clicks the "send now" button before clicking the "print page" link then there will be nothing to print.
Thank you clyde for your help!now, my customers can print the form and return to me! ThanKs!
-
Re: Return Authorization Module (RMA)
How can edit the format of the EMAIL that the STORE RECEIVES containing the info on the form the customer fills out.
The info runs together. It needs some line breaks!
Thanks!
-
Re: Return Authorization Module (RMA)
To be more specific:
Top part of the email is running together. The bottom part, after "Office Use Only" is listing the info nicely.
Here' what I'm getting:
From: Joe PublicEmail: joe######################Phone
Number: 2125551234Address: 123 Street RdCity: SpringfieldPost
Code: 11111Country: USAState: NYOrder Number: 2Total Value: Item
Number: Item Name: Action
Requested: Replacement------------------------------------------------------Reason: because------------------------------------------------------Office
Use Only:
From: Joe Public
Email: [email protected]
Telephone: 2125551234
IP Address: xxxxxx - xxxxxxxx
Host Address: xxxxxxxxxxx.nyc.res.rr.com
Date and Time: Wed Mar 2 2011 15:11:14 CST
Any ideas how I can get that top part of the email to have line breaks like the bottom section?
-
1 Attachment(s)
Re: Return Authorization Module (RMA)
FOUND IT, CLYDE!
POST #489 you posted the a zip called osaeed_fix which adds those /n/n before the breaks in modules/pages/returns/header_php.php
Thanks so much!
I'll re-attach it to this post for others if they need it.
-
Re: Return Authorization Module (RMA)
I know the Returns Request "Number" has been mentioned before and the answer has been "... make up a number yourself."
But...
Is there any "simple" php that could generate a 6-digit number (random or sequential) that is emailed to both the Return Seeker and the Store Owner. It wouldn't need to be stored in the SQL database, but just be a hidden field that gets emailed along with the other form info.
This way there would be a Returns Request Number that is different from the order number that both the customer and the store can reference - and it would be received by the costumer on "first contact" instead of having to email the customer at a later time with a number. It would be even better to have the Order Number incorporated somehow at then end or beginning of the Generated Number.
Just a thought..:lookaroun
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
clydejones
Sorry, :blush: Don't use quick_fix.zip It includes a file that shouldn't be included.
Use this instead. You'll have to rename the YOUR_TEMPLATE folders to match your custom template name.
Attachment 1461
Hi CLyde
Way back in Feb 2007 (post #80) you provided a solution for the automatic inclusion of customer's country into RMA titled QuickFix2.zip, but which is now a non-existant Attachment 1461.
Having recently reverted back to the less cluttered layout of RMA2.2.2, I am hoping you could repost or PM me this file to me so that I can compare/repair my botched solution with your fix.
Thanks in advance.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
dw08gm
Hi CLyde
Way back in Feb 2007 (post #80) you provided a solution for the automatic inclusion of customer's country into RMA titled QuickFix2.zip, but which is now a non-existant Attachment 1461.
Having recently reverted back to the less cluttered layout of RMA2.2.2, I am hoping you could repost or PM me this file to me so that I can compare/repair my botched solution with your fix.
Thanks in advance.
All the fixes mentioned in this thread are included in the latest version of RMA
-
Re: Return Authorization Module (RMA)
Hi Clyde
Thanks for your prompt reply. I will check out the update and report back.
FWIW, wrt a Returns Request "Number", I changed the references to EMAIL_SUBJECT in the zen-mail code to $email_subject and added the definition:
$email_subject = EMAIL_SUBJECT . ' ' . $order_number
Cheers
-
Re: Return Authorization Module (RMA)
Merged 2.2.2 layout with 2.3.3 additions, and with a few other tweaks, all is sweet.
-
1 Attachment(s)
Re: Return Authorization Module (RMA)
Hey Clyde, I did a test run of the email sent to the customer, please see the attached.
basically here it is
Dear Joseph Smith Thank you for your recent request. Your request has been successfully submitted to Axle Inc.. It will be reviewed and you will receive an email with instructions on how to proceed. If you have not received it within the next 48 hours, please contact us before submitting your request again. For help with our Returns , please email the store-owner: Axle Inc.. Note: This email address was given to us during a Return Merchandise Authorization. If you have a problem, please send an email to Axle Inc..
basically what looks like is the email part. The script just 'text'es teh store name. there is no email address or link to click to email. Shouldn't it say something else besides the store name like
"email the store owner at [email protected] ? or is this correct?
tia!
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
willie bee
Hey Clyde, I did a test run of the email sent to the customer, please see the attached.
basically here it is
Dear Joseph Smith Thank you for your recent request. Your request has been successfully submitted to Axle Inc.. It will be reviewed and you will receive an email with instructions on how to proceed. If you have not received it within the next 48 hours, please contact us before submitting your request again. For help with our Returns , please email the store-owner: Axle Inc.. Note: This email address was given to us during a Return Merchandise Authorization. If you have a problem, please send an email to Axle Inc..
basically what looks like is the email part. The script just 'text'es teh store name. there is no email address or link to click to email. Shouldn't it say something else besides the store name like
"email the store owner at
[email protected] ? or is this correct?
tia!
The mod uses the following constant STORE_OWNER_EMAIL_ADDRESS for this portion of the email.
that constant is set in admin -> configuration -> e-mail options -> Email Address (Displayed to Contact you)
-
1 Attachment(s)
Re: Return Authorization Module (RMA)
thanks one more thing, another screen shot. on the input page, the buttons are out of alignment and i KNOW i didn't muck with the coding on that.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
willie bee
thanks one more thing, another screen shot. on the input page, the buttons are out of alignment and i KNOW i didn't muck with the coding on that.
Not mis-aligned at all.
The send button is part of the form.
The back button has nothing to do with form and sits below it and to the left.
-
Re: Return Authorization Module (RMA)
my products have serial numbers that both I and the factory in China use to track the item history can an extra field be added in the form for this
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
my products have serial numbers that both I and the factory in China use to track the item history can an extra field be added in the form for this
With a considerable re-write, yes.
-
Re: Return Authorization Module (RMA)
Clyde, I would like to take the return request data, and send the data to the order comments and then update the status.
I've managed to modify the order_questions mod so that when a customer sends a question through their order, it updates their status to a customer comment status.
What I need is to be able to have the return request update their status to customer comment and insert that they have submitted a return request.
Can you help at all, I would be willing to send some money your way if need be as this would make a huge difference to the turn around time of the after sales care.
-
Re: Return Authorization Module (RMA)
I could use
PHP Code:
$order_number = zen_db_prepare_input($_POST['order_number']);
to get the order number, then modify my code below to get it to update
PHP Code:
$order_status = '6';
$return_update = array('orders_id' => zen_db_prepare_input($_POST['order_number']),
'orders_status' => $order_status,
'comments' => zen_db_prepare_input($_POST['action']),
'comment_by' => 'c'
);
zen_db_perform(TABLE_ORDERS, $return_update, 'update', "orders_id = '" . $order_id . "'");
Now if the code works, I just need that update to be done when they hit submit.
-
Re: Return Authorization Module (RMA)
-
Re: Return Authorization Module (RMA)
Hi
Have just come across a small problem ..If i leave it as "Only registered customers" False ( so anyone can view it) it works fine but as soon as I change it to "Only registered customers" true ( you have to sign in) it seems to default to the main page once signed in..
Have had it working fine before so I know it works well
thanks for any help
-
Re: Return Authorization Module (RMA)
HI come across a few problems, installed the mod but in the information sidebox I just get box information_returns and if I click on it it takes me to a custom 404 oage not found page :frusty:
http://www.rvsolarsystems.co.uk/store/
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
ATSWorld
Hi
Have just come across a small problem ..If i leave it as "Only registered customers" False ( so anyone can view it) it works fine but as soon as I change it to "Only registered customers" true ( you have to sign in) it seems to default to the main page once signed in..
Have had it working fine before so I know it works well
thanks for any help
is anyone help help plz
thanks
-
Re: Return Authorization Module (RMA)
DigitalShadow:
Did this work for you? Were you able to complete it so it updates when the Submit button is clicked?
Any more code to share? Your idea is great and would make this mod much more complete. If you have it working please upload a new fileset including your mods to the downloads section as a new version either through Clyde or directly. Let us know here if you do upload a new version.
Many thanks in advance,
Ron
Quote:
Originally Posted by
DigitalShadow
I could use
PHP Code:
$order_number = zen_db_prepare_input($_POST['order_number']);
to get the order number, then modify my code below to get it to update
PHP Code:
$order_status = '6';
$return_update = array('orders_id' => zen_db_prepare_input($_POST['order_number']),
'orders_status' => $order_status,
'comments' => zen_db_prepare_input($_POST['action']),
'comment_by' => 'c'
);
zen_db_perform(TABLE_ORDERS, $return_update, 'update', "orders_id = '" . $order_id . "'");
Now if the code works, I just need that update to be done when they hit submit.
-
Re: Return Authorization Module (RMA)
hello my template background is black as are the default text for rma page how can i change text color for that page? im using alien-atemware template version 1.3.9
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
IronKladPC
hello my template background is black as are the default text for rma page how can i change text color for that page? im using alien-atemware template version 1.3.9
ok got figured out in includes/templates/custom/css/returns
changed to silver working great now thanks for the updating of the mod clyde!:clap:
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DigitalShadow
Anyone?
Clyde passed away suddenly and unexpectedly on Aug 13th.
-
Re: Return Authorization Module (RMA)
how can i make the phone number box as a required field as this would save a lot of time in as we like to contact the customer to make sure that it's not an installation issue they are having.
-
Re: Return Authorization Module (RMA)
Hi,
Where can I download the latest version of this?
I am running Zen Cart version 1.5
Thanks
Robin
-
Re: Return Authorization Module (RMA)
The current version 2.3.3 does work in 1.5 other than the registration of the configuration menu. You always can use PhpMyadmin for this.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
mikebr
The current version 2.3.3 does work in 1.5 other than the registration of the configuration menu. You always can use PhpMyadmin for this.
Exactly how does one go about doing this? I can get into my PhpMyadmin but I'm am lost as what to do once I am there. :ohmy:
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
Eagle5
Exactly how does one go about doing this? I can get into my PhpMyadmin but I'm am lost as what to do once I am there. :ohmy:
NOT THE RGHT WAY but you can use this http://www.your domain/your admin name/configuration.php?gID=33 the gID you'll get from configuratin_group in yor database
-
Re: Return Authorization Module (RMA)
Hello
Does anyone know if this works on the latest version 1.5.1 of Zen Cart
After I load it there is no trace of it either on home page or in Admin.
Cheers
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
NOT THE RGHT WAY but you can use this
http://www.your domain/your admin name/configuration.php?gID=33 the gID you'll get from configuratin_group in yor database
This didn't work - I have v1.5.0 and I need to edit that page, but I cannot get it to show up in admin > configuration > nothing is there. I tried your suggestion and it would be gID=33 but nothing displays. Any other ideas?
-
Re: Return Authorization Module (RMA)
Have you checked for the correct configuration_group id in your phpMyAdmin it might not be 33
Edit Edit Edit Inline Edit Copy Copy Delete Delete your id No Return Authorization Return Authorization Display Settings
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
Have you checked for the correct configuration_group id in your phpMyAdmin it might not be 33
Edit Edit Edit Inline Edit Copy Copy Delete Delete your id No Return Authorization Return Authorization Display Settings
To be honest I don't exactly know how to phpMyAdmin. I was able to edit the SQL script for what I needed the drop down actions to say, so for now it is working great. I do appreciate the module. Thank you! I will keep an eye our for an upgrade for v1.5.0 if one is put out. If not, it is working fine for the time being. Thanks :)
-
Re: Return Authorization Module (RMA)
It's a bit late now I'll pm you a walk through if you want
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
It's a bit late now I'll pm you a walk through if you want
Sure! That would be great. I have been teaching myself as I go and I am always up to learning more. Thanks!
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
It's a bit late now I'll pm you a walk through if you want
Why not post these detailed instructions HERE so the community can benefit.. (IJS)
-
1 Attachment(s)
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Why not post these detailed instructions HERE so the community can benefit.. (IJS)
Hi Diva was not sure if I could as it could be a back door to you admin and could affect your pci compliance.
first off this is a dirty work round till someone with more brains than me kindly upgrades this mod :hug: also make sure you have a really strong password to your admin ( I use lastpass as it generates a password for you and is a free os application ) my host uses C Panel and this is based on that control panels layout
1 login to you hosting account and find the link to php MyAdmin and click on it
2 then find your data base name and click on that
3 You should then see a list on the left of all the tables in you database
4 find configuration_group and click on that
5 scroll down the list of tables till you find Return Authorization Return Authorization Display Settings see image and make a note of the number in the configuration_group_id column and keep it should you need it again
Attachment 11792
6 type the following in your address bar http://www.your domain/your admin name/configuration.php?gID=the ID No You noted in step 5 this will take you to the settings screen for Return Authorization and change the settings to you requirements
done
IF THE MODS DO NOT THINK THIS SHOULD BE POSTED HERE REMOVE IT AS I SAID I'M NOT SURE IF I'M DOING THE RIGHT THING
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
discoverytdi
Hi Diva was not sure if I could as it could be a back door to you admin and could affect your pci compliance.
first off this is a dirty work round till someone with more brains than me kindly upgrades this mod :hug: also make sure you have a really strong password to your admin ( I use lastpass as it generates a password for you and is a free os application ) my host uses C Panel and this is based on that control panels layout
1 login to you hosting account and find the link to php MyAdmin and click on it
2 then find your data base name and click on that
3 You should then see a list on the left of all the tables in you database
4 find configuration_group and click on that
5 scroll down the list of tables till you find Return Authorization Return Authorization Display Settings see image and make a note of the number in the configuration_group_id column and keep it should you need it again
Attachment 11792
6 type the following in your address bar http://
www.your domain/
your admin name/configuration.php?gID=
the ID No You noted in step 5 this will take you to the settings screen for Return Authorization and change the settings to you requirements
done
IF THE MODS DO NOT THINK THIS SHOULD BE POSTED HERE REMOVE IT AS I SAID I'M NOT SURE IF I'M DOING THE RIGHT THING
Thanks!
-
Re: Return Authorization mod issues...
Using Zen Cart 1.5.1
I am about to install Return Merchandise Authorization (RMA) from the following link:
http://www.zen-cart.com/downloads.php?do=file&id=288
Is the plugin from the above link compatible with Zen 1.5.1?
Is this thread discussing the plugin from the above link or is a different plugin being discussed?
-
Re: Return Authorization mod issues...
It will work but you have to use the work round I've posted to get it to shown in your admin configuration. see above your posting
-
Re: Return Authorization mod issues...
I am wondering if someone can please help me. I am trying to edit the mod so that the from email is actually the customer email not the store email address. Currently, when a return authorization is submitted, the email comes in and in the header information the From is the customer name BUT store address instead of the customer email address. Where do I change it so the from email is the customer email address and when clicking on reply it will attempt to send to the customer address not store address?
Thanks!
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
BlessIsaacola
I am wondering if someone can please help me. I am trying to edit the mod so that the from email is actually the customer email not the store email address. Currently, when a return authorization is submitted, the email comes in and in the header information the From is the customer name BUT store address instead of the customer email address. Where do I change it so the from email is the customer email address and when clicking on reply it will attempt to send to the customer address not store address?
Thanks!
Hello, I use this module and I did a test RGA and received the request as the business owner. As the business I just hit reply and did a test to see where the reply would go. It went direct to the customer from my correct email address. Have you done a test reply? Is this what you are referring to?
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
WWRepair
Hello, I use this module and I did a test RGA and received the request as the business owner. As the business I just hit reply and did a test to see where the reply would go. It went direct to the customer from my correct email address. Have you done a test reply? Is this what you are referring to?
Thanks for your update. I need to provide more clarification. Yes! When I hit reply, the right email is displayed in the reply to (which is the customer email address). However, in Outlook if you look at the original mail below, it shows the store email address and the top header also shows the store email address.
The reason I want the original email to actually show the customer's email address is because, we use an auto responder that acknowledges the RMA submission. Unfortunately, it's using the store email address because that's what's in the display even though if manually replying through Outlook when I click reply it populates with the customer email address. I am not even sure if this all makes sense but the problem here is with the auto responder seeing the store email address instead of the customer.
Thanks for looking into this for me.
-
Re: Return Authorization mod issues...
Bless, I apologize. I misunderstood your problem. I see what you are referring to and that is beyond my knowledge :blink: Sorry I couldn't help you. Good Luck!
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
BlessIsaacola
Thanks for your update. I need to provide more clarification. Yes! When I hit reply, the right email is displayed in the reply to (which is the customer email address). However, in Outlook if you look at the original mail below, it shows the store email address and the top header also shows the store email address.
The reason I want the original email to actually show the customer's email address is because, we use an auto responder that acknowledges the RMA submission. Unfortunately, it's using the store email address because that's what's in the display even though if manually replying through Outlook when I click reply it populates with the customer email address. I am not even sure if this all makes sense but the problem here is with the auto responder seeing the store email address instead of the customer.
Thanks for looking into this for me.
the issue you are having can't be fixed by any quick fix of this module. You will need to play with and adjust your Outlook rules so that your auto responder works as you wish.. if you are proficient in Outlook it should be easy to do..
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
Kevin205
Using Zen Cart 1.5.1
I am about to install Return Merchandise Authorization (RMA) from the following link:
http://www.zen-cart.com/downloads.php?do=file&id=288
Is the plugin from the above link compatible with Zen 1.5.1?
Is this thread discussing the plugin from the above link or is a different plugin being discussed?
I have just updated this mod to work on 1.5.1 and sent it for approval so hopefully should be available soon.
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
alray10
I have just updated this mod to work on 1.5.1 and sent it for approval so hopefully should be available soon.
I had the 1.39 installed and it was working fine.
I installed the 1.5.1 (3.0) and now the page is blank.
I did the sql upgrade, then refreshed my returns page and blank.
Uninstalled all 1.51 pages, then did the uninstall of mysql using: uninstall_return_authorization.sql
(included in the 3.0 folder)
then installed the 1.39 rma (as I did originally), I ran the install mysql from within zen (as I did originally).
called the admin returns using http://www.your domain/your admin name/configuration.php?gID=3? (first was 34 now it is 37)
The admin section is fine but still... the main customer rma page is blank.
Any help would be great.
Thanks
-
Re: Return Authorization mod issues...
Quote:
Originally Posted by
xspresso
I had the 1.39 installed and it was working fine.
I installed the 1.5.1 (3.0) and now the page is blank.
I did the sql upgrade, then refreshed my returns page and blank.
Uninstalled all 1.51 pages, then did the uninstall of mysql using: uninstall_return_authorization.sql
(included in the 3.0 folder)
then installed the 1.39 rma (as I did originally), I ran the install mysql from within zen (as I did originally).
called the admin returns using
http://www.your domain/your admin name/configuration.php?gID=3? (first was 34 now it is 37)
The admin section is fine but still... the main customer rma page is blank.
Any help would be great.
Thanks
Blank page = error.. Need to know what the error log generated says.. Otherwise we'll all be guessing what the issue is you are having..
-
Re: Return Authorization mod issues...
Upgrading from your version of RMA 2.3.3 (zencart 139h) -> RMA 1.5.1 (zencart 151)
1. If you had customised your version of RMA 2.3.3 in zencart 139h, all of those files can be copied directly to their corresponding folders in your zencart 1.5.1 store. Then go to step 2 below.
Otherwise, ensure all folders named YourTemplate (or similar) in Return Authorization 2.3.3 are changed to the actual name of your template in your zencart 1.5.1 store.
Then upload all of the Return Authorization 2.3.3 files in \email\ and \includes\ folders to their corresponding folders in your store, but do not upload any *.sql and *.txt files.
2. Copy the file Return Authorization 3.0.0\1.5.1\admin\includes\languages\english\extra_definitions\returns.php to the corresponding admin folder in your zencart 1.5.1 store.
3. Edit Return Authorization 3.0.0\1.5.1\install_return_authorization.sql
change last line from
Code:
INSERT INTO `configuration` VALUES (NULL, 'Return Authorization Version', 'RA_VERSION', '2.3.3', 'Return Authorization version', @t4, 9, NULL, now(), NULL, NULL);
to
Code:
INSERT INTO `configuration` VALUES (NULL, 'Return Authorization Version', 'RA_VERSION', '3.0', 'Return Authorization version', @t4, 9, NULL, now(), NULL, NULL);
and then save this file.
4. Copy and paste contents of your saved install_return_authorization.sql into Admin > Tools > Install sql patches page of your zencart 1.5.1 store, then click send.
5. Copy and paste contents of \Return Authorization 3.0.0\1.5.1\1.5.1-patch.sql into Admin > Tools > Install sql patches page of your zencart 1.5.1 store, then click send.
If you do no wrong, consider job done. Enjoy.
-
Re: Return Authorization mod issues...
The log file
I tried that first. Nothing (that I see)
imestamp admin_user ip_address page_accessed parameters flagged attention postdata
2013-04-15 23:08:30 1 admin 108.33 admin_activity.php action=save& 0 stdClass Object
(
[format] => 0
[filename] => admin_activity_archive_2013-04-15_23-07-35.csv
)
2013-04-15 23:07:35 1 admin 108.33 admin_activity.php 0
2013-04-15 23:06:32 1 admin 108.33 admin_activity.php action=save& 0 stdClass Object
(
[format] => 0
[filename] => admin_activity_archive_2013-04-15_23-06-26.csv
)
No errors in the cpanel log (blank)
As I said above I had the 1.39 installed and it was working fine.
I installed the 1.5.1 (3.0) by uploading 3.0 over 2.2 (i did not delete it)
The store is new I did not do any custom work to RMA.
I installed the sql from the 1.51 folder then I installed the patch for 1.51.
Then refreshed my returns page and it was blank.
Uninstalled all 1.51 pages, then did the uninstall of mysql using: uninstall_return_authorization.sql
(included in the 3.0 folder)
then installed the old original 1.39 rma (as I did originally), I ran the mysql (from orig 1.39) from within zen (as I did originally).
called the admin returns using http://www.your domain/your admin name/configuration.php?gID=3? (first was 34 now it is 37)
The admin section is fine but still... the main customer rma page is blank.
And again I deleted each page manually. And started a new install of the 1.51 from scratch.
Checked each line in mysql and all looks good there.
It seems the only variable here is the database.
So here I go again. I just deleted the config and config group entries using Return Authorization SQL Uninstall
Version: 2.3.3. I verified that all is uninstalled.
I installed 1.39 again, blank page. WTBlank.
Any ideas.
-
Re: Return Authorization mod issues...
xspresso
Which version of zencart are you running?
Have you read the entire RMA support thread?
If you are running zencart 139h, try loading 2.3.2 or 2.3.3 version of RMA. The 151 version of RMA 3.0 is not suited to 139h.
If you are running zencart 151, my instructions should work for 2.3.3 version of RMA.
Cheers
-
Re: Return Authorization mod issues...
Hi thanks for answering.
Yes fresh install 1.51. zen cart (I did mention the store was new.)
I installed rma 2.33 on zen 1.51, it worked fine.
I have been installing scripts for 15 years and using zen for dozens of projects.
I joined this forum in 2008 because I had a problem but fixed it without needing to post.
I always read the forum first, that always fixes the problem.
I deleted the 2.33 files and unzipped a fresh download, just in case.
I am thinking that it is not reading from the database.
I don't know much about mysql, could it be the sort order. First install 33
after updating database it went to 34 and is now 38 after deleting and trying 4 times.
The question: is there someplace else in mysql that keeps track of the sort order for returns?
(besides configuration and configuration group)
I forgot about this log!
[16-Apr-2013 09:05:28 America/Chicago] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so: cannot open shared object file: No such file or directory in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: timezonedb: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: third_arg_force_ref in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Warning: PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[16-Apr-2013 09:05:29 America/Chicago] PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
I would not post now if I did not need some ideas of what MIGHT be possibly wrong.
I realize it should work, and I realize 1.51 rma wont work on 1.39 zen.
I have completely uninstalled it 4 times and tried both the 1.39 rma and the 1.51 rma
and all pages come up blank. (not 404 etc just blank) source shows a "1")
-
Re: Return Authorization mod issues...
More log files.
I am in EST (Chicago is PST?)
lected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/languages/abbington_mega/english.php on line 16
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/languages/english/email_extras.php on line 30
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/languages/english.php on line 16
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/init_includes/init_special_funcs.php on line 36
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: date() [<a href='function.date'>function.date</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/counter.php on line 21
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: mktime() [<a href='function.mktime'>function.mktime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/counter.php on line 53
[16-Apr-2013 16:41:03 America/Chicago] PHP Warning: strftime() [<a href='function.strftime'>function.strftime</a>]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/sup/public_html/partydsc/includes/counter.php on line 53
-
Re: Return Authorization mod issues...
Sorry to blast you with all this.
But I deleted the returns.php.... Now the page show up in the site. It does not have text, just the statements ie;
ENTRY_NAME and not First Name.
I tried replacing returns.php with the 3.0 version and I get blank page returns.
-
Re: Return Authorization mod issues...
post a copy of that file - must have an error in it if it returns a bank page
-
Re: Return Authorization mod issues...
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..
-
Re: Return Authorization mod issues...
-
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
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
xspresso
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
Blank page = error log.. can't GUESS why you are getting a blank page.. post the results of the error log..
-
Re: Return Authorization Module (RMA)
Hello and thank you for your efforts.
There are a few items that I would like to change, the page returns to the view history in my account,
can we add an if else or something to the code below to send it to "success" after submission.
if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, '', 'SSL'));
}
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
Also:
Since the code you wrote is not used during success, the order_number will not show in success (i guess) without calling it from the database from within success?
P.S. my page was blank because I guess I have fat fingers and added an extra ' to the returns.php
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
xspresso
Hello and thank you for your efforts.
There are a few items that I would like to change, the page returns to the view history in my account,
can we add an if else or something to the code below to send it to "success" after submission.
if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, '', 'SSL'));
}
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
If you remove that code all together, it will produce the success page after the form is submitted.
-
Re: Return Authorization Module (RMA)
1.) Disregard my previous posts for I did not test thoroughly with @DivaVocals updated version.
2.) I actually installed the new version but did not test it (jumped the gun), but when I did (without any alterations), I am getting the send button on the success page (I am getting the success page) and no email being sent.
-
Re: Return Authorization Module (RMA)
Thank you that works great.
I hate to be a pain... but I'm sure it's too late!
Can you see any way to get the order_number to the success page?
-
Re: Return Authorization Module (RMA)
I removed that code and it send me back to success.
The success page I thought always had the send button, I was going to look at that next.
I get the email just fine.
-
Re: Return Authorization Module (RMA)
The button was to low I moved it up a few lines.
<fieldset>
<legend class="write"><?php echo ENTRY_REASON; ?></legend>
<label class="inputLabel" for="reason"><?php echo (($error == true && $entry_reason_error == true) ? ENTRY_REASON_TEXT . 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_REASON_TEXT . 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_reason_error == true) ? zen_draw_textarea_field('reason', '30', '7', $reason, 'id="reason"') . ENTRY_REASON_TEXT_ERROR : zen_draw_textarea_field('reason', '30', '7', $reason, 'id="reason"')); ?>
</fieldset>
</div>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></div>
<?php
}
?>
</form>
<br class="clearBoth" />
</div>
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
xspresso
I removed that code and it send me back to success.
The success page I thought always had the send button, I was going to look at that next.
I get the email just fine.
Never paid attention to that, but YES the send button has always been on the success form.. It SHOULD NOT be there.. Somehow in scrubbing the code and fixing the form I missed that.. Will update my version and submit it to the downloads section..
-
Re: Return Authorization Module (RMA)
UPDATED
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
in the middle of the file find:
PHP Code:
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));
towards the bottom find:
PHP Code:
$postcode = $check_customer->fields['entry_postcode'];
}
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'];
Now in /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_returns_default.php
find:
PHP Code:
<div class="mainContent success"><?php echo TEXT_SUCCESS; ?></div>
change to:
PHP Code:
<div class="mainContent success"><?php echo TEXT_SUCCESS; ?><?php echo 'Your RMA# is: '; $order_number = $_GET['order_id']; echo $order_number;?></div>
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 & sent to the success page
Enjoy!
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Never paid attention to that, but YES the send button has always been on the success form.. It SHOULD NOT be there.. Somehow in scrubbing the code and fixing the form I missed that.. Will update my version and submit it to the downloads section..
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.
-
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)
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
correct
Awesome.. Nice code.. I will incorporate your code into the core.. I think it SHOULD be included.. and then I'll submit the whole bloody thing to the RIGHT place..:smile:
-
Re: Return Authorization Module (RMA)
:bigups: Works for me! Thank you.
-
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!
That is very nice work. It is everything I have been trying to do for a week.
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
xspresso
That is very nice work. It is everything I have been trying to do for a week.
I'm glad we got it sorted and working :D
-
Re: Return Authorization Module (RMA)
This allows the customer to receive the RMA # in their email.
I also laid-out the email to look better.
Code:
// Prepare extra-info details
$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 />" .
"Total Value:" . "\t" . $value . "\n<br />" .
"Item Number:" . "\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 . "-". date('mdY') . "\n<br />" .
'------------------------------------------------------<br />' .
"\n\n<br />Reason:". "\n\n<br />" .
"" . $reason . "\n<br />" .
'------------------------------------------------------<br />' .
"" . "\n<br />" .
$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') . "\n<br />" ;
$email_text .= "\n" . "Invoice Number:" . "\t" . $order_number . "<br />" ;
$email_text .= "\n" . "Item(s)You Are Returning: (as you entered it)" . "\t" . $item_name . "<br />";
$email_text .= "\n" . "RMA Number:" . "\t" . $order_number . "-". date('mdY') . "\n<br />";
$email_text .= "\n\n" . EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;
I have a concern from post # 588. The code I gave you for the generator srand(5); echo(rand(1, 10)); echo(rand(1, 10)) is wrong.
This one is a 3 digit generator. BUT... my problem is: using this will make the "emailed RMA" different from the RMA that comes back in the success page. So maybe just remove it all together.
Code:
$digits = 3;
echo(rand(pow, 10));
$digits-1)), pow(10, $digits)-1))
unless you can carry the generated 3 digit number to the email:
Code:
$email_text .= "\n" . "RMA Number:" . "\t" . $3digit_number . "-". $order_number . "-". date('mdY') . "\n<br />";
-
Re: Return Authorization Module (RMA)
Seeing how the random 3 digit number doesn't really serve a purpose anyway, why not just replace it with a value that could help reference the RMA# with the:
A) Original Order Number
B) Customer's ID
C) RMA# Request Date
This way it can be sent to email when form is submitted and passed to the success page - and never regenerating a different RMA#
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
rbarbour
Seeing how the random 3 digit number doesn't really serve a purpose anyway, why not just replace it with a value that could help reference the RMA# with the:
A) Original Order Number
B) Customer's ID
C) RMA# Request Date
This way it can be sent to email when form is submitted and passed to the success page - and never regenerating a different RMA#
nods in agreement.. these elements will make the number sufficiently unique without the need for a random generated number.. No need to do anything fancy..
-
Re: Return Authorization Module (RMA)
That is good, just drop the random part and now the order# (aka: customer id or invoice no.) and date is more then enough to track the order as an RMA.
Now there is one final thing I believe the RMA needs to do.
Change the database status from complete (or whatever) to RMA Requested.
I think in header_php.php after sending mail, open database and change the status.
-
Re: Return Authorization Module (RMA)
Maybe in a future release :cool:
-
Re: Return Authorization Module (RMA)
Quote:
Originally Posted by
DivaVocals
Awesome.. Nice code.. I will incorporate your code into the core.. I think it SHOULD be included.. and then I'll submit the whole bloody thing to the RIGHT place..:smile:
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.