given a user is on an individual product's page
and the product being displayed is out of stock (product.quantity = 0)
then the "Add To Cart" button will be unclickable
and the "Add To Cart" button will be a lighter color
API
models/product.py:
a "sold_out" decoration should be added to the
if product.quantity > 0: "sold_out" should equal True
if product.quantity = 0: "sold_out" should equal False
views/products.py:
"sold_out" should be included in the ProductSerializer
Client
components/products/detail.js:
"Add to Cart" button should be conditionally rendered based on the product.sold_out property in the product state
given a user is on an individual product's page and the product being displayed is out of stock (product.quantity = 0) then the "Add To Cart" button will be unclickable and the "Add To Cart" button will be a lighter color
API
models/product.py: a "sold_out" decoration should be added to the if product.quantity > 0: "sold_out" should equal True if product.quantity = 0: "sold_out" should equal False
views/products.py: "sold_out" should be included in the ProductSerializer
Client
components/products/detail.js: "Add to Cart" button should be conditionally rendered based on the product.sold_out property in the product state