문제

I seem to be unable to get the current customer group price for a product.

Product is set up with a standard price of £20 and a 'wholesale' group price for 1+ units at £10.

On a category page (when logged in as a wholesale customer), I correctly see the struck through price and £10 beside it.

However, I want to show an icon when a customer is getting a special price because of their group.

$product->getPrice() returns 20, $product->getFinalPrice() returns 20, $product->getSpecialPrice() is null.

I'm trying to get the current group customer price (10) in a variable, so I can compare it. Is this possible? If so, what function do I need to use?

도움이 되었습니까?

해결책

You can get the group price by below way,

$product->getTierPrice()

Check this my another answer reference link: https://magento.stackexchange.com/a/301538/59677

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top