mitsuzer0 Posted September 10, 2015 Share Posted September 10, 2015 sry if title is missmatch to problem . i have a module. calling "payworks2" in there have this files payworks2.php payworks2.tpl validation.php (this suposse to check the data from payworks2.tpl and show a checking.tpl when the data is ok and bank has charge and finalice the process). checking.tpl and others but not folders Im thinking im missed something right now. this is the error showing in validation.php Fatal error: Using $this when not in object context in /data/3/1/80/27/1895679/user/2062193/htdocs/storetest/modules/payworks2/validation.php on line 31 this is the content of validation.php: include('../../config/config.inc.php'); include('../../header.php'); include(".dirname(__FILE__).'/payworks2.php'"); global $smarty; //$mymodule = new PayWorks2(); $idcustomer = $this->id_customer; $smarty->display(dirname(__FILE__).'/checking.tpl'); include('../../footer.php'); i need some directions... thanks some idea to put that to work. Link to comment Share on other sites More sharing options...
razaro Posted September 10, 2015 Share Posted September 10, 2015 Error message says what is wrong. So try with $idcustomer = Context::getContext()->customer->id; Link to comment Share on other sites More sharing options...
mitsuzer0 Posted September 10, 2015 Author Share Posted September 10, 2015 (edited) include(".dirname(__FILE__).'/payworks2.php'"); i included my main module file but i can't access to it .. sorry but im stucked right now... for information the PS version is 1.4.6.1 ... and there is not update the client said that would not be in this time. the errror below Fatal error: Class 'PayWorks2' not found in /data/3/1/80/27/1895679/user/2062193/htdocs/storetest/modules/payworks2/validation.php on line 30 Edited September 10, 2015 by mitsuzer0 (see edit history) Link to comment Share on other sites More sharing options...
razaro Posted September 10, 2015 Share Posted September 10, 2015 Sorry then my code is not for that version. include_once(dirname(__FILE__).'/payworks2.php'); and global $smarty, $cookie; //$mymodule = new PayWorks2(); $idcustomer = $cookie->id_customer; Link to comment Share on other sites More sharing options...
mitsuzer0 Posted September 10, 2015 Author Share Posted September 10, 2015 how to terminated the process ( orderconfirmation ) can i call in validation.php .. ??? Link to comment Share on other sites More sharing options...
mitsuzer0 Posted September 11, 2015 Author Share Posted September 11, 2015 again to terminate the pay process, can i call orderconfirmation or payconfirmation??? .... or what is the hook? ... to finish the process and the car product be cleared? Link to comment Share on other sites More sharing options...
bellini13 Posted September 11, 2015 Share Posted September 11, 2015 PaymentModule::validateOrder All you need to do is look at the bankwire or check modules to understand how it is done Link to comment Share on other sites More sharing options...
mitsuzer0 Posted September 11, 2015 Author Share Posted September 11, 2015 thanks bellini13 and i see diferent folder structure in diferents modules ... what is the basic folder structure for my version of PS? Link to comment Share on other sites More sharing options...
bellini13 Posted September 11, 2015 Share Posted September 11, 2015 http://doc.prestashop.com/display/PS14/Creating+a+PrestaShop+Module http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+Module http://doc.prestashop.com/display/PS16/Creating+a+PrestaShop+Module Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now