Why doesn't this code work on the cart page? šŸ›’ ```liquid {% if product.available %} <button>Add to Cart</button> {% else %} <button disabled>Sold Out</button> {% endif %} ```

### Quick Explanation šŸŽÆ The `product` object only exists on product pages. Other pages can't access it! šŸ”‘ Key Objects: - Page-specific: `product`, `collection`, `article` - Available everywhere: `cart`, `shop`, `request` šŸ’” Tip: Always check `request.page_type` before using page-specific objects

Answer Options:

  • Wrong if statement syntax
  • product object not available on cart page
  • available is not a valid property
  • You cannot add to cart on the cart page
Shopify Free Test
← PreviousQuestion 1 of 1Finish →
00
← PreviousFinish →
Copyright Ā©Michael Bollin. Found some mistake?[email protected]