Cash on Delivery available for orders below ₱2,000 only for select stores. For Senior Citizen or PWD discounts, please contact our hotline at 8580-8888.
/**
* Zapiet Eats – Product Card Badge Logic (Extended Version)
* ----------------------------------------------------------
* This script dynamically displays real-time product availability badges
* (e.g., AVAILABLE, PARTIALLY AVAILABLE, SOLD OUT, UNAVAILABLE, NOT IN MENU)
* across all product cards on the storefront — including dynamically loaded
* sections such as:
* - Product recommendations
* - Recently viewed products
* - Any theme-specific product card components
*
* Key Functions:
* - Evaluates Zapiet Eats data (restaurant, menu, date, inventory, restrictions)
* - Updates each product card with the correct status badge and disables
* “Add to Cart” buttons or product links when unavailable
* - Automatically observes and re-evaluates when:
* • Zapiet Eats state changes (restaurant/menu/date)
* • New products are dynamically added to the DOM
* • Shopify’s “Product Recommendations” section is rendered or refreshed
*
* Compatibility:
* - Works with both static and dynamic product grids
* - Supports themes using `.product-recommendations` or
* `#product-recommendations` containers
*
* Notes:
* - The script uses MutationObserver to detect newly loaded cards
* - Automatically applies consistent badge styling for all product states
* - Designed for Shopify stores integrated with Zapiet Eats’ inventory logic
*
* Author: [Mario Sanchez]
* Date: [Oct 29, 2025 11:03AM]
*/