HELP! Order confirmation emails not arriving to vendor, admin or shopper!!!

Started by erica23, October 09, 2013, 07:19:36 AM

Previous topic - Next topic

pmalkmes

So I was able to hack it by putting an email in the paypal plugin php file to temporarily get emails going to my client!
Please feel free to adjust as necessary!

if you need help contact me patrick@pmxli.com to help solve this issue with you
PMX 4EVA
pmxcomputing.com

********************************************
/plugins/vmpayment/paypal/paypal.php file at line 263
********************************************

//begin PMX MODZ below
   $mailer = JFactory::getMailer();
   $config = JFactory::getConfig();
        $sender = array(
        $config->getValue( 'config.mailfrom' ),
        $config->getValue( 'config.fromname' ) );

$mailer->setSender($sender);
$recipient = 'your@email.com'; //for admins  & store owner

$mailer->addRecipient($recipient);
$body ='
<table style="border: 1px solid lightgrey; margin: 5px; padding: 5px; width:
100%;" align="center" border="0" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<td>
<p><table width="100%" align="center" border="0" cellspacing="0"
cellpadding="10">
  <tr valign="top">
    <td align="left" class="Stil1">Your Website title</td>
   
    <td align="right"><img border="0"
src="http://www.yourwbsite.com/logo.png"></td>
   
  </tr>   
</table></p>
<p>&nbsp;</p>
<table style="width: 100%;" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr class="sectiontableheader" bgcolor="#cccccc">
<td class="Stil2" colspan="2"><strong>Order Information</strong></td>
</tr>
<tr class="Stil1">
<td>Order Number:</td>
<td>'.$post_variables['order_number'].'</td>
</tr>
<tr class="Stil1">
<td>Order Date:</td>
<td>'.date('m-d-Y').'</td>
</tr>
<tr class="Stil1">
<td>Order Status:</td>
<td>Pending</td>
</tr>
<tr class="sectiontableheader">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="sectiontableheader" bgcolor="#cccccc">
<td colspan="2"><strong class="Stil2">Customer Information</strong></td>
</tr>
<tr>
<td colspan="2">
<table class="html-email" cellspacing="0" cellpadding="0" border="0"
width="100%"> 
   <tr>
      <th width="50%">
          Bill To Information      </th>
      <th width="50%" >
            </th>
    </tr>
    <tr>
   <td valign="top" width="50%">
       <span>'.$post_variables['email'].'</span><br><span></span><br><span></span><br><span>'.$post_variables['first_name'].'</span> <span>'.$post_variables['last_name'].'</span><br><span>'.$post_variables['address1'].'</span><br><span>'.$post_variables['city'].'</span>, <span>'.$post_variables['state'].'</span> <br><span>'.$post_variables['zip'].'</span><br><br><span>Phone: '.$post_variables['night_phone_b'].'</span>
   </td>
   <td valign="top" width="50%">Shipping address will be on the follwoing invoice when the status is changed to confirmed.
   </td>
    </tr>
</table></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr class="Stil2" bgcolor="#cccccc">
<td colspan="2"><strong>Order Items</strong></td>
</tr>
<tr>
<td colspan="2"><table  cellspacing="0" cellpadding="0" border="0"
width="100%" style="">
    <tr align="left" >
          <th style="">&nbsp;</th>
            <th style="" align="left" ></th>
            <th style="" align="left" ></th>
            <th style="" align="left" ></th>
            <th style="" align="right" ></th>
             <th style="" align="right" ></th>
            <th style="" align="right" ></th>
            <th style="" align="right" >Total Amount Due</th>
       </tr>
            <tr valign="top">
        <td><a
href=""></a></td>          <td align="left" >
                   </td>
                 <td align="left" >
                   </td>
              <td align="left" >
       

         <div><div class="vm-customfield-cart"> <span
class="product-field-type-V"></span><br /></div></div>   
   </td>
                <td align="right" >
                   </td>
                <td align="right"><span></span></td>
                <td align="right" >
                   </td>
               <td align="right" >
         '.$post_variables['amount'].'       </td>
              </tr>
         <tr>
      <td colspan="8"><hr style=" border-top: 1px; height:1px; color:#444"></td>
   </tr>
         <tr>
         <td colspan="5" align="right"></td>

                        <td align="right"><span ></span></td>
                     <td align="right"><span></span></td>
                  <td align="right"></td>
               </tr>
   
    <tr>
      <td align="right" colspan="5"></td>
                <td align="right"></td>
            <td align="right"> </td>
            <td align="right"></td>
          </tr>
    <tr>
      <td align="right" colspan="5"></td>
                <td align="right"></td>
            <td align="right"> </td>
            <td align="right"></td>
          </tr>
        <tr>
      <td align="right" colspan="5"><strong></strong></td>
   
                <td align="right"><span ></span></td>
            <td align="right"> </td>
            <td align="right"><strong></strong></td>
          </tr>
