Jump to content

I have a Session variable thar i want to save with the product into the cart


fix!

Recommended Posts

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 by fixmedia (see edit history)
Link to comment
Share on other sites

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

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)

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...