I\'m writnig a custom controller for Prestashop. It is suposed to do a simple task: 1. Create a new cart if it wasn\'t created (working fine) 2. Get attribute ID from databa
The most simple to validate a cart:
// Validate the object cart $this->context->cart->save(); $this->context->cookie->id_cart = (int)$this->context->cart->id;
the save() method upate the cart if exists or create a new if not. Then force the cookie to have the same id.