-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storefront): BCTHEME-1750 Update Shop By Price Widget (#2408)
- Loading branch information
1 parent
278a7aa
commit b9f2086
Showing
9 changed files
with
87 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,3 +122,7 @@ | |
font-weight: bold; | ||
} | ||
} | ||
|
||
.reset-filters { | ||
display: none; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,12 @@ | ||
{{#and theme_settings.shop_by_price_visibility shop_by_price}} | ||
{{#and theme_settings.shop_by_price_visibility category.shop_by_price}} | ||
<div class="sidebarBlock"> | ||
<h2 class="sidebarBlock-heading" data-shop-by-price>{{lang 'category.shop_by_price'}}</h2> | ||
<ul class="navList"> | ||
{{#each shop_by_price}} | ||
<li class="navList-item"> | ||
<a | ||
{{#if selected }} | ||
class="navList-action is-active" | ||
role="status" | ||
aria-live="assertive" | ||
{{else}} | ||
class="navList-action" | ||
{{/if}} | ||
href="{{url}}" | ||
> | ||
{{lang 'category.filter_price_range'}} {{low.formatted}} - {{high.formatted}} | ||
</a> | ||
<span class="price-filter-message aria-description--hidden">{{lang 'category.filter_select_announcement'}}</span> | ||
</li> | ||
{{/each}} | ||
<h2 class="sidebarBlock-heading heading-price" data-shop-by-price>{{lang 'category.shop_by_price'}}</h2> | ||
|
||
{{#any shop_by_price selected=true}} | ||
<li class="navList-item"> | ||
<a href="{{category_url}}" class="navList-action reset-btn"> | ||
{{lang 'category.reset'}} | ||
</a> | ||
<span class="reset-message aria-description--hidden">{{lang 'category.filter_reset_announcement'}}</span> | ||
</li> | ||
{{/any}} | ||
</ul> | ||
{{> components/faceted-search/range-form shop_by_price=theme_settings.shop_by_price_visibility}} | ||
|
||
<div class="reset-filters"> | ||
<a href="{{category.url}}" class="navList-action reset-btn">{{lang 'category.reset'}}</a> | ||
<span class="reset-message aria-description--hidden">{{lang 'category.filter_reset_announcement'}}</span> | ||
</div> | ||
</div> | ||
{{/and}} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<form id="facet-range-form" class="form" method="get" data-faceted-search-range novalidate> | ||
<input type="hidden" name="search_query" value="{{search_query}}"> | ||
{{#if this.sort}} | ||
<input type="hidden" name="sort" value="{{this.sort}}"> | ||
{{/if}} | ||
<fieldset class="form-fieldset"> | ||
<div class="form-minMaxRow"> | ||
<div class="form-field"> | ||
<input | ||
name="{{#if shop_by_price}}price_min{{else}}min_price{{/if}}" | ||
placeholder="{{lang 'search.faceted.range.min-placeholder'}}" | ||
min="0" | ||
class="form-input form-input--small" | ||
required | ||
type="number" | ||
value="{{min_price}}" | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<input | ||
name="{{#if shop_by_price}}price_max{{else}}max_price{{/if}}" | ||
placeholder="{{lang 'search.faceted.range.max-placeholder'}}" | ||
min="0" | ||
class="form-input form-input--small" | ||
required | ||
type="number" | ||
value="{{max_price}}" | ||
/> | ||
</div> | ||
|
||
<div class="form-field"> | ||
<button class="button button--small" type="submit"> | ||
{{lang 'search.faceted.range.update'}} | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="form-inlineMessage"></div> | ||
</fieldset> | ||
</form> |