Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Accesses the flex attributes of a JSMA cartItem

Example

Code Block
languagejs
linenumberstrue
//add cart item attributes
cartItem.flexAttributes.forEach ( function ( key ) {
  result.attributes[key] = cartItem.get(key);
});

...

Returns the flex attributes associated with a JSMA cartItem

Example

Code Block
languagejs
linenumberstrue
//add cart item attributes
cartItem.flexAttributes.forEach ( function ( key ) {
  result.attributes[key] = cartItem.get(key);
});

...

cartItem.has(key)

Checks whether a JSMA cartItem has a flex attribute for given parameter key

...

file[] cartItem.previewImages

Returns a list of JSMA file for further access to the previewImages of an item.

...

product cartItem.product

Returns a JSMA product for the current item.

Example

...

file cartItem.project

Returns a JSMA file for the saved project of the current item.

...

Returns the shippingAddress as a JSMA address.

Example

Code Block
languagejs
linenumberstrue
//shipping address
var shippingAddress = cartItem.shippingAddress;

result.shippingAddress = {
  gender : shippingAddress.gender,
  firstName : shippingAddress.firstName,
  lastName : shippingAddress.lastName,
  company : shippingAddress.company,
  street : shippingAddress.street,
  houseNumber : shippingAddress.houseNumber,
  zipCode : shippingAddress.zipCode,
  city : shippingAddress.city,
  country : shippingAddress.countryCode,
  email : shippingAddress.email,
  phone : shippingAddress.phone,
  extra : shippingAddress.extra
};

return result;

...

cartItem cartItem.voucher

Returns the JSMA voucher of the current item if it is of type 'voucher'.

...