Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Auto-update cart subtotal not working

Auto-update cart subtotal not working

ando1031
Visitor
2 0 0

Can someone help me the issue? My cart cannot automatically update the subtotal with adjusted quantity. My store is using customized theme.

 

Here is the code:
 
 
{% if cart.item_count > 0 %}
  <form action="/cart"  method="post" class="cart-form" novalidate>
 
    <h1 class="h2">{{ 'cart.general.title' | t }}</h1>
 
    {% for item in cart.items %}
    <div  data-hulkapps-lineitem class="cart-row {% include 'w3-product-options', step:'item_row_class' %}" data-line="{{ forloop.index }}">
      <div class="grid">
 
        <div class="grid-item large--seven-twelfths">
          <div class="grid">
 
            <div class="grid-item one-third large--one-quarter">
              <a href="{{ item.url }}" class="cart-image">
                <img src="{{ item | img_url: 'medium' }}"  alt="{{ item.title | escape }}">
              </a>
            </div>
 
            <div class="grid-item two-thirds large--three-quarters">
              <a href="{{ item.url }}"><strong>{{ item.product.title }}</strong></a>
              
              {% include 'w3-product-options', step:'money_line' %}
              {% unless item.variant.title contains 'Default' %}
                <br>
               {{ item.variant.title }}
              {% endunless %}
 
              {% if settings.product_quantity_message and item.variant.inventory_management and item.variant.inventory_quantity <= 0 and item.variant.incoming %}
                {% assign date = item.variant.next_incoming_date | date: format: 'month_day_year' %}
                <p><small>{{ 'products.product.will_not_ship_until' | t: date: date }}</small></p>
              {% endif %}
 
              {% assign property_size = item.properties | size %}
              <span class="Bold-theme-hook-DO-NOT-DELETE bold_cart_item_properties" style="display:none !important;"></span>
              {% if property_size > 0 %}
                {%- comment -%}{% for p in item.properties %}
{% if p.first.first == '_' %}{% continue %}{% endif %}
                  {% if forloop.first %}<br>{% endif %}
                  {% assign first_character_in_key = p.first | truncate: 1, '' %}
                  {% unless p.last == blank or first_character_in_key == '_' %}
                    {{ p.first }}:
 
                    {% if p.last contains '/uploads/' %}
                      <a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
                    {% else %}
                      {{ p.last }}
                    {% endif %}
 
                    <br>
                  {% endunless %}
                {% endfor %}{%- endcomment -%}{% for p in item.properties %}
                  {% if p.first contains '_apo' %}{% continue %}{% endif; %}
      {% unless p.last == blank %}
        <div class="cart-property">
          <span class="property_name">{{ p.first }}:
          </span>
          {% if p.last contains '/uploads/' %}
            <span class="property_value" >
              <a href="{{ p.last }}">Uploaded File</a>
            </span>
          <br/>
          {% else %}
            <span class="property_value" >{{ p.last }}</span><br/>
          {% endif %}
        </div>
      {% endunless %}
    {% endfor %}
    
                {% endif %}
            </div>
 
          </div>
        </div>
 
        <div class="grid-item large--five-twelfths medium--two-thirds push--medium--one-third">
          <div class="grid">
