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

fix(Storefront): STRF-5072 Cornerstone not showing Sale badge #1694

Merged
merged 2 commits into from
Jun 30, 2020

Conversation

yurytut1993
Copy link
Contributor

@yurytut1993 yurytut1993 commented Jun 16, 2020

What?

@bc-themes
Fixed Cornerstone not showing Sale badge in list view.
In your page builder you have theme styles. In Global section you need to scroll opened modal window to Products paragraph. Here you can select display style list or grid. When grid is selected Sale Badges are seen on products that have a discount. But if you select list, product items will not have Sale Badges.
For now it is fixed - the user can see Sale Badges on items this discount in list view and in a grid view.
I added code that checks is this item on sale and need badge in html file of product list item. Also I updated styles for badges displaing in product list item

Tickets / Documentation

Add links to any relevant tickets and documentation.
https://jira.bigcommerce.com/browse/STRF-5072

Screenshots (if appropriate)

Attach images or add image links here.

Screenshot 2020-06-16 at 14 59 28

Screenshot 2020-06-16 at 15 00 48

@bigbot
Copy link

bigbot commented Jun 16, 2020

Autotagging @bigcommerce/storefront-team @davidchin

@junedkazi
Copy link
Contributor

@yurytut1993 can you please add a better title to reflect what is being done as part of this PR.

@yurytut1993
Copy link
Contributor Author

yurytut1993 commented Jun 16, 2020

@yurytut1993 can you please add a better title to reflect what is being done as part of this PR.

@junedkazi its done. Please check and ask me if you need more information

@yurytut1993 yurytut1993 changed the title Strf 5072 fix(Storefront): STRF-5072 Cornerstone not showing Sale badge Jun 18, 2020
{{#or price.non_sale_price_with_tax price.non_sale_price_without_tax}}
{{#if theme_settings.product_sale_badges '===' 'sash'}}
<div class="sale-flag-sash">
<span class="sale-text">On Sale!</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we need these span tags ? Also I this is going to be surfaced in the theme the I think we need to move the text into schema.json and config.json so we merchants can modify them.

thoughts @bookernath @bc-as ??

Copy link
Contributor Author

@yurytut1993 yurytut1993 Jun 19, 2020

Choose a reason for hiding this comment

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

span tags used for text styles and aligning. We already have this HTML construction for sale badges in products grid. Of course we can add possibility to our merchants to edit sale badge text. But I suppose that we should to add an input for it in control panel firstly. To allow merchants set up it. In this pull request I just wanted to fix the bug with lack of sale badge in products list

Copy link
Contributor

Choose a reason for hiding this comment

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

@junedkazi we historically haven't exposed the text on those badges to be configurable, but it is a good idea. I'll open another ticket to address that feature.

Copy link
Contributor

Choose a reason for hiding this comment

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

@junedkazi junedkazi merged commit 8ebca2c into bigcommerce:master Jun 30, 2020
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.

None yet

4 participants