Jump to content

Prestashop 1.3.5 Send to Friend Module Error


Recommended Posts

Hi friends. I want to use sendtofriend module but it gives an error saying that "An error occurred during the process." and these lines

if (empty($_POST['email']) OR empty($_POST['name']))
$error = $this->l('You must fill all fields.');
elseif (!Validate::isEmail($_POST['email']))
$error = $this->l('Your friend\'s email is invalid.');
elseif (!Validate::isName($_POST['name']))
$error = $this->l('Your friend\'s name is invalid.');
elseif (!isset($_GET['id_product']) OR !is_numeric($_GET['id_product']))
$error = $this->l('An error occurred during the process.');
else
{

gives that error. Thank you..

Link to comment
Share on other sites

Sorry, i'm correcting.. i guess the problem due to this lines :

/* Email sending */
if (!Mail::Send(intval($cookie->id_lang), 'send_to_a_friend', $subject, $templateVars, $_POST['email'], NULL, ($cookie->email ? $cookie->email : NULL), ($cookie->customer_firstname ? $cookie->customer_firstname.' '.$cookie->customer_lastname : NULL), NULL, NULL, dirname(__FILE__).'/mails/'))
$error = $this->l('An error occurred during the process.');
else
$confirm = $this->l('An email has been sent successfully to').' '.Tools::safeOutput($_POST['email']).'.';
}
}
else
{
global $cookie, $link;

it occurs while sending e-mail.. i can send test e-mail from mail preference page but i can't use send to friend module.. thank you again.g

Link to comment
Share on other sites

×
×
  • Create New...