BLOG

Get Order details any page

{% for order in customer.orders %} <tr> <td>{{ order.name | link_to: order.customer_url }}</td> <td>{{ order.created_at | date: format: 'short' }}</td> <td>{{ order.financial_status_label }}</td> <td>{{ order.fulfillment_status_label }}</td> <td>{{ order.total_price | money }}</td> </tr> {% for line_item in order.line_items %} <tr> <td>{{ line_item.title | link_to: line_item.product.url }}</td>...

Create Shopify blank theme from local

Create the theme folders as per shopify (templates, sections, snippets, etc.) In the config folder create on json file called settings_schema.json and add below details  [   {     "name": "theme_info",     "theme_name": "latest Devang",     "theme_version": "1.0.0",     "theme_author": "Rock",     "theme_documentation_url": "https:\/\/help.shopify.com\/manual\/online-store\/themes",     "theme_support_url": "https:\/\/support.shopify.com\/"   } ] In the layout...

Collection page filter shopify 2.0

Doc ulr: Support storefront filtering (shopify.dev)   <form class="filter-form"> {%- for filter in collection.filters -%} <details class="filter-group"> <summary class="filter-group-summary"> <div> <span>{{ filter.label }}</span> {%- if filter.active_values.size > 0 -%} <span>({{ filter.active_values.size }})</span> {%- endif -%} </div> </summary> <div class="filter-group-display"> <div class="filter-group-display__header"> <span class="filter-group-display__header-selected">{{ filter.active_values.size }} selected</span>...

Based on cart total amount display specific message on cart drawer shopify

<!-- start Geo location --> <script> $.get("https://ipinfo.io", function(response) { console.log(response.city, response.country); if(response.country == "GB"){ $(document).on('click', 'form[data-product-form], .product__submit__add, .cart__quantity-plus, .cart__quantity-minus, .cart-item__remove', function (e) { setTimeout(function() { jQuery.getJSON('/cart.js', function(cart) { var totprs = (cart.total_price/100).toFixed(2); if (cart.total_price >= 13500){ // alert('There are now ' + totprs + '...

GA4 SHopify

Github link:  GitHub - ruturajjadeja/GA4-Shopify-DataLayer Code: <script>if(!window.jQuery){ var jqueryScript = document.createElement('script'); jqueryScript.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js'); document.head.appendChild(jqueryScript); }__DL__jQueryinterval = setInterval(function(){ // wait for jQuery to load & run script after jQuery has loaded if(window.jQuery){ // search parameters getURLParams = function(name, url){ if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&");...

Cart page recommended product section Shopify

{%- for item in cart.items -%} {%- assign product_rec = item.product -%}{%- endfor -%} {%- assign tagn = section.settings.tag_name %} <div class="page-width"> <div class="product-recommendations__inner"> {%- if section.settings.heading != blank -%} <div class="section-header text-center"> <h2>{{ section.settings.heading | escape }}</h2> </div> {%- endif -%} <ul class="grid grid--uniform...

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