Developer notes
| Item | Value |
|---|---|
| Add-on id | kv_theme_keyring |
| Theme | kv_keyring (child of responsive) |
| Data class | Tygh\Addons\KvThemeKeyring\Theme\Hire (hooks gather_additional_products_data_post, dispatch_before_display, get_cart_product_data; admin: update_product_post, delete_product_post) |
| Card data | $product.ke_hire (mode, unit day/night, rate, week, month, save_w, save_m, min, max, tiers), ke_deposit, ke_kit (list), ke_kit_n, ke_collect; booking data $product.kv_br comes from Bookings & Reservations |
| Block source | $ke_src = Theme\HireSource (booking(), tiers(), fromPrices($items)) |
| Endpoints | dispatch=kv_keyring.avail&ids=1,2&from=YYYY-MM-DD&to=YYYY-MM-DD (per item s free/busy/rule/slot, n length, total price HTML, save percent), kv_keyring.strip&product_id=N[&start=..&days=14] (day states a/l/f/c), kv_keyring.quote&product_id=N&from=..&to=..[&qty..] (the add-on’s quote with the long-hire tier: full, total, saving, deposit). GET, JSON, Cache-Control: no-store, read-only. |
| Long-hire tiers | setting long_hire or feature HIRE_TIERS (days:percent list); applied in get_cart_product_data after Bookings & Reservations priced the line (priority 1000 < 5001), never to stored prices of order editing |
| Feature codes | DEPOSIT, KIT, HIRE_TIERS, COLLECTION |
| Visitor dates | browser localStorage key kv_keyring_dates ({from, to}), never sent to the session |
| My bookings | controllers/frontend/kv_booking_reservations.post.php assigns $ke_rentals (start / end / state of the listed bookings) for the countdowns |
| Demo setup | Tygh\Addons\KvThemeKeyring\Theme\Seed from data/hire.json; state var/kv_storage/kv_theme_keyring/hire.json, own list hire_items.json (removed on uninstall) |
Block templates: blocks/categories/kv_ke_desk.tpl, kv_ke_tags.tpl, kv_ke_long.tpl,
blocks/products/kv_ke_shelf.tpl. Hooks: products:product_data (post: key tag + availability pin into the product
labels capture), products:list_price_block (pre: hire partner, rate strip, chips, availability line),
products:main_info_title (post: rate card, 14-day strip), products:product_detail_bottom (post: kit, collection,
hire partner), index:scripts (pre: JS strings and URLs). Cached pages carry catalogue data only (full page cache);
everything that depends on the visitor’s dates comes from the endpoints. The constant KV_THEME_KEYRING_DEMO_BOOKINGS
(Kavio’s static demo and screenshots only, never set on a store) adds “out on hire” blocks to demo items.