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


For two audiences:
ms3_product_sets for (product_id, type) are checked first.hideIfEmpty=true → empty string '';hideIfEmpty=false → emptyTpl.max_items is clamped to 1..100.return=ids, the snippet returns only the ID list.resource_id / productId — base product.category_id — forced category for auto modes.set_id — VIP set number (vip_set_{set_id}).exclude_ids — IDs to exclude.buy_together Use for “Frequently bought together” on the product card.
Priority:
type=buy_together.msps_get_auto_recommendations by product category/category_id.{'ms3ProductSets' | snippet : [
'type' => 'buy_together',
'resource_id' => $_modx->resource.id,
'max_items' => 6,
'tpl' => 'tplSetItem'
]}[[!ms3ProductSets?
&type=`buy_together`
&resource_id=`[[*id]]`
&max_items=`6`
&tpl=`tplSetItem`
]]similar Alternatives from the same category.
Priority:
type=similar.msps_get_similar_products: parent) of the current product;exclude_ids excluded.{'ms3ProductSets' | snippet : [
'type' => 'similar',
'resource_id' => $_modx->resource.id,
'exclude_ids' => $_modx->resource.id,
'max_items' => 8,
'tpl' => 'tplSetItem'
]}[[!ms3ProductSets?
&type=`similar`
&resource_id=`[[*id]]`
&exclude_ids=`[[*id]]`
&max_items=`8`
&tpl=`tplSetItem`
]]popcorn Compact impulse / add-on block.
Priority:
type=popcorn.{'ms3ProductSets' | snippet : [
'type' => 'popcorn',
'resource_id' => $_modx->resource.id,
'max_items' => 4,
'tpl' => 'tplPopcorn'
]}[[!ms3ProductSets?
&type=`popcorn`
&resource_id=`[[*id]]`
&max_items=`4`
&tpl=`tplPopcorn`
]]cart_suggestion Suggestions in the cart or before checkout.
Priority:
type=cart_suggestion.category_id or resource_id category.{'ms3ProductSets' | snippet : [
'type' => 'cart_suggestion',
'category_id' => 5,
'resource_id' => 0,
'max_items' => 6,
'tpl' => 'tplSetItem'
]}[[!ms3ProductSets?
&type=`cart_suggestion`
&category_id=`5`
&resource_id=`0`
&max_items=`6`
&tpl=`tplSetItem`
]]auto_sales Recommendations from real orders (“often bought together”).
Priority:
type=auto_sales.ms3_order_product + ms3_order, statuses 2,4,5).similar.{'ms3ProductSets' | snippet : [
'type' => 'auto_sales',
'resource_id' => $_modx->resource.id,
'max_items' => 6,
'tpl' => 'tplSetItem'
]}[[!ms3ProductSets?
&type=`auto_sales`
&resource_id=`[[*id]]`
&max_items=`6`
&tpl=`tplSetItem`
]]vip Manual promo sets and campaign blocks.
Priority:
type=vip.ms3productsets.vip_set_{set_id}.If set_id is missing or less than 1, set_id=1 is used.
{'ms3ProductSets' | snippet : [
'type' => 'vip',
'set_id' => 1,
'max_items' => 8,
'tpl' => 'tplSetVIP'
]}[[!ms3ProductSets?
&type=`vip`
&set_id=`1`
&max_items=`8`
&tpl=`tplSetVIP`
]]auto General recommendations for home, categories and landings.
Priority:
type=auto.msps_get_auto_recommendations: resource_id),category_id.{'ms3ProductSets' | snippet : [
'type' => 'auto',
'category_id' => 5,
'resource_id' => 0,
'max_items' => 12,
'tpl' => 'tplSetItem'
]}[[!ms3ProductSets?
&type=`auto`
&category_id=`5`
&resource_id=`0`
&max_items=`12`
&tpl=`tplSetItem`
]]These types are accepted but handled as auto:
also-boughtcross-sellcustom| Type | When there are no manual links |
|---|---|
buy_together | auto by category |
similar | similar by category |
popcorn | auto by category → general auto fallback |
cart_suggestion | auto by category/category_id |
auto_sales | order stats → fallback to similar |
vip | system setting vip_set_{set_id} |
auto | auto by category/catalog |
auto/similar and add manual links only for key SKUs.vip + system settings work well.auto_sales ensure enough orders exist, otherwise you will often fall back to similar.sortby; auto modes are often random.