I get informational cards, but I need to show it to the customer, for example, to show a specific product, name, price, and the customer which bought this product. Getting cart info
class Index extends \Magento\Framework\View\Element\Template
{
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Checkout\Model\Cart $cart,
array $data = []
)
{
$this->cart = $cart;
parent::__construct($context, $data);
}
public function getCartInfo()
{
return $this->cart->getQuote()->getItemsCollection();
}
}
Can somebody help?