Skip to content

“quantity_and_stock_status” attribute is not functioning as expected on the product list page in Magento 2.4.6-p3, Enabled usage in product listing

I recently encountered an issue with the Magento default “quantity_and_stock_status” attribute. While this attribute is functioning properly on the product view page, it’s not working on the product listing page even after enabling the “used_in_product_listing” setting in the backend.

On the product view page, it returns the proper result.

Array(
  ['is_in_stock'] => 1
  ['qty] => 1000
)

But in the product list it’s returning null.

enter image description here