Skip to content

Commit

Permalink
Merge pull request #1834 from jairo-bc/STRF-8630
Browse files Browse the repository at this point in the history
feat(storefront): STRF-8630 update cornerstone to be compatible with handlebars v4
  • Loading branch information
junedkazi authored Oct 12, 2020
2 parents 4b09dd0 + 1ee8c3a commit 0564704
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 23 deletions.
1 change: 1 addition & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "Cornerstone",
"version": "4.11.0",
"template_engine": "handlebars_v4",
"meta": {
"price": 0,
"documentation_url": "https://support.bigcommerce.com/articles/Public/Cornerstone-Theme-Manual",
Expand Down
2 changes: 1 addition & 1 deletion templates/components/account/messages-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h5 class="account-product-title {{#unless unread}}is-read{{/unless}}">
</h5>
<p class="{{#unless unread}}is-read{{/unless}}">
{{#if is_reply}}
{{lang 'account.messages.merchant_said' store_name=../../settings.store_name}}
{{lang 'account.messages.merchant_said' store_name=../settings.store_name}}
{{else}}
{{lang 'account.messages.customer_said'}}
{{/if}}
Expand Down
12 changes: 8 additions & 4 deletions templates/components/account/order-contents.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ <h5 class="account-listShipping-title">{{lang 'account.orders.details.ship_to_mu
</div>
<figure class="account-product-figure">
{{#if type '===' 'giftcertificate'}}
<img src="{{cdn ../../theme_settings.default_image_gift_certificate}}" alt="Gift Certificate" title="Gift Certificate">
<img
src="{{cdn ../theme_settings.default_image_gift_certificate}}"
alt="Gift Certificate"
title="Gift Certificate"
>
{{else}}
{{> components/common/responsive-img
image=image
class="account-product-image"
fallback_size=../../theme_settings.productthumb_size
lazyload=../../theme_settings.lazyload_mode
default_image=../../theme_settings.default_image_product
fallback_size=../theme_settings.productthumb_size
lazyload=../theme_settings.lazyload_mode
default_image=../theme_settings.default_image_product
}}
{{/if}}
{{#unless refunded}}
Expand Down
11 changes: 7 additions & 4 deletions templates/components/account/orders-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ <h3 class="account-heading">{{lang 'account.orders.heading' }}</h3>
<div class="account-product">
<div class="account-product-figure">
{{#if items.0.type '===' 'giftcertificate'}}
<img src="{{cdn ../../theme_settings.default_image_gift_certificate}}" alt="GiftCertificate" title="GiftCertificate">
<img
alt="GiftCertificate"
title="GiftCertificate"
src="{{cdn ../theme_settings.default_image_gift_certificate}}">
{{else}}
{{> components/common/responsive-img
image=image
class="account-product-image"
fallback_size=../../theme_settings.productthumb_size
lazyload=../../theme_settings.lazyload_mode
default_image=../../theme_settings.default_image_product
fallback_size=../theme_settings.productthumb_size
lazyload=../theme_settings.lazyload_mode
default_image=../theme_settings.default_image_product
}}
{{/if}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/components/account/payment-methods-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4 class="paymentMethodsTitle">
{{#if type '===' 'stored_card'}}
{{!-- If credit card STARTS --}}
{{#if brand}}
{{#inArray ../../../../../theme_settings.supported_card_type_icons brand}}
{{#inArray ../../theme_settings.supported_card_type_icons brand) }}
<img class="methodHeader-icon" src="{{cdn (concat (concat 'img/payment-methods/' brand) '.svg')}}" alt="{{lang (concat 'account.payment_methods.card_types.' brand)}}" title="{{lang (concat 'account.payment_methods.card_types.' brand)}}">
{{/inArray}}
<span class="methodHeader-brand">{{lang (concat 'account.payment_methods.card_types.' brand)}} {{lang 'account.payment_methods.card_ending_in' last_four=last_4}}</span>
Expand Down
13 changes: 9 additions & 4 deletions templates/components/cart/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,19 @@
<tr class="cart-item" data-item-row>
<td class="cart-item-block cart-item-figure">
{{#if type '==' 'GiftCertificate'}}
<img class="cart-item-fixed-image" src="{{cdn ../../theme_settings.default_image_gift_certificate}}" alt="{{lang 'cart.gift_certificate'}}" title="{{lang 'cart.gift_certificate'}}">
<img
class="cart-item-fixed-image"
src="{{cdn ../theme_settings.default_image_gift_certificate}}"
alt="{{lang 'cart.gift_certificate'}}"
title="{{lang 'cart.gift_certificate'}}"
>
{{else}}
{{> components/common/responsive-img
image=image
class="cart-item-image"
fallback_size=../../theme_settings.productthumb_size
fallback_size=../theme_settings.productthumb_size
lazyload='disabled'
default_image=../../theme_settings.default_image_product
default_image=../theme_settings.default_image_product
}}
{{/if}}
</td>
Expand All @@ -38,7 +43,7 @@ <h2 class="cart-item-name"><a href="{{url}}">{{name}}</a></h2>
<dt class="definitionList-key">{{name}}:</dt>
<dd class="definitionList-value">
{{#if is_file}}
<a href="/viewfile.php?attributeId={{../id}}&cartitem={{../../id}}">{{value}}</a>
<a href="/viewfile.php?attributeId={{id}}&cartitem={{../id}}">{{value}}</a>
{{else}}
{{{ sanitize value}}}
{{/if}}
Expand Down
2 changes: 1 addition & 1 deletion templates/components/cart/modals/gift-wrapping-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2 class="modal-header-title">{{lang 'cart.gift_wrapping.title'}}</h2>
{{lang 'cart.gift_wrapping.item_multiple' index=$index name=product_name}}
{{#each gift_wrappings}}
{{#if preview_image}}
<a id="giftWrapping-image-{{../../$index}}-{{id}}" class="giftWrapping-image-{{../../$index}}" style="display:none" target="_blank" href="{{getImage preview_image}}">
<a id="giftWrapping-image-{{../$index}}-{{id}}" class="giftWrapping-image-{{../$index}}" style="display:none" target="_blank" href="{{getImage preview_image}}">
{{lang 'cart.gift_wrapping.preview'}}
</a>
{{/if}}
Expand Down
12 changes: 8 additions & 4 deletions templates/components/common/cart-preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
<li class="previewCartItem">
<div class="previewCartItem-image">
{{#if type '==' 'GiftCertificate'}}
<img src="{{cdn ../../theme_settings.default_image_gift_certificate}}" alt="GiftCertificate" title="GiftCertificate">
<img
alt="GiftCertificate"
title="GiftCertificate"
src="{{cdn ../theme_settings.default_image_gift_certificate}}"
>
{{else}}
{{> components/common/responsive-img
image=image
fallback_size=../../theme_settings.productthumb_size
lazyload=../../theme_settings.lazyload_mode
default_image=../../theme_settings.default_image_product
fallback_size=../theme_settings.productthumb_size
lazyload=../theme_settings.lazyload_mode
default_image=../theme_settings.default_image_product
}}
{{/if}}
</div>
Expand Down
6 changes: 3 additions & 3 deletions templates/components/common/quick-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<form class="form" onsubmit="return false" data-url="{{urls.search}}" data-quick-search-form>
<fieldset class="form-fieldset">
<div class="form-field">
<label class="is-srOnly" for={{name}}>{{lang "search.quick_search.input_label"}}</label>
<label class="is-srOnly" for="{{name}}">{{lang "search.quick_search.input_label"}}</label>
<input class="form-input"
data-search-quick
name={{name}}
id={{name}}
name="{{name}}"
id="{{name}}"
data-error-message="{{lang 'search.error.empty_field'}}"
placeholder="{{lang 'search.quick_search.input_placeholder'}}"
autocomplete="off"
Expand Down
2 changes: 1 addition & 1 deletion templates/components/faceted-search/facets/range.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{/each}}
<input type="hidden" name="search_query" value="{{search_query}}">
{{#if this.sort}}
<input type="hidden" name="sort" value={{this.sort}}>
<input type="hidden" name="sort" value="{{this.sort}}">
{{/if}}
<fieldset class="form-fieldset">
<div class="form-minMaxRow">
Expand Down

0 comments on commit 0564704

Please sign in to comment.