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
merged 1 commit into from Nov 29, 2018

Conversation

Projects
None yet
4 participants
@bc-zoharmuzafi
Copy link
Contributor

bc-zoharmuzafi 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

This comment has been minimized.

Copy link

bigbot commented Nov 16, 2018

@bc-zoharmuzafi bc-zoharmuzafi force-pushed the bc-zoharmuzafi:options branch from 0c2d46d to 862b8e6 Nov 16, 2018

@bc-zoharmuzafi bc-zoharmuzafi force-pushed the bc-zoharmuzafi:options branch from 52f789d to 82fd71c Nov 17, 2018

@bc-zoharmuzafi bc-zoharmuzafi 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)}}

This comment has been minimized.

@mattolson

mattolson Nov 17, 2018

Member

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

This comment has been minimized.

@bc-zoharmuzafi

bc-zoharmuzafi Nov 17, 2018

Author Contributor

@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.

This comment has been minimized.

@mattolson

mattolson Nov 17, 2018

Member

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?

This comment has been minimized.

@mattolson

This comment has been minimized.

Copy link
Member

mattolson commented Nov 27, 2018

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

@bc-zoharmuzafi bc-zoharmuzafi force-pushed the bc-zoharmuzafi:options branch from 82fd71c to 896883d Nov 29, 2018

@lord2800
Copy link
Contributor

lord2800 left a comment

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.

@bc-zoharmuzafi bc-zoharmuzafi force-pushed the bc-zoharmuzafi:options branch from 896883d to f4078ea Nov 29, 2018

@bc-zoharmuzafi bc-zoharmuzafi merged commit 5419007 into bigcommerce:master Nov 29, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@bc-zoharmuzafi bc-zoharmuzafi deleted the bc-zoharmuzafi:options branch Nov 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment