...
Code Block | ||||
---|---|---|---|---|
| ||||
CartApi.prototype.doSetShipping = function () { var countryCode = request.parameter("countryCode"); [...] var cart = carts.current; if (cart.shippingAddress.countryCode === null) { cart.shippingAddress.update({country: countryCode}); // updating countryCode } [...] return this.doUpdate(); } |
Note: the fields are filled with hashes like {country: countryCode}
reading data
Here is an example on how to read data from a JSMA address:
...