News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Virtuemart not sending order emails, but sends all other email.

Started by samlf3rd, July 02, 2014, 00:49:29 AM

Previous topic - Next topic

samlf3rd

Hello,
I have J 2.5.20 and VM 2.0.20b.

I can: Send email from my server, chronoforms, and from Joomla forms. I know that my server has no problems with sending emails.
I also can: Click "Ask a question about the product", and I can also update the order in VM which does send an email to user and admin.

However: When someone places an order there is no email sent to the shopper or the admin.

I have: Been reading through forum thread after forum thread. From here to stack overflow, and well beyond. I have tried numerous little "hacks" to no avail.
What I am looking for: Instead of saying my email doesn't work-help me... I thought I would ask the question everyone fails to ask like "How can I test the send a receipt/invoice for testing through the system"? Or, is there a place of code that usually (at some point) fails to do it's thing? How can I test this and what do I look for to resolve it since all other emails throughout my site work just fine?


Update: I did add this code into my components/com_virtuemart/views/pluginresponse/tmpl/default.php file and now I can get my VMEE Pro to send my template (without any VM data) virtuemart still doesn't send anything.

$order_id=$_GET['on'];
$query = 'select virtuemart_order_id from PREFISSOTABELLE_virtuemart_orders where order_number="'.$order_id.'"';
$db = JFactory::getDBO ();
$db->setQuery ($query);
$result=$db->loadObjectList();
$virtuemart_order_id=$result[0]->virtuemart_order_id;
$modelOrder = VmModel::getModel ('orders');
$order['order_status'] = 'C';
$order['virtuemart_order_id'] = $virtuemart_order_id;;
$order['customer_notified'] = 1;
$order['comments'] = "Pagamento ricevuto tramite PayPal per ordine ".$order_id;
$modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, true);


It seems something isn't getting passed along.
Can I just replace all the files associated with email, and hope that they go back to working order? I don't get why things work for months with VM then for some reason things just start breaking-even though no one is changing any settings or code? This system has worked for years, now it just stops sending email.

Please help me solve this nightmare so I can go play FIFA with my son...
Sam

samlf3rd

I ruled everything out besides Virtuemart-can anyone help? How can I can troubleshoot this?

John2400

just make sure under

Configuration>>Checkout >>default order that every option is added in the three boxes.

SAVE , save >> test

If that works then delete the ones you don't want in the boxes.

Also - sometimes it may not send an email because you have tested your shop a few times and the inventory of that item has reached 0 and it cannot send. I have seen this too.

Or as you test - are you using a paypal setting that will not send an invoice or email until payment is made.

So just set the cost to 0 and the shipping to everything accepted and see how you go.

samlf3rd

Quote from: John2400 on July 07, 2014, 07:07:45 AM
just make sure under

Configuration>>Checkout >>default order that every option is added in the three boxes.

SAVE , save >> test

If that works then delete the ones you don't want in the boxes.

Also - sometimes it may not send an email because you have tested your shop a few times and the inventory of that item has reached 0 and it cannot send. I have seen this too.

Or as you test - are you using a paypal setting that will not send an invoice or email until payment is made.

So just set the cost to 0 and the shipping to everything accepted and see how you go.

It still is not sending. The site has been working for a few years, and now all of a sudden just stopped sending emails. This is a nightmare.

jenkinhill

Quote from: samlf3rd on July 10, 2014, 15:32:51 PM
The site has been working for a few years, and now all of a sudden just stopped sending emails. This is a nightmare.

So what changed? Did the host make some changes? Did you update something?  You do have an old VM version there. http://forum.virtuemart.net/index.php?topic=118683.0
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

samlf3rd

No, nothing has changed.
I even created a new site with the most up-to-date versions of Joomla and Virtuemart, yet it still won't send an admin email, even though I have went into Migration set the user, selected confirmed and pending to "When to send invoice", every mail service works in Joomla (including the invoice to the client, ask a question, and my forms all work).

But virtuemart still won't send an admin email.

So, to reiterate, How can I test the VM admin email system?

I have tried every different variety of payment options, and they all send an email to the client, but won't send to admin. Again, to reiterate-this is a nightmare. We did nothing to the site, and out of nowhere it breaks. I have hundreds of sites on various servers and our VM admin email always break out of nowhere. No updates, no new plugin installs, nothing, just stops sending emails. I would say that is one of the biggest problems. But, of we could figure out how to test each step of the admin email process perhaps a resolution could be achieved easily for all of us in need.

Sam

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

