BLOG

Display all blog post using handle

{% assign blog_handles = 'blog-1,blog-2' | split:',' %} {% for handle in blog_handles %} {% for article in blogs[handle].articles %} {% assign article_handles = article_handles | concat:blogs[handle].articles %} {% endfor %} {% endfor %} {% for article in article_handles limit: 3 %} <h2>{{ article.title }}</h2>...

Git command

Shopify CLI Login 1>shopify version 2> shopify login --store tierliebhaber-animagus.myshopify.com 3> to download theme file use command >> shopify theme pull 1>https://github.com/blicksolutions/tierliebhaber.git 2> git remote set-url origin https://yourusername@github.com/user/repo.git Example:  git remote set-url origin https://ShahnawazRock@github.com/blicksolutions/tierliebhaber.git >to get remote permission >> git clone https://github.com/blicksolutions/tierliebhaber/tree/bugfix/search-result-bug-fix 3>to check code...

Display Selected icons on the product page

<!--Ali Code Start --> {%- capture payment_methods -%} {%- for type in shop.enabled_payment_types -%} {%- if type contains 'amazon' or type == 'google_pay' or type == 'paypal' or type == 'klarna' or type == 'apple_pay' -%} <div class="t_Footer_Paymentlist_element">{{ type | payment_type_svg_tag }}</div> {%- endif -%}...

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;...