I have a form adding an item to the basket in the form of a table
n x m where
m are taxonomy terms of two different taxonomies ('type of the insert' and 'insert size').
In each cell the user can enter the number of items, with the n-th 'type of the insert' and m-th 'size'.
Form I create myself in the template-based taxonomy vocabularies. How can I add products to cart programmatically?