VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: rupesh1989 on January 17, 2012, 12:18:46 PM

Title: Order email confirmation and user registration confirmation is not working
Post by: rupesh1989 on January 17, 2012, 12:18:46 PM
Hi sir,
I'm using joomla1.7.3 with virtuemart 2.0. i have checked global configuration tab in joomla and registration is set to "self "but when user completes its registration ! User wont get Confirmation email  but administrator of site get users registration email but user didnt get any confirmation emails or order emails!
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: mattprudente on January 25, 2012, 14:39:12 PM
I'm having the same problem too. Looks like there are quite a few people across the forum that are asking the same question but receiving now answers!

Is there anyone out there with a solution? I've narrowed it down to the PayPal payment option that we don't receive order confirmation to either the Admin or the Customer!
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: jenkinhill on January 25, 2012, 15:09:54 PM
Mail problems seem to be server/installation specific, as on all my test sites all mails to vendor, admin & shopper work OK (all on J1.7.3).

Try VM2.0.1 as some changes may make it work for you.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: mattprudente on January 25, 2012, 15:23:44 PM
Hi jenkinhill

I've tried the latest update and have installed on two different servers with all kinds of configs, but I can't seem to overcome this problem so far.

I will continue to look.

Thanks for the advice.

Matt
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: mattprudente on January 25, 2012, 16:29:23 PM
Hi there

I've checked all I can and there is nothing else I can change on my installation or server that will affect. When you change the order status in the admin it send out an email to the customer and the shop admin.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: John2400 on January 26, 2012, 07:49:27 AM
This might sound really weird but I was not receiving emails to customers in my trials because the products I was testing - was over subscribed. Eg I had 10 goods on my stock, number ordered 10 and the max purchase 1.

So when I changed the stock numbers (or the order confirmation like you did ) the computer sent my emails.

* it was a logic problem - I ordered as a customer and the vendor receives my email but he has no stock so I'm( the computer)am not going to send you an invoice for sometrhing I don't have.

Just chech the numbers on stock and the currency is the same as the default.

maybe.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: mattprudente on January 26, 2012, 12:28:41 PM
Tried the stock levels and no luck!
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: John2400 on January 26, 2012, 12:39:19 PM
Sorry it didn't work - I have updated to 2.0.1 as suggested by jenkinhill - It did fix some things for me. Expecially the vendor issues. maybe Ok for you too.

But Back up before you update - I'll keep looking or thinking.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: juagicre on January 26, 2012, 12:55:08 PM
I wasn't lucky vm2.0.1 did not solve my email problem but also crashed my cart, I tryed before upgrading with the increase of stock but did not do the trick.
With vm1.1.9 i had no problems with sending mails, what means that probably this is not a server misconfiguration...
Some more ideas about the mail?
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: mattprudente on January 26, 2012, 16:57:28 PM
Ok, I have figured out why my order confirmation emails for Admin and Customer are not working.

I set up paypal sandbox accounts to test. I ran through the whole process including returning to my site. Only once I had followed the links through and returned to the site did the order emails come through. AND the Status updated in my orders list!

The problem is, I still need an order email sent with payment pending and once payment is confirmed as most people will not follow the paypal links back to the site for it to update.

Any ideas?
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: John2400 on January 30, 2012, 11:21:23 AM
Dear Matt Prudente ,

I'm just wondering a point - Are you saying that the only emails you don't get are after you have received an invoice email??

So the customer gets a an order email and the vendor gets an email but when it goes to paypal - you are nor receiving those emails ?

Or are you saying that in testing they are not bouncing back and changing the stock levels?

* Just a thought - * Some servers don't like an email in the paypal setting that is not from your domain" eg @next.com is your domian and your paypal email login is @true.com .
When the customer orders and they complete the transaction in paypal - when the confirmation email bounces back to the server - because your paypal email is not from that domain - it sometimes will not chnage the stock or confirm inthe order.
* in a perfect setting I would ensure that VM email and paypal longin emails are at least from the same domain.
* this might be your issue.
* People do not have to return to your site fro the stck to change the 'bounce email from paypal" should move from pending to confirmed after the paypal order and then stocks should change.
Other orders - like free might need to be done manually.



Title: Re: Order email confirmation and user registration confirmation is not working
Post by: pinjosi on February 02, 2012, 09:49:21 AM
I had the same problem here but i solved the virtuemart part.

go to you database and go to the table "jos_virtuemart_userinfos"

