{% layout none %} {%- paginate collection.products by 1000 -%} {%- assign CountryCode = 'US' -%} {%- if shop.currency == 'CAD' -%}{%- assign CountryCode = 'CA' -%}{%- endif -%} {%- assign PriceAdjustment = 1.0 -%} {%- assign PriceAdjustmentEffectiveDate = '20181226T080000-0500/20190102T235900-0800' -%} {{ shop.name }} {{ collection.title | replace: '&', '&' }} {{ shop.url }} {{ collection.description | strip_html }} {%- for product in collection.products -%} {%- assign GoogleProductCategory = product.metafields.mm-google-shopping.google_product_category -%} {%- assign Gender = product.metafields.mm-google-shopping.gender -%} {%- assign AgeGroup = product.metafields.mm-google-shopping.age_group -%} {%- assign Color = "" -%} {%- assign Size = "" -%} {%- if product.variants.size > 0 -%} {%- for variant in product.variants -%} {%- for option in product.options -%} {%- if option == 'Color' -%}{% capture Color %}{{ variant.options[forloop.index0] }}{% endcapture %} {%- elsif option == 'Size' -%}{% capture Size %}{{ variant.options[forloop.index0] }}{% endcapture %} {%- endif -%} {%- endfor -%} {% comment %} Calculate Sales vs Base Pricing {% endcomment %} {%- if variant.compare_at_price == blank -%} {%- assign BasePrice = variant.price -%} {%- else -%} {%- assign BasePrice = variant.compare_at_price -%} {%- endif -%} {%- assign SalePrice = variant.price | times: PriceAdjustment -%} {{ product.title | strip_html | strip_newlines | replace: '&', '&' }}{% unless product.title contains Color %} {{ Color | replace: '&', '&' }}{% endunless %} {{ shop.url }}{{ variant.url }} {{ product.title | strip_html | strip_newlines | replace: '&', '&' }} {{ variant.title | strip_html | strip_newlines | replace: '&', '&' }} {{ product.description | replace: ' {{ GoogleProductCategory | replace: '&', '&' }} {{ product.id }} {{ variant.id }} new {{ BasePrice | money_without_currency }} {{ shop.currency }} {%- if SalePrice < BasePrice -%}{{ SalePrice | money_without_currency }} {{ shop.currency }}{%- endif -%} {%- if PriceAdjustment < 1 -%}{{ PriceAdjustmentEffectiveDate }}{%- endif -%} {% if variant.available %}in stock{% else %}out of stock{% endif %} http:{% if variant.image.src %}{{ variant.image.src | product_img_url: 'grande' }}{% else %}{{ product.featured_image.src | product_img_url: 'grande' }}{% endif %} {{ variant.barcode }} {{ product.vendor }} {{ variant.sku }} {{ product.type | replace: '&', '&' }} {{ AgeGroup }} {% unless Color == "" %}{{ Color | strip_html | strip_newlines | replace: '&', '&' }}{% endunless %} {% unless Size == "" %}{{ Size | strip_html | strip_newlines | replace: '&', '&' }}US{% endunless %} {{ Gender }} {{ product.metafields.mm-google-shopping.custom_label_0 }} {{ product.metafields.mm-google-shopping.custom_label_1 }} {{ product.metafields.mm-google-shopping.custom_label_2 }} {{ product.metafields.mm-google-shopping.custom_label_3 }} {{ product.metafields.mm-google-shopping.custom_label_4 }} {{ variant.weight | weight_with_unit }} {% endfor %} {% else %} {% comment %} Calculate Sales vs Base Pricing {% endcomment %} {%- if product.compare_at_price_min == blank -%} {%- assign BasePrice = product.price -%} {%- else -%} {%- assign BasePrice = product.compare_at_price_min -%} {%- endif -%} {%- assign SalePrice = product.price | times: PriceAdjustment -%} {{ product.title | strip_html | strip_newlines | replace: '&', '&' }} {{ shop.url }}{{ product.url }} {{ product.title | strip_html | strip_newlines | replace: '&', '&' }} {{ product.description | replace: ' {{ GoogleProductCategory | replace: '&', '&' }} {{ product.id }} {{ product.id }} new {{ BasePrice | money_without_currency }} {{ shop.currency }} {%- if SalePrice < BasePrice -%}{{ SalePrice | money_without_currency }} {{ shop.currency }}{%- endif -%} {%- if PriceAdjustment < 1 -%}{{ PriceAdjustmentEffectiveDate }}{%- endif -%} {% if product.available %}in stock{% else %}out of stock{% endif %} http:{{ product.featured_image.src | product_img_url: 'grande' }} {{ product.barcode }} {{ product.vendor }} {{ product.sku }} {{ product.type }} {{ AgeGroup }} {{ Gender }} {{ product.metafields.mm-google-shopping.custom_label_0 }} {{ product.metafields.mm-google-shopping.custom_label_1 }} {{ product.metafields.mm-google-shopping.custom_label_2 }} {{ product.metafields.mm-google-shopping.custom_label_3 }} {{ product.metafields.mm-google-shopping.custom_label_4 }} {{ variant.weight | weight_with_unit }} {% endif %} {% endfor %} {% endpaginate %}