Skip to content

Developer notes

  • Theme directory: design/themes/kv_petal (child of responsive), delivered by the add-on kv_theme_petal. The add-on copies var/themes_repository/kv_petal into design/themes on install; never edit the copy in var/themes_repository.
  • Styles: styles/data/<Style>.less (Theme editor variables + @kv_* kit tokens + @pe_* Petal tokens: bloom accent @pe_bloom (stamps, chips, countdown), date bar @pe_date*, gift band @pe_band*, image wells @pe_well1..4, occasion tags @pe_tag1..6 with ink colours, gift card paper @pe_card*, card mode @pe_card_mode (leaf, ticket, square) with @pe_leaf, head mode @pe_head_mode (sprig, bar, ribbon, line)), the skin in css/skin/skin.less. Own CSS classes use the pe- prefix; .pe-t1..6 set the tag colours (--pe-t, --pe-ti).
  • Templates added by the theme (all render the stock output, or nothing, without the licensed design):
    • blocks/products/kv_pe_grid.tpl, kv_pe_gift.tpl, kv_pe_extras.tpl, blocks/categories/kv_pe_tags.tpl
    • addons/banners/blocks/kv_pe_hero.tpl, addons/banners/blocks/kv_pe_promos.tpl, addons/blog/blocks/kv_pe_posts.tpl
    • blocks/vendor_list_templates/kv_pe_florists.tpl, blocks/wrappers/kv_pe_shop.tpl
    • hook files of the add-on: product grid card (products:product_multicolumns_list override with the card partial addons/kv_theme_petal/partials/kv_pe_card.tpl), product page (products:main_info_title pre with the occasions, products:product_detail_bottom pre with the delivery panel, the gift card, the extras slot, the care facts and the florist’s note), customer reviews (discussion:items_list_row override for the block with the user class pe-revs-block), index:html_tag pre, index:scripts pre.
  • Data: app/addons/kv_theme_petal/func.php (“petal-data”): $product.pe from gather_additional_products_data_post (earliest delivery label and lead days, occasions, colours, flowers, stems, vase life, height, light, pet-friendly, florist’s note, Size variants, “from” flag); $pe from dispatch_before_display (JSON for theme.js: cut-off hour, delivery days, store time zone offset in minutes at render time, flags for the Delivery Date & Time Slots and Gift Wrap & Messages add-ons); shop facts from get_companies_post / get_company_data_post. Every handler returns at once unless the storefront runs the licensed design. Catalogue data and settings only: safe with the block cache and the full page cache.
  • Script: js/addons/kv_theme_petal/theme.js on the Kavio kit API (Tygh.kvTheme): date buttons ([data-pe-chips]), arrival lines ([data-pe-lead] = lead days), the cut-off countdown ([data-pe-cutoff], [data-pe-cut]), the date filter ([data-pe-datefilter]), the hero slider, moving the extras block, bottom bar, option buttons. The chosen date is stored in localStorage (kv_petal_date); the “only in time” switch in sessionStorage. The event kv.petal.date ($.ceEvent) fires when the shopper picks a date.
  • Delivery Date & Time Slots contract: the countdown reads window.kvDdts.next and listens to ce.kv_ddts.eta; the product estimate .kv-ddts-eta moves into .pe-deliv; at checkout the day .kv-ddts-day[data-kv-ddts-day="Y-m-d"] (time slots) or the day radio (days only) is selected once per picker and date when the picker has no choice yet and the day is not full. Colours come through the add-on’s CSS custom properties (--kv-ddts-*).
  • Features are found by code (PE_*) or by name; see Usage.
  • The theme never overrides core templates; your own hooks keep working.