Click edit on your admin account and search there for your "id" i think your admin id will be on 42 or something.
Change this 42 to 1 and your virtuemart problem is solved.

Hope i helped you out (mail me if its solved)

Greets,

The Pin Man
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: Milbo on February 02, 2012, 21:20:30 PM
Quote from: pinjosi on February 02, 2012, 09:49:21 AM
Click edit on your admin account and search there for your "id" i think your admin id will be on 42 or something.
Change this 42 to 1 and your virtuemart problem is solved.

This is really a strange hack. I dont understand why it should work then. you just mismap the addressinfo of the admin (maybe also vendor) to 1 (which is never used).
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: pinjosi on February 09, 2012, 12:02:10 PM
if thats right what you telling here milbo its really strange then yes.

But i did it on my test site (that worked) then i put it also on my live site and that also worked

Strange but true :)
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: brendonhatcher on April 14, 2012, 16:39:14 PM
I just looked at my product table, and the virtuemart_vendor_id number is set to 1.
It would make "sense" therefore to change the superadmin ID to 1 so that order transactional details are sent to the superadmin.

Is there a table to join virtuemart_vendor_id to user_id?

Thanks
Brendon
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: deewhyweb on September 14, 2012, 14:01:45 PM
Anyone using the paypal payment method, i have found the following works:

edit plugins/vmpayment/paypal.php
In the function function plgVmOnPaymentResponseReceived
add in the following:

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);

before $cart = VirtueMartCart::getCart (); around line 387


Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 25, 2012, 11:20:49 AM
Thank you so much deewhyweb!!!!!!!!!!!  ;D
I put those 4 lines in paypal.php. It's working perfectly.
You helped me a lot. You made my day!  ;)
Thanks Thanks Thanks ... ....


Quote from: deewhyweb on September 14, 2012, 14:01:45 PM
Anyone using the paypal payment method, i have found the following works:

edit plugins/vmpayment/paypal.php
In the function function plgVmOnPaymentResponseReceived
add in the following:

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);

before $cart = VirtueMartCart::getCart (); around line 387



Title: Re: Order email confirmation and user registration confirmation is not working
Post by: alatak on September 25, 2012, 12:46:55 PM
Hello
the function plgVmOnPaymentResponseReceived shoud not update the order status.
Only the paypal IPN notification.
Are you testing locally? in this case, you do not receive the notification, and it is normal that your order is not updated.

You are not testing locally ? Then check on your web log if you received the IPN notification.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 26, 2012, 04:45:11 AM
Hello alatak

I tested from web, not locally. I made two changes to send confirmed mail to vendor and buyer.
1) Inside Virtuemart > Configuration > CheckOut > Default Order Status to send an invoice


2) edit plugins/vmpayment/paypal.php
In the function function plgVmOnPaymentResponseReceived
add in the following:

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);

before $cart = VirtueMartCart::getCart (); around line 387


After those two steps,
- I received the mail of confirmed order by buyer and Buyer received the mail of confirmed order at mysite.com.
- Inside Virtuemart > Orders & Shoppers > Orders, Order status is updated, please check


Log file that you mention is error.php inside logs folder. is it? If so, please check

I think it's because of Confirmed status is not updated inside Orders & Shoppers > Orders, only Pending before I put those 4 lines inside paypal.php.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: alatak on September 26, 2012, 08:34:56 AM
Hello

Quote2) edit plugins/vmpayment/paypal.php
In the function function plgVmOnPaymentResponseReceived
add in the following:

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);

before $cart = VirtueMartCart::getCart (); around line 387

As i said, this should not be done. It is the IPN that must update the status.

QuoteLog file that you mention is error.php inside logs folder. is it? If so, please check
No , it is not this file i meant.

I meant the server logs. It is on your host server. It logs all the page requests. You do a checkout, and then after search for the word notification.
Ecahc line is
the ip address of the request, the timestamp, the method + page link, the HTTP status code. The resulting status code. "200" is success.
If the number is 200, then everything is ok. If it is something else 500 for example, then something is wrong.
There is no reason why it is not 200. But this is the first step to check.

Once you are sure you get the 200 status code, then we must find out why the order status is not updated.
Go in Virtuemart>payment method>paypal, and set the debug on.
Do another checkout.
Open the file under the folder log, called paypal.log. You should have some debug infos inside. You can copy /paste those infos. And i will try to understand what is going on.


