Products on Landings

Products on Landings

Objective

This guide explains how to link products inside the landing editor and how to display them properly in production.


Available modules

  • ProductsGrid: lists products (optionally by category).
  • ProductTitle: name.
  • ProductPrice: price and discount.
  • ProductImage: image.
  • ProductDescription: description.
  • ProductCategory: category.

1. Fixed productId

Directly assign a product ObjectId.

Example:

  • productId: "67f2c1ab8f6d0f1a2b3c4d5e"

When to use it:

  • Static landings for a specific product.
  • Featured sections with a specific product.

2. Dynamic productId

Assign a variable coming from the dynamic path.

Example:

  • Path: /producto/:idProducto
  • Variable: {{IDPRODUCTO}}
  • In component: productId: "{{IDPRODUCTO}}"

When to use it:

  • Reusable templates for multiple products.
  • Dynamic detail URLs.

Step-by-step setup (dynamic)

  1. Define a dynamic path, for example /producto/:idProducto.
  2. In product modules (ProductTitle, ProductPrice, ProductImage, ProductDescription, ProductCategory), use productId: "{{IDPRODUCTO}}".
  3. Publish the landing.
  4. Test a real URL, for example /producto/67f2c1ab8f6d0f1a2b3c4d5e.

ProductsGrid and navigation to detail

ProductsGrid supports cardClickLink with {{card_product_id}}.

Example:

  • cardClickLink: "/producto/{{card_product_id}}"

Result:

  • Each card opens the detail landing of the clicked product.

Filter by category

  • Filter by category (category): the grid shows only that category's products. When you click the field, your products' categories show up to pick from; you can also type another one, or a route variable like {{CATEGORIA}}. Empty shows all of them.
  • Category filter (chips above the grid) (categoryFilter): buttons above the grid so visitors filter by category among the products shown.
  • Filter categories (filterCategories): which categories show as buttons, in the order you pick them. Empty shows every category of the products, alphabetically (not the hidden ones). You can also pick a hidden category. A category with no products in the grid doesn't show.

A link with ?categoria= opens the grid with that filter already picked: for example, a menu button to /shop?categoria=Shirts. It ignores case and accents, works with hidden categories too, and works even if the grid doesn't show the filter buttons: a menu with «Tea» and «Mugs» can open the same grid filtered two ways. If no product has that category, the grid is empty and says so. A link to the same page that only changes ?categoria= doesn't reload it: it filters right away and scrolls to the section.


Search box and card effects

The Product grid block has five more options, all off until you choose them:

  • Search box above the grid (showSearch): a box where visitors search the grid's products by name, ignoring case and accents ("yerba" finds "Yerba Maté"). When nothing matches, it says so. Change its sample text in Search box text (searchPlaceholder); empty says "Search products", in the visitor's language.
  • Button to pick a random product (randomPick): a button that picks one of the products on screen at that moment (it respects the search and the chosen category), scrolls to it and outlines it. Below it says which one it was, for people who can't see it. It never repeats the last pick. Change its text in Random button text (randomLabel); empty says "Pick one for me".
  • Position of the search box and button (toolbarAlign): Centered (as always) or On the left, lined up with the grid's edge.
  • Effect when hovering a card (cardHover): with Lean towards the pointer (tilt), the card tilts towards the mouse and a soft light follows it. On phones, with "reduce motion" and in the editor it stays still.
  • Entrance of each card (cardAnimation): each card appears with one of the entrance animations as you scroll, and cards in the same row start one after the other. A card already visible when the page opens shows complete.

The entrance animations are the same as in any block's Entrance animation field: Fade in, Slide up, From the left, From the right, Zoom in, With perspective (rises tilted from behind) and Blurred (appears blurred and comes into focus). The Gallery only offers the ones that don't move the block (Fade in).


What happens if a product is not found

You can control the strategy with strictProductResolution in root props:

  • false:

    • Missing product components are hidden.
    • The landing continues rendering the rest of the content.
  • true:

    • If a required product is missing, the landing may resolve as not found (404).

Recommendation:

  • Campaign or mixed landings: false.
  • Detail landings by URL: true.

Best practices

  • Use clear segment names (:idProducto, :categoria).
  • Maintain ID and path consistency when publishing.
  • Always test:
    • a valid ID,
    • an invalid ID,
    • and the expected behavior according to strictProductResolution.

Quick troubleshooting

  • Product content doesn't appear:
    • Check the component's productId.
    • If dynamic, validate the mapping (:idProducto -> {{IDPRODUCTO}}).
  • 404 appears and shouldn't:
    • Check strictProductResolution.
    • Confirm the product exists and is active.
  • Grid appears empty:
    • Verify active products in the group.
    • If filtering by category, confirm exact match.