Shopify themes, liquid, logos, and UX
Hi,
I'm working on a website and it has an issue with cart updates. When I change the quantity, we have to click on update cart for price update and it reloads the page. I have tried everything but it's not working.
- Remove button on the mobile cart dropdown isn't working.
Can anyone help me out making the above changes?
The Theme used is Fashe and the store name is https://tales-of-fur.myshopify.com/
Cart code:
<!-- Title Page -->
<section class="bg-title-page p-t-40 p-b-50 flex-col-c-m" {% if settings.show_cart_top_image %}
style="background-image:url({{ 'cart_top.jpg' | asset_url }});" {% endif %}>
<h2 class="l-text2 t-center">
{{ page_title }}
</h2>
</section>
<!-- Cart -->
<section class="cart bgwhite p-t-70 p-b-100">
<div class="container">
{% if cart.item_count > 0 %}
<form action="{{ routes.cart_url }}" method="post" novalidate class="cart" id="cart_form">
<!-- Cart item -->
<div class="container-table-cart pos-relative">
<div class="wrap-table-shopping-cart bgwhite">
<table class="table-shopping-cart">
<tr class="table-head">
<th class="column-1"></th>
<th class="column-2">{{ 'cart.general.heading_product_name' | t }}</th>
<th class="column-3">{{ 'cart.general.heading_unit_price' | t }}</th>
<th class="column-4 p-l-70">{{ 'cart.general.heading_quantity' | t }}</th>
<th class="column-5">{{ 'cart.general.heading_total' | t }}</th>
</tr>
{% for item in cart.items %}
<tr class="table-row" data-line="{{ forloop.index }}">
<td class="column-1">
<div class="cart-img-product b-rad-4 o-f-hidden">
<a href="{{ item.url }}">
<img src="{{ item | img_url: '90x120' }}" alt="{{ item.title | escape }}" title="{{ item.title | escape }}" class="" />
</a>
</div>
</td>
<td class="column-2">
<a href="{{ item.url }}">{{ item.product.title }}</a>
{% unless item.variant.title contains 'Default' %}
<br />
<small>{{ item.variant.title }}</small>
{% 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' %}
<br />
<small>{{ 'products.product.will_not_ship_until' | t: date: date }}</small>
{% endif %}
{% assign property_size = item.properties | size %}
{% if property_size > 0 %}
{% for p in item.properties %}
{% if forloop.first %}<br>{% endif %}
{% unless p.last == blank %}
{{ p.first }}:
{% if p.last contains '/uploads/' %}
<a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
{% else %}
{{ p.last }}
{% endif %}
<br>
{% endunless %}
{% endfor %}
{% endif %}
</td>
<td class="column-3">{{ item.price | money }}</td>
<td class="column-4">
<div class="flex-w bo5 of-hidden w-size17">
<button class="btn-num-product-down color1 flex-c-m size7 bg8 eff2">
<i class="fs-12 fa fa-minus" aria-hidden="true"></i>
</button>
<input type="number" name="updates[]" id="updates_{{ item.id }}" data-key="{{ item.id }}" value="{{ item.quantity }}" min="0" class="size8 m-text18 t-center num-product" data-line="{{ forloop.index }}">
<button class="btn-num-product-up color1 flex-c-m size7 bg8 eff2">
<i class="fs-12 fa fa-plus" aria-hidden="true"></i>
</button>
</div>
<button class="remove s-text7 flex-c-m m-l-30 m-t-10 p-l-10 p-r-10 p-t-5 p-b-5 bo1 bo-rad-23 hov1 trans-0-4" data-key="{{ item.variant_id }}">
<a href="/cart/change?line=1&quantity=0">Remove</a>
</button>
</td>
<td class="column-5">{{ item.line_price | money }}</td>
</tr>
{% endfor %}
</table>
</div>
</div>
<div class="flex-w flex-sb-m p-t-25 p-b-25 bo8 p-l-35 p-r-60 p-lr-15-sm">
<div class="flex-w flex-m w-full-sm">
<div class=" Coupon_code size11 bo4 m-r-10">
<input class="sizefull s-text7 p-l-22 p-r-22" type="text" name="discount" id="discount" placeholder="Coupon Code">
</div>
<div class="size12 trans-0-4 m-t-10 m-b-10 m-r-10">
<!-- Button -->
<!-- <button class="flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4">
Apply coupon
</button> -->
</div>
</div>
<div class="size10 trans-0-4 m-t-10 m-b-10">
<!-- Button -->
<button name="update" class="update-cart flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4">{{ 'cart.general.update' | t }}</button>
</div>
</div>
<!-- Total -->
<div class="bo9 w-size18 p-l-40 p-r-40 p-t-30 p-b-38 m-t-30 m-r-0 m-l-auto p-lr-15-sm">
<h5 class="m-text20 p-b-24">
Cart Totals
</h5>
<!-- -->
{% if cart.total_discounts > 0 %}
{% assign savings = cart.total_discounts | money %}
<div class="flex-w flex-sb-m p-b-12">
<span class="s-text18 w-size19 w-full-sm">
{{ 'cart.general.discount' | t }}:
</span>
<span class="m-text21 w-size20 w-full-sm">
{{ 'cart.general.savings_html' | t: price: savings }}
</span>
</div>
{% endif %}
<!-- <div class="flex-w flex-sb-m p-b-12">
<span class="s-text18 w-size19 w-full-sm">
{{ 'cart.general.subtotal' | t }}:
</span>
<span class="m-text21 w-size20 w-full-sm">
{{ cart.total_price | money }}
</span>
</div>
-->
<div class="flex-w flex-sb bo10 p-t-15 p-b-20">
<span class="s-text18 w-size19 w-full-sm">
Shipping: Calculated on next step
</span>
<div class="w-size20 w-full-sm">
<!-- <p class="s-text8 p-b-23">
There are no shipping methods available. Please double check your address, or contact us if you need any help.
</p> -->
{% include 'shipping-calculator' %}
<!--
<div class="rs2-select2 rs3-select2 rs4-select2 bo4 of-hidden w-size21 m-t-8 m-b-12">
<select class="selection-2" name="country">
<option>Select a country...</option>
<option>US</option>
<option>UK</option>
<option>Japan</option>
</select>
</div>
<div class="size13 bo4 m-b-12">
<input class="sizefull s-text7 p-l-15 p-r-15" type="text" name="state" placeholder="State / country">
</div>
<div class="size13 bo4 m-b-22">
<input class="sizefull s-text7 p-l-15 p-r-15" type="text" name="postcode" placeholder="Postcode / Zip">
</div>
<div class="size14 trans-0-4 m-b-10">
<!-- Button -->
<!--<button class="flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4">
Update Totals
</button>
</div>
-->
</div>
</div>
<div class="flex-w flex-sb-m p-t-26 p-b-30">
<span class="m-text22 w-size19 w-full-sm">
{{ 'cart.general.subtotal' | t }}:
</span>
<span class="m-text21 w-size20 w-full-sm">
{{ cart.total_price | money }}
</span>
</div>
<div class="size15 trans-0-4">
<!-- Button added by sam -->
<a href="/checkout" class="flex-c-m size1 bg1 bo-rad-20 hov1 s-text1 trans-0-4">
{{ 'cart.general.checkout' | t }}
</a>
<!-- <button onclick="document.getElementById('cart_form').submit(); return false;" class="flex-c-m sizefull bg1 bo-rad-23 hov1 s-text1 trans-0-4">
{{ 'cart.general.proceed_checkout' | t }}
</button>-->
{% if additional_checkout_buttons %}
{{ content_for_additional_checkout_buttons }}
{% endif %}
</div>
</div>
</form>
{% else %}
<h1 class="page-heading">{{ 'cart.general.empty' | t }}</h1>
<p>{{ 'cart.general.continue_browsing_html' | t }}</p>
{% endif %}
</div>
</section>
{% unless settings.shipping_calculator == 'Disabled' %}
<script>
window.theme = window.theme || {};
theme.strings = {
shippingCalcSubmitButton: {{ settings.shipping_calculator_submit_button_label | default: 'Calculate shipping' | json }},
shippingCalcSubmitButtonDisabled: {{ settings.shipping_calculator_submit_button_label_disabled | default: 'Calculating...' | json }},
{% if customer %}shippingCalcCustomerIsLoggedIn: true,{% endif %}
shippingCalcMoneyFormat: {{ shop.money_with_currency_format | json }}
}
</script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.10/handlebars.min.js"></script>
<script src="/services/javascripts/countries.js"></script>
<script src="{{ 'shopify_common.js' | shopify_asset_url }}" defer="defer"></script>
{{ 'shipping-cart.js' | asset_url | script_tag }}
<script>
Shopify.Cart.ShippingCalculator.show( {
submitButton: theme.strings.shippingCalcSubmitButton,
submitButtonDisabled: theme.strings.shippingCalcSubmitButtonDisabled,
customerIsLoggedIn: theme.strings.shippingCalcCustomerIsLoggedIn,
moneyFormat: theme.strings.shippingCalcMoneyFormat
} );
</script>
{% endunless %}
<style>
.Coupon_code {
display:none;
}
</style>
@KetanKumar requesting you to help me out
can you check theme option may be allow bcz i can see now update button
Yeah @KetanKumar If we click on update then only it changes the price and quantity value.
it doesn't has Ajax to update automatically without clicking on "update cart"
Please let me know your thoughts on this
yes, its possible to customization code
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024