Add QR Code Shopify Custom Coding – Verified Easy Methods

Add QR Code Shopify Custom Coding – Verified Easy Methods

How to Add QR Codes to Your Shopify Store (4 Simple Methods)

QR codes are a fast and user-friendly way to boost engagement with your Shopify store especially for mobile users. Whether you're linking directly to product pages, offering discounts, or enabling order tracking, QR codes make the customer journey smoother and more interactive.

In this guide, we’ll walk you through 4 proven ways to add QR codes to your Shopify store ranging from manual embedding to powerful no-code apps. By the end, you'll know how to create scannable shortcuts that drive more clicks, conversions, and in-store visits.

Methods for Adding QR Code in Shopify

There are 4 methods for adding QR COde in Shopify.

  1. Embed QR Code Using QR Server
  2. QR Code for Discount Links
  3. Create a Custom Section for QR Code
  4. Install Shopify QR Code Generator Apps for Advanced Customizations

 

Method 1: Embed QR Code Using QR Server

Using this method you can generate QR codes for products, discount codes etc. When user scan this QR code user can see the details of the product if it is the product QR code. In this method you can use the QR code generator tools like QRServer to generate the QR code and add this into the theme using liquid. Here is the final result, check the GIF below to see how it will look before we go through the steps.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Follow these steps to Add QR code By Goqr.me

Step 1: Navigate to Online Store > Themes > Edit Code

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 2: Go to the main-product.liquid file or product.liquid depending on the theme you are using.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 3: Add the following code in your desired place where you want the QR code to appear in your storefront.

  
    <div class="qr-code-wrapper">
        <img
            src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data={{ shop.url | append: product.url | url_escape }}"
            alt="QR Code for {{ product.title }}">
        <p>Scan to view this product</p>
    </div>

  

Add the following css optional if you want some styling in your theme.css or base.css file based on the theme. Or directly included into the product.liquid file between <style></style> tags.

    
        <style>
            .qr-code-wrapper {
                text-align: center;
                margin-top: 20px;
            }
            .qr-code-wrapper img {
                border: 1px solid #ddd;
                padding: 10px;
                background: #fff;
            }
        </style>

    

Step 4: Click Save to save the changes.

 

Method 2: QR Code for Discount Links

Discounts in the online Store play a vital role for customer trust and increase conversions. You can create the QR code for different discounts and sent to the user via email, social media plat form or using the promotional banner inside the website. User have to scan the code to get the discount. Here is the final result, check the GIF below to see how it will look before we go through the steps.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 1: Navigate to Shopify Admin > Discounts

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 2: Click on the Create discount button and choose the type of discount you want to add from the list.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 3: For discount code use discount code tab add code of your choice like Summer20. Add the discount value and select the collections or products based on your requirements.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 4: Click Save.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 5: Click on Promote and click on Get a shareable link 

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 6: Copy your discount code link from here.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 7: Got to QR code generator website and paste your code here

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 8: Click on the Embed button.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 9: Adjust the size of the QR code and other settings according to the needs and copy the HTML embed code.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 10: Paste this code in your theme at the desired location like announcement bar, promotional banner etc. or you can send to the customer via emails as well. 

  
        <img class="qr-code__image"src="https://api.qrserver.com/v1/create-qr-code/?color=000000&bgcolor=FFFFFF&data=https%3A%2F%2Ftest-shop-schema-markup.myshopify.com%2Fdiscount%2FFree30&qzone=1&margin=0&size=150x150&ecc=L" alt="qr code" />
        <style>
            .qr-code__image {
                text-align: center;
                border: 1px solid #ddd;
                padding: 10px;
                display: block;
                margin: 0 auto;
            }
        </style>
  

Step 11: For example OS 2.0 theme click on add section and add custom liquid section in your page where you want to show.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 12: After adding embed code click Save. Add appropriate css for styling as per your requirements.

Add QR Code Shopify Custom Coding – Verified Easy Methods


Method 3: Create a Custom Section for QR Code 

If you want more flexibility and freedom, you can create a custom Shopify section that can be placed anywhere on your website. For this, you’ll need coding knowledge. Navigate to Shopify Admin > Themes > Edit code, and in the Sections directory, create a new section and name it something like custom-qr-code-section. Add the coding logic for the QR code and save the changes. Follow these steps to add a custom section in your Shopify store.

