Question

While most of the products in my Magento 2 store work ok, there are some products that special price is not displayed on the product page. I'm referring to simple products.

Assuming that regular price = 38 and final price = 33, check this test code:

var_dump($_product->getFinalPrice());
var_dump($_product->getPriceInfo()->getPrice('regular_price')->getValue());
var_dump($_product->getPriceInfo()->getPrice('special_price')->getValue());

The correct result would be:

string(7) "33.0000" 
float(38) 
float(33) 

but in some products I'm getting the following output:

float(38) 
float(38) 
bool(false) 

It makes no sense to me.

Can somebody help me to find what's wrong with these products?

Deleting them and re-creating them is not an option.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top