JSMA orderItem
Overview
The JSMA orderItem provides functionality for handling orderItems
What can JSMA orderItem do for me?
You could easily use the JSMA orderItem to edit an orderItem
Index
Usage
writing data
Here is an example on how to write data to a JSMA orderItem:
... orderItem.setAmount(5) ...
reading data
Here is an example on how to read data from a JSMA customer:
... var amount = orderItem.amount; ...
Methods
The JSMA orderItem provides the following methods:
int orderItem.amount
Returns the amount of an orderItem
Example
... orderItem.amount ...
string orderItem.backendState
Returns the backend state of an orderItem
Example
... orderItem.backendState ...
string orderItem.backendUuid
Returns the backend uuid of an orderItem
Example
... orderItem.backendUuid ...
string orderItem.description
Returns the description of an orderItem
Example
... orderItem.description ...
orderItem.flexAttributes()
Returns an array of the flex attributes of an orderItem
Example
... orderItem.flexAttributes() ...
string orderItem.get(key)
Returns the value of key as string or null if no value is set under the key.
Example
... orderItem.get(key) ...
Parameter key:string (required)
The key to be looked up in the flexAttributes of the orderItem.
boolean orderItem.has(key)
Returns a boolean value depending on whether key is present for a given orderItem
Example
... orderItem.has(key) ...
Parameter key:string (required)
The key to be checked in the flexAttributes of the orderItem.
orderItem.id
Returns the id of an orderItem
Example
... orderItem.id ...
orderItem.increment(key)
Increments the vale of a given key by one.
Example
... orderItem.increment(key) ...
Parameter key:string (required)
The key to be incremented in the flexAttributes of the orderItem.
orderItem.order
Returns the order of an orderItem
Example
... orderItem.order ...
file[] orderItem.previewImages
Returns a file array of privewImages for the orderItem
Example
... orderItem.previewImages ...
int orderItem.price
Returns the price in cent of the orderItem
Example
... orderItem.price ...
product orderItem.product
Returns the product of the orderItem
Example
... orderItem.product ...
file orderItem.project
Returns the project of the orderItem
Example
... orderItem.project ...
int orderItem.projectId
Returns the project id of the orderItem
Example
... orderItem.projectId ...
string orderItem.projectPrintId
Returns the print id of the orderItem
Example
... orderItem.projectPrintId ...
orderItem.remove(key)
Removes the key from the flexAttributes of the orderItem
Example
... orderItem.remove(key) ...
Parameter key:string (required)
The key to be removed from the flexAttributes of the orderItem.
orderItem.sanitizePiced()
Opens the picedstore of the orderItem and runs ImageMagick convert
over the images to repair images with broken pixels.
Example
... orderItem.sanitizePiced() ...
orderItem.set(key, value)
Sets the value of a specified key for a given orderItem.
Example
... orderItem.set(key, value, [options]) ...
Parameter key:string (required)
The key to be set in the flexAttributes of the orderItem.
Parameter value:string (required)
The value to be set for the key
orderItem.setAmount(quantity)
Sets the amount of a given oderItem
Example
... orderItem.setAmount(quantity) ...
Parameter quantity (required)
orderItem.setBackendState(status)
Sets the backend state of a given oderItem
Example
... orderItem.setBackendState(status) ...
Parameter status (required)
orderItem.setBackendUuid(uuid)
Sets the backend uuid of the oderItem
Example
... orderItem.setBackendUuid(uuid) ...
Parameter uuid (required)
orderItem.setPrice(cent)
Sets the price in cent of the oderItem
Example
... orderItem.setPrice(cent) ...
Parameter cent (required)
orderItem.setProduct(id)
Sets the product id of the oderItem
Example
... orderItem.setProduct(id) ...
Parameter id (required)
orderItem.setTrackingId(tracking_id)
Sets the tracking id of the oderItem
Example
... orderItem.setTrackingId(tracking_id) ...
Parameter tracking_id (required)
orderItem.setVat(vat)
Sets the vat of the oderItem
Example
... orderItem.setVat(vat) ...
Parameter vat (required)
address orderItem.shippingAddress
Sets the shipping address of the oderItem
Example
... orderItem.shippingAddress ...
int orderItem.singlePrice
Sets the single price of the oderItem
Example
... orderItem.singlePrice ...
string orderItem.sku
Sets the sku of the oderItem
Example
... orderItem.sku ...
string orderItem.subOrderId
Sets the sub oder id of the oderItem
Example
... orderItem.subOrderId ...
string orderItem.token
Sets the token of the oderItem
Example
... orderItem.token ...
string orderItem.trackingId
Sets the tracking id of the oderItem
Example
... orderItem.trackingId ...
string orderItem.type
Returns the type of the oderItem
Example
... orderItem.type ...
string orderItem.uuid
Returns the uuid of the oderItem
Example
... orderItem.uuid ...
int orderItem.vat
Returns the vat of the oderItem
Example
... orderItem.vat ...