</table>
</td>
</tr>
<tr class="sectiontableheader">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="sectiontableheader" bgcolor="#cccccc">
<td colspan="2"><strong class="Stil2"></strong></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr class="sectiontableheader">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="sectiontableheader" bgcolor="#cccccc">
<td><strong class="Stil2"></strong></td>
<td><strong class="Stil2"></strong></td>
</tr>
<tr>
<td><span class="vmpayment_name">Paypal</span></td>
<td><span class="vmshipment_name">UPS</span></td>
</tr>
</tbody>
</table>
<p></p>
<p>Sincerely,</p>
<p>Slant/Fin | High Efficiency Boilers and Baseboard</p>
<p>http://www.slantfin.com/</p>
<p>orders@slantfin.com</p>
</td>
</tr>
</tbody>
</table>


';
$mailer->setSubject('New website order');
$mailer->isHTML(true);
$mailer->Encoding = 'base64';
$mailer->setBody($body);
$send = $mailer->Send();
if ( $send !== true ) {
    echo 'Error sending email: ' . $send->message;
} else {
    echo 'Mail sent';
}
//endPMX Modz

Milbo

Strange hack, should not be needed.

Please check which configuration you are using for "useVendorEmail" in the vm config tab "shop". We have this code:


if(!empty($view->vendorEmail) and VmConfig::get( 'useVendorEmail', 0 )) {
$sender[0] = $view->vendorEmail;
$sender[1] = $view->vendor->vendor_name;
} else {
// use default joomla's mail sender
$app = JFactory::getApplication();
$sender[0] = $app->getCfg( 'mailfrom' );
$sender[1] = $app->getCfg( 'fromname' );
}


Maybe we just need to add a fallback with

$config = JFactory::getConfig();
        $sender = array(
        $config->getValue( 'config.mailfrom' ),
        $config->getValue( 'config.fromname' ) );


Maybe the reason is the joomla version? Maybe we use here a deprecated function which is not working anylonger for the latest j2.5? And maybe we just do not notice it, because we use the option "use vendor email"?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

Maybe this helps one or the other user encountering this problem. Below I've attached two screenshots showing the settings which do work on my Joomla 2.5.14/VirtueMart 2.0.24 website. In case you updated from VM 2.0.20 or earlier, you have to configure the new options in the Configuration > Checkout tab and click on 'Save'.

[attachment cleanup by admin]
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

pmalkmes

I Had set the VM up the same way and still no emails I was under some pressure from the powers that be so I just found a good spot to inject code and did.

I changed my settings to the same as yours and still diddnt work I assume there is a function that is getting locked up somehwere along the way in the order email generation process.


Milbo

Hmm and how works this?


// set proper sender
$sender = array();
if(!empty($view->vendorEmail) and VmConfig::get( 'useVendorEmail', 0 )) {
$sender[0] = $view->vendorEmail;
$sender[1] = $view->vendor->vendor_name;
} else {
// use default joomla's mail sender
$app = JFactory::getApplication();
$sender[0] = $app->getCfg( 'mailfrom' );
$sender[1] = $app->getCfg( 'fromname' );
if(empty($sender[0])){
$config = JFactory::getConfig();
$sender = array( $config->getValue( 'config.mailfrom' ), $config->getValue( 'config.fromname' ) );
}
}


in shopfunctionsf.php around line 346 function sendVmMail
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

erica23

Thank you all for your input and help! I have tried all of your suggestions and nothing is working.  Now, on top of all the order confirmation email issues, my contact us page is not sending messages through to my email.  I can use the contact us page and it does not give me any errors, but I do not receive any emails to confirm I have been contacted or to send me the contact page information.

Can you please help me more with this issue?  Both of these issues are super important!!! My client wants this done by Friday at the latest and I need help PLEASE!!

I have tried different versions of virtuemart, joomla, your suggestions from above, etc. and nothing is working.

I still have joomla 2.5.9 (as every other version gives this site many other and MORE problems) and virtuemart 2.0.20a (this also gives me issues in all the other versions I have tried.  At this point, using these versions together give me the least problems overall.  PLEASE ASSIST ME ASAP!

Thank you!

erica23

Hi Everyone,

All of the sudden recently, I began having problems with the contact us page on my site.  It was saying messages were going through, but I was not receiving the email confirmation or information.  Just in case this has happened to any of you who are using Fox Contact too, I figured I'd let you know how I fixed it.  I went into extensions > manage > uninstall fox contact component and module > then I reinstalled the fox contact package >reset all of the information I wanted for fox contact and it worked!!

Still in MAJOR NEED of HELP with the order confirmation emails that I am still not receiving...please help! Thanks!

-Erica

erica23

Hi,

I have fixed the contact us page on my site....but still having major problems with NOT receiving the confirmation email for orders, I have tried every version of virtuemart and joomla possible, I have tried on test sites, on the live site, etc and NOTHING is working as far as receiving the confirmation emails.  I feel like this should not be this difficult.  It was working fine when the day before this issue started and within 24 hours without me touching or changing anything, it stopped working.  I have tried everyone's suggestions on this forum, please help asap!!  I am even recreating my site from scratch on a different test url and the emails aren't working either....

Thanks,
Erica