Hello, We’re using the URL ‘_/app/site/backend/add...
# suitecommerce
v
Hello, We’re using the URL ‘_/app/site/backend/additemtocart.nl_’ to add items to cart via one of our extensions. We are setting the amount manually via the ‘_amount_’ parameter (the item being added to cart has Variable Amount checked). The base price on the item is some positive amount (ex: $5.00). When we set the amount in the URL parameters to anything greater than $0.00, the item gets added to cart with the correct amount that we set. But when we set the amount in the URL parameters to $0.00, the item gets added to cart with the base price (i.e. $5.00) and not $0.00. I couldn’t find anything relevant in the official documentation (https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N2612472.html) that can help me understand this behaviour. Can anyone help me with this?
s
OK, firstly we don’t explicitly support variable price items on SCA, so we generally do not recommend you use them. Secondly, if the item is variable price, I’m not sure it’s correct to set a ‘base price’ for them. Where I have seen them used, no price is set. Thirdly, and this is probably the most important, I don’t think you can add an item to the cart that has no price. The exception being free gift promotions via SuitePromotions. If the requirement is a $0 item in the cart, might I suggest using a free gift promotion instead?
When I try to add a variable price item to the cart that has no price set, I get sent back an error saying that I need to set a price, so my guess is that you’re tripping up some validation
v
Yes, that must be a possible explanation. Thanks for your inputs, Steve. I’ll provide this information to my peers and I hope it will help them to probably fix our situation.
f
I would add a fourth and that is that ‘_/app/site/backend/additemtocart.nl_’ to add items to cart is intended and was created to be used in SiteBuilder, thought it works on SC or SCA it’s not officially supported and could stop working at any time.
👍 1
s
That too!
v
Thanks for the info, Flo. Is there no other way we can add an item to cart with some custom amount? Will SC/SCA ever support variable price items in the future?
f
Hi Viraj, I don´t think there is another way to do it. Currently we are not planning to work on this in the short term.
v
Got it. Thanks for the update, Flo.