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.

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.