Cant find mini cart code?

Tourist
23 0 0

Hi guys. So i've added some code in a couple of places to my cart page to show the customer what they will be saving with the automatic discounts applied at checkout. 

Screen Shot 2019-06-17 at 8.28.40 AM.png

 

I want to add this snippet of code to my mini cart either above or below the subtotal,

 

Screen Shot 2019-06-17 at 7.42.05 AM.png

 

but I can't find the little bugger. I don't know where my mini cart container is. Heres what has "cart" in the name, and my cart-template.liquid code

Screen Shot 2019-06-17 at 8.06.22 AM.png

{% comment %}
** Cart page - default view **
- Template section
{% endcomment %}

<div class="container main content">
<a name="pagecontent" id="pagecontent"></a>
 
<div class="section clearfix">
  <div class="sixteen columns">
    <h1>{{ 'cart.general.title' | t }}</h1>
    <div class="feature_divider"></div>
  </div>
</div>
  <div class='tabarnapp_discount_applied'>A discount of <b><em>${discount_amount}</em></b> will be applied at checkout.</div>


{% if cart.item_count == 0 %}
  <div class="sixteen columns">
    <div class="section clearfix">
      <div class="six columns offset-by-five medium-down--one-whole">
        <p class="quote">{{ 'cart.general.continue_browsing_html' | t }}</p>

        <a href="{% if cart.items.first.product.collections != blank %}{{ cart.items.first.product.collections.last.url }}{% else %}/collections/all{% endif %}" class="action_button continue-button add_to_cart">{{ 'cart.general.continue_shopping_link_html' | t }}</a>
      </div>
      <br class="clear" />
    </div>
  </div>
{% else %}

  {% include 'banana-stand-cart-top-container' %}

  <form action="/cart" method="post" id="cart_form">
    <div class="section clearfix">
      <div class="eleven columns medium-down--one-whole">
        {% assign total_saving = 0 %}
        {% for item in cart.items %}
          {% if item.variant.compare_at_price > item.variant.price %}
            {% assign saving = item.variant.compare_at_price | minus: item.variant.price | times: item.quantity %}
            {% assign total_saving = saving | plus: total_saving %}
          {% endif %}

          <div class="section clearfix">
            <div class="five columns alpha">
              <a href="{{ item.url }}" title="{{ item.title | escape }}" class="cart_page_image">
                <img  src="{{ item | img_url: '100x' }}"
                      alt="{{ item.title | escape }}"
                      class="lazyload {{ settings.image_loading_style }}"
                      style="max-width: {{- item.image.width -}}px"
                      data-sizes="auto"
                      data-src="{{ item | img_url: '900x' }}"
                      data-srcset=" {{ item | img_url: '300x' }} 300w,
                                    {{ item | img_url: '600x' }} 600w,
                                    {{ item | img_url: '900x' }} 900w"
                       />
              </a>
            </div>

            <div class="eleven columns omega cart_content_info">
              <h3>
                <a href="{{ item.url }}">{{ item.product.title }}</a>
              </h3>
    {% unless item.product.has_only_default_variant or item.variant.title contains "Title" %}
                <p class="meta">
                  {% for option in item.product.options %}
                    <span class="label">{{ option }}:</span> <span>{{ item.variant.options[forloop.index0] }}</span><br />
                  {% endfor %}
          
                </p>
              {% endunless %}
              
           

              {% if item.properties %}
                <p>
                  {% for p in item.properties %}
                    {% unless p.last == blank %}
                      {% if p.last contains '/uploads/' %}
                        <div>
                          {{ p.first }}: <a class="lightbox" href="{{ p.last }}">{{ 'cart.general.uploaded_file' | t }}</a>
                        </div>
                      {% else %}
                        <div>
                          {{ p.first }}: {{ p.last }}
                        </div>
                      {% endif %}
                    {% endunless %}
                  {% endfor %}
                </p>
              {% endif %}
            
            
              <p class="modal_price">
                {% if item.price > 0 %}
                  <span class="money">{{ item.price | money }}</span>
                {% else %}
                  {{ settings.free_price_text }}
                {% endif %}

                {% if item.price < item.variant.compare_at_price %}
                  <span class="money was_price">{{ item.variant.compare_at_price | money }}</span>
                {% endif %}
              </p>

              <div class="product-quantity-box left">
                <span class="ss-icon product-minus js-change-quantity" data-func="minus"><span class="icon-minus"></span></span>
                <input type="number" min="0" size="2" class="quantity" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}" data-line-id="{{ forloop.index }}" {% if settings.limit_quantity and item.variant.inventory_management != blank and item.variant.inventory_quantity > 0 and item.variant.inventory_policy == "deny" %}max="{{ item.variant.inventory_quantity }}"{% endif %} />
                <span class="ss-icon product-plus js-change-quantity" data-func="plus"><span class="icon-plus"></span></span>
              </div>
            </div>
          </div>
        {% endfor %}
      </div>
  

      <div class="five columns medium-down--one-whole">
        <div class="section clearfix">
          <div class="subtotal">
            <p class="cart_subtotal js-cart_subtotal">
              <span class="right">
                <span class="money">{{ cart.total_price | money }}</span>
            
              </span>
              <span>{{ 'cart.general.subtotal' | t }}</span>
              <div class='tabarnapp_discount_applied'>A discount of <b><em>${discount_amount}</em></b> will be applied at checkout.</div>
            </p>
         
            {% if section.settings.display_savings %}
              <p class="cart_savings sale">
                {% if total_saving > 0 %}
                  <span class="right">
                    <span class="money">{{ total_saving | money }}</span>
                  </span>
                  <span>{{ 'layout.general.savings' | t }}</span>
                {% endif %}
              </p>
            {% endif %}

            {% if settings.show_multiple_currencies %}
              <p>
                <small>
                  {{ 'cart.general.orders_processed_in_currency_html' | t: currency: shop.currency }}
                </small>
              </p>
            {% endif %}

            {% if section.settings.display_special_instructions %}
              <label for="note">{{ 'cart.general.note' | t: shop_name: shop.name }}:</label>
              <textarea id="note" name="note" rows="2">{{ cart.note }}</textarea>
            {% endif %}

            {% if section.settings.display_tos_checkbox %}
              <p>
                <input type="checkbox" class="tos_agree" id="cart_agree" required />
                  <label class="tos_label" for="cart_agree">
                    {{ 'cart.general.agree_to_terms_html' | t }}
                  </label>
                {% if settings.tos_page != blank %}
                  <a href="{{ pages[settings.tos_page].url }}" target="_blank" class="tos_icon">{{ 'cart.general.view_terms' | t }}</a>
                {% endif %}
              </p>
            {% endif %}

            {% if section.settings.cart_message != blank %}
              <div>
                {{ section.settings.cart_message }}
              </div>
            {% endif %}

            <p>
              <button type="submit" class="action_button add_to_cart" id="checkout" name="checkout">{% if settings.show_lock_icon %}<span class="icon-lock"></span>{% endif %}{{ 'cart.general.checkout' | t }}</button>
            </p>

            {% if content_for_additional_checkout_buttons %}
              <div class="additional-checkout-buttons">
                {{ content_for_additional_checkout_buttons }}
              </div>
            {% endif %}

            {% if cart.item_count > 0 %}
              <div class="featured-links">
                <a href="{% if cart.items.first.product.collections != blank %}{{ cart.items.first.product.collections.last.url }}{% else %}/collections/all{% endif %}" class="secondary_button">{{ 'cart.general.continue_shopping_link_html' | t }}</a>
              </div>
            {% endif %}
          </div>
        </div>
      </div>
    </div>
  </form>

  {% include 'cart-shipping-calculator' %}
{% endif %}

