Skip to content

Developer notes

  • Theme design/themes/kv_errand (child of Responsive) and the wrapper add-on kv_theme_errand (licence, settings, demo content, data endpoints). CSS prefix er-.
  • Theme\Shops: the shop list (Multi-Vendor vendors or store locations), cached with Registry::registerCache on companies, company_descriptions, logos, images_links, store_locations and store_location_descriptions; assigned to the view as $er on every storefront page and printed once as JSON (#er-shops).
  • dispatch=kv_errand.reach&postcodes=A,B&country=US (GET, JSON, Cache-Control: no-store, read-only): per postcode (max 6) and shop the Local Delivery Zones answer (ok, fee, min, free, day, formatted *_t). 404 without the licensed design. Throttled per client (600 requests / 10 min, bucket = Local Delivery Zones ClientIp::rateKey(), which resolves the real client behind trusted proxies and Cloudflare; no throttle when Local Delivery Zones is off) and capped at 180 shop checks per request.
  • dispatch=kv_errand.locate&lat=..&lng=..: the nearest postcode of ?:kv_ldz_postcodes.
  • Full page cache: no visitor data in HTML. The script (js/addons/kv_theme_errand/theme.js) keeps the postcode in localStorage (er-doorstep) and a cookie, caches answers for 10 minutes in sessionStorage and mirrors them into #kv_er_reach_cache. Cart data come from hidden spans inside the core cart block (rendered per visitor) and on the cart page.
  • Template hooks: products:list_price_block.post (shop line), products:product_detail_bottom.pre (sold by), checkout:minicart_product_info.post and checkout:product_info.post (basket by shop), companies:catalog.override (shop grid), index:footer.post (config, JSON, sheet).
  • Demo network: Theme\Seed sets the demo vendors’ addresses and creates one Local Delivery Zones zone per demo vendor (or one for the storefront) through Zones::save(), tracked in var/kv_storage/kv_theme_errand/network.json and removed with the last demo product or on uninstall.