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

STENCIL-3536 bulk discount rates #1058

Merged
merged 3 commits into from
Aug 4, 2017

Conversation

mcampa
Copy link
Contributor

@mcampa mcampa commented Aug 1, 2017

Add bulk discount rates to product cards

https://jira.bigcommerce.com/browse/STENCIL-3695

bulk-discount-modal

@bigcommerce/stencil-team

@mcampa mcampa force-pushed the STENCIL-3536-bulk_rates branch from 189405c to 268c252 Compare August 1, 2017 01:22
@@ -82,5 +82,40 @@ <h4 class="card-title">
{{> components/common/login-for-pricing}}
{{/or}}
</div>
{{#if bulk_discount_rates.length}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nice if we moved this into a component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, I will

{{#each bulk_discount_rates}}
<li>
{{lang 'products.bulk_pricing.range' min=min max=max}}
{{#if type '===' 'percent'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

from where are we getting this type ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from {{#each bulk_discount_rates}}
each creates a new context for each block

@@ -82,5 +82,7 @@ <h4 class="card-title">
{{> components/common/login-for-pricing}}
{{/or}}
</div>
{{> components/common/login-for-pricing}}
Copy link
Contributor

Choose a reason for hiding this comment

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

We already display the login for pricing above. Why do we need it here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My mistake, this shouldn't be here

@@ -82,5 +82,7 @@ <h4 class="card-title">
{{> components/common/login-for-pricing}}
{{/or}}
</div>
{{> components/common/login-for-pricing}}
{{> components/products/bulk-discount-rates}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think this needs to be wrapped in a setting ? 🍹

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is already wrapped, in the component file

config.json Outdated
@@ -275,6 +275,7 @@
],
"resources": {
"cart": true,
"bulk_discount_rates": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean bulk discounts will be loaded on all pages ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. All pages that have product context. But I'm going to change it to default to false

@mcampa mcampa force-pushed the STENCIL-3536-bulk_rates branch from ee8bf9b to eb4b389 Compare August 2, 2017 18:31
@mcampa mcampa merged commit 670f310 into bigcommerce:master Aug 4, 2017
@mcampa mcampa deleted the STENCIL-3536-bulk_rates branch August 4, 2017 19:24
@nnandani
Copy link
Contributor

Right now not working on 2.0.0

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.

3 participants