I would like to know why the prices of my products do not change when different variants are selected.
Below is my theme.liquid code. Any help would be greatly appreciated.
<!doctype html> <!--[if IE 9]> <html class="ie9 no-js" lang="{{ shop.locale }}"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js" lang="{{ shop.locale }}"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> <meta name="theme-color" content="{{ settings.color_button }}"> <meta name="version" content="2.2.1"> <meta name="email" content="{{ shop.email }}"> <meta name="role" content="{{ theme.role }}"> <meta name="verifyownership" content="536c7a25f7f6aeb6fe4f57e71c3aef42"/> <link rel="canonical" href="{{ canonical_url }}"> {% if settings.favicon != blank %} <link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png"> {% endif %} {% capture seo_title %} {{ page_title }} {% if current_tags %} {%- assign meta_tags = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: meta_tags -}} {% endif %} {% if current_page != 1 %} – {{ 'general.meta.page' | t: page: current_page }} {% endif %} {% unless page_title contains shop.name %} – {{ shop.name }} {% endunless %} {% endcapture %} <title>{{ seo_title }}</title> {% if page_description %} <meta name="description" content="{{ page_description | escape }}"> {% endif %} {% include 'social-meta-tags' %} {{ 'theme.scss.css' | asset_url | stylesheet_tag }} {{ 'typo-color.scss.css' | asset_url | stylesheet_tag }} {% include 'google-fonts' %} <script> var theme = { strings: { addToCart: {{ 'products.product.add_to_cart' | t | json }}, soldOut: {{ 'products.product.sold_out' | t | json }}, unavailable: {{ 'products.product.unavailable' | t | json }}, showMore: {{ 'general.filters.show_more' | t | json }}, showLess: {{ 'general.filters.show_less' | t | json }}, addressError: {{ 'sections.map.address_error' | t | json }}, addressNoResults: {{ 'sections.map.address_no_results' | t | json }}, addressQueryLimit: {{ 'sections.map.address_query_limit_html' | t | json }}, authError: {{ 'sections.map.auth_error_html' | t | json }} }, moneyFormat: {{ shop.money_format | json }} } document.documentElement.className = document.documentElement.className.replace('no-js', 'js'); </script> <!--[if (lte IE 9) ]>{{ 'match-media.min.js' | asset_url | script_tag }}<![endif]--> {% if template.directory == 'customers' %} <!--[if (gt IE 9)|!(IE)]><!--><script src="{{ 'shopify_common.js' | shopify_asset_url }}" defer="defer"></script><!--<![endif]--> <!--[if lte IE 9]><script src="{{ 'shopify_common.js' | shopify_asset_url }}"></script><![endif]--> {% endif %} <script type="text/javascript"> var sv = {{ 'products.product.on_save_like_price' | t | json }};var x = {{ 'products.product.on_save' | t | json }}; var y = {{ 'general.newsletter_form.confirmation' | t | json }};{% if settings.show_multiple_currencies %}var currency_dropdown = true;{% if settings.select_dropdown == 'auto_currency' %}var auto_curncy = true;{% else %}var auto_curncy = false;{% endif %}{% else %}var currency_dropdown = false;{% endif %}{% if settings.show_saved_amount %}{% if settings.show_discount_amount == 'percent_save' %}var precentprice = true;{% else %}var precentprice = false;{% endif %}{% endif %} var addToCartBtnLabel_1 = {{ 'products.product.add_to_cart' | t | json }},addedToCartBtnLabe_1 = {{ "products.product.Thanks_you" | t | json }},addingToCartBtnLabel_1 = {{ "products.product.adding" | t | json }},soldOutBtnLabel_1 = {{ "products.product.sold_out" | t | json }};{% if template == 'product' or template == 'index'%}var relatedupsellmodal = true;{% else %}var relatedupsellmodal = false;{% endif %}var added_to_cart = {{ 'cart.general.added_to_cart' | t | json }};var view_cart = {{ "cart.general.view_cart" | t | json }};var continue_shopping = {{ "cart.general.continue_shopping" | t | json }};var items_count_one = {{ 'layout.cart.items_count.one' | t | json }};var items_count_other = {{ 'layout.cart.items_count.other' | t | json }};var read_more = {{ "products.timer.readmore" | t | json}};var read_less = {{ "products.timer.readless" | t | json}};var eblstcky = false;var ebl_pay_but = false;var read_mor = false;var visitorcountr = false;var livestock = false;var enable_defaul_variant = true; </script> <!--[if (gt IE 9)|!(IE)]><!--><script src="{{ 'lazysizes.js' | asset_url }}" async="async"></script><!--<![endif]--> <!--[if lte IE 9]><script src="{{ 'lazysizes.min.js' | asset_url }}"></script><![endif]--> <!--[if lte IE 9]><!--><script src="{{ 'theme.js' | asset_url }}"></script><!--><![endif]--> <!-- bootstrap js & css --> <script src="{{ 'bootstrap.min.js' | asset_url }}"></script> <script>var mainShopDomain='{{shop.permanent_domain}}';</script> {{ 'shop.js' | asset_url | script_tag }} {{ 'fontawesome.css' | asset_url | stylesheet_tag }} {{ content_for_header }} <link href="https://fonts.googleapis.com/css?family=Anton|Arimo|Arvo|Baloo+Bhai|Baloo+Bhaina|Bitter|Bree+Serif|Cabin|Catamaran|David+Libre|Dosis|Droid+Sans|Droid+Serif|Ek+Mukta|Fjalla+One|Hind|Inconsolata|Indie+Flower|Lato|Libre+Baskerville|Lobster|Lora|Merriweather|Modak|Montserrat|Muli|Noto+Sans|Noto+Serif|Nunito|Open+Sans|Open+Sans+Condensed:300|Oswald|Oxygen|PT+Sans|PT+Sans+Narrow|PT+Serif|Pavanam|Playfair+Display|Poppins|Raleway|Roboto|Roboto+Condensed|Roboto+Slab|Slabo+27px|Source+Sans+Pro|Teko|Titillium+Web|Ubuntu|Yanone+Kaffeesatz|Yatra+One" rel="stylesheet"> <style type="text/css"> .product-description + [data-readmore-toggle], .product-description[data-readmore]{display: block; width: 100%;margin-top: 15px;}.product-description[data-readmore]{transition: height 100ms;overflow-x: hidden !important;overflow: -webkit-paged-x;}</style> <!-- BeginShopPopAddon --><script> Shopify.shopPopSettings = {"proof_enabled":true,"proof_show_add_to_cart":true,"proof_mobile_enabled":true,"proof_mobile_position":"Bottom","proof_desktop_position":"Bottom Left","proof_show_on_product_page":true,"proof_hide_notification_after":30,"proof_display_time":6,"proof_interval_time":5,"proof_order_random":false,"proof_fetch_count":30,"proof_cycle":true,"proof_anonymize":true,"proof_anonymize_text":null,"proof_hours_before_obscure":48,"proof_sequential":true,"proof_top":10,"proof_left":10,"proof_right":10,"proof_bottom":10,"proof_background_color":"#FFFFFF","proof_font_color":"#000000","proof_custom_css":null,"proof_border_radius":40,"proof_first_interval_time":1,"proof_locale":"en"};</script><!-- EndShopPopAddon --> <meta name="google-site-verification" content="RIoZkYD3vFz1GiVg0k01AnEQJlGsIzxjAtt_rV563rg" /> </head> <body class="template-{{ template | split: '.' | first }}"> <input type="hidden" id="product_key" value="{{ settings.product_key }}"> <input type="hidden" id="permanent_domain" value="{{ shop.permanent_domain }}"> <a class="in-page-link visually-hidden skip-link" href="#MainContent">{{ 'general.accessibility.skip_to_content' | t }}</a> {% if settings.salepopup_position == 'top'%} {% include 'notification-popup' %} {% endif %} <div id="SearchDrawer" class="search-bar drawer drawer--top"> <div class="search-bar__table"> <div class="search-bar__table-cell search-bar__form-wrapper"> <form class="search search-bar__form" action="/search" method="get" role="search"> <button class="search-bar__submit search__submit btn--link" type="submit"> {% include 'icon-search' %} <span class="icon__fallback-text">{{ 'general.search.submit' | t }}</span> </button> {% if settings.search_result == 'only_product'%} <input type="hidden" name="type" value="product"> {% endif %} <input class="search__input search-bar__input" type="input" name="q" value="{{ search.terms | escape }}" placeholder="{{ 'general.search.placeholder' | t }}" aria-label="{{ 'general.search.placeholder' | t }}"> </form> </div> <div class="search-bar__table-cell text-right"> <button type="button" class="btn--link search-bar__close js-drawer-close"> {% include 'icon-close' %} <span class="icon__fallback-text">{{ 'general.search.close' | t }}</span> </button> </div> </div> </div> {% section 'header' %} <div class="page-container" id="PageContainer"> <main class="main-content" id="MainContent" role="main"> {{ content_for_layout }} </main> {% section 'footer' %} </div> <!-- Start discount popup --> {% include 'discount_popup' %} <!-- End discount popup --> {% if settings.salepopup_position == 'bottom'%} {% include 'notification-popup' %} {% endif %} {{ 'timer_all.scss' | asset_url | stylesheet_tag }} {{ 'timer_new.scss' | asset_url | stylesheet_tag }} {% include 'currencies' %} <script type="text/javascript"> var final1 = document.createElement("script"); final1.src='{{ 'new_theme.js' | asset_url }}'; document.head.appendChild(final1); </script> </body> </html>
Solved! Go to the solution
I think theme.liquid is not useful in this situation, more useful will be live url of the site. )))
Success.
the problem in your theme.js.liquid file
It want to get the id of the featured_image and can't and here the scripts stops
There is need to edit it, make it to check at first if the featured_image is there at all?
Please add me as collaborator for your store, I will do it, if it is not fixed yet.
Use shopify@sarhov.com email
Could you please look at my issue? I have the same problem
Subject | Author | Latest Post |
---|---|---|
Subject | Author | Posted |
---|---|---|
9m ago | ||
16m ago | ||
33m ago | ||
34m ago | ||
an hour ago |