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-2461 Check if gift certificates are enabled before rendering. #914

Merged
merged 1 commit into from
Jan 31, 2017
Merged

STENCIL-2461 Check if gift certificates are enabled before rendering. #914

merged 1 commit into from
Jan 31, 2017

Conversation

junedkazi
Copy link
Contributor

Only show the gift certificate section if gift certificates are enabled.

@mcampa @mjschock @bigcommerce/stencil-team

@lord2800
Copy link
Contributor

👍

{{> components/cart/gift-certificate-input}}
</li>
{{#if settings.gift_certificates_enabled}}
{{#each cart.gift_certificates}}
Copy link
Contributor

Choose a reason for hiding this comment

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

4 spaces indention

</div>
{{> components/cart/gift-certificate-input}}
</li>
{{#if settings.gift_certificates_enabled}}
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need this flag because when gift certificates are disabled cart.gift_certificates should be empty.

if cart.gift_certificates is not empty is because a bcapp bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

Plus, If you fix the issue in bcapp, you fix it for all themes

Copy link
Contributor Author

@junedkazi junedkazi Jan 31, 2017

Choose a reason for hiding this comment

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

We still need the check to hide the form element which takes in the gift certificates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cart.gift_certificates empty does not mean gift certificates are disabled. It just means no gift certificates are applied to cart.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, but if GC are disabled cart.gift_certificates should be empty

Copy link
Contributor

@mcampa mcampa left a comment

Choose a reason for hiding this comment

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

👍

@nickdengler
Copy link
Contributor

Checked out and tested locally 💚

@junedkazi junedkazi merged commit 2153630 into bigcommerce:master Jan 31, 2017
@junedkazi junedkazi deleted the STENCIL-2461-gift-cert branch January 31, 2017 21:53
@bigbot
Copy link

bigbot commented Feb 1, 2017

Autotagging @mcampa @bc-miko-ademagic @davidchin

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.

5 participants