-
Notifications
You must be signed in to change notification settings - Fork 615
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-3527: Adding toggle for weight and dimensions on product pages. #1092
Conversation
9ba7e01
to
59e0146
Compare
config.json
Outdated
@@ -382,6 +384,8 @@ | |||
"show_accept_paypal": false, | |||
"show_accept_visa": false, | |||
"show_product_details_tabs": true, | |||
"show_product_weight": true, | |||
"show_product_dimensions": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed. This only needs to be added once to the global settings on line 72 and 73
I noticed that there are several cases like this :(. It only needs to be added to the variations if the values are different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and GTK!
config.json
Outdated
@@ -654,6 +658,8 @@ | |||
"show_accept_paypal": false, | |||
"show_accept_visa": false, | |||
"show_product_details_tabs": true, | |||
"show_product_weight": true, | |||
"show_product_dimensions": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed :)
lang/en.json
Outdated
"depth": "Depth:", | ||
"measurement": { | ||
"metric": "cm", | ||
"imperial": "in" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indented now.
@@ -76,10 +76,39 @@ <h2 class="productView-brand"{{#if schema}} itemprop="brand" itemscope itemtype= | |||
<dt class="productView-info-name">{{lang 'products.availability'}}</dt> | |||
<dd class="productView-info-value">{{product.availability}}</dd> | |||
{{/if}} | |||
{{#if product.weight}} | |||
{{#if theme_settings.show_product_weight}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you still need to check for product.weight
. You can use all
helper
{{#all product.weight theme_settings.show_product_weight}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to weight as well as dimensions since dimensions are optional. Thanks for catching these!
59e0146
to
09ae9f5
Compare
<dt class="productView-info-name">{{lang 'products.weight'}}</dt> | ||
<dd class="productView-info-value" data-product-weight>{{product.weight}}</dd> | ||
{{/if}} | ||
{{/all}} | ||
{{#all product.width product.height. product.depth theme_settings.show_product_dimensions}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is an extra dot in product.height.
😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♀️ ✔️
config.json
Outdated
@@ -69,6 +69,8 @@ | |||
"show_accept_paypal": false, | |||
"show_accept_visa": false, | |||
"show_product_details_tabs": true, | |||
"show_product_weight": true, | |||
"show_product_dimensions": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never displayed this info before we should default it to false
. We don't want people calling support that new data started showing up on their product details page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I had thought about that but forgot to implement. Good news is I am better at squashing ;)
What is the performance impact here? We have heard from merchants it is very slow using theme editor with a bunch of theme options to change. This seems it would slow down theme editor even more. Do we know either way? |
09ae9f5
to
4a9c905
Compare
This is just adding two more fields, so the impact should be marginal. |
4a9c905
to
a2e9b12
Compare
What?
Adds toggle settings to the theme editor for displaying (or not displaying) weight and dimensions on product pages.
Tickets / Documentation
This is a feature request from customers as documented here:
Screenshots (if appropriate)
Video of working changes: https://www.screencast.com/t/juQ8DUTeG3F8