mxQuickView
Quick view of product card and any resources via AJAX for MODX 3

This page describes how to choose data-mxqv-action and output mode.
data-mxqv-id (resource must exist and be viewable).data-mxqv-action defines what to render: chunk, snippet, or template.data-mxqv-mode defines where to output: modal or selector.POST and only action=render.| Task | data-mxqv-action | data-mxqv-mode |
|---|---|---|
| Product card | chunk | modal |
| Cart / mini-cart | snippet | modal |
| Quick view in custom block | chunk or snippet | selector |
| Resource template render | template | modal or selector |
chunk The basic, safest case: a dedicated card chunk (e.g. mxqv_product).
mxquickview_allowed_chunk.$modx->getChunk($name, $props).$props includes resource fields, msProductData, variants_* (has_variants=true|false, variants_html, variants_json).<button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="chunk"
data-mxqv-element="mxqv_product"
data-mxqv-id="[[+id]]"
data-mxqv-title="[[+pagetitle]]">
mxQuickView
</button><button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="chunk"
data-mxqv-element="mxqv_product"
data-mxqv-id="{$id}"
data-mxqv-title="{$pagetitle}">
mxQuickView
</button>snippet Use for elements already built by a snippet (e.g. msCart).
mxquickview_allowed_snippet.$modx->runSnippet($name, $props).<button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="snippet"
data-mxqv-element="msCart"
data-mxqv-id="[[+id]]"
data-mxqv-title="[[+pagetitle]]">
Cart
</button><button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="snippet"
data-mxqv-element="msCart"
data-mxqv-id="{$id}"
data-mxqv-title="{$pagetitle}">
Cart
</button>template Used less often: when the resource should be rendered with its template.
mxquickview_allowed_template.mxquickview_allowed_template means template render is disabled.element accepts template ID or templatename.<button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="template"
data-mxqv-element="12"
data-mxqv-id="[[+id]]"
data-mxqv-title="[[+pagetitle]]">
Template
</button><button data-mxqv-click data-mxqv-mode="modal"
data-mxqv-action="template"
data-mxqv-element="12"
data-mxqv-id="{$id}"
data-mxqv-title="{$pagetitle}">
Template
</button>modal modalLibrary (native, bootstrap, fancybox) in mxQuickView.initialize.data-mxqv-title) and prev/next navigation.selector data-mxqv-output.