Jump to content

Customer confirmation Email Not sending


Chaney

Recommended Posts

Confirmation emails not sent to owner or customer using Paypal only as payment method in store. Here is the code error my hosting found; any help??

 

Thanks!

 

Here is the php error my hosting support found when we tried an order:

 

The following error message was found in modules/paypal:

 

[03-Sep-2011 16:44:35] PHP Fatal error: Cannot use object of type Product as array in /home/chaney92/public_html/Store/modules/mailalerts/mailalerts.php on line 219

 

Here is the function, with marked line, where that error is occuring:

 

public function hookUpdateQuantity($params)

{

global $cookie;

 

$qty = intval($params['product']['quantity_attribute'] ? $params['product']['quantity_attribute'] : $params['product']['stock_quantity']); // This line is 219.

if ($qty <= intval(Configuration::get('mA_last_qties')) AND !(!$this->_merchant_oos OR empty($this->_merchant_mails)) AND Configuration::get('PS_STOCK_MANAGEMENT'))

{

$templateVars = array(

'{qty}' => $qty - $params['product']['cart_quantity'],

'{last_qty}' => intval(Configuration::get('mA_last_qties')),

'{product}' => strval($params['product']['name']));

$iso = Language::getIsoById(intval($cookie->id_lang));

if (file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.txt') AND file_exists(dirname(__FILE__).'/mails/'.$iso.'/productoutofstock.html'))

Mail::Send(intval(Configuration::get('PS_LANG_DEFAULT')), 'productoutofstock', $this->l('Product out of stock'), $templateVars, explode(self::__MA_MAIL_DELIMITOR__, $this->_merchant_mails), NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/');

}

 

if ($this->_customer_qty AND $params['product']->quantity > 0)

$this->sendCustomerAlert(intval($params['product']->id), 0);

}

<p class="ipsLikeBar right clearfix" id="rep_post_623356" style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; float: right; font-size: 11px; ">

Link to comment
Share on other sites

The emails to customers orders, registration and notification to the owner are now working - after my host support gave me the php log error I was able to surmise that the stock tracking in paypal combined with the option noted below (I think) was the cause of the error.

 

After removing the "Enable Stock Management" option in "Back Office/Preferences/Products everything worked fine.

 

I wouldn't say this is solved because of the option being unavailable to those that need it, but at least I can open my store with how its working now.

 

I submitted a 'bug' report with the error log to the developers and am waiting to see what they find.

 

Thanks for everyone's help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...