Skip to content

can't get minicart value (price, qty) in PDP (Product Detail Page) #5976

Closed
@ragum

Description

@ragum

I add an item in minicart and I tried to get minicart value like price and qty in PDP and it show empty, but when I get minicart value in other page except PDP it show the value
anybody can help me how to get minicart value in PDP?
Thanks before

here's my code:

create('\Magento\Checkout\Helper\Cart')->getQuote()->getAllItems(); ?> getSku(); $productQty = explode(".",$item->getQty()); $productPrice = explode(".",$item->getPrice()); $itemCart[] = "{item: "."'".$productSku."'".", "."price: ".$productPrice[0].", "."quantity: ".$productQty[0]."}"; $newitemCart = implode(", ",$itemCart); } ?>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions