BLOG

Ajax Cart count Shopify

 <span class="count">{{ cart.item_count }}</span>   jQuery(document).ready(function() {   jQuery("#addToCart").click(function() {     setTimeout(function() {       jQuery.getJSON('/cart.js', function(cart) {           console.log(cart);           jQuery("span.count").html(cart.item_count);        });      }, 200);   }); });

Collection Page redirect base on country code

{%- for collection in collections -%} {%- if request.path == "/collections/accessories" and localization.country.iso_code == 'IN' -%} <script>window.location.href = "http://stackoverflow.com";</script> {%- endif -%} {%- endfor -%} <script> $(document).ready(function(){ $.getJSON("https://ipinfo.io", function(data) { console.log(data.country); if(data.country == "IN"){ window.location.href = "http://stackoverflow.com"; }else if(data.country == "RO"){ window.location.href = "https://www.google.com"; }...

Countdown timer collection page

<style> .hide_block { display: none !important; } .show_block { display: block !important; } .btn-coupon { width: 330px; display: block; margin: 0; margin-bottom: 15px; background: #5ce1e6; color: #fff; border-color: #5ce1e6; padding: var(--padding_btn_qv_add_to_cart) !important ; margin-right:12px; } #str_timer>span { border-bottom: 1px solid #b3b3b3; margin-right: 10px; font-size: 16px;...

Slick Marquee text slick slider with hover pause functionality

{%- capture topInfoBar -%} <div class="top-bar {% if section.settings.topbarmobile %}small--hide{% endif %}"> <div class="marquee-text page-width{% if section.settings.fullwidth %} fullwidth{% endif %}" id="carousel-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="carousel"> <div class="flex carousel top-info-bar" data-slick='{"slidesToShow": {{ section.settings.grid }},"slidesToScroll": 1, {%- if settings.rtl -%}"rtl": true,{%- endif -%} "infinite":...