fix! Posted November 3, 2013 Share Posted November 3, 2013 (edited) Hello, i have a custom SESSION var, that i want to save into the cart_product table, you know where is the insert instruction to impact this table? Hola tengo una variable de sesion que quiero guardar en la tabla cart_product, ustedes saben en que archivo está la instrucción que impacta dicha tabla? Gracias! Edited November 3, 2013 by fixmedia (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 the question is: when you want to add this variable to this table? 1 Link to comment Share on other sites More sharing options...
fix! Posted November 11, 2013 Author Share Posted November 11, 2013 the question is: when you want to add this variable to this table? Thanks for your answer, i want to save the value into the table after add product to the cart. How can convert the traditional $_SESSION into a Prestashop variable? Regards Link to comment Share on other sites More sharing options...
vekia Posted November 11, 2013 Share Posted November 11, 2013 How can convert the traditional $_SESSION into a Prestashop variable? you can use context object to store this variable. if i were you, i will create a module which uses actionCartSave hook. This hook is called right after a cart creation or update. in this hook function (in module) you can add code to update cart_product table field (with DB object as it is suggested in documentation) 1 Link to comment Share on other sites More sharing options...
fix! Posted November 12, 2013 Author Share Posted November 12, 2013 Thank you vekia for your tips, Best Regards fix! 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