-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add article that documents a Spree::Order journey #2803
Add article that documents a Spree::Order journey #2803
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some questions, thanks!
- If returning, Solidus determines whether the customer is a guest. | ||
- If customer was logged in during a previous session, Solidus determines | ||
whether customer should be logged in again. | ||
- If new, `guest_token` cookie might be generated for the customer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too much indent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. This was intentional, but I think that it makes more sense to indent these lists this way:
- If returning, Solidus determines whether the customer is a guest.
- If customer was logged in during a previous session, Solidus determines
whether customer should be logged in again.
- If new, `guest_token` cookie might be generated for the customer.
Because the "If customer was logged in..." item relates specifically to the returning customers item above.
|
||
- Customer logs in or continues checkout as a guest. | ||
- The `Spree::Order` is updated. | ||
- If the customer logs into an existing account, their `Spree::User` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should mention that at this point the order could be merged with a previous user's order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I had overlooked that. I will be adding a new list item to account for this functionality.
|
||
- The `Spree::Payment`'s `state` changes from `checkout` to `pending`. | ||
|
||
Administrator approves the shipment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that this is needed actually. I think that shipments become ready when the payment is paid (no balance due), no approval needed.
|
||
- The `Spree::Order`'s `approver_id` and `approved_at` values are no | ||
longer `nil`. | ||
- The [`Spree::StockItem`'s][spree-stock-item] `count_on_hand` value decrease by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this happen when the shipment is shipped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will run through an order and double-check this now. Thank you.
My understanding was that a sold stock item is no longer counted as on hand, because it has been sold and will be shipped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just ran through an order. The count_on_hand
decreases as soon as an order has been placed – so before the shipment is shipped.
The initial version of this article tracks a Spree::Order, from before it is created (by a customer adding an item to the cart), to the point when an order is shipped and received by the customer.
0a257a7
to
409d39b
Compare
@kennyadsl Thanks for your comments. I just updated the commit to fix the issues you commented on. |
|
||
- The `Spree::Order`'s `approver_id` and `approved_at` values are no | ||
longer `nil`. | ||
- The [`Spree::StockItem`'s][spree-stock-item] `count_on_hand` value decrease by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I still think this should not stay here, doesn't this happen when the order is completed without the need for the admin to do any approval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, thank you! Fixing.
This commit adds additional headings to the customer flow article. This allows readers to more quickly skim and scan the article for the information they are looking for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ben!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very useful. Thanks for writing that
The initial version of this article tracks a
Spree::Order
, from before it is created (by a customer adding an item to the cart), to the point when an order is shipped and received by the customer.