Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Compare at price logic #111

Merged
merged 3 commits into from
Apr 7, 2017
Merged

Compare at price logic #111

merged 3 commits into from
Apr 7, 2017

Conversation

NathanPJF
Copy link
Contributor

What are you trying to accomplish with this PR?

Fixes #96

  • Always render markup for compare at price, so JS can update it.
  • On featured product page, use current_variant information so the initial prices displayed reflect the option selectors.

New stuff:
The changes in product.js have to do with how we are handling compare_at information when the variant is on sale. We are always leaving the "compare_at" text on screen for screenreaders, even when we were hiding the sale price. Now it hides that text if the variant isn't on sale.

I also update the strikethrough price when the variant isn't on sale. It was already being hidden with the hide class, but it just felt odd to leave a strikethrough price in the markup if we had no intention of using it.

/cc @Shopify/themes-fed

Checklist

For contributors:

For maintainers:

  • I have 🎩'd these changes.
  • I have bumped the package.json version in a separate PR, if applicable.

@NathanPJF NathanPJF requested a review from bertiful March 30, 2017 20:27
@NathanPJF
Copy link
Contributor Author

Same approach approved here: https://github.com/Shopify/narrative/pull/114

@NathanPJF NathanPJF merged commit ba63aba into master Apr 7, 2017
@NathanPJF NathanPJF deleted the compare-at-price branch April 7, 2017 20:41
@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant