0
votes

I need to add an non-inventory item by internal id to the cart in SCA, how would I go about pulling that item and then adding it? The code samples I find are for pulling data always refer to views, I am thinking I need to pull it as an item, as I need to add it as an item using methods in LiveOrder.Model

thanks for anyhelp you may give

2
Sorry It got chopped off I need to add an non-inventory item to by internal id to the cart in SCA - jk121960

2 Answers

1
votes

Really depends on which version of SCA you are using. The quick answer is to look in the ItemDetails.View.js file in the Modules directory and find the code for the addToCart method.

The longer answer is that SCA's architecture and performance leave much to be desired. If you have things like multiple add to or update cart I found that it was easier to write my own cart.ss service and then just forward to the cart or refresh the page on completion.

0
votes

So I found out that the easiest way to do this is like this, the items are returns in a object array, so thanks for your help

$.get('/api/items?id=10779&fieldset=details', function(obj) {
}).done(function(obj) {
});