Jump to content

$cookie->isLogged()


Duozhasht

Recommended Posts

Well, im developing a CMS based form with a copy-center-system (http://www.papelariaveloso.com/content/8-C%C3%B3pias), but i need the $cookie->id_customer.

But i get an error:

 

Fatal error: Call to a member function isLogged() on a non-object in /home/papelari/public_html/modules/mymodule/submit.php on line 13

 

<?php
/*
$con = mysql_connect("localhost","user","password");
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
mysql_select_db("papelari_Veloso", $con); */
global $cookie;

if(!$cookie->isLogged())
{
echo 'Please login';
exit;
}
else
{
echo 'Hi, ' . $cookie->customer_firstname. ' ' .$cookie->customer_lastname . '<br/>';
echo 'We contact to you: '. $cookie->email;
}
/* $sql="INSERT INTO ps_copias (id_customer, file, cor, copias, pags, papel, gramagem, flag) VALUES('$cookie->id_customer','$_POST[file]','$_POST[cor]','$_POST[copias]','$_POST[pags]','$_POST[papel]','$_POST[gramagem]', 0)";
if (!mysql_query($sql,$con))
 {
 die('Error: ' . mysql_error());
 }
echo "Succeful";
mysql_close($con); */
?>

Link to comment
Share on other sites

Thank you for help...

Now i have other issue, i lost my shooping cart, can you check what happened?

 

http://www.papelariaveloso.com/

 

we still don't know what version you are using....but if it's 1.5 you can not use $cookie..so you are probably taking an error, again assuming 1.5...

 

you need to use context...read more here

http://doc.prestashop.com/display/PS15/Using+the+Context+Object

Link to comment
Share on other sites

  • 1 year later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...