Liquid, JavaScript, themes, sales channels
To continue receiving payouts, you need to secure your account by turning on two-step authentication. If two-step authentication is not turned on your payouts will be paused. Learn more
Theme - Ella version 5.1.0
Hi!
I'm not an expert, I made a website by Googling
I found an error while modifying our website.
The product's inventory quantity is 0 and add to cart button is automatically changed to SOLD OUT but I can still click the SOLD OUT button and the product goes into the cart. But I cannot purchase it.
https://tirtir.us/collections/shop/products/centella-foam-cleansing
<input type="submit" name="add" class="btn" id="product-add-to-cart" value="Sold Out">
It should be
<input type="submit" name="add" class="btn" id="product-add-to-cart" disabled value="Sold Out">
My product-template-default.liquid is below.
<div class="groups-btn"> <div class="groups-btn-tree {% if section.settings.display_product_detail_share or settings.enable_wishlist %}margin-button{% endif %}"> {% if current_variant.available %} {% if current_variant.inventory_management %} {% assign first_inventory = current_variant.inventory_quantity %} {% if first_inventory > 0 %} <input data-btn-addToCart type="submit" name="add" class="btn" {% if settings.enable_multilang %}data-translate="products.product.add_to_cart"{%endif%} id="product-add-to-cart" value="{{ 'products.product.add_to_cart' | t }}" data-form-id="#add-to-cart-form"> {% else %} <input data-btn-addToCart type="submit" name="add" class="btn" {% if settings.enable_multilang %}data-translate="products.product.pre_order"{%endif%} id="product-add-to-cart" value="{{ 'products.product.pre_order' | t }}" data-form-id="#add-to-cart-form"> {% endif %} {% else %} <input data-btn-addToCart type="submit" name="add" class="btn" {% if settings.enable_multilang %}data-translate="products.product.add_to_cart"{%endif%} id="product-add-to-cart" value="{{ 'products.product.add_to_cart' | t }}" data-form-id="#add-to-cart-form"> {% endif %} {% else %} <input type="submit" name="add" class="btn" {% if settings.enable_multilang %}data-translate="products.product.unavailable"{%endif%} id="product-add-to-cart" disabled value="{{ 'products.product.unavailable' | t }}" > {% endif %} {% if section.settings.display_product_detail_share %} <a class="icon-share" href="javascript:void(0)" aria-label="{{ 'products.product.share' | t }}" {% if settings.enable_multilang %}data-translate="products.product.share" {%endif%}>{% render 'icon-share' %}</a> {% endif %} </div> </div>
Can someone help me to fix it?
Thank you in advance.
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022