
ms3ProductSets
Dynamic product recommendations for MiniShop3 — manual links, auto rules, manager templates


Related: Flows, API, Set types.
ms3ProductSets Builds an ID list for the set type and renders via msProducts.mspsLexiconScript Exposes window.mspsLexicon and window.mspsConfig.assets/components/ms3productsets/connector.php Single entry for frontend and manager actions.core/components/ms3productsets/include/helpers.php Shared logic for sets, templates and utilities.OnDocFormSave — sync TVs into the link table;OnResourceDelete — clean links for the deleted resource.assets/components/ms3productsets/js/mgr/.ms3_product_sets Links used to output sets.
product_id — product whose card shows the setrelated_product_id — recommended producttype — set typesortorder — ordertemplate_name — template name when the link came from bulk applyproduct_id, related_product_id, type)ms3_product_set_templates Templates for bulk apply to categories.
nametyperelated_product_ids (comma-separated IDs)sortorderdescription (added by upgrade resolver)type, resource_id, max_items, exclude_ids, chunks).msps_get_products_by_type(...): ms3_product_sets;hideIfEmpty=true → '';emptyTpl.return=ids → return CSV of IDs.msProducts + optional tplWrapper.vip: manual type=vip; fallback to ms3productsets.vip_set_{set_id}.auto_sales: SQL on ms3_order_product + ms3_order (statuses 2,4,5), fallback to similar.similar: products in the same category (parent), excluding current/exclude_ids.buy_together, cart_suggestion: auto by category via msps_get_auto_recommendations.popcorn: auto by category; if empty, fallback to random catalog products.auto, also-bought, cross-sell, custom: auto by category.ms3productsets_*) on the product.OnDocFormSave checks those TVs exist on the resource template.msps_sync_product_sets_from_tv: related_product_id rows with sortorder from the TV;template_name, so links created by bulk category templates are kept.apply_template.msProduct).ms3_product_set_templates.ms3_product_sets with template_name.replace=true, all links of that type for selected products are removed first.