kondasoft / ks-bootshop

Our Free Shopify Theme focused on simplicity, speed, and user experience. Download it today and finish your Shopify store within days, not months. Powered by Bootstrap v5 framework and 15+ years of coding experience.
https://www.kondasoft.com
MIT License
122 stars 114 forks source link

Add to Cart unresponsive with QTY hidden #49

Closed cleayp closed 3 years ago

cleayp commented 3 years ago

The Add to Cart button hangs when the 'Show quantity' option is checked; the button dims and the spinner spins indefinitely.

Fixed by editing the qty input in the add to cart form on the product-template.liquid file: Move the {% if section.settings.show_qty %} conditional to change the input type from 'number' to 'hidden':

<input
    id="qty"
    {% if section.settings.show_qty %}
    type="number"
    {% else %}
    type="hidden"
    {% endif %}
    class="form-control me-2"
    size="20" 
    name="quantity" 
    value="1" 
    min="1"
    data-bs-toggle="tooltip" 
    data-bs-placement="bottom" 
    aria-label="{{ 'product.quantity' | t }}"
    title="{{ 'product.quantity' | t }}"
    style="max-width: 100px;">
alvinkonda commented 3 years ago

Does not happen often that the QTY field gets hidden, but anyway it seems your solution is fine, so I'm closing this.