Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest

V3.0.5 Admin E-Mail Fix in HERE!

Recommended Posts

Guest

Ok guys, we know there were some funky e-mail snafu's in 3.0.5. So I spent the last 2 hours building a comprehensive admin e-mail.

Download this file from my site and upload over your existing files. Only three files are affected:

/includes/content/gateway.inc.php

/includes/orderSuccess.inc.php

/language/en/lang.inc.php

Download the zip file and put those files in place of yours.

http://www.swscripts.com/downloads/email-fix.zip

For the real geeks among you, here's what was wrong and what I did:

The 3.0.5 release was setup to send a copy of the customer confirmation e-mail to the admin. This is a fine idea, but that e-mail is sent only after an order is set to processing, so unless you have a payment gateway doing that successfully (and a LOT of you don't) you didn't get notification of the order. -- And I won't mention that the initial release sent only a copy of the digital download notification. sorry brooky ;)

So I got rid of that admin e-mail and built a new admin e-mail in the gateway.inc.php file. The old admin mail was sent early in the process before any of the order details had really been processed. Instead, I build and send the message after the order has already been inserted into the database. By doing this, all features of the order are listed including all products, options, etc.

Brooky, please feel free to include this in the core code. This is a donation from me to the cause. Cheers! :angry:

Share this post


Link to post
Share on other sites

Guest hennaboy

Cheers for the hard work Sir William. Works just fine.

Wondered if anyone can confirm though.... If a customer places an order and chooses the print order form gateway. Only an admin email is recieved the customer does not recieve any email about the order - Is that correct?

I know you can manually confirm the order through the admin so it isnt a big problem - Just wondered if something was not correct.

Share this post


Link to post
Share on other sites
Guest

Cheers for the hard work Sir William. Works just fine.

Wondered if anyone can confirm though.... If a customer places an order and chooses the print order form gateway. Only an admin email is recieved the customer does not recieve any email about the order - Is that correct?

I know you can manually confirm the order through the admin so it isnt a big problem - Just wondered if something was not correct.

Thats what is happening with me to but not just on print order also paypal & nochex the only way customer gets email is if admin changes status.

But even then the customer only gets email telling them status of order not what they ordered.

I know that if they pay by paypal or nochex they will get confermation email via them.

Question ?

If someone registers are they ment to get an email with their registration info?

Thanks

Share this post


Link to post
Share on other sites
Guest shawnlovebaobao

hi, i tried it but i didn't work either, i am still no receing order notification from customers to my defult store email address

weired

Share this post


Link to post
Share on other sites
Guest

FYI hennaboy

http://www.cubecart.com/site/forums/index.php?showtopic=11710&hl=

http://www.cubecart.com/site/forums/index....topic=10866&hl=

http://www.cubecart.com/site/forums/index....topic=11886&hl=

I Will update later and post results! Am hoping Sir Will's fix includes the customer postal order email thingamajig + a missing link on the postal form to take you back to home page of shop!!

Sir Will

Can you please confirm if it’s necessary to upgrade to Ver 3.0.5 before replacing with your updated files?

Or can your updated files work with and fix 3.0.4 ?

Share this post


Link to post
Share on other sites

yeah Will will these files work on 3.0.4 as alot of us are waiting for 3.0.5b to get sorted out

Share this post


Link to post
Share on other sites
Guest markyvuk

Cheers Sir William - What a fab solution.... much better than even the original system.

Thanks

Share this post


Link to post
Share on other sites
Guest

Yes, these are good for 3.0.3 or 3.0.4 with no problem. In fact for those, you only need the lang.inc.php and the gateway.inc.php. Leave the orderSuccess.inc.php alone as the only difference is the version and date in the header.

BTW, if any of you have modified your lang.inc.php files, the only section I changed is the $lang['front']['gateway'] section, so feel free to just copy that into your modded lang.inc.php file and you're golden. :)

Share this post


Link to post
Share on other sites
Guest

Yeah, I'm doin a PHP / OpenSSL / Curl upgrade today. It's back up right now, but will probably some other blips throughout the day. :)

Share this post


Link to post
Share on other sites
Guest mig6

Yes, these are good for 3.0.3 or 3.0.4 with no problem. In fact for those, you only need the lang.inc.php and the gateway.inc.php. Leave the orderSuccess.inc.php alone as the only difference is the version and date in the header.

