Hi, I have wrote module that correctly works on local server (PS v 1.6.1.9). But when I upload this module to the server with working-site (PS v 1.6.1.5), I get incorrect data from controller. In this module Ajax sent json to controller.
Controller-code:
$json = json_decode($_GET["Data"]);
$subject = "=?utf-8?B?" . base64_encode("Subject") . "?=";
$message = "Name: '".$json->name."'\nPhone: '".$json->phone."'.";
mail('
[email protected]', $subject, $message, "Content-type: text/plain; charset=UTF-8\r\n");
echo json_encode('This is valid json.');
Local server sends correct data, but production server sends "Name ''\nPhone ''.". Can you help me?
And one question: after uploading my module to shop I can't enter into section "modules and services". Production server says:
[PrestaShop] Fatal error in module file :/var/www/a20160066/data/www/sandaly.com.ua/classes/helper/Helper.php:
Call to a member function createTemplate() on a non-object
Local server:
Fatal error: Call to a member function assign() on a non-object in D:\Web\OpenServer\domains\prestashop\classes\controller\Controller.php on line 624
[PrestaShop] Fatal error in module file :\Web\OpenServer\domains\prestashop\classes\controller\Controller.php: Call to a member function assign() on a non-object
How to сorrect this mistake?