Set related products

ps_set_related_products

Write · preview + approveCommerce · switch, until turned offTellMyShop Pro onlySaves: Commerce switch (until turned off)Visible right after install

Sets the related products shown on the product page, for example based on what customers buy together.

TellMyShop Free: No. This tool is only in TellMyShop Pro. TellMyShop Free has only ready reports that read your store.

Ask Claude

„For the 10 best-selling sofas, add as related products what customers most often buy with them.”

Example preview

10 products. Sofa Oslo 3-seat (12): now Throw Hygge (44) -> Throw Hygge (44), Cushion set Nord (31). Warning: Lamp Fjord (58) is out of stock.

Technical details

Sets related products on the product page (in the PrestaShop back office "Related products", accessories; themes usually show them as "You might also like") for up to 50 products per call, up to 20 related products each. mode: set replaces the list, add appends to it, remove takes products off it. The preview shows the list before and after with names and warns about inactive or out-of-stock products. The related list is shared by all shops of a multistore.

Parameters

NameTypeRequiredDescription
itemsarray of objectyesOne item per product. Max 50 items. Fields of each item: product (string, required): Product (id:123, ref:ABC-1, ean:..., product URL, ID, EAN or reference). Max 300 characters. related (array of string, required): Related products (ID, reference or EAN). Max 20. mode (enum: set | add | remove): set = replace, add = append, remove = take off. Default add.
shop_idintegernoShop ID in a multistore installation. Defaults to the shop in the connector address. IDs are listed by ps_get_shop_info.
confirmbooleannofalse (default) returns a preview and saves nothing. true executes, only after the user approved the preview, together with change_token.
change_tokenstringwhen: confirm=trueToken from the preview. Required with confirm=true. Valid 30 minutes, single use, bound to the previewed arguments and data state.

Limits

Max 50 products per call and 20 related products per product. A product can't be related to itself. Saving needs the Commerce switch (off after install). Permission checked per action in the back office (Catalog > Products). Undo with ps_revert_change.

What you see before anything is saved

Claude first calls the tool without confirming it. The module returns a preview (current and new values) and a single-use token valid for 30 minutes. Claude shows you the preview and saves the change only after your yes.

Related tools

Last updated: 2026-10-11