October 25, 2024
Chicago 12, Melborne City, USA
PHP

disable out of stock attribute terms


I’m working on an art website that sells printed artworks with a specific print number attribute and various frame options. Each print number has only one unit in stock, and once it’s sold, that number should become unavailable.

I’ve managed to implement the functionality where the product is marked as unavailable after it’s sold. However, the issue is that the option still appears on the shop page, only disabling the "Add to Cart" button once the visitor selects that variation. This can be frustrating for users.

How can I make sold-out print numbers unclickable, blur or dissapear from the shop page entirely?
image showing my shop page product variation
on the image i attached with you print number 1 is sold but it’s still visible on the shop page.

i tried to use some code snippet but none of them worked, i will be glad if you have a plugin recommendation or custom code.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video