QuoteI think it's because of Confirmed status is not updated inside Orders & Shoppers > Orders, only Pending before I put those 4 lines inside paypal.php.
Yes I understand, but it is not correct. You must check if you get the IPN, and why the order is not updated.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 26, 2012, 11:19:43 AM
Hello alatak,

My site is at shared server. Inside Raw access  logs, I saw the list like following. is it correct?
66.249.74.146 - - [25/Sep/2012:20:04:57 +0800] "GET /accessories/art/results,1-16.html HTTP/1.1" 200 60097 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
(http://forum.virtuemart.net/index.php?action=dlattach;topic=96541.0;attach=51571;image)

I cannot find the date of last two day transaction inside logs list. Record is started from yesterday evening. Can you help me to let me know How can I trace back last two days record to see whether 200 or 500?


If it's not corrected, I should remove these following 4 lines. is it? After that you ask me to do another check out and check whether 200 or 500 inside the server log first. Then copy infos from paypal.logs to let you know.

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);

Thank you for your help. :)


[attachment cleanup by admin]
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: alatak on September 26, 2012, 11:33:41 AM
Hello

yes it is correct the raw access logs.
Look in the error log also what do you have.
May be you have to setup something in "Choose log programs"?
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 26, 2012, 11:40:50 AM
"Choose log programs" is locked by administrator.

If those code are not correct, I should remove these following 4 lines. is it? After that you ask me to do another check out and check whether 200 or 500 inside the server log first. Then copy infos from paypal.logs to let you know.

$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);


Quote from: alatak on September 26, 2012, 11:33:41 AM
Hello

