Do we know if the cart component, addLines method,...
# suitecommerce
k
Do we know if the cart component, addLines method, should work with minimum quantities?
s
Work how?
addLines is just a wrapper for standard frontend add-to-cart behaviour
k
When I try to add an item to cart via the addLines method, all my minimum quantity items throw a minimum quantity error. Regardless the quantity.
Copy code
let validatedValues = [
    {
        "quantity": "3",
        "item": {
            "internalid": "10372220"
        }
    },
    {
        "quantity": "1",
        "item": {
            "internalid": "9522000"
        }
    }
]

cart.addLines({ 
    'lines': validatedValues 
}).done(function (line) {
	console.log('added-line', line);
}).catch(function (error) {
	console.log('cannot add', error);
});
message has been deleted
s
And if you remove the item that has a quantity of 1 and just use it for the one that has 3?
k
Yes, I've tried that as well
s
Quantities should be integers not strings.
Once you change that, it works fine.
k
Ok let me try that
You are the man @Steve Goldberg
netsuite halo 1