The JSMA orders provides access to the orders (JSMA order) in the instance.
What can JSMA orders do for me?You can use the JSMA orders to access and manipulate orders in the database |
Here is an example on how to write data to a JSMA orders:
... orders.createFromCart(cart, [uuid]) ... |
Here is an example on how to read data from a JSMA orders:
... orders.findOrderItemByUuid(uuid) ... |
The JSMA orders provides the following methods:
Creates an order in a given portal
... orders.create(portal) ... |
Creates an order in a given cart
... orders.createFromCart(cart, [uuid]) ... |
Creates an order in a given cart with paypal
... orders.createFromCartWithPaypal(cart, token, payerId) ... |
Returns the current order
... orders.current ... |
The function signature orders.find(query, [limit]) is deprecated and will produce a warning in log files. |
Finding an order matching the given parameter in query
... orders.find(query, { limit: 1000, page: 2 }) orders.find(query, [limit]) // deprecated ... |
Finds an order by the given id
Avoid usage of findByIdIds change whenever a package is reimported. So please avoid using ids whenever possible. Also delivering contents to users by id might make it possible for users to flip through the files (and by that see contents of others possibly) by changing the ids in requests. |
... orders.findById(id) ... |
Finds an order by the given uuid
... orders.findByUuid(uuid) ... |
Findes an order that contains an orderItem with the given uuid
... orders.findOrderItemByUuid(uuid) ... |
Finds orderItems matching the given paramenters in query
... orders.findOrderItems(query, [limit]) ... |