yes it is correct the raw access logs.
Look in the error log also what do you have.
May be you have to setup something in "Choose log programs"?
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 26, 2012, 11:49:20 AM
By the way, I received the confirmation order in this morning. Order date is 22 September. But received confirmation order mail is 26 September.
(http://forum.virtuemart.net/index.php?action=dlattach;topic=96541.0;attach=51573;image)

[attachment cleanup by admin]
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: alatak on September 26, 2012, 11:56:31 AM
Hello

ok, llok at the bottom of your order, you will have the Paypal details, and you will have the timestamp of the paypal IPN.
May be that will help us to know why it took soo long.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 26, 2012, 12:07:23 PM
Please check it. Hope it could help!
(http://forum.virtuemart.net/index.php?action=dlattach;topic=96541.0;attach=51575;image)

[attachment cleanup by admin]
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: alatak on September 26, 2012, 13:39:20 PM
Ok,


Strange that all the fields are not filled in.
which version of VM do you have? Have you updated the AIO also?You can update both either with the live update, or using the Joomla Installer.
In both case, if the tables need to be updated , they will be update.

And you have a strange error concerning the dates. The IPN was sent the 21/09 (this is the paypal timestamp), your order was created 22/09 (this is your server timestamp), and the IPN was received by Virtuemart the 26/09 (your server timestamp).
what is wrong s the IPN recevied before the order was created.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 27, 2012, 07:05:02 AM
Hello alatak,

Quote
Strange that all the fields are not filled in.
which version of VM do you have? Have you updated the AIO also?You can update both either with the live update, or using the Joomla Installer.
In both case, if the tables need to be updated , they will be update.
Actually all fields are filled in. Because I think those are customers infos. so, I just keep it hid. I use VM 2.0.10 which is latest version. Kindly let me know if you would like to know those info in order to trace the cause of not sending confirmed mail.


Quote
And you have a strange error concerning the dates. The IPN was sent the 21/09 (this is the paypal timestamp), your order was created 22/09 (this is your server timestamp), and the IPN was received by Virtuemart the 26/09 (your server timestamp).
I checked out payment from singapore. Do you think is that error caused by due to time difference?

Quote
what is wrong s the IPN recevied before the order was created.
Where can I see what's wrong with IPN received before order was created? Two days after checked out, I don't receive any auto confirmed mail except paypal mail, so, I changed order-status to Confirmed manually in order to send confirmed mail to customer. Four days after checked out, I received auto confirmed mail, my customer also received too. It's on 26 September. Kindly help me! Thank you

Best regards,
Ngenge
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: ngenge on September 28, 2012, 09:52:42 AM
This time I checked out with Real payment of Paypal.
Hope someone can help me.   :'(

Best regards,
ngenge

[attachment cleanup by admin]
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: Ffragrances on October 24, 2012, 05:30:14 AM
Some detail: As of today I have the very latest versions of Joomla 2.5 and VM2 installed on ultimate hosting on Godaddy.

Well, it seems I have the same issue here: I turned on the debug in the PayPal module, and I did a test purchase. Check the log from Paypal module and it returns this.   
2012-10-24 02:50:14
message: plgVmConfirmedOrder order number: 0791060

Admin received an E-mail from PayPal for the completed transaction and so did the User. This has been going on since I migrated from the older versions of both Joomla and VM. In the Orders> details backside in VM these orders all show "pending" even though they are in fact complete. If I manually change them to confirmed then the Vendor and the User gets confirmation emails. Admin does not. This is very weird. As I have read through this thread it seems that "ngenge" has tried this addition to the PHP and it worked for them. And the developers seem to be saying this as not the proper solution. Is it?, and if not what is possible the issue here. All other normal emails seem to be working fine on the site.
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: Ffragrances on October 24, 2012, 06:00:26 AM
Quote from: Ffragrances on October 24, 2012, 05:30:14 AM
Some detail: As of today I have the very latest versions of Joomla 2.5 and VM2 installed on ultimate hosting on Godaddy.

Well, it seems I have the same issue here: I turned on the debug in the PayPal module, and I did a test purchase. Check the log from Paypal module and it returns this.   
2012-10-24 02:50:14
message: plgVmConfirmedOrder order number: 0791060

Admin received an E-mail from PayPal for the completed transaction and so did the User. This has been going on since I migrated from the older versions of both Joomla and VM. In the Orders> details backside in VM these orders all show "pending" even though they are in fact complete. If I manually change them to confirmed then the Vendor and the User gets confirmation emails. Admin does not. This is very weird. As I have read through this thread it seems that "ngenge" has tried this addition to the PHP and it worked for them. And the developers seem to be saying this as not the proper solution. Is it?, and if not what is possible the issue here. All other normal emails seem to be working fine on the site.


Well, I did test this addition of these 4 lines and it works perfectly.. Thanks.. :)
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: phobophil on February 28, 2013, 15:17:57 PM
Hello,

are these 4 lines


$modelOrder = VmModel::getModel ('orders');
$order = array();
$order['order_status'] = 'C';
$modelOrder->updateStatusForOneOrder ($virtuemart_order_id, $order, TRUE);


still the most proper solution for updating order status and getting confirmation emails? It works except for this error message
"Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party. Are you sure you want to continue sending this information?"
How can I get rid of that? Is that problem related to the IPN-confimation-mail-problem?

Same issue and no solution here:
http://forum.virtuemart.net/index.php?topic=96896.0

In addition to that, I can not create a paypal.log-file. In debug mode I got some warnings:
Warning: fopen(htdocs/logs/paypal.log): failed to open stream: Permission denied in /htdocs/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 1020

Warning: fwrite() expects parameter 1 to be resource, boolean given in /htdocs/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 1021

Warning: fwrite() expects parameter 1 to be resource, boolean given in /htdocs/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 1022

Warning: fclose() expects parameter 1 to be resource, boolean given in /htdocs/administrator/components/com_virtuemart/plugins/vmpsplugin.php on line 1023


Furthermore i do not have any IPN-informations in my order details like shown in the image posted by ngenge? Does somebody know why?

phobophil

(Do I have to open a new discussion because of those problems or are they related to each other?)
Title: Re: Order email confirmation and user registration confirmation is not working
Post by: phobophil on March 04, 2013, 15:30:06 PM
Now I can read my paypal.log file by changing the path in URL of /administrator/components/com_virtuemart/plugins/vmpsplugin.php in line 1017

$file = JPATH_ROOT . "/vmlogs/logs/" . $this->_name . ".log";

My provider does not allow to change the owner of (my) logs-folder.  I receive the same returning message like Ffragrances:

Quote2013-03-04 12:53:20
message: plgVmConfirmedOrder order number: 163e028

Relevant to the 4-line-Hack my test buyer is getting two confirmation mails which are exactly the same. I've no idea why?!

Grettings
phobophil

Title: Re: Order email confirmation and user registration confirmation is not working
Post by: SwordFish on June 22, 2013, 16:31:29 PM
Hi all,
Here is a good solution for this issue. Check the following post:

No order confirmation email sent after checkout via PayPal

http://forum.interamind.com/viewtopic.php?f=1&t=1302 (http://forum.interamind.com/viewtopic.php?f=1&t=1302)

Hope it can help.

Thanks,
J