thefallX3 Posted April 16, 2013 Share Posted April 16, 2013 (edited) Hello, confusing question in PS 1.5.017 why are my client's receiving 2 sets of email order confimartion? Format 1: that contains the correct details of. Delivery Address contains the sender name and address Billing Address contains the recipient name and address and the other format is Format 2: that contains incorrect or swapped details Delivery Address contains recipient name and address Billing Address contains sender name and address I only have one order_conf.html What could be the cause? Thanks very much Edited April 17, 2013 by thefallX3 (see edit history) Link to comment Share on other sites More sharing options...
sadlyblue Posted April 16, 2013 Share Posted April 16, 2013 have you checked the hooks? there may be another module in the hook after the order is placed sending emails. Link to comment Share on other sites More sharing options...
thefallX3 Posted April 16, 2013 Author Share Posted April 16, 2013 Thanks sadlyblue, frankly I'm not sure about that hook, what type of module am I looking for exactly?. In my understanding mailalerts is the only mail module I am using. but what's really confusing is why are the clients receiving two different kinds of order confirmation like of the above explanation, and to included that it each order confirmation has two different footer one with the default footer from prestashop and the one with the edited footer. The confirmation that has the edited footer is the one that contains all the correct details. Thanks again. Link to comment Share on other sites More sharing options...
sadlyblue Posted April 16, 2013 Share Posted April 16, 2013 go to modules->positions then choose " Display non-positionable hooks ". you see all actions on every hook. for example, in the hook: New orders - (Technical name: actionValidateOrder) I have 2 modules: Mail alerts, and customer loyalty and rewards. If i add module another here (if they have the right hook), it will run when an order is created. You might have another module here, sending mails when they are created... Link to comment Share on other sites More sharing options...
thefallX3 Posted April 17, 2013 Author Share Posted April 17, 2013 Hi sadlyblue, Thanks again for your reply, I don't see anything wrong with the hooks. In new orders I got mailalerts placed and the rest of the hooks I don't see anything odd. The thing that confuses me, was why does system send 2 types of order confirmation with different product detail contents and different footer, when I only have 1 order_conf.html in english folder (and I only use english). By the way you might also know the answer to this, in OPC the default layout is new user account, delivery then invoice details. when you filled up the form for new registration automatically the system will use the name you provide in the delivery as the name of customer that appears as the logged customer, while the correct one should be the name in the invoice. How can I use the invoice name as the name in userinfo? Thanks very much sadlyblue Link to comment Share on other sites More sharing options...
sadlyblue Posted April 17, 2013 Share Posted April 17, 2013 Hi, What I would do, is download all of the modules folder of the shop. Then use notepad++ to find a precise sentence, that doesn't include any variable, in files from that folder. Some modules have a mails folder also. You can also copy paste the positions (with all hooks displayed) in this forum. Open that page and print to pdf, then post here and i'll have a look. You can do the same with Order->Statuses. Has for your second question. Do you want to change the name that show in the mails to the format firstname lastname? Link to comment Share on other sites More sharing options...
thefallX3 Posted April 17, 2013 Author Share Posted April 17, 2013 Hi sadlyblue, Thank you very much for all your replies and effort, and sorry for this late reply. Please see attached files per your request. What i'm saying about OPC is, when you go inside a PS store in the header section you will see the welcome visitor login, create account or logout. In the default setting and layout of one page checkout, when a new customer fills the registration form, userinformation automatically use the first and last name in the delivery first and last name section (in fact it is being automatically filled), but in reality details in delivery section should be belongs to the recipient, and the details in the invoice/billing section of the form belongs to the real customer "the sender or the buyer". What I am trying to accomplish is to point the user information to get the value from invoice first and last name instead of getting it automatically from delivery fields. sorry how can i post the .pdf files in here (so naive Link to comment Share on other sites More sharing options...
thefallX3 Posted April 17, 2013 Author Share Posted April 17, 2013 Hi sadlyblue, better yet why don't you try a test purchase to the site http://citifloraflowers.com, but please send me the details for Delivery Address: Recipient First name, Recipient Last name and delivery address. And Billing Address Sender First name:, Sender Last name and billing address., during checkout, pleae try to cross match your details in the addresses page, pls. choose boxed delivery as carrier, and write in the message box test order for AJDesigns, and choose bank wire for payment methods. in the email order confirmation kindly cross match again the details if they are correct can you please forward the order confirmation to me, [email protected] Attn: Mr. Marvin, please say that this test is from prestashop community and confirm that all the details from addresses page during checkout are correct and all the details in the order confirmation and correct. Thank you very much sadly blue, very very much Link to comment Share on other sites More sharing options...
thefallX3 Posted April 17, 2013 Author Share Posted April 17, 2013 Hi sadlyblue, problem with the order confirmation has been solved, thank you so much for your great efforts. But I still do have the other problem and actually it's the only remaining problem. What im saying about OPC is, when you go inside a PS store in the header section you will see the welcome visitor login, create account or logout. In the default setting and layout of one page checkout, when a new customer fills the registration form, userinformation automatically use the first and last name in the delivery sections first and last name fields (in fact it is being automatically filled), but in reality details in delivery section should be belong to the recipient, and the details in the invoice/billing section of the form belongs to the real customer "the sender or the buyer". What I am trying to accomplish is to point the user information to get the value from invoice first and last name instead of getting it automatically from delivery fields. Link to comment Share on other sites More sharing options...
thefallX3 Posted April 17, 2013 Author Share Posted April 17, 2013 (edited) Hi sadlyblue, I have solve my above last question too, what I did was I just swapped the fields names in the form, instead of delivery address first I renamed it to be billing address, now the user information has been resolved. To make sure that the address titles in the back office orders list are correct, I edited my view.tpl file in admin folder and I swapped the address titles from shipping to billing to billing and vice versa. I edited my email order-confirmation both for customer and shop owner and it works, everything is OK. Another problem arises, for returning customer after they logged in to their account the address details in the addresses box are swapped. Like: Choose a delivery address (dropdown): shows the alias of billing address Choose a billing address 9dropdown): shows the alias of delivery address thus this make the below delivery and billing table with swapped details. Do you know a fix for this? Thanks again. sadlyblue, I have also solved the above problem. Again thank you so much for your great efforts. Edited April 17, 2013 by thefallX3 (see edit history) Link to comment Share on other sites More sharing options...
sadlyblue Posted April 17, 2013 Share Posted April 17, 2013 glad to know you solved your previous problems. can you tell us how you solved the double email problem? someone might need also, and i would like to know also, for future reference. as for your last question, i don't know what could be. my only guess, it the translations (if you don't use the store in english). my advice, mark this topic as solved, since you solved it, and post a new one. Link to comment Share on other sites More sharing options...
thefallX3 Posted April 18, 2013 Author Share Posted April 18, 2013 Modifying the OPC as Billing/Invoice First Followed by Delivery in New Customer Registration: The default layout of the form is: 1. Account 1.a already registered box 1.b. new customer box 1.c delivery box containing all the fields 1.d checkbox to open invoice box 1.e invoice box containing all the fields 1.f customer data privacy 1.g save button In the above layout the default process is, whatever you fill in the first and last name in the new customer box, it will be automatically be copied to the delivery box's first and last name. And if you used the sender's name (this is supposed to be found in the invoice box) to fill the first and last name of the new customer box then changed the first and lat name of the automatically filled first and last name in the delivery box to recipient name, after registration only sender's name will be saved the recipient name from the delivery box is gone. But if you will use the recipient name in the first and last name in the new customer box, the recipient name will be used as the customer information in the user login, showing the name of the recipient as the customer name (so annoying). This experience could may only have been because of a bug on my part. But what i did was i reversed everything so everything would be clearer and straightforward. the Fix: 1. Edit your themes/yourthemename/order-opc-new-account.tpl A. Delivery Box - In about line 31 in the h3 tag saying New Customer, changed it to 'Sender Information (Billing Address)' or what ever you want to call it. And this box will be you invoice box. doing it this way will ensure that the sender name will be used as the customer user information, and will save your customers time in filling out the form because of confusion. - In about line 112, change the (l s'Email') to (l s'Sender Email') *please be careful in using apostophee s in Sender it will read as another code. - In about line 116, change the (l s'Password') to Sender Password - In about line 128, change instance from First Name to Sender First Name - In about line 132, change instance from Last Name to Sender Last Name -In about line 179 delete the h3 tag saying Delivery Address (remember we are modifying address box to become the invoice box) - In about line 189, removed the lable for first name - In about line 190 hide the input type instance from "text" to "hidden" - In about line 194 delete the lable for last name - In about line 195 hide the input type instance from "text" to "hidden" The rest of the fields are ok..... Note: if you are using an active carriers for your shipping you have to change the state field instance in your delivery box: - In about line 235 and 252 change this <p class="required id_state select" style="display:none;"> <label for="id_state">{l s='State'} <sup>*</sup></label> <select name="id_state" id="id_state"> <option value="">-</option> </select> </p> to this <p class="required id_state_invoice select" style="display:none;"> <label for="id_state">{l s='State'} <sup>*</sup></label> <select name="id_state_invoice" id="id_state_invoice"> <option value="">-</option> </select> </p> there are 2 state field instances, make sire to change both. Reason for this is to make the state field in your delivery box being read as field from invoice box. B. Invoice Box - In abut line include this : checked="checked" in the checkbox inout type right adter the id="invoice_address" this will automatically check the checkbox to show the invoice box (now will become the delivery box), also pleae make sure to change the label title to whatever you want to call it. - In about line 284, change the h3 tag from Invoice Address to 'Recipient Information (Delivery Address)' or whatever you want - In about line 305, change instance from 'First Name' to {l s='Recipient First name'} or your own equivalent - In about line 310, change instance from 'last Name" to {l s='Recipient Last name'} or your own equivalent Note: if you are using an active carriers for your shipping you have to change the state field instance in your delivery box: - In about line 345 and 354 change this <p class="required id_state_invoice select" style="display:none;"> <label for="id_state">{l s='State'} <sup>*</sup></label> <select name="id_state_invoice" id="id_state_invoice"> <option value="">-</option> </select> </p> to this <p class="required id_state select" style="display:none;"> <label for="id_state">{l s='State'} <sup>*</sup></label> <select name="id_state" id="id_state"> <option value="">-</option> </select> </p> there are 2 state field instances, make sire to change both. Reason for this is to make the state field in your invoice box being read as field from delivery box, thus will ensure that your carrier(s) will work. That's it for editing your themes/yourthename/order-opc-new-account,tpl View your new form, if you like it let's proceed to the next step. 2. Edit your themes/yourthemename/order-address.tpl - In about line 100 to 108 change the instance (get address titles) From this: function getAddressesTitles() { return { 'invoice': "{l s='Your billing address'}", 'delivery': "{l s='Your delivery address'}" }; } To this: function getAddressesTitles() { return { 'invoice': "{l s='Your delivery address'}", 'delivery': "{l s='Your billing address'}" }; } - In about line 215, change the label instance From this: <label for="id_address_delivery">{if $cart->isVirtualCart()}{l s='Choose a billing address:'}{else}{l s='Choose a delivery address:'}{/if}</label> To This: <label for="id_address_delivery">{if $cart->isVirtualCart()}{l s='Choose a billing address:'}{else}{l s='Choose a billing address:'}{/if}</label> - In about line 232, change the label instance From this: <label for="id_address_invoice" class="strong">{l s='Choose a billing address:'}</label> To this: <label for="id_address_invoice" class="strong">{l s='Choose a delivery address:'}</label> And that's it enjoy the new functionality of your OPC, please be advised that this has been tested in PS 1.5 above. Make a proper back up of your files before you do this fix. If your client's are having mixed or swapped addresses in their email order confirmation you may edit your mails/your_language/order_conf.html and swapped the instance in the address_block in delivery and billing . Do the same if you are having swapped addresses details in your shop owner new order email confirmation in modules/mailalerts/mails/your_language/new_order.html **************WARNING************** This fix may have been very useful for me, try this at your own accord. Thank you and hope this will help someone!. Link to comment Share on other sites More sharing options...
sadlyblue Posted April 18, 2013 Share Posted April 18, 2013 Thanks for sharing. But about the double email customers received when they finished an order. How did you solved that. Since it wasn't in the hooks, i would like to know. We never know when someone has the same problem... Link to comment Share on other sites More sharing options...
thefallX3 Posted April 18, 2013 Author Share Posted April 18, 2013 Hi sadlyblue, regarding that issue, it was not a file, format, module or hooks problem. As it turns out, I was pointing out to the customer that the email order confirmation they received was correct (and I am 100% sure because it was properly configured). But what they are insisting to me that is wrong is the shop owner new owner email confirmation, and they keep calling it order confirmation (basically correct)so the problem is "a misunderstanding error" hahahahaha. But really I am greatful and thankful for your replies and effort. Thanks again sadlyblue, until next time Link to comment Share on other sites More sharing options...
Recommended Posts