NishantVadgama Posted December 17, 2014 Share Posted December 17, 2014 I want to pass parameters or variables from one controller to another. for example what actually I want to do is. I have override PaymentModule's validateOrder() method from that method I have to pass array data like cart info etc to my modules OrderConfirmation hook function. Link to comment Share on other sites More sharing options...
NemoPS Posted December 17, 2014 Share Posted December 17, 2014 From paymentModule to order confirmation? You can try executing the hook directly... but all modules hooked there will run. I sggest you find a workaround as this would breaks the already broken mvc pattern prestashop has. Why not assigning the array from a module hooking there? Link to comment Share on other sites More sharing options...
NishantVadgama Posted December 17, 2014 Author Share Posted December 17, 2014 Sir..! I have implemented that hook into my module's php file only and not executing that hook but I want to pass array variable from that overrided PaymentModule's validateOrder() method to hookDisplayOrderConfirmation($params){} method which is in my modules php file. how can I done that..? Link to comment Share on other sites More sharing options...
NemoPS Posted December 17, 2014 Share Posted December 17, 2014 hm, it sounds tough. You can't pass a parameter there as the paymentmodule class runs on a different page compared to the order confirmation, so at a different time. You need to store the value/s in the db (serialized, perhaps), and get them back Link to comment Share on other sites More sharing options...
NishantVadgama Posted December 17, 2014 Author Share Posted December 17, 2014 absolutely I have thought about that way but Im confuse about how long database will increase day by day transaction..? Link to comment Share on other sites More sharing options...
NemoPS Posted December 17, 2014 Share Posted December 17, 2014 Well you're right, but I see no other way around it honestly Try with a simple column added to the ps_order tab Link to comment Share on other sites More sharing options...
NishantVadgama Posted December 17, 2014 Author Share Posted December 17, 2014 Actually I have added already two column in ps_order table , ok then if there is no option so I'll create one table and store my array to that and later on access in hook. thanks nemo for helping in my development 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