-
Notifications
You must be signed in to change notification settings - Fork 154
Query for retrieving shopping cart information #266
Conversation
@@ -9,3 +9,11 @@ | |||
->setIsMultiShipping(false) |
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.
Please, add rollback for this fixture
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.
The rollback for the mentioned fixture exists (active_quote_rollback.php). As for masked id - the corresponding database entry is being removed when the quote is removed, so the current rollback works for masked ids as well (have just double checked this behavior)
@@ -0,0 +1,171 @@ | |||
<?php /** @noinspection SpellCheckingInspection */ |
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.
Looks like we need to remove this string
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, it's PHPStorm stuff. Removed :)
public function testGetCartForGuest() | ||
{ | ||
$reservedOrderId = 'test_order_1'; | ||
$this->quoteResource->load( |
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.
Why do we need to load Quote?
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.
Let me shed some light here.
I use this fixture because we perform tests for this quote. I use this fixture since it assigns maskedQuoteId to the quote. Also, this fixture provides a guest quote (it's not assigned to a customer)
So, the flow is: we load the guest quote, we perform tests for the guest quote.
As for the model loading, we need to get maskedQuoteId somehow but we don't have a quoteId that can be used for quoteIdToMaskedId service (only reservedOrderId). So, I load the model for retrieving quoteId.
Hi @rogyar, thank you for your contribution! |
Description (*)
This PR introduces the possibility to retrieve shopping cart information for guests and registered users by
cart_id
.Fixed Issues (if relevant)
Manual testing scenarios (*)