8000 Merge pull request #2 from spencern/patch-2 · github4f/reaction@cfd13a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit cfd13a9

Browse files
committed
Merge pull request reactioncommerce#2 from spencern/patch-2
Edited for consistency with the rest of the docs.
2 parents 2c5f9c0 + 3ef04c2 commit cfd13a9

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

docs/developer/methods.md

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Meteor.call "updateVariant", variant
186186

187187
updateVariant takes a variant object which only needs to include fields which are being updated.
188188

189-
### updateVaraints
189+
### updateVariants
190190
The updateVariants method updates a whole variants array.
191191

192192
Usage:
@@ -195,17 +195,15 @@ Usage:
195195
Meteor.call "updateVariants", variants
196196
```
197197

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.
199199

200200

201201
## 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)
203203

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
205205

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.
209207

210208
```javascript
211209
ReactionCore.Collections.Products.update({
@@ -217,9 +215,11 @@ ReactionCore version **0.9.0.** has the following methods for Orders. They happe
217215
});
218216
```
219217
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`
221220
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`
223223
224224
```javascript
225225
"history": {
@@ -230,15 +230,20 @@ ReactionCore version **0.9.0.** has the following methods for Orders. They happe
230230
}
231231
```
232232
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.
234235
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`
236238
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.
238241
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.
240244
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 :
242247
243248
```javascript
244249
if (result.capture) {
@@ -260,15 +265,18 @@ if (result.capture) {
260265
}
261266
```
262267
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.
264270
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.
266273
267-
### Unconfirmed Order of operation
274+
### orders/shipmentPacking
275+
Updates the workflow status that the shipment is being packed.
268276
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.
270279
271-
**orders/updateDocument** updates the order with a reference to the specific doc created for shipping and label.
272280
```javascript
273281
ReactionCore.Collections.Orders.update(orderId, {
274282
$addToSet: {
@@ -281,7 +289,8 @@ ReactionCore.Collections.Orders.update(orderId, {
281289
```
282290
283291
284-
**orders/addItemToShipment** This adds an item to the Orders.shipping.items array.
292+
### orders/addItemToShipment
293+
This adds an item to the Orders.shipping.items array.
285294
```javascript
286295
ReactionCore.Collections.Orders.update({
287296
"_id": orderId,
@@ -292,19 +301,23 @@ ReactionCore.Collections.Orders.update({
292301
}
293302
});
294303
```
295-
**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.
296306
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.
298309
```javascript
299310
ReactionCore.Collections.Orders.update(orderId, {
300311
$pull: {
301312
shipments: null
302313
}
303314
});
304315
```
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.
306318
307-
**orders/updateShipmentTracking** updated the shipment tracking information.
319+
### orders/updateShipmentTracking
320+
updated the shipment tracking information.
308321
309322
## Other Methods
310323
### locateAddress

0 commit comments

Comments
 (0)
0