Step 1: Navigate to Online store > Themes > Edit code 

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 2 : Create a new section and name it like custom-qr-code.liquid.

Add QR Code Shopify Custom Coding – Verified Easy Methods
Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 3: Add this code here.

  
    {% if section.settings.qr_link != blank %}
        <div class="qr-section">
        <img 
            src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&data={{ section.settings.qr_link }}" 
            alt="QR Code" width="" height="" loading="eager">
        <p>{{ section.settings.caption }}</p>
        </div>
    {% endif %}
    {% schema %}
        {
            "name": "QR Code Section",
            "settings": [
                {
                    "type": "url",
                    "id": "qr_link",
                    "label": "Link to Encode"
                },
                {
                    "type": "text",
                    "id": "caption",
                    "label": "Caption",
                    "default": "Scan the code"
                }
            ],
            "presets": [
                {
                    "name": "QR Code"
                }
            ]
        }
    {% endschema %}

  

Step 4: Click Save.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 5: Navigate to Online Store > Themes > Customize

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 6: Add this Section in your desired page.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 7: Add a link here for which you want to generate QR code. And add css additionally for your styling(Optional).

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 8: View your Online Store to see the results. 

 

Method 4: Use Shopify QR Code Generator Apps for Advanced Customizations 

If you are not comfortable with coding then you can install shopify apps from the Shopify app store and configure it using theme editor. Link this app with your store using App embed setting.  Here is the final result, check the GIF below to see how it will look before we go through the steps.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Follow these steps to add Shopify apps for the QR code from Shopify theme store.

Step 1: Navigate to Shopify Admin > Apps

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 2: Click on All recommended apps button here.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 3: Navigate to the Shopify app store using this link.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 4: search for the app you want to add eg. o2o QR Code Unlimited app.

Step 5: Click on the Install button 

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 6: Open the app settings and click on this Create your first QR code button.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 7: Choose the type of QR code you want to generate for example home page product page etc.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 8: Add name of the Code and set conditions like auto apply discount when scanned and add the discount code here which you created in the Shopify Admin.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 9: Download QR code image from here.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 10: Add this image into your store using Theme Customizer or directly add this using Shopify assets. Draq and drop file to this folder.

Add QR Code Shopify Custom Coding – Verified Easy Methods

Step 11: Navigate to the file where you want to add it and add this code for example in the announcement bar and style it according to the need.

  
    <img style="display: block; margin: 0 auto;" src="{{ 'QR_code_1.png' | asset_url }}" width="200" height="200" alt="QR code">
  

Apps like 

  1. K: QR code generator hub
  2. O2o QR code Unlimited
  3. Spice QR code Generator
  4. Super QR code generator

 

Bottom Line 

Adding QR codes to your Shopify store is a smart and practical way to improve user experience and boost mobile engagement. Whether you're guiding customers to a product page, offering instant discounts, or supporting offline marketing with scannable links, the methods above cover every need from basic embeds to app-powered customizations.

Frequently Asked Questions

QR codes in Shopify can link to product pages, apply automatic discounts, track orders, or show directions to physical store locations—making it easier for mobile users to interact with your store.

Yes! You can use Shopify QR code generator apps that let you create and display QR codes on your store without writing any code.

You can embed a QR code by editing your product template file and using a free QR code API like QRServer to dynamically generate the code for each product.

Yes. Shopify lets you create discount links, and you can generate QR codes for these links using a QR generator, then embed them into your site or share via email.

Absolutely. OS 2.0 themes allow you to use custom Liquid sections or HTML blocks where you can paste your QR code embed code directly.

Comments(0)
You don't have any comments yet

Are You Looking for a Shopify Expert?

We design, develop, optimize, and scale high-converting Shopify stores.

Get in touch
Let's Connect
Shopify Plus eCommerce Development Agency ecomx agency

Looking for a Trusted Ecommerce & Shopify Plus Agency?

We design, develop, optimize, and scale high converting Shopify Ecommerce stores that drive sales.

Get in Touch
Ecomx shopify plus agency about us page Yasin

Looking for a Shopify expert to handle a small task? Shopify Migration Experts Agency Ecomx shopify plus agency

Let’s talk about your project

Shopify Custom Theme Development Services Live Chat