PageBuilder
Visual section builder for MODX 3. Draft and publish without overwriting resource content

Store hero or "product of the week": large image, price, description, add to cart. One product from msProducts.
Информация
Requires PageBuilder Pro and miniShop3.
Product relation to a miniShop3 resource. Other section fields set the block title.
| Parameter | Value |
|---|---|
| key | product_spotlight |
| Layer | Pro |
| Category | commerce (commerce) |
| Chunk | pagebuilderpro_product_spotlight |
| Requires | pro, minishop3 |
Fill these fields in the section inspector. Field types are documented in the field types reference.
title) Type text. Optional.
product) Type relation. Required. Pick one MODX resource in a search modal.
Two-column pb-product-spotlight via msProducts.
Example payload after save. Media, video, and map values may be enriched on output:
{
"title": "Section title",
"product": 201
}Fenom chunk pagebuilderpro_product_spotlight:
{var $productId = $pb_product_resource|default:($product_id|default:0)}
{var $listing = ''}
{if $productId}
{var $listing = $modx->runSnippet('msProducts', [
'parents' => 0,
'resources' => $productId,
'limit' => 1,
'tpl' => 'pagebuilderpro_ms3_product_spotlight_row',
'includeVendorFields' => '*',
'includeOptions' => 'color,size',
'withCurrency' => 1,
'showZeroPrice' => 1
])}
{/if}
<section class="pb-section pb-section--product-spotlight pb-product-spotlight{if $cssClass} {$cssClass|escape}{/if}" data-pb-section="product_spotlight"{if $id} id="pb-{$id|escape}"{/if}>
<div class="pb-section__inner pb-product-spotlight__inner">
{if $title}
<h2 class="pb-heading">{$title|escape}</h2>
{/if}
{if $listing}
{$listing}
{else}
<p class="pb-listing__empty">Product not selected or unavailable.</p>
{/if}
</div>
</section>PageBuilderPro/core/components/pagebuilderpro/sections/product_spotlight.json