This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set variantParam = 'variant' %} | |
{# set product #} | |
{% set product = craft.products.id(productId).one() %} | |
{# set variant #} | |
{% set variant = product.defaultVariant %} | |
{# overvrite default variant with url param #} | |
{% if product.variants|filter(v => v.id == craft.app.request.getParam(variantParam)) is not empty %} |