I am creating a mobile application and I need to add products with ajax requests.
My client uses a type of custom product called yith-composite that converts the products to parents and children (component)
Like a car (father) and wheels (component)
My problem that the button add to cart (ajax) and wx-ajax = add_to_cart does not work with this type of product,
Adding to cart works correctly only if I deactivated the ajax and let it submit the form and then update.
When the application form data were viewed, they were as follows:
ywcp_selection(153CE4EE-C1A0-6D39-9AD5-58B51C5AB306): -1 attribute_pa_sphere: 7-50 ywcp_variation_id(153CE4EE-C1A0-6D39-9AD5-58B51C5AB306): 124138 ywcp_quantity(153CE4EE-C1A0-6D39-9AD5-58B51C5AB306): 1 ywcp_selected_product_value(153CE4EE-C1A0-6D39-9AD5-58B51C5AB306): 102523 ywcp_selection(471BAD03-9C3B-B44E-8584-348A5F33F8A6): -1 attribute_pa_sphere: 7-00 ywcp_variation_id(471BAD03-9C3B-B44E-8584-348A5F33F8A6): 110356 ywcp_quantity(471BAD03-9C3B-B44E-8584-348A5F33F8A6): 1 ywcp_selected_product_value(471BAD03-9C3B-B44E-8584-348A5F33F8A6): 102552 quantity: 1 add-to-cart: 102491
So, my question about how to modify the wc-ajax = add_to_cart default to accept that kind of new data. and adding the product correctly to the cart?