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

Update js such that if replacement add to cart button is missing, leave existing button #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trs998
Copy link

@trs998 trs998 commented Apr 15, 2016

In the event that "add-to-box" is about to be replaced with undefined, just leave it - replacing button with undefined variable removes add to cart button, rendering site useless to customer.

This problem occurred on "awesome" theme - but in general, do not replace perfectly functional button with blank variable. Now makes a check that variable is defined for add to cart button and stock status before replacing existing content. Tested and working - no change to behaviour if variable is loaded correctly.

…n is undefined, do not replace button

This problem occurred on "awesome" theme - but in general, do not replace perfectly functional button with blank variable. Now makes a check agains empty variable for add to cart button and stock status before replacing with garbage. Tested and working - no change to behaviour if variable is loaded correctly.
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.

1 participant