Magento 2 Product not available for purchase when qty=0 - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Monday, August 28, 2023

Magento 2 Product not available for purchase when qty=0

Default magento shows out of stock for qty 0, And if admin set display out of stock product set to No, then Magento will not show out of stock product..

My requirement is i can show a message that " This product is no longer available for purchase" but only certain category like "overstock sale" category and it can be manage totally form admin. i am using back order for all products. where:

  • Product should show.
  • Add to cart should hide.
  • And message should show instead of Out of Stock.

Suggest any extension or any code. Thanks in advance.

my effort is https://github.com/saif-bin-zahid/soldout but still no luck.



source https://stackoverflow.com/questions/76988580/magento-2-product-not-available-for-purchase-when-qty-0

No comments:

Post a Comment