samlf3rd


jenkinhill

The only time I came across this on a client site was a US store owner who had a site built elsewhere, and for him email to admin did not work. It was on a Godaddy server, not one of mine, so I copied his site and installed it on one of my UH servers and the mail worked without me changing any files or settings. I literally changed nothing except the host and DNS. So I have always suspected it is a server related issue where VM configuration is correct. 
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

samlf3rd

Quote from: jenkinhill on July 14, 2014, 00:07:58 AM
The only time I came across this on a client site was a US store owner who had a site built elsewhere, and for him email to admin did not work. It was on a Godaddy server, not one of mine, so I copied his site and installed it on one of my UH servers and the mail worked without me changing any files or settings. I literally changed nothing except the host and DNS. So I have always suspected it is a server related issue where VM configuration is correct.

Thank you for your response Jenkinhill,

I have other Virtuemart stores running on the same server, and they work just fine without a glitch and send all emails. I tried installing a new fresh copy on my WHM-cPanel, my Plesk cPanel, and another server running cPanel, none will work. I am really confused. I am installing Joomla 2.5.22, and VM 2.6.6 all with PHP 5.4, one is 5.4.26. I even tried on a 5.3 server too. But I don't get it, as it all worked just fine then out of nowhere it just stops sending.

Bottom line I can't for the life of me even get a new system to install and send emails (on my business Apache server it works just fine???). I feel at this point like perhaps my brain is on vacation. What am I doing wrong? I have many VM's up and running on numerous servers that work perfectly fine.

I can't just update my servers with existing websites on them to PHP 5.4 in order to use the newest version of virtue mart. So I am running out of options, I can't even use the newest VM on anything I have anymore it seems. Even with different versions of PHP. But, all of them will still send general emails even Chronoforms always sends no problems ever.

I agree it has to be the server and VM combination, but that sucks. Not sure why I can't find a way to test the email script to see what it is missing. Anyone?

samlf3rd

When I do this:

in components/com_virtuemart/views/pluginresponse/pluginresponse/tmpl/default.php after JHTML::_('behavior.modal');

$order_id=$_GET['on'];
$query = 'select virtuemart_order_id from PREFISSOTABELLE_virtuemart_orders where order_number="'.$order_id.'"';
$db = JFactory::getDBO ();
$db->setQuery ($query);
$result=$db->loadObjectList();
$virtuemart_order_id=$result[0]->virtuemart_order_id;
$modelOrder = VmModel::getModel ('orders');
$order['order_status'] = 'C';
$order['virtuemart_order_id'] = $virtuemart_order_id;;
$order['customer_notified'] = 1;
$order['comments'] = "Pagamento ricevuto tramite PayPal per ordine ".$order_id;
$modelOrder->updateStatusForOneOrder($virtuemart_order_id, $order, true);

The email actually gets sent for some reason. I found that post in another forum. However the message doesn't contain any prices or anything from the order, just an email with blank order fields and pricing. Why is that? What isn't getting loaded? I feel like we are close... Help!

GJC Web Design

But below should be completely un-nesscesary - your duplicating code that is already in the models/order.php ..

You need to find out why the code isn't being triggered.. it is triggered normally by the payment plugin - is that working?
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

samlf3rd

Quote from: GJC Web Design on July 17, 2014, 10:57:25 AM
But below should be completely un-nesscesary - your duplicating code that is already in the models/order.php ..

You need to find out why the code isn't being triggered.. it is triggered normally by the payment plugin - is that working?

Yes we receive payment from all payment processors.

The orders also store in the system, and an email is sent but the emails contain no customer or order info. No name, name order id, no products, no price. So, something is broken and not sending the order through to the next file. Where are all the files located that get the order from the payment processor?

GJC Web Design

the functions are all in admin-> com_virtuemart/models/orders.php  (the VM naming conventions are very logical and clear)

it is the payment plugins job to check the validity and then trigger the update ... I don't think it passes any information

the function updateOrderStatus() is triggered on success
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

samlf3rd

Quote from: GJC Web Design on July 18, 2014, 09:48:06 AM
the functions are all in admin-> com_virtuemart/models/orders.php  (the VM naming conventions are very logical and clear)

it is the payment plugins job to check the validity and then trigger the update ... I don't think it passes any information

the function updateOrderStatus() is triggered on success

I checked that entire directory (models) in admin for any changes from our backups, but the files are identical. So, nothing has been changed for a long time in that directory all files are the same. I was hoping to see a change in a file here or there. Dang it... Thanks for that though.