Jump to content

Problem adding product variants to cart.


Recommended Posts

Hello,

I'm having problems to add product variants programatically to the cart.

It looks like if I try to add a product variant into cart is getting created, and if i check that cart through the backoffice, i can see that in fact the product is inside of the cart. However, the client is not getting that cart updated.

 I'm getting the following error from this line in my php code $cart->updateQty($samples_quantity, $product_id, $combination_id, false, 'up');

 Uncaught TypeError: Return value of CartBase::getCartPriceFromCatalog() must be of the type float, null returned.

Obviously I checked if all the variables exist into the database and everything.

 

The most weird part is the fact that if i do the same without variants:     $cart->updateQty($samples_quantity, $copia_producto->id);

Everything works nice.

 

Could someone help me with this?

 

Thank you so much!

 

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...