BTW, if any of you have modified your lang.inc.php files, the only section I changed is the $lang['front']['gateway'] section, so feel free to just copy that into your modded lang.inc.php file and you're golden. :w00t:

BTW, if any of you have modified your lang.inc.php files, the only section I changed is the $lang['front']['gateway'] section, so feel free to just copy that into your modded lang.inc.php file and you're golden. 

Sir william, i use the cart in Spanish language, do i need to update lang.inc.php in my espanish directory also, doesnt need some mods before upgrading and/or can you review this file in the spanish directory to see if it needs some changes???

Thank you

Regards

Miguel

Share this post


Link to post
Share on other sites
Guest

Man I hate finding bugs in my work. I left out one stinkin period! Anyway guys, on line 113 of /includes/content/gateway.inc.php the assignment needs to concatenated, not strictly assigned.

So instead of this:

$prodtext = sprintf($lang['front']['gateway']['admin_email_body_4'],

   	 $basket['invArray'][$i+1]["name"]);



It needs to read this:


$prodtext .= sprintf($lang['front']['gateway']['admin_email_body_4'],

   	 $basket['invArray'][$i+1]["name"]);

Otherwise, you'll only get one product listed in the admin e-mail. This fixes that. One darned little dot. Oh well, at least I found it. :w00t:

Share this post


Link to post
Share on other sites
Guest

Man I hate finding bugs in my work. I left out one stinkin period! Anyway guys, on line 113 of /includes/content/gateway.inc.php the assignment needs to concatenated, not strictly assigned.

SNIP

Otherwise, you'll only get one product listed in the admin e-mail. This fixes that. One darned little dot. Oh well, at least I found it. :)

By chance did you fix this in the download zip I JUST got?

Share this post


Link to post
Share on other sites
Guest

Not yet, I haven't had a chance to update the zip file yet. But I will later today. :)

Share this post


Link to post
Share on other sites
Guest

Hi Sir Will & everyone reading this post!

Sir Will

I’ve made the changes you using your zip file! http://www.swscripts.com/downloads/email-fix.zip

Plus I’ve put in the pesky missing “stinkin period!†or for any Brits reading the missing Full stop!

But it still not doing what I want exactly! Sorry…!

To keep this short this is what I would like, my begging bowl is out you might say!

1. Customer gets an email as soon as they place an order using any payment system? Like in CC Ver 2. Other people I can see have this problem!!

Note. Order status change email notification should be a separate process and not to replace above!

2. Customer email after status change in Admin still has no order details! This was working in CC Ver 2! Not a status change in Ver2 but when order placed from customer!

Note. Thanx Admin now has full order details :)

E.g. Dear Mr Test User,

The status of your order id: 051016-173228-5222 has been changed to Processing

This email was automaticaly sent from http://www.etc.etc.etc....com

Note. Spelling of Automatically!! I think it might have 2 L’s!! But then I am dyslexsick!!

3. I Would like the digital link as well as full order details in both emails for Admin and Customer, perhaps Admin order status change also!

4. I want the “Items In Cart†total to be shown all the way through the “Cart†“Payment†“Complete†process!

5. Link back to home page from Postal order page! As was in CC Ver 2!

Note. Was there a bug fixed when clicking Buy from a Category view which use to add item directly to cart? Was a problem for me but now it’s working correctly!

Thanx Sir Will for your help in sorting this stuff out. If any of the changes are possible for a total novis of PHP then a few pointers in the right direction and I’ll have a go?

Cheers

Share this post


Link to post
Share on other sites
Guest

Let me ask a stupid question......

I am using 3.0.5......

1. when is the admin supposed to get an email?

2. when is the customer supposed to get an email?

I have made test purchases using paypal and postal order.....on each one niether the customer or the admin get an email

wheni change the status of an order from processing to completed and check the box to inform the customer.......then the customer gets an email....but again the admin gets nothing.

What should be happening is this.....

1. customer choosies pament gateway (paypal, postal order, whatever) at that moment the customer and admin should recieve and email.

PLEASE HELP....

why is this so hard to do!!!!

Share this post


Link to post
Share on other sites
Guest

Admin and Customer get an email when they leave the "Choose a Payment Method" screen. Customer will get a further e-mail when the payment changes to Processing if they've purchased digital product(s). :w00t:

That's the way it's setup now at least.

Share this post


Link to post
Share on other sites
Guest

the admin and customer do not get an email when they leave the admin screen in my current set-up.

