You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updateVariant takes a variant object which only needs to include fields which are being updated.
188
188
189
-
### updateVaraints
189
+
### updateVariants
190
190
The updateVariants method updates a whole variants array.
191
191
192
192
Usage:
@@ -195,17 +195,15 @@ Usage:
195
195
Meteor.call "updateVariants", variants
196
196
```
197
197
198
-
updateVaraints takes a whole variant array object and updates the included fields.
198
+
updateVariants takes a whole variant array object and updates the included fields.
199
199
200
200
201
201
## Order Methods
202
-
All order related server methods can be found in _/reacti
8000
on-core/server/methods/orders.js_
202
+
All order related Meteor methods can be found in [/reaction-core/server/methods/orders.js](https://github.com/reactioncommerce/reaction-core/server/methods/orders.js)
203
203
204
-
ReactionCore version **0.9.0.** has the following methods for Orders. They happen sequentially based on the workflow order. There are 17 different methods being called during the order process.
204
+
### orders/inventoryAdjust
205
205
206
-
#### Order Methods Listed Sequentially in terms of the workflow:
207
-
208
-
1)**orders/inventoryAjust** is called when the customer places an order. It's triggered by entering a credit card that that is not declined and clicking the check out button. The function loops through each Product in an order and adjusts the quantity for that product variant.
206
+
Called when the customer places an order. It's triggered by entering a credit card that that is not declined and clicking the check out button. The function loops through each Product in an order and adjusts the quantity for that product variant.
209
207
210
208
```javascript
211
209
ReactionCore.Collections.Products.update({
@@ -217,9 +215,11 @@ ReactionCore version **0.9.0.** has the following methods for Orders. They happe
217
215
});
218
216
```
219
217
220
-
2) **orders/addOrderEmail** is called when a customer has checked out as a guest, then adds an email within the order confirmation page. This also adds an email field to `ReactionCore.Collections.Orders.email`
218
+
### orders/addOrderEmail
219
+
Called when a customer has checked out as a guest, then adds an email within the order confirmation page. This also adds an email field to `ReactionCore.Collections.Orders.email`
221
220
222
-
3) **orders/updateHistory** occurs when any Order event occurs. The first occurance is when a user clicks on the newly created order, but also called when the **begin** button is clicked or tracking number added etc. It extends the history object with additional fields to `ReactionCore.Collections.Orders.history`
221
+
### orders/updateHistory
222
+
Called when any Order event occurs. The first occurance is when a user clicks on the newly created order, but also called when the **begin** button is clicked or tracking number added etc. It extends the history object with additional fields to `ReactionCore.Collections.Orders.history`
223
223
224
224
```javascript
225
225
"history": {
@@ -230,15 +230,20 @@ ReactionCore version **0.9.0.** has the following methods for Orders. They happe
230
230
}
231
231
```
232
232
233
-
4) **orders/shipmentTracking** occurs when a tracking number has been entered and the **Add** button was clicked. This also triggers `addTracking` and `updateHistory`. This method verifies the order and tracking, then calls addTracking and updateHistory and updates the workflow/pushOrderWorkflow status.
233
+
### orders/shipmentTracking
234
+
Called when a tracking number has been entered and the **Add** button was clicked. This also triggers `addTracking` and `updateHistory`. This method verifies the order and tracking, then calls addTracking and updateHistory and updates the workflow/pushOrderWorkflow status.
234
235
235
-
5) **orders/addTracking** occurs when a tracking number has been entered and the **Add** button has been clicked. This updates `ReactionCore.Collections.Orders.shipping.shipmentMethod.tracking`
236
+
### orders/addTracking
237
+
Called when a tracking number has been entered and the **Add** button has been clicked. This updates `ReactionCore.Collections.Orders.shipping.shipmentMethod.tracking`
236
238
237
-
6) **orders/documentPrepare** occurs when the **Download PDF** button is clicked or when the Adjustment *Approved* button is clicked. This also calls updateHistory and updated that shipment is being prepared.
239
+
### orders/documentPrepare
240
+
Called when the **Download PDF** button is clicked or when the Adjustment *Approved* button is clicked. This also calls updateHistory and updated that shipment is being prepared.
238
241
239
-
7) **orders/processPayment** Still defining when this occurs. This method calls the `processPayments` and also updates the workflow status.
242
+
### orders/processPayment
243
+
This method calls the `processPayments` and also updates the workflow status.
240
244
241
-
8) **orders/processPayments** Finds the payment method and hits the payment API to capture the payment. If successful it updates `ReactionCore.Collections.Orders.payment.paymentMethod.transactionId` else it throws an error :
245
+
### orders/processPayments
246
+
Determines the payment method and hits the payment API to capture the payment. If successful it updates `ReactionCore.Collections.Orders.payment.paymentMethod.transactionId` else it throws an error :
242
247
243
248
```javascript
244
249
if (result.capture) {
@@ -260,15 +265,18 @@ if (result.capture) {
260
265
}
261
266
```
262
267
263
-
9) **orders/shipmentShipped** occurs when payment is completed and updates the work flow to the coreShipmentShipped status.
268
+
### orders/shipmentShipped
269
+
Called when payment is completed and updates the work flow to the coreShipmentShipped status.
264
270
265
-
do) **orders/orderCompleted** occurs when the order has been completed. This updates the workflow status and also updated the order with the OrderCompleted Status.
271
+
### orders/orderCompleted
272
+
Called when the order has been completed. This updates the workflow status and also updated the order with the OrderCompleted Status.
266
273
267
-
### Unconfirmed Order of operation
274
+
### orders/shipmentPacking
275
+
Updates the workflow status that the shipment is being packed.
268
276
269
-
**orders/shipmentPacking** updates the workflow status that the shipment is in packing.
277
+
### orders/updateDocument
278
+
Updates the order with a reference to the specific doc created for shipping and label.
270
279
271
-
**orders/updateDocument** updates the order with a reference to the specific doc created for shipping and label.
**orders/updateShipmentItem** This updates the items that are being associatated with a specific shipping id.
304
+
### orders/updateShipmentItem
305
+
This updates the items that are being associatated with a specific shipping id.
296
306
297
-
**orders/removeShipment** This method removed the shipment information from an order. It sets shipment object to null.
307
+
### orders/removeShipment
308
+
This method removed the shipment information from an order. It sets shipment object to null.
298
309
```javascript
299
310
ReactionCore.Collections.Orders.update(orderId, {
300
311
$pull: {
301
312
shipments:null
302
313
}
303
314
});
304
315
```
305
-
**orders/capturePayments** Cycles through each Orders paymentMethod and attempts to capture the payment. If successful it updates the Paymentmethod status to completed. Else it throws a server warning that payment was not captured.
316
+
### orders/capturePayments
317
+
Cycles through each Orders paymentMethod and attempts to capture the payment. If successful it updates the Paymentmethod status to completed. Else it throws a server warning that payment was not captured.
306
318
307
-
**orders/updateShipmentTracking** updated the shipment tracking information.
0 commit comments