</div>

<div class="cart__blocks">
  {% for block in section.blocks %}
    <div {{ block.shopify_attributes }} class="block__{{ block.type }} block__{{ block.id }}">
      {% if block.type == 'featured_collection' %}
        {% include 'include-featured-collection', type: 'block' %}
      {% endif %}
    </div>
  {% endfor %}
</div>

{% schema %}

{
  "name": "Cart page",
  "class": "cart-section",
  "settings": [
    {
      "type": "checkbox",
      "id": "display_special_instructions",
      "label": "Show \"note\" text box"
    },
    {
      "type": "checkbox",
      "id": "display_tos_checkbox",
      "label": "Show \"agree to terms\" checkbox"
    },
    {
      "type": "checkbox",
      "id": "display_savings",
      "label": "Show total savings",
      "default": true
    },
    {
      "type": "richtext",
      "id": "cart_message",
      "label": "Cart message"
    }
  ],
  "blocks": [
    {
      "type": "featured_collection",
      "name": "Featured collection",
      "settings": [
        {
          "type": "text",
          "id": "title",
          "label": "Heading",
          "default": "You may also be interested in"
        },
        {
          "type": "collection",
          "id": "collection",
          "label": "Collection"
        },
        {
          "type": "radio",
          "id": "collection_style",
          "label": "Collection layout",
          "default": "grid",
          "options": [
            {
              "value": "slider",
              "label": "Slider"
            },
            {
              "value": "grid",
              "label": "Grid"
            }
          ]
        },
        {
          "type": "checkbox",
          "id": "collection_description",
          "label": "Show description",
          "default": true
        },
        {
          "type": "range",
          "id": "products_per",
          "label": "Products per row",
          "min": 2,
          "max": 7,
          "step": 1,
          "default": 6
        },
        {
          "type": "range",
          "id": "products_limit",
          "label": "Limit products",
          "min": 2,
          "max": 50,
          "step": 1,
          "default": 6
        }
      ]
    }
  ]
}