I don't know what the problem is!!

If the customer get an email when the order status is changed then that means the email component is working.....so i don't get it!!

Share this post


Link to post
Share on other sites
Guest

I’ll 2nd that!

Please see my earlier detailed post Sir Will!

Could you or someone from CC please reply to the points I've raised?

Customers email after selecting “Please choose your prefered payment method:†is not working for me and also these folks it would seem! :w00t:

searchty

hennaboy

shawnlovebaobao

In addition I think it would be great if all the eMail options could be turned on, off, digital signature included or excluded etc… or what ever you want from Admin!

PS. Note. Think there are 2 R’s in “Preferredâ€

Share this post


Link to post
Share on other sites
Guest mig6

Sir william,

What do i need to do to apply this email fix on my store, but notice that i use ESPANISH as default lenguage...........

Can you please give me some directions

Thanks for your help

Regards

Miguel

Share this post


Link to post
Share on other sites
Guest

mig6, I don't speak spanish. I added verbiage to the $lang['front']['gateway'] section. You'd need to copy my version of that array to your spanish file and then translate the text within. That's how ALL language files are made. Have fun! :lol:

$lang['front']['gateway'] = array(



'admin_email_body_1' => "Dear CubeCart Store Administrator,



New Order Number: %s placed on %s



~~~~~~~~~~~~~~~~~~~~~~~~~~

Name: %s

E-Mail: %s

Subtotal: %s

Postage & Packaging: %s

Tax: %s

Grand Total: %s

~~~~~~~~~~~~~~~~~~~~~~~~~~



Invoice Address:

%s

%s

%s

%s

%s

%s

%s



Shipping Address:

%s

%s

%s

%s

%s

%s

%s



Payment Method: %s

Shipping Method: %s",



'admin_email_body_2' => "\r\nCustomer comments: %s\r\n",



'admin_email_body_3' => "\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n



Order Inventory:\r\n",



'admin_email_body_4' =>"Product: %s\r\n",



'admin_email_body_5' => "Options: %s\r\n",



'admin_email_body_6' => "Quantity: %s

Product Code: %s

Price: %s\r\n\r\n",



'newOrderMsg' => "A customer has just made the order %s, to view this order please follow the link below: \r\n\r\n%s",



'newOrderSubj' => "New Store Order Placed - ",



'payment' => "Payment",



'cart' => "Cart",



'address' => "Address",



'payment' => "Payment",



'complete' => "Complete",



'fill_out_below' => "Please fill out the form below:",



'transferring' => "Transferring to payment",



'go_now' => "Go Now!",



'continue' => "Continue",



'choose_method' => "Please choose your prefered payment method:",



'your_comments' => "Your comments:",



'none_configured' => "Sorry no payment methods have been configured.",



);

That's the code there. I could go to Google and translate it, but I'm sure it would be horrible. :rolleyes:

Share this post


Link to post
Share on other sites
Guest

Admin and Customer get an email when they leave the "Choose a Payment Method" screen.  Customer will get a further e-mail when the payment changes to Processing if they've purchased digital product(s).  ;)

That's the way it's setup now at least.

This still doesn't work for me! Anyone else?

I've uploaded the new files supplied on the download & included the missing "." but Customer emails still not getting sent after "Choose a Payment Method" screen.! B)

email via Admin Change of status works but receiving order ID only, no details of order? HELP PLEASE?

Share this post


Link to post
Share on other sites
Guest mig6

Sir william

Ive uploaded both files (lang.inc.php & gateway.inc.php) im running V3.0.4 Admin does Get email when order is placed, but Customer doesnt get any mail

Customer does get an e mail when Order is changed status by Admin

Im making tests order with print order form option (does this have anything to do with the failure???) ;)

Hoppe you can help us... B)

Share this post


Link to post
Share on other sites
Guest mig6

Also in the admin Email The prices are shown without the shipping cost added to de final price

i made an order of a product that costs $200 and shipping is $22 So the total is $222.00 and in the admin mail says total is $200

Share this post


Link to post
Share on other sites
Guest GoodLiteCandles

Sir William,

Is the most recent/best version of your email fix loacated at http://www.swscripts.com/downloads/email-fix.zip?

I havent downloaded or tried it yet and before I do I want to make sure I dont have to make any changes to it.

If I do have to make changes, which ones?

Thanks,

Hollie

Share this post


Link to post
Share on other sites

×
×
  • Create New...