Skip to content

Commit

Permalink
Merge branch 'dev' into 'main'
Browse files Browse the repository at this point in the history
Release version 2.1.0

See merge request engineering/sm/discovery-connectors/shopify-discovery-connector-v2!7
  • Loading branch information
lachire committed Sep 3, 2024
2 parents 6e3c74c + bd051bb commit 62997f0
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 163 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
build
node_modules
docs
.github
.editorconfig
.env*
.eslint*
.prettierignore
docker-compose.yml
shopify.*.toml
*.md
12 changes: 12 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## 2.1.0

### Added

- [`ADDED`]: Added support for [Bloomreach Discovery Facet Response V3](https://documentation.bloomreach.com/discovery/reference/facet-response-v3-unified-ranking).

## 2.0.0

### Changed

- [`CHANGED`]: Completely rewriting of the app using the new Theme App Extensions.
- [`CHANGED`]: Removed usages of the Assets API. This is a breaking change.
16 changes: 5 additions & 11 deletions app/templates/categoryTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,9 @@ const CategoryTemplate = `<% if (did_you_mean.length) { %>
<span class="blm-range-slider__values--min">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[0] * 100) : config.format_money(priceRangeFacet.start * 100) %>
</span>
<% if (checkedFacets.price) { %>
<span class="blm-range-slider__values--max">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[1] * 100) : config.format_money(priceRangeFacet.start * 100) %>
</span>
<% } else { %>
<span class="blm-range-slider__values--max">
<%= config.format_money(priceRangeFacet.end * 100) %>
</span>
<% } %>
<span class="blm-range-slider__values--max">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[1] * 100) : config.format_money(priceRangeFacet.end * 100) %>
</span>
</div>
<% if (checkedFacets.price) { %>
<div class="blm-range-slider__clear-values">
Expand All @@ -116,8 +110,8 @@ const CategoryTemplate = `<% if (did_you_mean.length) { %>
<input
type="checkbox"
<% if (facet.original_title in checkedFacets && checkedFacets[facet.original_title].includes(escapeSpecialCharacters(item.id))) { %>checked<% } %>
name="<%- facet.original_title %>"
value="<%- escapeSpecialCharacters(item.id) %>"
name="<%= facet.original_title %>"
value="<%= escapeSpecialCharacters(item.id) %>"
id="<%- facet.original_title + '[' + escapeSpecialCharacters(item.name) + ']' %>"
class="blm-product-search-filter-item__checkbox"
/>
Expand Down
120 changes: 60 additions & 60 deletions app/templates/recommendationTemplate.js
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
const RecommendationTemplate = `<div class="blm-recommendation-widget-content" data-rid="<%= widgetMetadata.rid %>" data-type="<%= widgetMetadata.type %>" data-id="<%= widgetMetadata.id %>">
<% if (products.length > config.number_of_items_to_show) { %>
<span class="blm-carousel__item blm-carousel-previous blm-invisible">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z" />
<path d="M15.61 7.41L14.2 6l-6 6 6 6 1.41-1.41L11.03 12l4.58-4.59z" />
</svg>
</span>
<% } %>
<% if (products.length > config.number_of_items_to_show) { %>
<span class="blm-carousel__item blm-carousel-previous blm-invisible">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z" />
<path d="M15.61 7.41L14.2 6l-6 6 6 6 1.41-1.41L11.03 12l4.58-4.59z" />
</svg>
</span>
<% } %>
<section class="blm-recommendation__products" style="--number-of-items-to-show: <%= config.number_of_items_to_show %>">
<% products.forEach(function(product) { %>
<div class="blm-recommendation__product" data-id="<%= product.id %>">
<div class="blm-recommendation__product-inner">
<div class="blm-product-image-container">
<a href="<%= product.link %>" class="blm-widget-link">
<img
class="blm-product-image-container__image"
alt="<%= product.title %>"
src="<%= product.image %>"
/>
</a>
</div>
<div class="blm-product-details-container">
<div class="blm-product-details-title-container">
<a href="<%= product.link %>" class="blm-product-details-container__title blm-widget-link"><%= product.title %></a>
<section class="blm-recommendation__products" style="--number-of-items-to-show: <%= config.number_of_items_to_show %>">
<% products.forEach(function(product) { %>
<div class="blm-recommendation__product" data-id="<%= product.id %>">
<div class="blm-recommendation__product-inner">
<div class="blm-product-image-container">
<a href="<%= product.link %>" class="blm-widget-link">
<img
class="blm-product-image-container__image"
alt="<%= product.title %>"
src="<%= product.image %>"
/>
</a>
</div>
<div class="blm-product-details-container">
<div class="blm-product-details-title-container">
<a href="<%= product.link %>" class="blm-product-details-container__title blm-widget-link"><%= product.title %></a>
</div>
<% if (product.price && product.sale_price) { %>
<p class="blm-product-details-container__price">
<% if (config.format_money) { %>
<%= config.format_money(product.sale_price.toFixed(2) * 100) %>&nbsp;<strike class="blm-product-details-container__original-price"><%= config.format_money(product.price.toFixed(2) * 100) %></strike>
<% } else { %>
<%= config.default_currency %><%= product.sale_price.toFixed(2) %>&nbsp;<strike class="blm-product-details-container__original-price"><%= config.default_currency %><%= product.price.toFixed(2) %></strike>
<% } %>
</p>
<% } else { %>
<p class="blm-product-details-container__price">
<% if (config.format_money) { %>
<%= config.format_money(product.price.toFixed(2) * 100) %>
<% } else { %>
<%= config.default_currency %><%= product.price.toFixed(2) %>
<% } %>
</p>
<% } %>
</div>
<% if (product.price && product.sale_price) { %>
<p class="blm-product-details-container__price">
<% if (config.format_money) { %>
<%= config.format_money(product.sale_price.toFixed(2) * 100) %>&nbsp;<strike class="blm-product-details-container__original-price"><%= config.format_money(product.price.toFixed(2) * 100) %></strike>
<% } else { %>
<%= config.default_currency %><%= product.sale_price.toFixed(2) %>&nbsp;<strike class="blm-product-details-container__original-price"><%= config.default_currency %><%= product.price.toFixed(2) %></strike>
<% } %>
</p>
<% } else { %>
<p class="blm-product-details-container__price">
<% if (config.format_money) { %>
<%= config.format_money(product.price.toFixed(2) * 100) %>
<% } else { %>
<%= config.default_currency %><%= product.price.toFixed(2) %>
<% } %>
</p>
<% } %>
</div>
</div>
</div>
<% }); %>
</section>
<% }); %>
</section>
<% if (products.length > config.number_of_items_to_show) { %>
<span class="blm-carousel__item blm-carousel-next">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z" />
<path d="M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" />
</svg>
</span>
<% } %>
<% if (products.length > config.number_of_items_to_show) { %>
<span class="blm-carousel__item blm-carousel-next">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24">
<path fill="none" d="M0 0h24v24H0V0z" />
<path d="M10.02 6L8.61 7.41 13.19 12l-4.58 4.59L10.02 18l6-6-6-6z" />
</svg>
</span>
<% } %>
</div>`;

export default RecommendationTemplate;
16 changes: 5 additions & 11 deletions app/templates/searchTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,9 @@ const SearchTemplate = `<% if (did_you_mean.length) { %>
<span class="blm-range-slider__values--min">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[0] * 100) : config.format_money(priceRangeFacet.start * 100) %>
</span>
<% if (checkedFacets.price) { %>
<span class="blm-range-slider__values--max">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[1] * 100) : config.format_money(priceRangeFacet.start * 100) %>
</span>
<% } else { %>
<span class="blm-range-slider__values--max">
<%= config.format_money(priceRangeFacet.end * 100) %>
</span>
<% } %>
<span class="blm-range-slider__values--max">
<%= checkedFacets.price ? config.format_money(checkedFacets.price[1] * 100) : config.format_money(priceRangeFacet.end * 100) %>
</span>
</div>
<% if (checkedFacets.price) { %>
<div class="blm-range-slider__clear-values">
Expand All @@ -116,8 +110,8 @@ const SearchTemplate = `<% if (did_you_mean.length) { %>
<input
type="checkbox"
<% if (facet.original_title in checkedFacets && checkedFacets[facet.original_title].includes(escapeSpecialCharacters(item.id))) { %>checked<% } %>
name="<%- facet.original_title %>"
value="<%- escapeSpecialCharacters(item.id) %>"
name="<%= facet.original_title %>"
value="<%= escapeSpecialCharacters(item.id) %>"
id="<%- facet.original_title + '[' + escapeSpecialCharacters(item.name) + ']' %>"
class="blm-product-search-filter-item__checkbox"
/>
Expand Down
67 changes: 0 additions & 67 deletions app/templates/widgetTemplate.js

This file was deleted.

3 changes: 3 additions & 0 deletions docs/shopify-app-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,9 @@ If you have any concerns related to the functionality of the connector, try to m

## Change Log / Release Notes

2.1.0
- Added support for [Bloomreach Discovery Facet Response V3](https://documentation.bloomreach.com/discovery/reference/facet-response-v3-unified-ranking).

2.0.0
- Completely rewriting of the app using the new Theme App Extensions.
- Removed usages of the Assets API. This is a breaking change.
Expand Down
Loading

0 comments on commit 62997f0

Please sign in to comment.