<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Michael Myers on Medium]]></title>
        <description><![CDATA[Stories by Michael Myers on Medium]]></description>
        <link>https://medium.com/@myersdev?source=rss-33b3c64888b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fFJkyPbtNHIm2HGDXPomzQ@2x.jpeg</url>
            <title>Stories by Michael Myers on Medium</title>
            <link>https://medium.com/@myersdev?source=rss-33b3c64888b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 18 May 2026 06:50:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@myersdev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[What is Section Rendering API in Shopify?]]></title>
            <link>https://myersdev.medium.com/what-is-section-rendering-api-in-shopify-dd97eb3002db?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd97eb3002db</guid>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[shopify-theme]]></category>
            <category><![CDATA[shopify-store]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[shopify-development]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Mon, 05 May 2025 16:56:03 GMT</pubDate>
            <atom:updated>2025-05-05T16:56:03.123Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9g9d8jQjMHD_VFkE.png" /></figure><p>Shopify Section Rendering API allows you to dynamically update the content of sections on your store’s pages without fully reloading the page.</p><p>The <strong>Section Rendering API</strong> in Shopify is an API that allows you to dynamically update the content of sections on your store’s pages without fully reloading the page. This is especially useful for creating interactive elements like filters, cart updates, product variant switching, and more.</p><p>Key features of the Section Rendering API:</p><ol><li><strong>Asynchronous Updates</strong>: You can send a request to the server to retrieve updated content for a specific section. The server returns HTML, which can then be embedded into the current page without a full reload.</li><li><strong>Performance Improvement</strong>: Since only a specific part of the page is updated, this can significantly enhance performance and the user experience.</li><li><strong>Flexibility and Control</strong>: You can use this API to update individual sections of a page, giving you more control over how and when data on the page is updated.</li><li><strong>Ease of Use</strong>: API requests are made via AJAX, and the resulting HTML is easily integrated into the DOM using JavaScript.</li></ol><p>A practical use case for the Section Rendering API includes:</p><ul><li>updating the cart contents after adding an item</li><li>filtering products on a collection page,</li><li>changing a product variant on a product page where only specific sections are updated to reflect the new information.</li></ul><p>This API helps create a more dynamic and responsive interface for users of Shopify stores.</p><p>You can see the example of using Shopify Section Rendering API in action below.</p><h3>HTML</h3><pre>&lt;div id=&quot;cart-section&quot;&gt;<br>  {% section &#39;cart-template&#39; %}<br>&lt;/div&gt;<br><br>&lt;button id=&quot;add-to-cart&quot; data-product-id=&quot;{{ product.id }}&quot;&gt;<br>  Add to Cart<br>&lt;/button&gt;</pre><h3>JS</h3><pre>document.getElementById(&#39;add-to-cart&#39;).addEventListener(&#39;click&#39;, function() {<br>  const productId = this.getAttribute(&#39;data-product-id&#39;);<br>  <br>  // Add the product to the cart via AJAX<br>  fetch(&#39;/cart/add.js&#39;, {<br>    method: &#39;POST&#39;,<br>    headers: {<br>      &#39;Content-Type&#39;: &#39;application/json&#39;,<br>    },<br>    body: JSON.stringify({<br>      id: productId,<br>      quantity: 1,<br>    }),<br>  })<br>  .then(response =&gt; response.json())<br>  .then(() =&gt; {<br>    // Fetch the updated cart section<br>    fetch(&#39;/?sections=cart-template&#39;)<br>      .then(response =&gt; response.json())<br>      .then(data =&gt; {<br>        // Update the cart section with the new HTML<br>        document.getElementById(&#39;cart-section&#39;).innerHTML = data[&#39;cart-template&#39;];<br>      });<br>  })<br>  .catch(error =&gt; {<br>    console.error(&#39;Error adding to cart:&#39;, error);<br>  });<br>});</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd97eb3002db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“There was an error updating your shopping cart. Please try again.” — Shopify issue]]></title>
            <link>https://myersdev.medium.com/there-was-an-error-updating-your-shopping-cart-please-try-again-shopify-issue-ffb009491dd1?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffb009491dd1</guid>
            <category><![CDATA[shopify-store]]></category>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[shopify-theme]]></category>
            <category><![CDATA[shopify-for-beginners]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Tue, 09 Jul 2024 06:49:34 GMT</pubDate>
            <atom:updated>2024-07-09T06:51:22.081Z</atom:updated>
            <content:encoded><![CDATA[<h3>“There was an error updating your shopping cart. Please try again.” — Shopify issue</h3><p>This issue can stem from various causes, ranging from browser settings to server-side problems. In this blog post, we’ll explore several troubleshooting steps to help you resolve this error.</p><p><a href="https://blog.devmoek.com/there-was-an-error-updating-your-shopping-cart-please-try-again-shopify/"><em>Originally published at blog.devmoek.com</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iTuy8PtfBOjUsZ8Y.png" /></figure><p>Encountering an error while updating your shopping cart can be frustrating, especially when you have a lot of customers that in the midst of making an online purchase in your store. One of the common messages in Shopify is <strong>“There was an error updating your shopping cart. Please try again.”</strong>.</p><p>This issue can stem from various causes, ranging from browser settings to server-side problems. In this article, we’ll explore several troubleshooting steps to help you resolve this error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*IsNL0GQdfa9JhrT_.gif" /><figcaption>When a bug appears, the real me comes out</figcaption></figure><p>When I tried to fix it myself, I found a bunch of opened questions in <a href="https://community.shopify.com/?ref=blog.devmoek.com">Shopify Community</a> from people in different years from 2020 to 2023 about how to fix this issue. On of the method in this post helped me, so I’m sharing the whole list of steps I tried to fix the issue.</p><p>I will start from the basic fixes to complex. Below you can find each of them and jump further if need it.</p><h3>Table of content</h3><ul><li>Step 1: Refresh the Page</li><li>Step 2: Clear Browser Cache and Cookies</li><li>Step 3: Disable Browser Extensions</li><li>Step 4: Try a Different Browser or Device</li><li>Step 5: Update Your Browser</li><li>Step 6: Check for Website-Specific Issues</li><li>Step 7: Disable Ad Blockers and Security Software</li><li>Step 8: Ensure Cookies Are Enabled</li><li>Step 9: Check the Console</li><li>Step 10: Check the Theme’s Code</li><li>Step 11: Custom Code</li></ul><h3>Step 1: Refresh the Page</h3><p>Sometimes, a simple page refresh can resolve the issue. Click the refresh button on your browser or press F5 ( CMD + R on mac) on your keyboard. This can help if the error was caused by a temporary glitch.</p><h3>Step 2: Clear Browser Cache and Cookies</h3><p>Cached files and cookies can sometimes cause conflicts with website functionality.</p><p><strong>“Cookies and other site data” will log out you from all the sites you are logged in.</strong></p><h3>Step 3: Disable Browser Extensions</h3><p>Extensions or add-ons can interfere with website functionality. Temporarily disable them to see if the issue is resolved.</p><h3>Step 4: Try a Different Browser or Device</h3><p>If the problem persists, try accessing the website using a different browser or device. This can help determine if the issue is specific to your current setup.</p><h3>Step 5: Update Your Browser</h3><p>An outdated browser can cause compatibility issues with modern websites. Ensure your browser is up-to-date.</p><h3>Step 6: Check for Website-Specific Issues</h3><p>Sometimes, the issue might be on the website’s end. Look for any notifications about site maintenance or known issues. You can also contact the website’s support team for assistance.</p><h3>Step 7: Disable Ad Blockers and Security Software</h3><p>Ad blockers and security software can sometimes block necessary scripts and resources needed for the website to function correctly. Try disabling them temporarily. As an alternative way here, you can switch your browser into incognito mode.</p><ol><li>Locate the ad blocker extension and click on its icon.</li><li>Choose the option to disable it for the site you are visiting.</li></ol><h3>Security Software:</h3><p>Refer to your specific software’s instructions to temporarily disable its web protection features.</p><p><strong>Be careful disabling anti-malware software. It might be not safe in your case.</strong></p><h3>Step 8: Ensure Cookies Are Enabled</h3><p>Cookies are essential for shopping cart functionality. Make sure they are enabled in your browser settings.</p><h4>Information below require knowledge in Web Dev.</h4><p>If you are not familiar with code or web development overall — ask a developer to help you.</p><h3>Step 9: Check the Console</h3><p>If none of the above steps work, the issue might be more technical. Checking the browser’s console can provide insights into what might be going wrong.</p><h3>Step 10: Check the Theme’s Code</h3><p>Take a look at the theme’s code for any errors. To do that, go to your theme and click <strong>Customize</strong>. Customizations or errors in the theme’s JavaScript or HTML could be causing the issue.</p><ul><li>Go to your Shopify admin panel.</li><li>Navigate to Online Store &gt; Themes &gt; Actions &gt; Edit Code.</li><li>Check for any recent changes or errors in your cart.liquid and cart.js or relevant JavaScript files.</li></ul><p>Check for any JavaScript errors or conflicting code that might be causing the cart update issue. If you’re unsure, consider reverting recent changes or <a href="https://cal.com/myersdev?ref=blog.devmoek.com">consulting with a developer</a>.</p><h3>Step 11: Custom Code</h3><p>If you have a custom code in your theme, or your theme is fully custom-built — that might be a problem. First things first, check the header. <strong>If you have a custom header, that 100% an issue.</strong></p><p>There is some magic in the default header that makes the cart total value working well. So you have different approaches how to set the default header.</p><ol><li><strong>Customize the default header</strong> and implement your design &amp; functionality.<br>It takes time, but you will have a cleaner code.</li><li><strong>Hide the default header </strong>(not a good fix, but sometimes faster is better). In this points you will have your custom header, and a default one, but the default header will be only in the code, so no one can’t see it.</li></ol><p>These were my list of fixes. I hope you solved this issue now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffb009491dd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Add Infinite Marquee Section in Shopify?]]></title>
            <link>https://myersdev.medium.com/how-to-add-infinite-marquee-section-in-shopify-48ea4b26d822?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/48ea4b26d822</guid>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[e-commerce-software]]></category>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[e-commerce-solution]]></category>
            <category><![CDATA[ecommerce]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Wed, 05 Jun 2024 08:33:49 GMT</pubDate>
            <atom:updated>2024-07-09T06:55:19.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Q1bDlOqpOMAkFZSCdSkZWA.png" /></figure><p>Are you looking to add more dynamism and visual appeal to your Shopify store? A marquee section might be what you need! This classic web design element is perfect for highlighting <strong>special offers</strong>, <strong>announcements</strong>, or <strong>key products</strong> in an engaging way.</p><p>Let’s dive into how you can add a marquee section to your Shopify store, and don’t miss the opportunity to grab an easy-to-integrate solution at the end of this post!</p><h3>What is Marquee Section?</h3><p>A marquee section is a scrolling text or image area that can capture the attention of your visitors as soon as they land on your page. It’s a versatile tool to convey important messages, promotions, or updates effectively. By incorporating a marquee, you make sure your key messages don’t go unnoticed.</p><h3>Steps to Add a Marquee Section in Shopify</h3><p>In this section I will talk about adding this marquee section. The marquee section was developed exclusively for Shopify.</p><figure><img alt="A screenshot of the product page “Shopify Marquee (ticker) section”" src="https://cdn-images-1.medium.com/max/1000/1*cWaUyeFMXl0GNG0M4X3KFQ.png" /></figure><ol><li><strong>Access Your Shopify Dashboard</strong><br>First, log in to your Shopify admin panel. This is where all the magic happens, from managing products to customizing your store’s design.</li><li><strong>Choose the Right Theme</strong><br>Not all Shopify themes support marquees out of the box. Choose a theme that offers custom sections or is flexible enough for custom code integration.</li><li><strong>Customize Your Theme</strong><br>Go to the ‘Online Store’ section and click on ‘Themes’. Here, you can either edit your current theme or choose to customize a new one. Look for options to add a new section or edit an existing one.</li><li><strong>Adding Content to Your Marquee</strong><br>In the theme editor, you can add text, images, or links to your marquee section. Be creative but also concise — your marquee should be catchy, not cluttered.</li><li><strong>Styling the Marquee</strong><br>Customize the appearance of your marquee. Adjust the colors, borders, and scrolling direction to match your store’s style and theme.</li></ol><h3>Advanced Customization Options</h3><p>If you’re comfortable with HTML/CSS, the sky’s the limit! You can create more intricate designs or animations for your marquee. Alternatively, consider hiring a professional if you’re aiming for something more complex.</p><h3>Don’t have the time?</h3><p>Don’t have the time or skills to customize? No worries! You can find beautifully designed, ready-to-use marquee sections at <a href="https://shop.myerswebagency.com/?ref=blog.devmoek.com">SS&amp;T</a>. The marquee sections are easy to integrate and can significantly elevate the look of your Shopify store.</p><h3>Conclusion</h3><p>Adding a marquee to your Shopify store is a fantastic way to engage visitors and highlight important content. Whether you decide to customize one yourself or opt for a pre-designed solution, the impact on your store’s aesthetic and functionality can be substantial.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48ea4b26d822" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Choose a Shopify Theme?]]></title>
            <link>https://myersdev.medium.com/how-to-choose-a-shopify-theme-17160038467c?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/17160038467c</guid>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[ecommerce-web-development]]></category>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[shopify-theme]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Fri, 05 Jan 2024 18:39:23 GMT</pubDate>
            <atom:updated>2024-01-05T18:39:23.447Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SSrv4UxU0v71jledh0VGYw.png" /></figure><p>Choosing the right Shopify theme is crucial for the success of your online store. It’s not just about aesthetics. The right theme can significantly enhance user experience, boost sales, and reflect your brand’s unique identity.</p><h3>Table of Contents</h3><ul><li>Understand your brand and audience</li><li>Key features to look for in a theme</li><li>Possible mistakes</li><li>Conclusion</li></ul><h3>Understanding Your Brand and Audience:</h3><p>A Shopify theme should be a reflection of your brand’s personality and values. It’s essential to have a clear understanding of your brand identity. Equally important is knowing your target audience. What appeals to them? What kind of shopping experience are they looking for? Aligning your theme with both your brand and customer expectations is the first step towards e-commerce success.</p><h3>Key Features to Look for in a Shopify Theme</h3><p>A good Shopify theme should be responsive, fast to load, and easy to navigate. Look for SEO-friendly designs to boost your store’s visibility. Ensure the theme is compatible across different browsers and devices. Customization is key — your theme should allow you to tailor your store to meet your specific needs without extensive coding.</p><p>If you already have a theme that you would like to improve I can help you.</p><p><em>I have 4 years of experience developing websites and web applications. Latest 3 years I’m making custom themes and customizing Shopify stores.</em></p><h4>Design and Aesthetics</h4><p>First impressions matter. The visual appeal of your store can make or break a customer’s decision to explore further. Choose a theme with an appropriate color scheme, legible typography, and a clean layout. Flexibility in design is important, but remember, it shouldn’t come at the cost of performance.</p><h4>Evaluating User Experience</h4><p>User experience is paramount. Features like easy search functionality, efficient product filters, and a smooth checkout process are essential. Ensure that the theme provides a consistent and seamless experience across all devices.</p><h4>Theme Support and Updates</h4><p>Try to find a theme that comes with reliable customer support and regular updates. This ensures your store stays secure and incorporates the latest features and design trends. Themes from reputable developers often come with better support and update services.</p><h4>Reviews and Ratings</h4><p>Don’t forget to check reviews and ratings from other users. They can offer valuable insights into the theme’s performance, ease of use, and reliability.</p><h4>Budget Considerations</h4><p>While free themes can be a great starting point, premium themes offer more advanced features and customization options. Consider it an investment in your business’s future. However, always balance it with your budgetary constraints.</p><h4>Making the Final Decision</h4><p>Sum up your requirements, and compare the shortlisted themes against them. Take your time and ensure that your final choice aligns with your business goals, aesthetic preferences, and functional requirements.</p><h3>Possible mistakes of choosing a Shopify theme</h3><p>If it’s your first time choosing a theme, consider hiring a professional to help you.</p><p>If you have experience in development, you might know what is the clean code mean. So, when you bought a theme from a third-party developer, usually the quality of code isn’t so good. I’m not saying that the third-party themes are bad. The big problem for these themes is theme requirements.</p><h4>-All official themes must meet all of the requirements to be published on the Shopify Theme Store. If a theme is missing any of the requirements in <a href="https://shopify.dev/docs/themes/store/requirements?ref=blog.devmoek.com">this list</a>, then a submission will be rejected and a developer will need to make further changes to your theme before it can be resubmitted.</h4><p>It means that official themes are verified by developers from Shopify. It’s a guarantee that the product was made with a good quality.</p><p>And as you may assume, the third-party themes may skip these important requirements, because they are selling outside of the official theme store.</p><h3>Conclusion</h3><p>Selecting the right Shopify theme is a critical decision that can significantly impact the success of your online store. Take into account your brand identity, customer preferences, theme features, design aesthetics, user experience, support, reviews, and budget before making your choice.</p><h3>Need help?</h3><p>If you are looking for help choosing a right theme for your business, let me know.</p><p><em>I made a bunch of Shopify stores and worked with a lot of different Shopify themes. I know what theme would fit your store perfectly.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17160038467c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to add Header and Footer in Nuxt 3]]></title>
            <link>https://myersdev.medium.com/how-to-add-header-and-footer-in-nuxt-3-143697e08aee?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/143697e08aee</guid>
            <category><![CDATA[nuxtjs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[nuxt-3]]></category>
            <category><![CDATA[nuxt]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Sun, 17 Dec 2023 20:49:19 GMT</pubDate>
            <atom:updated>2023-12-17T20:49:19.441Z</atom:updated>
            <content:encoded><![CDATA[<p>Headers and footers are like the bookends of a webpage — they frame everything nicely and keep it all together. In Nuxt 3, these header and footer parts can be made easily using its special way of building things called “components.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6tY_XsPjuHyyn-kKqPdFzw.png" /></figure><p><a href="https://blog.devmoek.com/add-header-footer-nuxt3/"><em>Originally published at blog.devmoek.com</em></a></p><p>Also, we will fix a bug when you may see that after navigating between pages the footer is “jumping”.</p><h3>Understanding Nuxt 3’s Component Architecture</h3><p>Nuxt 3 is all about breaking things into smaller pieces called “components.” It’s a bit like building with Lego — you create different parts and snap them together to make something cool. Headers and footers are like those special Lego blocks that you can use over and over.</p><h3>Using the Header and Footer</h3><p>Once the header and footer are ready, we’ll make them show up on all pages using layout. Or, if you want, you can pick where it shows up — like on some pages and not on others. In that case, you will need to create different layouts.</p><h3>Create a default layout</h3><p>In my application I don’t need different layouts. I will have just one called default.vue. So, create a folder layouts in a root directory of your project and create a default.vue file. In that file we will have that piece of code:</p><pre>&lt;template&gt;<br>  &lt;div&gt;<br>    &lt;slot /&gt;<br>  &lt;/div&gt;<br>&lt;/template&gt;</pre><p>Once we done with layout we need to make it visible on the page — add the layout to the app.vue file like so:</p><pre>&lt;template&gt;<br>  &lt;NuxtLayout&gt;<br>    &lt;Header /&gt;<br>    &lt;NuxtPage /&gt;<br>    &lt;Footer /&gt;<br>  &lt;/NuxtLayout&gt;<br>&lt;/template&gt;</pre><blockquote>I’m assuming that you already have Header and Footer in your project</blockquote><h3>Troubleshooting</h3><p>If you paste the code above in your project and footer “jumps” to the top of the page when you navigate between pages, that’s because we need to make our page as a unique node. To make that we need to put our &lt;NuxtPage /&gt; into div.</p><pre>&lt;template&gt;<br>  &lt;NuxtLayout&gt;<br>    &lt;Header /&gt;<br>    + &lt;div&gt;<br>        &lt;NuxtPage /&gt;<br>    + &lt;/div&gt;<br>    &lt;Footer /&gt;<br>  &lt;/NuxtLayout&gt;<br>&lt;/template&gt;</pre><p>Now that glitch effect should be gone.</p><h3>Conclusion</h3><p>Headers and footers might seem like small things, but they’re super important in making a website look and feel just right. With Nuxt 3, it’s easy to make these parts and use them again and again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=143697e08aee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Added Multiple Products To The Shopify Cart]]></title>
            <link>https://myersdev.medium.com/how-i-added-multiple-products-to-the-shopify-cart-406923edfb12?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/406923edfb12</guid>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[shopify-store]]></category>
            <category><![CDATA[shopify-theme]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Thu, 21 Sep 2023 16:53:32 GMT</pubDate>
            <atom:updated>2023-10-29T14:48:15.150Z</atom:updated>
            <content:encoded><![CDATA[<h3>How To Use Shopify Cart API and Add Multiples Products To The Cart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7EiFkc86tK59Hj0uvPuLQ.png" /></figure><p>Recently <a href="https://lnkd.in/dBnMMJWj">I said I’m working on a configurator in Shopify</a> without any apps. And here’s an update. I’m attaching the screencast of how it works so far. It’s not 100% done and I found a couple of bugs recently. Anyway, the pre-build version is ready and I’m happy to share it with you.</p><h3>The issues before starting</h3><p>This configurator took a lot of time and resources.</p><p>The first issue was to properly design it. The design I got from the client was… not in good shape. There was nothing about the different conditions of the products. For example, out-of-stock, discounts, adding products to the cart error, etc. The design didn’t have it and I started to make it myself.</p><p>And the second one is to build it. In the process of making it live, if properly say when I started to debug it. I tested the prices, and the main question was <strong>“Are the prices shown correctly?”</strong>. On the fifth screen, I added the prices of the products that the user chose. In the design, prices aren’t included. I found it helpful to show the prices to the user again.</p><h3>The working process</h3><p>Firstly was made an HTML version. Secondly, I converted it to Liquid code. The problem with HTML is that the products and prices were hard-coded. And with Liquid code all the data is dynamic and customizable through the theme editor which is super cool!</p><h3>The issue after starting</h3><p>The main issue was to add multiple products to the cart. I thought about how to make it properly read the documentation (a lot). I read on Shopify discussions, and asked different developers about <strong>“how to add multiple products to the cart from one click?”</strong> — No luck at all. I tried it on my test Shopify store because thought maybe the problem was in a theme I worked on. But no, the problem was in me :) Later I got an idea and implemented this into the configurator.</p><p>The users can add multiple products to the cart now (not sure of the limit of how many products they can add, but 10 it’s 100%).</p><h3>The solution</h3><p>To add multiple products to the cart you need to send to the <a href="https://shopify.dev/docs/api/ajax/reference/cart">Cart API</a> an items object with product ID and the quantity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/0*Erb1f3lLqUVvVCaw" /></figure><p>But be sure to send a variant ID of the product instead of product ID, if your product has variants.</p><pre>items: [<br>  {<br>   id: 36110175633573,<br>   quantity: 2<br>  }<br>]</pre><p>Here’s how I made a fetch request:</p><pre>document.querySelectorAll(&quot;form.configurator-form&quot;).forEach((form) =&gt; {<br>  form.addEventListener(&quot;submit&quot;, async (e) =&gt; {<br>    e.preventDefault();<br><br>    // Show loading spinner<br>    const loadingOverlays = document.querySelectorAll(&quot;.loading-overlay&quot;);<br>    loadingOverlays.forEach((overlay) =&gt; overlay.classList.remove(&quot;hidden&quot;));<br><br>    // Collect product data<br>    const productData = selectedProducts.map((product) =&gt; ({<br>      id: product.id,<br>      quantity: 1,<br>      variantId:<br>        product.variantId &amp;&amp; product.variantId !== product.id<br>          ? parseInt(product.variantId)<br>          : undefined,<br>    }));<br><br>    const requestBody = {<br>      items: productData,<br>    };<br><br>    // Add products to cart<br>    await fetch(`${window.Shopify.routes.root}cart/add.js`, {<br>      method: &quot;POST&quot;,<br>      headers: {<br>        &quot;Content-Type&quot;: &quot;application/json&quot;,<br>      },<br>      body: JSON.stringify(requestBody),<br>    });<br><br>    // Get updated cart data<br>    const res = await fetch(&quot;/cart.json&quot;);<br>    const cart = await res.json();<br><br>    // Update cart count<br>    document.querySelectorAll(&quot;.cart-count-bubble&quot;).forEach((el) =&gt; {<br>      el.textContent = cart.item_count;<br>    });<br><br>    // Navigate to cart page<br>    window.location.href = &quot;/cart&quot;;<br>  });<br>});</pre><h3>Overall</h3><p>I like the project. It will be great for users to get the unique experience and build the box they want. That was a real challenge and I gained a lot of experience from this project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=406923edfb12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shopify Edition Summer 2023 - Key Features]]></title>
            <link>https://myersdev.medium.com/shopify-edition-summer-2023-key-features-7f41542f8a5e?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f41542f8a5e</guid>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[shopify-store]]></category>
            <category><![CDATA[updates]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Fri, 11 Aug 2023 13:11:27 GMT</pubDate>
            <atom:updated>2023-08-11T13:11:27.156Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="A text with a title of this article" src="https://cdn-images-1.medium.com/max/1024/1*DnNUymHlmAznqBaQz2ue8Q.png" /></figure><p>Shopify Summer 2023 edition brings a host of new features and improvements, in this article I’ve posted the keys from the update, let’s find out what’s new.</p><h3>Sidekick — AI Commerce Assistant</h3><p>Sidekick is Shopify’s AI-enabled commerce assistant that helps merchants start, run, and grow their businesses. Sidekick can answer queries, perform tasks, create discounts, redesign stores, and generate content.</p><h3>Shopify Magic</h3><p>Shopify Magic combines AI with Shopify’s data to help merchants work faster, smarter, and more creatively. It can generate blog content, optimize email campaigns, provide help center answers, and suggest Inbox chat responses.</p><h3>Online Store Editor Flex Sections</h3><p>The new flex sections feature in the Online Store editor allows merchants to easily create custom layouts using drag-and-drop blocks without coding. Merchants can add, remove, and rearrange sections and customize them with their own content.</p><h3>Shopify Collective</h3><p>Shopify Collective lets merchants sell new products from Shopify brands without managing inventory or shipping. Merchants can curate complementary products to expand their product range effortlessly.</p><h3>Shopify Subscriptions App</h3><p>The new Shopify Subscriptions app allows merchants to offer their products as subscriptions, increasing recurring revenue and customer loyalty.</p><h3>Improved Checkout</h3><p>Shopify’s checkout has been enhanced with a one-page checkout, checkout extensions, and integrations to help merchants customize checkout and drive higher conversion rates.</p><h3>New Developer Tools and APIs</h3><p>Shopify has released over 20 new tools and APIs to help developers build customized commerce experiences and extend Shopify.</p><h3>Other Updates</h3><ul><li>New B2B features like volume pricing, PO numbers, and PayPal payments</li><li>Custom email templates and high-volume pricing plans for Shopify Email</li><li>Enhanced Shopify POS features for retail stores</li><li>Streamlined order management tools like smart order routing and split fulfillments</li><li>An updated visual design for the Shopify admin</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f41542f8a5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Shopify Theme Development]]></title>
            <link>https://myersdev.medium.com/shopify-theme-development-9c38952440a7?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c38952440a7</guid>
            <category><![CDATA[shopify-developer]]></category>
            <category><![CDATA[shopify-development]]></category>
            <category><![CDATA[shopify-theme]]></category>
            <category><![CDATA[shopify]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Sat, 13 May 2023 14:50:05 GMT</pubDate>
            <atom:updated>2023-05-13T14:50:05.383Z</atom:updated>
            <content:encoded><![CDATA[<p>Shopify is a popular e-commerce platform that allows individuals and businesses to set up an online store quickly and easily. One of the key features of Shopify is its theme development capabilities, which allow users to create custom designs for their online stores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OAvJYRl2hicnVioG1r4bww.jpeg" /></figure><h3><strong>What is Shopify?</strong></h3><p>Shopify is a popular e-commerce platform that allows businesses of all sizes to create and manage their online stores. It provides a variety of tools and features that make it easy to build and customize an online store, accept payments, manage inventory, and track sales. Shopify also offers a range of integrations with third-party apps and services, as well as built-in marketing and SEO tools to help businesses promote their online stores and reach more customers.</p><h3><strong>Shopify Development</strong></h3><p>If you’re interested in developing your own Shopify theme, there are a few key things you should keep in mind. First, it’s important to have a solid understanding of HTML, CSS, and JavaScript. These are the three core technologies that are used to create web pages and applications, and they are essential for creating a custom Shopify theme.</p><p>Once you have a solid grasp of these technologies, you can begin exploring the Shopify theme development environment. This includes using Shopify’s theme editor to customize the look and feel of your store, as well as using Liquid, Shopify’s templating language, to create dynamic content.</p><p>Some of the key features you’ll want to consider when developing a Shopify theme include the layout and structure of your store, the typography and color scheme, and the navigation and user interface design. It’s important to create a theme that is visually appealing, easy to navigate, and optimized for conversion, so that your customers can easily find and purchase the products they are looking for.</p><p>Another key consideration when developing a Shopify theme is the mobile user experience. With more and more customers shopping on their mobile devices, it’s essential that your theme is fully responsive and optimized for mobile devices. This means designing with a mobile-first approach and testing your theme thoroughly on a variety of mobile devices and screen sizes.</p><h4><strong>Shopify CLI</strong></h4><p><a href="https://shopify.dev/docs/themes/tools/cli">Shopify CLI</a> (Command Line Interface) is a tool developed by Shopify that allows developers to create, manage, and deploy Shopify apps and themes from their command line interface. It is designed to simplify the development process for Shopify apps and themes, and provides a number of features that can help streamline the development workflow.</p><p>With Shopify CLI, developers can easily create new Shopify apps and themes, manage app and theme code, and run a local development server to test and preview their work. It also provides a range of commands for managing Shopify resources, including products, collections, and customers.</p><p>One of the key benefits of using Shopify CLI is that it allows developers to work with Shopify resources using their preferred tools and workflows. For example, developers can use their favorite text editor or IDE to write code and manage their project, and then use Shopify CLI to manage the deployment and testing of their code.</p><p>Another advantage of Shopify CLI is that it provides access to a range of development and testing tools that can help streamline the development process. For example, developers can use the Shopify CLI to automatically create test data for their apps and themes, and then use Shopify’s testing tools to run automated tests and catch errors early in the development process.</p><p>Shopify CLI is a powerful and flexible tool that can help developers streamline their workflow and simplify the development process for Shopify apps and themes. Whether you are a seasoned developer or just getting started with Shopify development, Shopify CLI is a tool worth exploring.</p><h4>Shopify theme check</h4><p>Shopify Theme Check is a free tool provided by Shopify that allows developers and merchants to check their Shopify themes for compliance with best practices, performance, and security standards.</p><p>Shopify Theme Check runs a series of tests on the theme code to ensure that it follows Shopify’s recommended guidelines for building themes. It checks for common errors, such as missing or incorrect template files, as well as performance issues like slow page load times.</p><p>The tool also provides a detailed report on any issues it finds, with suggestions for how to fix them. By using Shopify Theme Check, developers and merchants can ensure that their themes are optimized for speed and usability, and that they meet the necessary security and performance standards.</p><p>Overall, Shopify Theme Check is a valuable tool for anyone building or using Shopify themes, as it helps to ensure that the theme is well-optimized and provides a positive user experience for customers.</p><h4>Installation</h4><ul><li><a href="https://shopify.dev/themes/tools/cli/install">Install Theme Check with Shopify CLI</a></li><li><a href="https://shopify.dev/themes/tools/theme-check/vscode">Install the Shopify Liquid Visual Studio Code extension</a></li></ul><p>It’s important to note that Shopify Theme Check is a tool for developers and requires some technical knowledge to use effectively. If you’re not comfortable with code or don’t understand the errors and warnings that are returned, you may want to seek the help of a developer or Shopify Expert to address any issues that are identified.</p><h3><strong>Documentation</strong></h3><p>One of the best ways to get started with Shopify theme development is to explore the available resources and documentation. Shopify has a wealth of resources available to help you get started, including detailed documentation on Liquid, the theme editor, and various other features.</p><p>In addition to the official documentation, there are also a number of third-party resources available, including online courses, tutorials, and forums. These can be a great way to learn more about Shopify theme development and get advice and guidance from experienced developers.</p><h3><strong>Testing and optimization</strong></h3><p>When it comes to actually building your Shopify theme, one of the most important things to keep in mind is the importance of testing and optimization. A good Shopify theme should be optimized for speed, usability, and search engine optimization (SEO), as these are all critical factors in ensuring that your store is successful.</p><p>To optimize your theme, you’ll need to pay close attention to factors such as page load times, image sizes, and user interface design. You’ll also want to ensure that your theme is fully accessible and meets the latest web accessibility standards.</p><p>In addition to these technical considerations, it’s also important to think about the overall user experience of your store. This includes things like the layout and structure of your site, the placement of key elements such as product descriptions and calls to action, and the overall ease of use and navigation.</p><h3><strong>Overall</strong></h3><p>Overall, developing a Shopify theme requires a combination of technical skills, design expertise, and a deep understanding of e-commerce best practices. By keeping these key considerations in mind, you can create a custom theme that not only looks great, but also helps you drive sales and grow your business.</p><p>You can <a href="mailto:info@devmoek.com">hire me</a> as a Shopify Developer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c38952440a7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 10 Freelance Platforms]]></title>
            <link>https://myersdev.medium.com/top-10-freelance-websites-17131443b8b9?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/17131443b8b9</guid>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[freelance]]></category>
            <category><![CDATA[work-from-home]]></category>
            <category><![CDATA[websites-for-freelancing]]></category>
            <category><![CDATA[freelancers]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Sat, 25 Mar 2023 13:02:39 GMT</pubDate>
            <atom:updated>2023-12-18T11:05:55.048Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you looking for freelance work opportunities? In today’s digital age, there are numerous websites that provide platforms for freelancers to connect with clients and find work. As a freelancer, it can be challenging to find work, especially when you’re just starting out. Fortunately, there are many freelance websites out there that can help you find the perfect job. Here are the top 10 freelance websites that you should check out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAJb0P_LZg-SnBNtqwuZ6w.png" /></figure><h3><strong>Upwork</strong></h3><p><a href="https://upwork.com">Upwork</a> is one of the largest freelance websites with a vast number of job postings. It is perfect for writers, designers, developers, and marketers. The site offers a variety of job opportunities with different payment structures, including hourly and fixed-rate projects. It also has a feature called Upwork Pro, which connects businesses with top-rated freelancers for large-scale projects. Upwork is a great choice for freelancers who are just starting out or for those who want to expand their client base.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oV8KteIPKeg3GpjnD-JbCQ.jpeg" /></figure><h3><strong>Freelancer</strong></h3><p><a href="https://freelancer.com">Freelancer</a> has a user-friendly interface and provides jobs in various categories, including writing, designing, and programming. This platform offers a unique feature called “Contests,” where clients can host a competition for a particular project, and freelancers can submit their work to win the prize money. Freelancer also has a mobile app that allows freelancers to search for jobs and manage their profiles on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdrSAQVZYKZEy6Y5pzCTqA.png" /></figure><h3><strong>Fiverr</strong></h3><p><a href="http://www.fiverr.com/s2/c01a98358c">Fiverr</a> is an excellent platform for freelancers who specialize in creative services like graphic design, video editing, and copywriting. As the name suggests, Fiverr started as a platform where freelancers could offer their services for $5. However, the site has evolved, and now freelancers can set their own rates. Fiverr also has a feature called “Gigs,” which allows freelancers to offer pre-packaged services to clients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6oBisvoFLOaTWZEQR-BOg.png" /></figure><h3>Toptal</h3><p><a href="https://toptal.com">Toptal</a><strong> </strong>is an exclusive platform that provides access to the best freelancers in the industry. It is perfect for businesses that need high-quality work. Toptal has a rigorous screening process that ensures that only the top 3% of freelancers are accepted onto the platform. This means that clients can be confident that they are working with the best of the best. Toptal also offers project management and team coordination services, making it a one-stop-shop for businesses looking to outsource their work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ARB_7n2tp5_9N5KNlBFS5Q.png" /></figure><h3>Guru</h3><p><a href="https://guru.com"><strong>Guru</strong></a><strong> </strong>provides job opportunities for freelancers in various categories like web development, design, writing, and marketing. The site has a feature called “SafePay,” which allows clients to deposit funds into an escrow account, and the payment is only released when the project is completed to the client’s satisfaction. Guru also has a collaboration tool that allows freelancers and clients to communicate and share files in real-time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a3KwLMyx-Rq5a5EIgzVsRg.png" /></figure><h3>99designs</h3><p><a href="https://99designs.com/"><strong>99designs</strong></a><strong> </strong>is a platform that is solely dedicated to designers. It provides opportunities for graphic designers, logo designers, and web designers. The site has a unique feature called “Contests,” where clients can host a competition for a particular design project, and freelancers can submit their work to win the prize money. 99designs also has a feature called “Projects,” where clients can work one-on-one with a freelancer to create a custom design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rS9lpVEqEFkl6SGGweKoPA.png" /></figure><h3>PeoplePerHour</h3><p><a href="https://bit.ly/3K59Yxq"><strong>PeoplePerHour</strong></a> is a UK-based freelance website that provides job opportunities for freelancers worldwide. It is perfect for writers, designers, and developers. The site has a feature called “Hourlies,” where freelancers can offer their services for a fixed price. PeoplePerHour also has a mobile app that allows freelancers to search for jobs and manage their profiles on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BSMx3bTcExK8_gsdKF_fCw.png" /></figure><h3><strong>Contra</strong></h3><p>On <a href="https://bit.ly/3z6htxL">Contra</a>, freelancers can create a profile that highlights their skills and experience, search for job opportunities, and apply to projects that match their expertise. The platform covers a wide range of industries, including design, development, writing, marketing, and more.</p><p>Contra also offers features such as escrow payments, project management tools, and dispute resolution to ensure a smooth and secure transaction between freelancers and clients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REb-7BStspB3ijKI0I-f_g.png" /></figure><h3>SimplyHired</h3><p><a href="https://www.simplyhired.com/">SimplyHired</a> is a job search engine that provides job opportunities for freelancers in various categories like writing, designing, and programming. The site has a feature called “Salary Estimator,” which allows freelancers to see the average salary for a particular job in their area. SimplyHired also has a mobile app that allows freelancers to search for jobs and manage their profiles on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hek-uNK57apz3pi2E9uUMQ.png" /></figure><h3>TaskRabbit</h3><p><a href="https://www.taskrabbit.com/">TaskRabbit</a> is a platform that provides opportunities for freelancers who specialize in odd jobs like cleaning, moving, and handyman services. The site has a feature called “Instant Matching,” where freelancers can receive job requests in real-time. TaskRabbit also has a mobile app that allows freelancers to manage their profiles and receive job requests on the go.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqBRvubarPKbL6McJPNNAQ.png" /></figure><h3>Conclusion</h3><p>If you are a freelancer looking for work opportunities, these top 10 freelance websites can help you find the perfect job. Each platform has its unique features and benefits, so it’s worth checking them out to see which one suits your needs. Whether you’re a writer, designer, developer, or marketer, there is a platform out there that can help you achieve your freelance goals. Keep in mind that building a successful freelance career takes time and effort, but with the right platform, you can find high-quality clients and build a thriving career. So, go ahead and start your freelance journey today!</p><p><em>this article was made by AI</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17131443b8b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Add Recently Viewed Section in Shopify?]]></title>
            <link>https://myersdev.medium.com/how-to-add-recently-viewed-section-in-shopify-1e14533aa812?source=rss-33b3c64888b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e14533aa812</guid>
            <category><![CDATA[shopify-theme]]></category>
            <category><![CDATA[shopify]]></category>
            <category><![CDATA[shopify-customization]]></category>
            <category><![CDATA[shopify-developer]]></category>
            <category><![CDATA[shopify-development]]></category>
            <dc:creator><![CDATA[Michael Myers]]></dc:creator>
            <pubDate>Sun, 05 Feb 2023 15:38:33 GMT</pubDate>
            <atom:updated>2023-12-18T07:37:48.747Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*stEj5kFFZIMdTSTl94O3zA.png" /></figure><p>In this article you will know how to add a recent viewed section. This section allows your customers to get better experience with your store.</p><p><a href="https://github.com/devmoek/recently-viewed-section-dawn">GitHub repository</a></p><p>Let’s get started.</p><h3>Create recently-viewed.liquid file</h3><p>Go to sections folder and create recently-viewed.liquid file. Put the code below inside the file:</p><pre>{{ &#39;section-recently-viewed.css&#39; | asset_url | stylesheet_tag }}<br><br><br>&lt;div class=&quot;recently-viewed-wrapper page-width&quot;&gt;<br>    &lt;h2&gt;{{section.settings.heading}}&lt;/h2&gt;<br>    &lt;ul class=&quot;recently-viewed-grid&quot;&gt;<br>    &lt;!-- Recently viewed products will appear here --&gt;<br>    &lt;/ul&gt;<br>&lt;/div&gt;<br><br>&lt;script&gt;<br>function setRecentlyViewedProducts() {<br>  const productData = {<br>    productTitle: &quot;{{ product.title }}&quot;,<br>    productImg: &quot;{{ product.featured_media | img_url: &#39;300x&#39; }}&quot;,<br>    productPrice: &quot;{{ product.price | money }}&quot;,<br>    productUrl: &quot;{{ product.url }}&quot;,<br>    productImageAltText: &quot;{{product.featured_media.alt | escape }}&quot;<br>  };<br>  const productList = [];<br>  let jsonResp, jsonRespArr, jsonRespArrStr;<br>  const numberOfProducts = 8;<br>  productList.push(productData);<br>  const currProductPageTitle = productData.productTitle;<br>  const productDataString = JSON.stringify(productList);<br>  const localData = localStorage.getItem(&quot;recentlyViewedProduct&quot;);<br><br>  if (localData === null) {<br>    localStorage.setItem(&quot;recentlyViewedProduct&quot;, productDataString);<br>  } else if (localData) {<br>    const oldProductData = localStorage.getItem(&quot;recentlyViewedProduct&quot;);<br>    const countProductData = (oldProductData.match(/productTitle/g) || []).length;<br>    const sameProduct = oldProductData.includes(currProductPageTitle);<br>    if (countProductData &lt; numberOfProducts &amp;&amp; sameProduct == false) {<br>      jsonResp = JSON.parse(oldProductData);<br>      jsonRespArr = jsonResp.concat(productList);<br>      jsonRespArrStr = JSON.stringify(jsonRespArr);<br>      localStorage.setItem(&quot;recentlyViewedProduct&quot;, jsonRespArrStr);<br>    } else if (countProductData &gt;= numberOfProducts &amp;&amp; sameProduct == false) {<br>      jsonResp = JSON.parse(oldProductData);<br>      jsonResp.shift();<br>      jsonRespArr = jsonResp.concat(productList);<br>      jsonRespArr = JSON.stringify(jsonRespArr);<br>      localStorage.setItem(&quot;recentlyViewedProduct&quot;, jsonRespArr);<br>    }<br>  }<br>}<br><br>setRecentlyViewedProducts();<br>const localViewed = localStorage.recentlyViewedProduct;<br>function getRecentlyViewedProducts() {<br>  const productData = JSON.parse(localStorage.getItem(&quot;recentlyViewedProduct&quot;));<br>  const recentlyViewedHtml = [];<br>  productData.map(item =&gt; {<br>    recentlyViewedHtml.unshift(`<br>    &lt;li class=&quot;recently-viewed-grid-item&quot;&gt;<br>      &lt;a href=&quot;${item.productUrl}&quot;&gt; <br>  &lt;img class=&quot;recently-viewed-img&quot; src=&#39;${item.productImg}&#39; loading=&quot;lazy&quot; alt=&quot;${item.productImageAltText}&quot;/&gt;<br>      &lt;/a&gt;<br>       &lt;h3&gt;&lt;a class=&quot;recently-viewed-a&quot; href=&quot;${item.productUrl}&quot;&gt;${item.productTitle}&lt;/a&gt;&lt;/h3&gt;<br>       &lt;p&gt;${item.productPrice}&lt;/p&gt;<br>    &lt;/li&gt;<br>   `);<br>  });<br>  const newProductData = `${recentlyViewedHtml.join(&quot;&quot;)}`;<br>  const fullContent = document.getElementsByClassName(&quot;recently-viewed-grid&quot;);<br>  fullContent[0].innerHTML = newProductData;<br>}<br><br>document.addEventListener(&quot;DOMContentLoaded&quot;, function (event) {<br>  getRecentlyViewedProducts();<br>});<br><br>&lt;/script&gt;<br><br>{% schema %}<br>  {<br>    &quot;name&quot;: &quot;Recently Products&quot;,<br>    &quot;settings&quot;: [<br>        {<br>          &quot;type&quot;: &quot;text&quot;,<br>          &quot;id&quot;: &quot;heading&quot;,<br>          &quot;default&quot;: &quot;Recently Viewed&quot;,<br>          &quot;label&quot;: &quot;Heading&quot;<br>        }<br> ]<br>  }<br>{% endschema %}</pre><h3>Create a stylesheet file</h3><p>Navigate to assets folder and create section-recently-viewed.css file, paste the code inside. By the way you can paste CSS into section file. If so, don&#39;t forget to delete first line from the section file and use liquid tags {% style %} <em>your styles here</em> {% endstyle %} to wrap your styles. More about liquid you can read <a href="https://www.shopify.com/partners/shopify-cheat-sheet">here</a>.</p><p>Put the styles below inside the file:</p><pre>.recently-viewed-wrapper {<br>    margin: 1rem auto;<br>  }<br><br>  .recently-viewed-img {<br>    width: 100%;<br>  }<br><br>  .recently-viewed-grid {<br>    display: grid;<br>    grid-gap: 1rem;<br>    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));<br>    list-style: none;<br>    margin:0; <br>    padding: 0;<br>  }   <br><br>  .recently-viewed-grid-item {<br>    display: flex;<br>    flex-direction: column;<br>    text-align: center;<br>  }<br><br>  .recently-viewed-a {<br>    text-decoration: none;<br>    color: #000;<br>  }</pre><h3>Create jquery.product.min.js file</h3><p>It needs to collect and store cookie data. Go to assets and create jquery.product.min.js file and paste the code into it.</p><p>Copy and paste code inside the file:</p><pre>/**<br> * Cookie plugin<br> *<br> * Copyright (c) 2006 Klaus Hartl (stilbuero.de)<br> * Dual licensed under the MIT and GPL licenses:<br> * http://www.opensource.org/licenses/mit-license.php<br> * http://www.gnu.org/licenses/gpl.html<br> *<br> */<br> <br> jQuery.cookie=function(b,j,m){if(typeof j!=&quot;undefined&quot;){m=m||{};if(j===null){j=&quot;&quot;;m.expires=-1}var e=&quot;&quot;;if(m.expires&amp;&amp;(typeof m.expires==&quot;number&quot;||m.expires.toUTCString)){var f;if(typeof m.expires==&quot;number&quot;){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e=&quot;; expires=&quot;+f.toUTCString()}var l=m.path?&quot;; path=&quot;+(m.path):&quot;&quot;;var g=m.domain?&quot;; domain=&quot;+(m.domain):&quot;&quot;;var a=m.secure?&quot;; secure&quot;:&quot;&quot;;document.cookie=[b,&quot;=&quot;,encodeURIComponent(j),e,l,g,a].join(&quot;&quot;)}else{var d=null;if(document.cookie&amp;&amp;document.cookie!=&quot;&quot;){var k=document.cookie.split(&quot;;&quot;);for(var h=0;h&lt;k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+&quot;=&quot;)){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};<br><br> /**<br>  * Module to show Recently Viewed Products<br>  *<br>  * Copyright (c) 2014 Caroline Schnapp (11heavens.com)<br>  * Dual licensed under the MIT and GPL licenses:<br>  * http://www.opensource.org/licenses/mit-license.php<br>  * http://www.gnu.org/licenses/gpl.html<br>  *<br>  */<br>  <br> Shopify.Products=(function(){var a={howManyToShow:3,howManyToStoreInMemory:10,wrapperId:&quot;recently-viewed-products&quot;,templateId:&quot;recently-viewed-product-template&quot;,onComplete:null};var c=[];var h=null;var d=null;var e=0;var b={configuration:{expires:90,path:&quot;/&quot;,domain:window.location.hostname},name:&quot;shopify_recently_viewed&quot;,write:function(i){jQuery.cookie(this.name,i.join(&quot; &quot;),this.configuration)},read:function(){var i=[];var j=jQuery.cookie(this.name);if(j!==null){i=j.split(&quot; &quot;)}return i},destroy:function(){jQuery.cookie(this.name,null,this.configuration)},remove:function(k){var j=this.read();var i=jQuery.inArray(k,j);if(i!==-1){j.splice(i,1);this.write(j)}}};var f=function(){h.show();if(a.onComplete){try{a.onComplete()}catch(i){}}};var g=function(){if(c.length&amp;&amp;e&lt;a.howManyToShow){jQuery.ajax({dataType:&quot;json&quot;,url:&quot;/products/&quot;+c[0]+&quot;.js&quot;,cache:false,success:function(i){d.tmpl(i).appendTo(h);c.shift();e++;g()},error:function(){b.remove(c[0]);c.shift();g()}})}else{f()}};return{resizeImage:function(m,j){if(j==null){return m}if(j==&quot;master&quot;){return m.replace(/http(s)?:/,&quot;&quot;)}var i=m.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?/i);if(i!=null){var k=m.split(i[0]);var l=i[0];return(k[0]+&quot;_&quot;+j+l).replace(/http(s)?:/,&quot;&quot;)}else{return null}},showRecentlyViewed:function(i){var i=i||{};jQuery.extend(a,i);c=b.read();d=jQuery(&quot;#&quot;+a.templateId);h=jQuery(&quot;#&quot;+a.wrapperId);a.howManyToShow=Math.min(c.length,a.howManyToShow);if(a.howManyToShow&amp;&amp;d.length&amp;&amp;h.length){g()}},getConfig:function(){return a},clearList:function(){b.destroy()},recordRecentlyViewed:function(l){var l=l||{};jQuery.extend(a,l);var j=b.read();if(window.location.pathname.indexOf(&quot;/products/&quot;)!==-1){var k=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1];var i=jQuery.inArray(k,j);if(i===-1){j.unshift(k);j=j.splice(0,a.howManyToStoreInMemory)}else{j.splice(i,1);j.unshift(k)}b.write(j)}}}})();</pre><h3>Add the section in product.json file</h3><p>Don’t forget about this step. It’s super important! Go to templates folder and then click on product.json file, paste the code where you would like to show a recently viewed section.</p><pre>    &quot;recently-viewed&quot;: {<br>        &quot;type&quot;: &quot;recently-viewed&quot;,<br>        &quot;settings&quot;: {<br>        }<br>      }</pre><p>Don’t forget to indicate this section in order, like so:</p><pre>&quot;order&quot;: [<br>      &quot;main&quot;,<br>      &quot;recently-viewed&quot;<br>    ]</pre><p>You can see a little bit different product page layout. It’s okay. Hope it helps :)</p><h3>Note</h3><p>You can face with possible issues. For example, the code won’t work in your theme. That’s okay and no worries. Every store can have different settings like integrations or whatever. If so, <a href="mailto:info@devmoek.com">reach me by email</a> I’ll try my best to help you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e14533aa812" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>