{% endschema %}

thank you! 

0 Likes
Shopify Expert
2465 414 519

Mini cart not generating by liquid code its generating by Js code, so please check in theme.js or any ajax cart js file.Which theme you have.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Tourist
23 0 0

I am using TURBO theme

I believe this is the file that should be edited: "jquery.cart.min.js."

"object"==typeof Countries&&(Countries.updateProvinceLabel=function(e,t){if("string"==typeof e&&Countries[e]&&Countries[e].provinces){if("object"!=typeof t&&(t=document.getElementById("address_province_label"),null===t))return;t.innerHTML=Countries[e].label;var r=jQuery(t).parent();r.find("select");r.find(".custom-style-select-box-inner").html(Countries[e].provinces[0])}}),"undefined"==typeof Shopify.Cart&&(Shopify.Cart={}),Shopify.Cart.ShippingCalculator=function(){var _config={submitButton:"Calculate shipping",submitButtonDisabled:"Calculating...",templateId:"shipping-calculator-response-template",wrapperId:"wrapper-response",customerIsLoggedIn:!1,moneyFormat:"${{amount}}"},_render=function(e){var t=jQuery("#"+_config.templateId),r=jQuery("#"+_config.wrapperId);if(t.length&&r.length){_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var n=_.template(jQuery.trim(t.text())),a=n(e);if(jQuery(a).appendTo(r),"undefined"!=typeof Currency&&"function"==typeof Currency.convertAll){var i="";jQuery("[name=currencies]").length?i=jQuery("[name=currencies]").val():jQuery("#currencies span.selected").length&&(i=jQuery("#currencies span.selected").attr("data-currency")),""!==i&&Currency.convertAll(shopCurrency,i,"#wrapper-response span.money, #estimated-shipping span.money")}}},_enableButtons=function(){jQuery(".get-rates").removeAttr("disabled").removeClass("disabled").val(_config.submitButton)},_disableButtons=function(){jQuery(".get-rates").val(_config.submitButtonDisabled).attr("disabled","disabled").addClass("disabled")},_getCartShippingRatesForDestination=function(e){var t={type:"POST",url:"/cart/prepare_shipping_rates",data:jQuery.param({shipping_address:e}),success:_pollForCartShippingRatesForDestination(e),error:_onError};jQuery.ajax(t)},_pollForCartShippingRatesForDestination=function(e){var t=function(){jQuery.ajax("/cart/async_shipping_rates",{dataType:"json",success:function(r,n,a){200===a.status?_onCartShippingRatesUpdate(r.shipping_rates,e):setTimeout(t,500)},error:_onError})};return t},_fullMessagesFromErrors=function(e){var t=[];return jQuery.each(e,function(e,r){jQuery.each(r,function(r,n){t.push(e+" "+n)})}),t},_onError=function(XMLHttpRequest,textStatus){jQuery("#estimated-shipping").hide(),jQuery("#estimated-shipping em").empty(),_enableButtons();var feedback="",data=eval("("+XMLHttpRequest.responseText+")");feedback=data.message?data.message+"("+data.status+"): "+data.description:"Error : "+_fullMessagesFromErrors(data).join("; ")+".","Error : country is not supported."===feedback&&(feedback="We do not ship to this destination."),_render({rates:[],errorFeedback:feedback,success:!1}),jQuery("#"+_config.wrapperId).show()},_onCartShippingRatesUpdate=function(e,t){_enableButtons();var r="";if(t.zip&&(r+=t.zip+", "),t.province&&(r+=t.province+", "),r+=t.country,e.length){"0.00"==e[0].price?jQuery("#estimated-shipping em").html("FREE"):jQuery("#estimated-shipping em").html(_formatRate(e[0].price));for(var n=0;n<e.length;n++)e[n].price=_formatRate(e[n].price)}_render({rates:e,address:r,success:!0}),jQuery("#"+_config.wrapperId+", #estimated-shipping").fadeIn()},_formatRate=function(e){function t(e,t){return"undefined"==typeof e?t:e}function r(e,r,n,a){if(r=t(r,2),n=t(n,","),a=t(a,"."),isNaN(e)||null==e)return 0;e=(e/100).toFixed(r);var i=e.split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?a+i[1]:"";return o+s}if("function"==typeof Shopify.formatMoney)return Shopify.formatMoney(e,_config.moneyFormat);"string"==typeof e&&(e=e.replace(".",""));var n="",a=/\{\{\s*(\w+)\s*\}\}/,i=_config.moneyFormat;switch(i.match(a)[1]){case"amount":n=r(e,2);break;case"amount_no_decimals":n=r(e,0);break;case"amount_with_comma_separator":n=r(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":n=r(e,0,".",",")}return i.replace(a,n)};return _init=function(){new Shopify.CountryProvinceSelector("address_country","address_province",{hideElement:"address_province_container"});var e=jQuery("#address_country"),t=jQuery("#address_province_label").get(0);"undefined"!=typeof Countries&&(Countries.updateProvinceLabel(e.val(),t),e.change(function(){Countries.updateProvinceLabel(e.val(),t)})),jQuery(".get-rates").click(function(){_disableButtons(),jQuery("#"+_config.wrapperId).empty().hide();var e={};e.zip=jQuery("#address_zip").val()||"",e.country=jQuery("#address_country").val()||"",e.province=jQuery("#address_province").val()||"",_getCartShippingRatesForDestination(e)}),_config.customerIsLoggedIn&&jQuery(".get-rates:eq(0)").trigger("click")},{show:function(e){e=e||{},jQuery.extend(_config,e),jQuery(function(){_init()})},getConfig:function(){return _config},formatRate:function(e){return _formatRate(e)}}}();

and im trying to add this code:

  <div class='tabarnapp_discount_applied'>A discount of <b><em>${discount_amount}</em></b> will be applied at checkout.</div>

either above or below the subtotal 

0 Likes
Shopify Expert
2465 414 519

No jquery.cart.min.js file use for backed purpose of cart, you need to find file that generate mini cart html. You can find any class of mini cart in file so you get idea.

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Tourist
8 0 0

I have the same theme. It's in the header.liquid

0 Likes