Skip to content
  1. Extras
  2. ms3ProductSets
  3. Site integration
  4. Snippet ms3ProductSets

Snippet ms3ProductSets

Outputs product sets for MiniShop3. Logic: first tries manual links from ms3_product_sets, then applies auto logic by type when result is empty.

Supported types

  • buy_together
  • similar
  • popcorn
  • cart_suggestion
  • auto_sales
  • vip
  • auto
  • also-bought, cross-sell, custom (handled as auto)

Unknown type falls back to buy_together.

Parameters

ParameterDescriptionDefault
typeSet typebuy_together
resource_id / productIdProduct ID (context resource)current resource
category_idCategory ID for auto mode0
set_idVIP set number (vip_set_{set_id})0
max_itemsProduct limit (1–100)ms3productsets.max_items
tplCard chunktplSetItem
tplWrapperBlock wrapper chunktplSetWrapper
emptyTplEmpty result chunktplSetEmpty
hideIfEmptytrue: empty string, false: emptyTpltrue
exclude_idsProduct IDs to exclude''
showUnpublishedPassed to msProductsfalse
showHiddenPassed to msProductsfalse
sortby / sortdirOutput sortorder from set
showLogPassed to msProductsfalse
tvPrefix, includeTVs, includeThumbspdoTools/msProducts params''
returnFormat: data, ids, jsondata
toPlaceholderWrite result to placeholder''

Examples

fenom
{'ms3ProductSets' | snippet : [
  'type' => 'buy_together',
  'resource_id' => $_modx->resource.id,
  'max_items' => 6,
  'tpl' => 'tplSetItem'
]}
modx
[[!ms3ProductSets?
  &type=`buy_together`
  &resource_id=`[[*id]]`
  &max_items=`6`
  &tpl=`tplSetItem`
]]

VIP set:

fenom
{'ms3ProductSets' | snippet : [
  'type' => 'vip',
  'set_id' => 1,
  'resource_id' => $_modx->resource.id,
  'tpl' => 'tplSetVIP'
]}
modx
[[!ms3ProductSets?
  &type=`vip`
  &set_id=`1`
  &resource_id=`[[*id]]`
  &tpl=`tplSetVIP`
]]

IDs only, no HTML:

fenom
{'ms3ProductSets' | snippet : ['type' => 'auto', 'return' => 'ids', 'category_id' => 5]}
modx
[[!ms3ProductSets?
  &type=`auto`
  &return=`ids`
  &category_id=`5`
]]