Has anyone experienced adding items to an SCA cart...
# suitecommerce
a
Has anyone experienced adding items to an SCA cart using a completely external site? We'd ideally add items and retrieve the cart contents. I tried using LiveOrder.Line.Service.ss, but have ran into some hurdles. This is similar to WSDK, but NetSuite was adamant that we go with SCA instead of SiteBuilder.
s
It is possible, yes. You can use the ​/app/site/backend/additemtocart.nl endpoint
It can also be used with multiple items and item options (rather than matrix child IDs) if you prefer. Be sure to also include any additional URL parameters your site might need
Eg /app/site/backend/additemtocart.nl?c=123456&buyid=multi&multi=51,1,custcolsize|1|| custcolcolor|1;52,2,custcolsize|2||custcolcolor|2
a
Awesome! Thanks!
s
Some old WSDK endpoints still work with SCA sites but they're old and not very flexible, and require you to enable the external catalog site feature
a
Do you know if there is a backend call for the cart? Are these calls documented somewhere?
*to retrieve the cart contents
s
Accordingly, they're not really supported for SCA purposes but they mostly 'work'
I don't know about cart contents
They're not really set up to make a rich, featureful external site as they're quite old and haven't been improved in years
they're useful in circumstances where you want to create an external catalog site (as the name suggests) or shopping experience (like a product configurator) and then redirect the user back to your SCA site
a
Yeah, that was the plan. We found the enable WSDK feature in the "Enable Features" portion, but we could not find it at the web site level.
It is available on Sitebuilder websites, but not SCA.
s
AFAIK once you turn it on at the company level it should work on all sites
p
you can code your own services in SCA to add to cart from an external site if you don’t like WSDK too
as long as you use GET requests you’ll be fine
(because of cross domain issues otherwise)
a
The problem that I had with this is that I could get a call to be successful, but it didn't actually add it to the cart when you would visit the site.
Almost like it is adding it to the wrong cart or something. It would return basically a brand new cart with the added item in it.
f
Just so it´s clear
possible does not mean "supported"
/app/site/backend/additemtocart.nl is intended to be used and supported in SiteBuilder
☝🏻 1
a
Ok, understood. I assumed it was not supported, since it was not mentioned in the documentation. Thanks for the clarification!
111 Views