Hi!
When i add any of my products to cart and view it the wrong number always shows up where it says “subtotal”. But when i press “checkout” it converts to the right prize. Also the product prize is always right and i have set all the shipping rates to 0 so my guess would be that it’s in the code somewhere?
Here is my cart.liquid:
{% section ‘static-cart’ %}
Here is the cart._ajax.liquid:
{% layout none %}
{
“totalPrice”: {{ cart.total_price | money | json }}
}
And here is the static-cart.liquid:
{% assign is_customer = false %}
{% if shop.customer_accounts_enabled and customer %}
{% assign is_customer = true %}
{% endif %}
{% assign has_sidebar = false %}
{% assign has_items = false %}
{% assign show_continue_link = false %}
{% if section.blocks.size > 0 %}
{% assign has_sidebar = true %}
{% endif %}
{% if cart.items.size > 0 %}
{% assign has_items = true %}
{% endif %}
{% assign continue_url = “/collections/all” %}
{% if settings.continue_shopping_url != blank %}
{% assign continue_url = settings.continue_shopping_url %}
{% endif %}
{% if settings.continue_url_cart %}
{% assign show_continue_link = true %}
{%- capture continue_link_html -%}
{{ ‘cart.general.continue_shopping’ | t }}
{% include ‘icon-library’, id: ‘icon-signpost-arrow’ %}
{%- endcapture -%}
{% endif %}
{{ 'cart.general.your_cart' | t }}
{% if has_items %}
{% endif %}{% if has_items or show_continue_link %}
<button
class=“button-primary cart-title-button”
name=“checkout”
type=“submit”
aria-label=“{{ ‘cart.general.checkout’ | t }}”
{% if settings.enable_checkout_lock_icon %}
{% include ‘icon-checkout-lock’ %}
{% else %}
{% include ‘icon-cart’ %}
{% endif %}
{{ ‘cart.general.checkout’ | t }}
{% elsif show_continue_link %}
{{ continue_link_html }}
{% endif %}
{% if section.settings.enable_order_notes %}
-
{%
include 'cart-discounts',
cart: cart
%}
{% comment %}
snippets/cart-shipping.liquid has an internal check to see if shipping is required
{% endcomment %}
{% if section.settings.enable_shipping_calc %}
{% include ‘cart-shipping’ %}
{% endif %}
{% if additional_checkout_buttons %}
{% if show_continue_link %}
{{ continue_link_html }}
{% endif %}
{{ 'cart.general.cart_empty' | t }}
{% if show_continue_link %}
{% include ‘icon-cart’ %}
{{ ‘cart.general.continue_shopping’ | t }}
{% endif %}
{% if has_sidebar %}
{% if block.type == ‘richtext’ %}
{{ block.settings.richtext }} {% endif %}{% if block.type == ‘page’ %}
{{ pages[block.settings.page].content }} {% endif %} {% endfor %}{% schema %}
{
“name”: “Cart page”,
“class”: “cart–section”,
“max_blocks”: 2,
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_order_notes”,
“label”: “Enable order notes text box”,
“default”: false
},
{
“type”: “header”,
“content”: “Shipping estimator”
},
{
“type”: “checkbox”,
“id”: “enable_shipping_calc”,
“label”: “Enable shipping estimator”,
“default”: true
},
{
“type”: “text”,
“id”: “shipping_calc_default_country”,
“label”: “Default country”,
“default”: “United States”
}
],
“blocks”: [
{
“type”: “richtext”,
“name”: “Rich text”,
“limit”: 1,
“settings”: [
{
“id”: “richtext”,
“type”: “richtext”,
“label”: “Rich text”,
“default”: “
Use this section to welcome customers to your store, say a bit about your brand, or share news and seasonal promotions.
”}
]
},
{
“type”: “image”,
“name”: “Image”,
“limit”: 1,
“settings”: [
{
“id”: “image”,
“type”: “image_picker”,
“label”: “Image”
}
]
},
{
“type”: “page”,
“name”: “Page”,
“limit”: 1,
“settings”: [
{
“id”: “page”,
“type”: “page”,
“label”: “Choose page”
}
]
}
]
}
{% endschema %}
lastly the cart.appikon.json.liquid:
{%- layout none -%}
{
“items”: [
{%- for item in cart.items -%}
{
“id”: {{ item.id | json }},
“collectionIds”: [
{%- for productCollection in item.product.collections -%}
{{ productCollection.id | json }}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}