Skip to content

Developer notes

Technical reference for developers who customize Shoppable Video Reels.

Item Value
Add-on id kv_shoppable_video_reels
Function prefix fn_kv_shoppable_video_reels_
Language variables kv_shoppable_video_reels.*
CSS scope .kv-svr, .kv-svr-modal
PHP namespace Tygh\Addons\KvShoppableVideoReels

PHP: add_to_cart (counts add-to-cart from a sticker), place_order (books order lines and revenue), delete_order, delete_product_post, delete_company, init_templater_post (upgrade synchronizer, only while pending).

Template hooks: index:scripts and index:styles (post).

None.

Block type kv_svr_reels with the templates addons/kv_shoppable_video_reels/blocks/{carousel,grid,product}.tpl. Content comes from fn_kv_shoppable_video_reels_block_items() and depends on the URL only (product_id, category_id), so block output is cached for all guests and is safe with the full page cache. The slides are inert <template> elements; the add-to-cart form is the stock common/product_data.tpl form with product_data[<id>][extra][kv_svr_reel] for attribution.

?:kv_svr_reels (reel rows), ?:kv_svr_reel_products (tags), ?:kv_svr_stats (daily counters), ?:kv_svr_orders (order attribution), ?:kv_svr_rate (rate limit buckets). Uploaded videos and captions live in images/kv_svr_video/; posters use the core image storage (object type kv_svr).

index.php?dispatch=kv_shoppable_video_reels.track (POST reel_id, event = view or click) answers 204. It is rate limited per network (forged forwarding headers are ignored) and counts only active reels.

Storefront templates live in design/themes/<theme>/templates/addons/kv_shoppable_video_reels/. To customize one, copy it to your own theme’s folder; do not edit the add-on’s files, they are replaced on update. Themes that do not inherit from Responsive get the files copied by the upgrade synchronizer.

The Kavio Reel theme keeps its own reels block; this add-on does not replace it and the two do not conflict (different block type, CSS scope and script).