Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STRF-4373: Removing lazyload for logo in order-confirmation.html #1159

Merged
merged 1 commit into from
Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Draft
- Fix logo not loading on order confirmation page [#1159](https://github.com/bigcommerce/cornerstone/pull/1159)

## 1.12.1 (2018-01-23)
- Fix event delegation error [#1151](https://github.com/bigcommerce/cornerstone/pull/1151)
Expand Down
2 changes: 1 addition & 1 deletion templates/pages/order-confirmation.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="is-srOnly">{{lang 'checkout.title'}}</h1>
<h2 class="checkoutHeader-heading">
<a class="checkoutHeader-link" href="{{urls.home}}">
{{#if checkout.header_image}}
<img alt="{{settings.store_logo.title}}" class="checkoutHeader-logo lazyload" id="logoImage" data-sizes="auto" src="{{cdn 'img/loading.svg'}}" data-src="{{ checkout.header_image }}"/>
<img alt="{{settings.store_logo.title}}" class="checkoutHeader-logo" id="logoImage" src="{{ checkout.header_image }}"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with this change but instead of removing the lazy load we should be investigating what is causing the failure to load in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I was just looking at a quick solution for now, as it's only this and another page from a previous PR. I tried researching it a bit, but it was bit over my head as to why. Thanks for reviewing, I wasn't sure as to why it wouldn't let me add reviewers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support running theme scripts on the order confirmation page? I believe the lazysizes script just isn't being inserted there, despite being part of global.js. Assuming that's the case, this is quite possibly the correct solution, short of manually inserting a <script> tag in the order confirmation template.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing that is what is happening as well.

{{ else }}
<span class="header-logo-text">{{settings.store_logo.title}}</span>
{{/if}}
Expand Down