{% comment %} Arguments - product: product object - [per_row]: number of items per row - [quick_shop_enable]: boolean - [collection]: collection object {% endcomment %} {%- liquid unless per_row assign per_row = 4 endunless capture gridView render 'products_per_row', products_per_row: per_row, style: 'fractions' endcapture # These assignments have no effect if a sizes parameter is passed in assign sizeVariable = gridView if fallback != blank assign fallback = fallback else assign fallback = 'variable' endif assign product_compare_at_price = product.compare_at_price assign product_price = product.price assign product_price_min = product.price_min assign product_price = product.metafields.app--168074346497.min_auto_discounted_price.value | default: product.price if product.metafields.app--168074346497.discount_percentage.value > 0.01 assign deducted_percentage = 1.0 | minus: product.metafields.app--168074346497.discount_percentage.value assign product_price = product.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign product_price_min = price assign product_compare_at_price = product.price if product.compare_at_price > product_compare_at_price assign product_compare_at_price = product.compare_at_price endif endif assign on_sale = false if product_compare_at_price > product_price assign on_sale = true endif assign product_tags = product.tags | join: ',' assign has_custom_label = false if product.metafields.theme.label and product.metafields.theme.label != blank assign has_custom_label = true assign custom_label = product.metafields.theme.label.value elsif product_tags contains '_label_' for tag in product.tags if tag contains '_label_' assign tag_starts_with = tag | slice: 0 if tag_starts_with == '_' assign has_custom_label = true assign custom_label = tag | replace: '_label_', '' endif endif endfor endif -%}