ileriya Posted January 29, 2014 Share Posted January 29, 2014 (edited) Hello, I would like to pass my parameters from controller to model, function hook. Does anybody can help me? That is my controller: <?php require_once('../../../config/config.inc.php'); require_once('../../../init.php'); require_once('../giftonordermodule.php'); $giftonordermodule = new GiftonorderModule(); $gift_id = Tools::getValue('gift'); if ($gift_id){ echo $gift_id; } ?> Thanks Edited January 29, 2014 by ileriya (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 from controller to model, function hook. don't understand. what you exactly expect? what you want to pass and where? Link to comment Share on other sites More sharing options...
ileriya Posted January 29, 2014 Author Share Posted January 29, 2014 (edited) Sorry for my English I want to pass the variable $gift_id from MyController to function HookMyhook of the class giftonordermodule.php Edited January 29, 2014 by ileriya (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 29, 2014 Share Posted January 29, 2014 as far as i know it's not possible. it's because you use separate controller for this (controller and module class are separate things). where you've got this: gift Tools::getValue('gift'); i suppose that this is... some kind of $_POST param? maybe $_GET ? ... or... what? Link to comment Share on other sites More sharing options...
ileriya Posted January 29, 2014 Author Share Posted January 29, 2014 It's a variable that was assigned using ajax. If it's not possible, how can I use this variable in my module class? Link to comment Share on other sites More sharing options...
Recommended Posts