Skip to content
ms3ProductSets
ms3ProductSets
Dynamic product recommendations for MiniShop3. Manual links, auto rules, manager templates
  • MODX 3
  • PHP 8.1
  • miniShop3
  1. Extras
  2. ms3ProductSets
  3. Quick start

Quick start ​

Wire recommendation blocks (sets) on a MiniShop3 site.

Snippet names: ms3ProductSets, mspsLexiconScript.

Fenom examples require pdoTools 3.x.

Installation ​

Requirements ​

RequirementVersion
MODX Revolution3.0+
PHP8.1+
MiniShop3installed
pdoTools3.0.0+
VueToolsinstalled (“Product sets” manager page)

Via ModStore ​

  1. Connect ModStore repository. Encrypted transport needs provider modstore.pro/extras or install fails with Package provider not found.
  2. Go to Extras → Installer and click Download Extras.
  3. Ensure MiniShop3, pdoTools and VueTools are installed.
  4. Find ms3ProductSets, click Download, then Install.
  5. Settings → Clear cache.

Open Components → Product sets and create the first template. Walkthroughs: manager scenarios.

Product sets manager

Package is available at modstore.pro.

After installation ​

Load lexicon, CSS and JS. Place ms3ProductSets in the product card template.

Step 1: Lexicon, styles and script ​

Load lexicon first, then CSS and JS, in the template (or shared head/footer).

fenom
{'mspsLexiconScript' | snippet}
<link rel="stylesheet" href="{'assets_url' | option}components/ms3productsets/css/productsets.css">
<script src="{'assets_url' | option}components/ms3productsets/js/productsets.js" defer></script>
modx
[[!mspsLexiconScript]]
<link rel="stylesheet" href="[[++assets_url]]components/ms3productsets/css/productsets.css">
<script src="[[++assets_url]]components/ms3productsets/js/productsets.js" defer></script>

Step 2: Block in the product card ​

Call ms3ProductSets on the product page template (or in the product card chunk inside a listing).

The type parameter ​

type selects the scenario: which manual links to read from ms3_product_sets, and which auto logic to run when those links are missing. Shared rules: Set types, “Common rules (all types)”.

typePurpose
buy_together“Frequently bought together”. Auto: co-purchase, then category.
similarSimilar products from the same category.
popcornCompact impulse add-ons. Extra fallback if the category path is empty.
cart_suggestionCart / checkout suggestions. Often with category_id.
auto_salesOrder-statistics set. Falls back to similar when data is thin.
vipPromo set from vip_set_*. Missing set_id uses vip_set_1.
autoGeneric blocks (home, landings). Often category_id and/or resource_id.

The example below uses buy_together.

Other call parameters:

  • resource_id: product ID the set is built for. On the product page, the current resource.
  • max_items: max items in the block (range 1…100).
  • tpl: chunk for one product row. Package default tplSetItem.

If the set is empty, the snippet returns an empty string (hideIfEmpty=true). Wrap heading and markup in a conditional, or use a placeholder. See Site integration. Per-type details: Set types.

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`
]]

Step 3: Verify ​

  • Open a product page.
  • Manual links: the block shows them.
  • No manual links: auto logic for the chosen type runs.
  • Empty set: no output (hideIfEmpty=true).

Step 4: VIP set (optional) ​

  1. Set ms3productsets.vip_set_1 (e.g. 12,34,56).
  2. Output the block:
fenom
{'ms3ProductSets' | snippet : [
  'type' => 'vip',
  'set_id' => 1,
  'tpl' => 'tplSetVIP'
]}
modx
[[!ms3ProductSets?
  &type=`vip`
  &set_id=`1`
  &tpl=`tplSetVIP`
]]

Next steps ​