Skip to content

Commit

Permalink
magento/graphql-ce#890: [Checkout] Replace usage of CartItemQuantity …
Browse files Browse the repository at this point in the history
…with CartItemInterface
  • Loading branch information
lenaorobei committed Oct 23, 2019
1 parent c9c13a6 commit 8b51315
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ public function execute(QuoteAddress $address): array
} else {
$itemId = $addressItem->getQuoteItemId();
}

$productData = $addressItem->getProduct()->getData();
$productData['model'] = $addressItem->getProduct();
$addressItemsData[] = [
'cart_item_id' => $itemId,
'quantity' => $addressItem->getQty()
'id' => $itemId,
'quantity' => $addressItem->getQty(),
'product' => $productData,
'model' => $addressItem,
];
}
$addressData['cart_items'] = $addressItemsData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ private function getQuery(string $maskedQuoteId): string
cart (cart_id: "{$maskedQuoteId}") {
shipping_addresses {
cart_items {
cart_item_id
id
quantity
product {
sku
}
}
available_shipping_methods {
amount {
Expand Down

0 comments on commit 8b51315

Please sign in to comment.