Navigation Menu

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

changed access level for parent context- products list display #1384

Merged
1 commit merged into from Nov 29, 2018
Merged

changed access level for parent context- products list display #1384

1 commit merged into from Nov 29, 2018

Conversation

ghost
Copy link

@ghost ghost commented Nov 16, 2018

What?

In Cornerstone v2.6.0 compare buttons are missing from Category pages that use a List view instead of a grid. This pr change the access level to the parent context when generating the products list display.

Screenshots (if appropriate)

Before

screen shot 2018-11-16 at 3 24 11 pm

After

screen shot 2018-11-16 at 3 24 28 pm

@bigbot
Copy link

bigbot commented Nov 16, 2018

Autotagging @bigcommerce/storefront-team @davidchin

@ghost ghost changed the title changed access level for parent context- show_compare for product list display changed access level for parent context- products list display Nov 17, 2018
@@ -2,9 +2,9 @@
{{#each products}}
<li class="product">
{{#if settings.data_tag_enabled}}
{{>components/products/list-item show_compare=../show_compare show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer event=../event position=(add @index 1)}}
{{>components/products/list-item show_compare=../../show_compare show_rating=../../settings.show_product_rating theme_settings=../../theme_settings customer=../../customer event=../../event position=(add @index 1)}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate on this change? Why do we need to do it here and not in any of the other templates?

Copy link
Author

Choose a reason for hiding this comment

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

@mattolson Entering into an if statement adds another level to the context, so the parent becomes ../../foo
Looking on the grid display, I do see that the other values also will be available in the same context as show_compare so they will also should to be modified. I also tested @Index and this variable is available and no change needed for it.

Copy link
Contributor

Choose a reason for hiding this comment

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

If that is the case, then many other things would be broken too. This if statement was added in #1377 which added it in many other places as well. Are those templates experiencing issues too?

Copy link
Author

Choose a reason for hiding this comment

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

@mattolson
Copy link
Contributor

@lord2800 can you take a look at this since it is a modification of some work you did earlier?

Copy link
Contributor

@lord2800 lord2800 left a comment

Choose a reason for hiding this comment

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

Sorry this took so long to get to. @bc-zoharmuzafi and I sat down and figured out that there was more than one bug here, and we were able to eliminate a redundant if check in the process.

@ghost ghost merged commit 5419007 into bigcommerce:master Nov 29, 2018
@ghost ghost deleted the options branch November 29, 2018 00:55
This pull request was closed.
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

3 participants