Med6 Posted May 2, 2014 Share Posted May 2, 2014 Good Morning, I have the ID of a client and ID of product and I want to add the product to the carte of the client from a module I created in the B.O Programmatically Thanks Link to comment Share on other sites More sharing options...
Med6 Posted May 2, 2014 Author Share Posted May 2, 2014 Any one ? Link to comment Share on other sites More sharing options...
PascalVG Posted May 3, 2014 Share Posted May 3, 2014 Hi Med, (Do you want it to the cart, or a client's order? IN Back office, there's functionality already to add a product to an order (N.B. It may also update the linked cart, now that I think of it, you well worth have a look how they implemented it there) ) To add a product/update quantity of a cart, you could use function in Cart.php: public function updateQty($quantity, $id_product, $id_product_attribute = null, $id_customization = false, $operator = 'up', $id_address_delivery = 0, Shop $shop = null, $auto_add_cart_rule = true) (Assuming you do have the cart object already...) pascal 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