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

STENCIL-3009 - automatically open review link if hash is included #928

Merged
merged 1 commit into from
Feb 20, 2017
Merged

STENCIL-3009 - automatically open review link if hash is included #928

merged 1 commit into from
Feb 20, 2017

Conversation

bookernath
Copy link
Contributor

Our product review emails link to the PDP with the hash #write_review
included.

We need to respond to this hash and automatically pop the review form.

Testing/Proof
Visit any product page with #write_review at the end of your URL.

@bigbot
Copy link

bigbot commented Feb 18, 2017

Autotagging @mcampa

@@ -53,6 +53,10 @@ export default class Product extends PageManager {
return false;
});

if (window.location.hash.indexOf('write_review') === 1) {
Copy link

@willfaught willfaught Feb 20, 2017

Choose a reason for hiding this comment

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

Just curious: why indexOf instead of substring/===?

@mcampa
Copy link
Contributor

mcampa commented Feb 20, 2017

I think we already have this logic here https://github.com/bigcommerce/stencil/blob/80d48965453f513751f949b498e9c3e6579612c9/assets/js/theme/product.js#L65

We need to fix it there

@bookernath
Copy link
Contributor Author

Nice catch! I'll update there.

Our product review emails link to the PDP with the hash #write_review
included.

We need to respond to this hash and automatically pop the review form.
@junedkazi junedkazi merged commit 6f34d08 into bigcommerce:master Feb 20, 2017
@bookernath bookernath deleted the STENCIL-3009 branch February 21, 2017 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants