Skip to content

Commit

Permalink
Merge pull request #1699 from BC-tymurbiedukhin/BCTHEME-40
Browse files Browse the repository at this point in the history
fix(catalog): BCTHEME-40 Cornerstone - Product Reviews Not Showing If…
  • Loading branch information
junedkazi authored Jul 2, 2020
2 parents 950667b + e0ce305 commit 20e6f5b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"show_accept_googlepay": false,
"show_accept_klarna": false,
"show_product_details_tabs": true,
"show_product_reviews_tabs": false,
"show_product_reviews": true,
"show_custom_fields_tabs": false,
"show_product_weight": true,
"show_product_dimensions": false,
Expand Down
4 changes: 2 additions & 2 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1381,13 +1381,13 @@
"type": "checkbox",
"label": "i18n.ShowProductReviews",
"force_reload": true,
"id": "show_product_reviews_tabs"
"id": "show_product_reviews"
},
{
"type": "select",
"label": "i18n.NumberOfProductReviews",
"id": "productpage_reviews_count",
"reference": "show_product_reviews_tabs",
"reference": "show_product_reviews",
"reference_default": false,
"force_reload": true,
"options": [
Expand Down
4 changes: 2 additions & 2 deletions templates/components/products/description-tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<a class="tab-title" href="#tab-{{dashcase (lowercase (sanitize theme_settings.pdp-custom-fields-tab-label))}}">{{sanitize theme_settings.pdp-custom-fields-tab-label}}</a>
</li>
{{/all}}
{{#all settings.show_product_reviews theme_settings.show_product_reviews_tabs product.reviews.total}}
{{#all settings.show_product_reviews theme_settings.show_product_reviews product.reviews.total}}
<li class="tab">
<a class="tab-title productView-reviewTabLink" href="#tab-reviews">{{lang 'products.reviews.header' total=product.reviews.total}}</a>
</li>
Expand All @@ -37,7 +37,7 @@
</dl>
</div>
{{/all}}
{{#all settings.show_product_reviews theme_settings.show_product_reviews_tabs}}
{{#all settings.show_product_reviews theme_settings.show_product_reviews}}
<div class="tab-content" id="tab-reviews">
{{> components/products/reviews reviews=product.reviews product=product urls=urls}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/components/products/reviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<section class="toggle productReviews" id="product-reviews" data-product-reviews>
<h4 class="toggle-title">
{{lang 'products.reviews.header' total=reviews.total}}
{{#if theme_settings.show_product_reviews_tabs '!==' true}}
{{#if theme_settings.show_product_reviews}}
<a class="toggleLink is-open" data-collapsible href="#productReviews-content">
<span class="toggleLink-text toggleLink-text--on">
{{lang 'products.reviews.hide'}}
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{> components/products/videos product.videos}}
{{/if}}

{{#all settings.show_product_reviews (if theme_settings.show_product_reviews_tabs '!==' true)}}
{{#all settings.show_product_reviews theme_settings.show_product_reviews (if theme_settings.show_product_details_tabs '!==' true)}}
{{> components/products/reviews reviews=product.reviews product=product urls=urls}}
{{/all}}

Expand Down

0 comments on commit 20e6f5b

Please sign in to comment.