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

Add option to display custom fields under "Additional Information" tab on PDP #1480

Merged
merged 1 commit into from
Apr 25, 2019
Merged

Conversation

sacr3dc0w
Copy link
Contributor

@sacr3dc0w sacr3dc0w commented Apr 19, 2019

What?

Adds an option to display custom fields under a "Additional Information" tab.

Tickets / Documentation

Screenshots (if appropriate)

False, default
01 false default

False, default - tab region
02 false tab region

True
03 true

True, tab region - closed
04 true tab closed

True, tab region - open
05 true tab open

True, tab region - open, mobile
true mobile

True, tab region - closed
06 theme editor

@bigbot
Copy link

bigbot commented Apr 19, 2019

Autotagging @bigcommerce/storefront-team @davidchin

@@ -1285,6 +1285,20 @@
"force_reload": true,
"id": "show_product_details_tabs"
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

@bigcommerce/merc-team

@@ -7,6 +7,11 @@
<a class="tab-title" href="#tab-warranty">{{lang 'products.warranty'}}</a>
</li>
{{/if}}
{{#all product.custom_fields theme_settings.show_custom_fields_tabs}}
<li class="tab">
<a class="tab-title" href="#tab-specs">{{theme_settings.pdp-custom-fields-tab-label}}</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we build the href based on the label so it matches what we are actually calling the tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen Shot 2019-04-22 at 4 23 39 PM

@@ -22,6 +27,16 @@
{{{product.warranty}}}
</div>
{{/if}}
{{#all product.custom_fields theme_settings.show_custom_fields_tabs}}
<div class="tab-content" id="tab-specs">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we build the href based on the label so it matches what we are actually calling the tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen Shot 2019-04-22 at 4 27 24 PM

@sacr3dc0w
Copy link
Contributor Author

@junedkazi Ran the string through {{sanitize}} in case merchants try to include HTML in the label, then {{lowercase}} and {{dashcase}} for cleaner output.

Copy link
Contributor

@junedkazi junedkazi left a comment

Choose a reason for hiding this comment

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

LGTM

config.json Outdated
@@ -304,6 +305,7 @@
"pdp-sale-price-label": "Now:",
"pdp-non-sale-price-label": "Was:",
"pdp-retail-price-label": "MSRP:",
"pdp-custom-fields-tab-label": "Specifications",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also change the label to be more generic like "Additional Information" ? 🍹

@sacr3dc0w sacr3dc0w changed the title Add option to display custom fields under "Specifications" tab on PDP Add option to display custom fields under "Additional Information" tab on PDP Apr 23, 2019
@junedkazi junedkazi merged commit dbb0800 into bigcommerce:master Apr 25, 2019
@sacr3dc0w sacr3dc0w deleted the specs-tab branch April 25, 2019 21:18
@sacr3dc0w sacr3dc0w mentioned this pull request Apr 25, 2019
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