<div class="grid-item one-half medium-down--one-third text-right">
                <input type="number" class="cart_quantity-selector" name="updates[]" id="updates_{{ item.key }}" data-id="{{ item.key }}" value="{{ item.quantity }}"
             {% unless item.variant.inventory_management == blank or item.variant.inventory_policy == 'continue' %} max="{{ item.variant.inventory_quantity }}" 
            {% endunless %} min="0"  data-line="{{ forloop.index }}"    
             />
            </div>
            
 
            <div class="grid-item one-third medium-down--one-third medium-down--text-left text-right">
              {% if item.original_line_price != item.line_price %}
              {% include 'w3-product-options', step:'money_line' %}
                <small  data-hulkapps-ci-price data-key='{{item.key}}' class="cart-item--original-price"><s>{{ item.original_price | money }}</s></small>
              {% endif %}
               <span class="h2">
                <span  data-hulkapps-ci-price data-key='{{item.key}}' class="Bold-theme-hook-DO-NOT-DELETE bold_cart_item_price" style="display:none !important;"></span>
               {% include 'price' with item.price %}
              </span>
            </div>
 
            <div class="grid-item one-sixth medium-down--one-third text-right">
              <a href="/cart/change?line={{ forloop.index }}&amp;quantity=0" data-line="{{ forloop.index }}" class="icon-fallback-text btn-secondary remove">
                <span class="icon icon-x" aria-hidden="true"></span>
                <span class="fallback-text">{{ 'cart.general.remove' | t }}</span>
              </a>
            </div>
 
 
          </div>
        </div>
 
      </div>
    </div>
 
    {% endfor %}
                 <div class="grid-item one-whole text-right small--text-left">
              {% for discount in item.discounts %}
                <small class="cart-item--discount">{{ discount.title }}</small>
              {% endfor %}
            </div>
    <div class="cart-row">
      <div class="grid">
        <div class="tbtDiscountCombine" data-brandcolor="#3f51b5" data-boxtitle="Discount Code"
 data-boxdes="If you have multiple discount code please separating them using a comma" data-buttontext="Apply" data-maxcode="0" data-maxcodetext="We only allow this maximum codes per combination"
 data-placeholder="Enter discount codes here" data-enable="1"></div>
        {% if settings.cart_notes_enable %}
          <div class="grid-item large--one-half">
            <label for="cartSpecialInstructions">{{ 'cart.general.note' | t }}</label>
            <textarea name="note" class="input-full" id="cartSpecialInstructions">{{ cart.note }}</textarea>
          </div>
        {% endif %}
        
        <div class="grid-item text-right {% if settings.cart_notes_enable %}large--one-half{% endif %}">
       
          <div class="cart-subtotal">
            {{ 'cart.general.subtotal' | t }}
            <span class="h1 cart-subtotal--price">
              <span  data-hulkapps-cart-total class="Bold-theme-hook-DO-NOT-DELETE bold_cart_total" style="display:none !important;"></span>{% include 'price' with cart.total_price %}
            </span>
            {% if cart.total_discounts > 0 %}
             {% assign savings = cart.total_discounts | money %}
             <small class="cart-subtotal--savings">{{ 'cart.general.savings_html' | t: price: savings }}</small>
            {% endif %}
          </div>
 
          <p class="cart-subtotal__note"><em>{{ 'cart.general.taxes_extra' | t }}</em></p>
 
 
          <button type="submit" name="checkout" class="btn">
            <span class="icon icon-cart"></span>
            {{ 'cart.general.checkout' | t }}
          </button>
         {% if additional_checkout_buttons %}
            <br/>
          Before you checkout, make sure you agree to all the customer policies, terms, and conditions.
          By click checkout, you agree to all the customer policies, terms, and conditions.
          <br/>
          {% endif %}
 
        </div>
 
      </div>
    </div>
 
  </form>
 
{% else %}
 
  <div id="EmptyCart">
    <h1 class="h2">{{ 'cart.general.title' | t }}</h1>
    <p class="cart--empty-message">{{ 'cart.general.empty' | t }}</p>
    <p class="cart--continue-message">{{ 'cart.general.continue_browsing_html' | t }}</p>
    <p class="cart--cookie-message">{{ 'cart.general.cookies_required' | t }}</p>
  </div>
 
{% endif %}
 
 
<p class="mlvedaCartNote" style="display:none">
  {{ shop.name }} process all orders in {{ shop.currency }}.
  While the content of your cart is currently displayed in
  <span class="selected-currency"></span>,
  you will checkout using {{ shop.currency }} at the most current exchange rate.
</p>
Replies 2 (2)

Haptech
Shopify Partner
53 4 1

Hi ando1031

Can you give me the website link to check?

 

- If helpful then please Like and Accept Solution.
- Try Haptech: B2B/wholsale Free? Check this app for all Shopify Plans.
- Need help from our expert? Kindly share your request with us via hatptech@gmail.com
ando1031
Visitor
2 0 0

Hello,

Here is the link: https://www.ureach-estore.com/

 

Thank you!