Skip to content

Commit

Permalink
STRF-3382 display facebook like button when enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-williamkwon committed Jul 1, 2019
1 parent f400c19 commit e0ea153
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add return instructions in return-saved.html [#1525](https://github.com/bigcommerce/cornerstone/pull/1525)
- Remove Google Plus [#1526](https://github.com/bigcommerce/cornerstone/pull/1526)
- Fix broken conditional statement in share.html [#1533](https://github.com/bigcommerce/cornerstone/pull/1533)
- Enable Facebook like button to be displayed on product page if enabled [#1530](https://github.com/bigcommerce/cornerstone/pull/1530)

## 3.5.1 (2019-06-24)
- Fix conditional logic in share.html [#1522](https://github.com/bigcommerce/cornerstone/pull/1522)
Expand Down
12 changes: 12 additions & 0 deletions templates/components/common/facebook-like-button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{#if settings.facebook_like_button}}
{{#if settings.facebook_like_button.enabled}}
<iframe
class="facebook{{#if settings.facebook_like_button.verb '===' 'recommend'}}Recommend{{else}}Like{{/if}}Btn"
style="border:none; overflow:hidden; margin: 0; padding: 0; position:absolute"
src="http://www.facebook.com/plugins/like.php?href={{settings.facebook_like_button.href}}&amp;layout=button_count{{#if settings.facebook_like_button.verb '===' 'recommend'}}&amp;action=recommend{{/if}}&amp;colorscheme=light&amp;height=20"
scrolling="no"
frameborder="0"
allowTransparency="true">
</iframe>
{{/if}}
{{/if}}
6 changes: 1 addition & 5 deletions templates/components/common/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ul class="socialLinks">
{{#each settings.add_this.buttons}}
<li class="socialLinks-item socialLinks-item--{{service}}">
<a class="addthis_button_{{service}} icon icon--{{service}}" {{{annotation}}}>
<a class="addthis_button_{{service}} icon icon--{{service}}">
{{#if service '===' 'facebook'}}
<svg>
<use xlink:href="#icon-facebook"/>
Expand Down Expand Up @@ -33,10 +33,6 @@
<svg>
<use xlink:href="#icon-pinterest"/>
</svg>
{{else if service '===' 'facebook_like'}}
<svg>
<use xlink:href="#icon-facebook_like"/>
</svg>
{{/if}}
</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions templates/components/products/product-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ <h2 class="productView-brand"{{#if schema}} itemprop="brand" itemscope itemtype=
{{/if}}
</div>
{{> components/common/share}}
{{> components/common/facebook-like-button}}
</section>

<article class="productView-description"{{#if schema}} itemprop="description"{{/if}}>
Expand Down

0 comments on commit e0ea153

Please sign in to comment.