Skip to content

Commit

Permalink
Merge branch 'staging-04-2024' of https://github.com/atriantas/dawn i…
Browse files Browse the repository at this point in the history
…nto staging-04-2024
  • Loading branch information
atriantas committed Sep 12, 2024
2 parents f2a9bd4 + e9c5cc1 commit 631ec04
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 127 deletions.
2 changes: 1 addition & 1 deletion config/settings_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "theme_info",
"theme_name": "Dawn",
"theme_version": "15.0.0",
"theme_version": "15.0.1",
"theme_author": "Shopify",
"theme_documentation_url": "https:\/\/help.shopify.com\/manual\/online-store\/themes",
"theme_support_url": "https:\/\/support.shopify.com\/"
Expand Down
2 changes: 1 addition & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"from_price_html": "Von {{ price }}",
"regular_price": "Normaler Preis",
"sale_price": "Verkaufspreis",
"unit_price": "Stückpreis"
"unit_price": "Grundpreis"
},
"share": "Dieses Produkt teilen",
"sold_out": "Ausverkauft",
Expand Down
2 changes: 1 addition & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
"remove_all_single_item_confirmation": "¿Eliminar 1 artículo de tu carrito?",
"min_error": "Este artículo tiene un mínimo de {{ min }}.",
"max_error": "Este artículo tiene un máximo de {{ max }}.",
"step_error": "Solo puedes agregar este artículo en incrementos de {{ step }}."
"step_error": "Solo puedes agregar este artículo en incrementos de {{ step }}"
}
},
"localization": {
Expand Down
4 changes: 2 additions & 2 deletions locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"product": {
"add_to_cart": "Ajouter au panier",
"description": "Description",
"on_sale": "En vente",
"on_sale": "Promotion",
"product_variants": "Variantes de produits",
"quantity": {
"label": "Quantité",
Expand All @@ -125,7 +125,7 @@
"max_of": "Max. {{ quantity }}"
},
"price": {
"from_price_html": "Du {{ price }}",
"from_price_html": "À partir de {{ price }}",
"regular_price": "Prix habituel",
"sale_price": "Prix promotionnel",
"unit_price": "Prix unitaire"
Expand Down
36 changes: 5 additions & 31 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
Dawn 15.0.0 adds support for combined listing products and products with over 2,000 variants, includes several enhancements for B2B online stores and localization improvements.
### Added
- Support for products with over 2,000 variants (when released)
- Support for combined listing products
- Structured data for Product and Article drops generated by new structured_data liquid filter
- Now possible to enable/disable the display of customer avatars via the Shopify admin (without editing code)
- New “Extra Extra Large” font size option for headers
### Changed
- Default values for sections and blocks are now translated in the store's default language
- Optimized CSS to improve rendering performance
- Store policies are now displayed in the footer by default
- Product page, featured product card and cart now display “Duties included” text
- Country selector no longer requires diacritics to match – for example, in French, typing ‘Etats’ will match ‘États-Unis’
- Removed drop shadows from variant images in the quick add modal
- Updated root locale keys of the regional locales to their default variations
Dawn 15.0.1 introduces a few bug fixes.
### Fixes and improvements
- Implemented client-side validation to better enforce quantity rules
- Fixed an issue where option value selection was incorrect if the user selected an option before fully loading
- Slideshow updated to address irregular movement during scroll
- Fixed an issue where product variant images were not being displayed on mobile
- Fixed an issue where image thumbnail was not updated when a product variant featured media changed
- Improved quantity accuracy when using Quick Order List to add to cart (no longer dropping clicks)
- Quick Order List allows multiple variants to be updated at once
- Quick Add Bulk now displays “out of stock” for items with no inventory
- Improved quantity accuracy when using Quick Add Bulk to add to cart (no longer dropping clicks)
- Significant network performance improvements for Quick Add Bulk
- Product media correctly displayed in the Quick Add Bulk modal when a user selects a variant
- Several UX improvements for Quick Add Bulk modal on desktop
- Centered "View cart” button text
- Optimized header and footer spacing
- Clicking product name now links to the product details page
- Removed superfluous underlined space on “View full details” link
- Fix issues where when the header section is hidden, some functionalities were broken.
- Update cart errors to be output as a string rather than a HTML element.
- Escape variant option names so that when an option includes quotation marks it doesn’t cause undesired effects.
- Fix placeholder product cards that were not showing a default price and make the check more robust.
16 changes: 10 additions & 6 deletions sections/featured-product.liquid
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{%- liquid
assign product = section.settings.product
if product == null
assign placeholder = true
endif
-%}

<product-info
Expand Down Expand Up @@ -69,7 +72,7 @@
<div class="page-width section-{{ section.id }}-padding{% if section.settings.secondary_background %} isolate{% endif %}">
<div class="featured-product product product--{{ section.settings.media_size }} grid grid--1-col gradient color-{{ section.settings.color_scheme }} product--{{ section.settings.media_position }}{% if section.settings.secondary_background == false %} isolate{% endif %} {% if product.media.size > 0 or section.settings.product == blank %}grid--2-col-tablet{% else %}product--no-media{% endif %}">
<div class="grid__item product__media-wrapper">
{%- if section.settings.product != blank -%}
{%- unless placeholder -%}
{% render 'product-media-gallery', product: product, variant_images: variant_images, limit: 1 %}
{%- else -%}
<div class="product__media-item">
Expand All @@ -80,7 +83,7 @@
{{ 'product-apparel-1' | placeholder_svg_tag: 'placeholder-svg' }}
</div>
</div>
{%- endif -%}
{%- endunless -%}
</div>
<div class="product__info-wrapper grid__item{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
<section
Expand All @@ -104,16 +107,17 @@
</p>
{%- when 'title' -%}
<h2 class="product__title {{ block.settings.heading_size }}" {{ block.shopify_attributes }}>
{%- if product.title != blank -%}
{%- unless placeholder -%}
{{ product.title | escape }}
{%- else -%}
{{ 'onboarding.product_title' | t }}
{%- endif -%}
{%- endunless -%}
</h2>
{%- when 'price' -%}
<div id="price-{{ section.id }}" role="status" {{ block.shopify_attributes }}>
{%- render 'price',
product: product,
placeholder: placeholder,
use_variant: true,
show_badges: true,
price_class: 'price--large'
Expand All @@ -138,14 +142,14 @@
{%- endif -%}
</div>
{%- endif -%}
{%- if product != blank -%}
{%- unless placeholder -%}
<div {{ block.shopify_attributes }}>
{%- form 'product', product -%}
<input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}">
{{ form | payment_terms }}
{%- endform -%}
</div>
{%- endif -%}
{%- endunless -%}
{%- when 'sku' -%}
<p
class="product__sku{% if block.settings.text_style == 'uppercase' %} caption-with-letter-spacing{% elsif block.settings.text_style == 'subtitle' %} subtitle{% endif %}{% if product.selected_or_first_available_variant.sku.size == 0 %} visibility-hidden{% endif %}"
Expand Down
3 changes: 2 additions & 1 deletion snippets/card-product.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@
{%- else -%}
{%- liquid
assign ratio = 1
assign placeholder = true
if media_aspect_ratio == 'portrait'
assign ratio = 0.8
endif
Expand Down Expand Up @@ -610,7 +611,7 @@
<span class="visually-hidden">{{ 'accessibility.vendor' | t }}</span>
<div class="caption-with-letter-spacing light">{{ 'products.product.vendor' | t }}</div>
{%- endif -%}
{% render 'price', show_compare_at_price: true %}
{% render 'price', placeholder: placeholder, show_compare_at_price: true %}
</div>
</div>
</div>
Expand Down
174 changes: 90 additions & 84 deletions snippets/price.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Accepts:
- product: {Object} Product Liquid object (optional)
- placeholder: {Boolean} Renders a placeholder price (optional)
- use_variant: {Boolean} Renders selected or first variant price instead of overall product pricing (optional)
- show_badges: {Boolean} Renders 'Sale' and 'Sold Out' tags if the product matches the condition (optional)
- price_class: {String} Adds a price class to the price element (optional)
Expand All @@ -14,6 +15,8 @@
{%- liquid
if use_variant
assign target = product.selected_or_first_available_variant
elsif placeholder
assign target = null
else
assign target = product
endif
Expand All @@ -37,94 +40,97 @@
endif
-%}

{%- unless target == nil -%}
<div
class="
price
{%- if price_class %} {{ price_class }}{% endif -%}
{%- if available == false %} price--sold-out{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
{%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
{%- if show_badges %} price--show-badge{% endif -%}
"
>
<div class="price__container">
{%- comment -%}
Explanation of description list:
- div.price__regular: Displayed when there are no variants on sale
- div.price__sale: Displayed when a variant is a sale
{%- endcomment -%}
<div class="price__regular">
{%- if product.quantity_price_breaks_configured? -%}
{%- if show_compare_at_price and compare_at_price -%}
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">
{{- 'products.product.price.regular_price' | t -}}
</span>
<span>
<s class="price-item price-item--regular variant-item__old-price">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</span>
{%- endunless -%}
{%- unless target == null and placeholder == null -%}
<div
class="
price
{%- if price_class %} {{ price_class }}{% endif -%}
{%- if available == false %} price--sold-out{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? != true %} price--on-sale{% endif -%}
{%- if compare_at_price > price and product.quantity_price_breaks_configured? %} volume-pricing--sale-badge{% endif -%}
{%- if product.price_varies == false and product.compare_at_price_varies %} price--no-compare{% endif -%}
{%- if show_badges %} price--show-badge{% endif -%}
"
>
<div class="price__container">
{%- comment -%}
Explanation of description list:
- div.price__regular: Displayed when there are no variants on sale
- div.price__sale: Displayed when a variant is a sale
{%- endcomment -%}
<div class="price__regular">
{%- if product.quantity_price_breaks_configured? -%}
{%- if show_compare_at_price and compare_at_price -%}
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">
{{- 'products.product.price.regular_price' | t -}}
</span>
<span>
<s class="price-item price-item--regular variant-item__old-price">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</span>
{%- endunless -%}
{%- endif -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
{{-
'products.product.volume_pricing.price_range'
| t: minimum: money_price_min, maximum: money_price_max
-}}
</span>
{%- else -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
{{ money_price }}
</span>
{%- endif -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
{{- 'products.product.volume_pricing.price_range' | t: minimum: money_price_min, maximum: money_price_max -}}
</span>
{%- else -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span class="price-item price-item--regular">
</div>
<div class="price__sale">
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span>
<s class="price-item price-item--regular">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</span>
{%- endunless -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.sale_price' | t }}</span>
<span class="price-item price-item--sale price-item--last">
{{ money_price }}
</span>
{%- endif -%}
</div>
<div class="price__sale">
{%- unless product.price_varies == false and product.compare_at_price_varies %}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.regular_price' | t }}</span>
<span>
<s class="price-item price-item--regular">
{% if settings.currency_code_enabled %}
{{ compare_at_price | money_with_currency }}
{% else %}
{{ compare_at_price | money }}
{% endif %}
</s>
</div>
<small class="unit-price caption{% if product.selected_or_first_available_variant.unit_price_measurement == nil %} hidden{% endif %}">
<span class="visually-hidden">{{ 'products.product.price.unit_price' | t }}</span>
<span class="price-item price-item--last">
<span>{{- product.selected_or_first_available_variant.unit_price | money -}}</span>
<span aria-hidden="true">/</span>
<span class="visually-hidden">&nbsp;{{ 'accessibility.unit_price_separator' | t }}&nbsp;</span>
<span>
{%- if product.selected_or_first_available_variant.unit_price_measurement.reference_value != 1 -%}
{{- product.selected_or_first_available_variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ product.selected_or_first_available_variant.unit_price_measurement.reference_unit }}
</span>
</span>
{%- endunless -%}
<span class="visually-hidden visually-hidden--inline">{{ 'products.product.price.sale_price' | t }}</span>
<span class="price-item price-item--sale price-item--last">
{{ money_price }}
</span>
</small>
</div>
<small class="unit-price caption{% if product.selected_or_first_available_variant.unit_price_measurement == nil %} hidden{% endif %}">
<span class="visually-hidden">{{ 'products.product.price.unit_price' | t }}</span>
<span class="price-item price-item--last">
<span>{{- product.selected_or_first_available_variant.unit_price | money -}}</span>
<span aria-hidden="true">/</span>
<span class="visually-hidden">&nbsp;{{ 'accessibility.unit_price_separator' | t }}&nbsp;</span>
<span>
{%- if product.selected_or_first_available_variant.unit_price_measurement.reference_value != 1 -%}
{{- product.selected_or_first_available_variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ product.selected_or_first_available_variant.unit_price_measurement.reference_unit }}
</span>
{%- if show_badges -%}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>
</small>
</div>
{%- if show_badges -%}
<span class="badge price__badge-sale color-{{ settings.sale_badge_color_scheme }}">
{{ 'products.product.on_sale' | t }}
</span>

<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>
{%- endif -%}
</div>
{% endunless %}
<span class="badge price__badge-sold-out color-{{ settings.sold_out_badge_color_scheme }}">
{{ 'products.product.sold_out' | t }}
</span>
{%- endif -%}
</div>
{% endunless %}

0 comments on commit 631ec04

Please sign in to comment.