<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>QuickCode on OKCKnet</title><link>/categories/quickcode/</link><description>Recent content in QuickCode on OKCKnet</description><generator>Hugo</generator><language>en</language><atom:link href="/categories/quickcode/index.xml" rel="self" type="application/rss+xml"/><item><title>Shopify: How to find orders containing bundles in Shopify Flow?</title><link>/blog/work/shopify-how-to-find-containing-bundles-in-shopify-flow/</link><pubDate>Thu, 12 Dec 2024 02:45:00 +0300</pubDate><guid>/blog/work/shopify-how-to-find-containing-bundles-in-shopify-flow/</guid><description>&lt;p&gt;If you want to find orders containing bundles in Shopify Flow and send an internal email, you can use the following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to Shopify Flow page on your store.&lt;/li&gt;
&lt;li&gt;Create a new flow.&lt;/li&gt;
&lt;li&gt;Select Trigger: Shopify &amp;gt; Start when: &lt;code&gt;Order Created&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Then + Add an action: Flow &amp;gt; For each &lt;code&gt;item in order.lineItems&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Then + Add a condition: Check if &lt;code&gt;Line item group title not empty and exists&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Then + Add an action: &lt;code&gt;Send an internal email&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After these steps, Shopify Flow will send an email for each order that contains a bundle.&lt;br&gt;
You can customize the email content and recipients as you wish.&lt;/p&gt;</description></item><item><title>Shopify: Liquid Snippet for Loading CSS Asynchronously</title><link>/blog/work/shopify-liquid-snippet-for-loading-css-asynchronously/</link><pubDate>Wed, 18 Oct 2023 22:30:00 +0300</pubDate><guid>/blog/work/shopify-liquid-snippet-for-loading-css-asynchronously/</guid><description>&lt;p&gt;Shopify recently added section.index to the Liquid API. This is a great addition that allows you to do things like selectively load CSS based on the section index. This is useful for things like loading CSS asynchronously, which can help improve your page speed scores.&lt;/p&gt;
&lt;p&gt;If you want to load CSS asynchronously on Shopify, you can use this Liquid snippet:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;css.liquid&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-liquid"&gt; {%- liquid
 assign css = css | default: false
 assign section_index = section_index | default: 3
 -%}

 {%- if section_index &amp;gt; 2 -%}
 &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;{{- css | asset_url-}}&amp;quot; media=&amp;quot;print&amp;quot; onload=&amp;quot;this.media='all'&amp;quot;&amp;gt;
 &amp;lt;noscript&amp;gt;
 {{- css | asset_url | stylesheet_tag -}}
 &amp;lt;/noscript&amp;gt;
 {%- else -%}
 {{- css | asset_url | stylesheet_tag -}}
 {%- endif -%}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, you can render this snippet in your theme with this code:&lt;/p&gt;</description></item><item><title>Hugo: Dynamic Image Rendering with URL Replacement</title><link>/blog/work/hugo-dynamic-image-rendering-with-url-replacement/</link><pubDate>Mon, 16 Oct 2023 07:40:00 +0300</pubDate><guid>/blog/work/hugo-dynamic-image-rendering-with-url-replacement/</guid><description>&lt;p&gt;If you want to use Hugo to dynamically render images with URL replacement and lazy loading, here is the code.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-javascript"&gt;{{ $card__show_image := .Params.show_image }}
{{ $cardImageURL := &amp;quot;&amp;quot; }}
{{ if and (eq $card__show_image &amp;quot;true&amp;quot;) (.Params.images) }}
 {{ with .Params.images }}
 {{ range $image := . | first 1 }}
 {{ $cardImageURL = replaceRE &amp;quot;(=w|s)(2400|1600)&amp;quot; &amp;quot;$1360&amp;quot; $image }}
 {{ end }}
 {{ end }}
 &amp;lt;img src=&amp;quot;{{ $cardImageURL | absURL }}&amp;quot; alt=&amp;quot;{{ .LinkTitle }}&amp;quot; decoding=&amp;quot;async&amp;quot; loading=&amp;quot;lazy&amp;quot;&amp;gt;
{{ end }}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;rsquo;m using this code on my blog to render images with lazy loading and responsive image sizes on different part of my blog, like cards, cover images etc.&lt;/p&gt;</description></item><item><title>Shopify: How to Hide a Product, Page or Post from Search?</title><link>/blog/work/shopify-how-to-hide-a-product-page-or-post-from-search/</link><pubDate>Thu, 12 Oct 2023 02:45:00 +0300</pubDate><guid>/blog/work/shopify-how-to-hide-a-product-page-or-post-from-search/</guid><description>&lt;p&gt;If you want to hide a product, page or post (item) from search or seo, here are steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to Custom Data page on store&lt;/li&gt;
&lt;li&gt;Add a new &lt;strong&gt;definition&lt;/strong&gt; with name SEO Visibility&lt;/li&gt;
&lt;li&gt;Change &lt;strong&gt;Namespace and key&lt;/strong&gt; as ‘seo.hidden’&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;Integer&lt;/strong&gt; type with one value and validations (min: 0, max: 1).&lt;/li&gt;
&lt;li&gt;Activate Storefront access.&lt;/li&gt;
&lt;li&gt;Then go to item and set SEO Visibility metafield value as 1.&lt;/li&gt;
&lt;li&gt;Done ✅&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After these steps, Shopify will add this code to setted product / page / post etc.&lt;/p&gt;</description></item></channel></rss>