I am using the code below to add a product variant to the cart. However, it doesn't work if the product doesn't have any variants.
How can I add a product without variants to the cart? I tried using the Product ID, but that doesn't work.
Any assistance would be greatly appreciated.
jQuery.post('/cart/add.js', {
items: [
{
quantity: 1,
id: 39486502174869,
properties: {
'Length': metres_required
}
}]
});