:::: MENU ::::

magento 2 get current quote

magento 2 get current quote

Today we talk about how Magento 2 get current quote. You can get quote data from the checkout session. You can get data to manipulate the data in the cart. So let start with our example.

<div>::CODECOLORER_BLOCK_4::</div>

Now we call our function and get a quote data.

$allItems = $this->getQuotes()->getAllVisibleItems();
foreach ($allItems as $item) {
    echo $item->getProductId();
}
Author: Qaisar Satti
Category: Magento 2
Last Modified: September 29, 2020


So, what do you think ?