magento-configurable-simple
magento-configurable-simple copied to clipboard
Update js such that if replacement add to cart button is missing, leave existing button
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.