How to Add a Recently Viewed Products Section in Free Shopify Themes

 

In the world of eCommerce, enhancing user experience is key to boosting sales and customer satisfaction. One effective way to achieve this is by adding a “Recently Viewed Products” section to your Shopify store. While many premium Shopify themes include this feature, it’s not readily available in free themes like Dawn, Fresh, or Sales. This guide will walk you through setting up a “Recently Viewed Products” section on these free themes.

 

Why Add a Recently Viewed Products Section in Your Shopify Store?

Before diving into the implementation, here’s why this feature is valuable:

  • Facilitates Purchase Decisions: Online shoppers often take time to decide. Displaying recently viewed products keeps those items top of mind.
  • User Convenience: Customers can easily return to products without searching again.
  • Enhanced User Experience: Adds personalization, making your store more engaging.

 

Step-by-Step Guide to Implement Recently Viewed Products on Shopify Free Themes

 

Follow these steps to implement the “Recently Viewed Products” section in your Shopify store.

Step 1: Create a “recently-viewed” Snippet in Shopify Admin

 

  1. Log in to your Shopify admin and navigate to Online Store > Themes.
  2. Select your theme and click Actions > Edit Code.
  3. In the Snippets folder, click Add a new snippet and name it recently-viewed.liquid.

 

Step 2: Add Custom Code to Track and Display Recently Viewed Products

Check the code into the recently-viewed.liquid snippet:

 

 

 

Recently Viewed

 

 

This code uses Shopify’s product data and local storage to track and display up to four recently viewed products. It’s compatible with various Shopify themes and includes responsive styling for desktop and mobile.

 

Step 3: Render the Snippet on Product Pages

 

  1. In the code editor, open the main-product.liquid file under the Sections folder.
  2. Search for product-media-model.
  3. Add the following line after it to render the snippet:

{% render 'recently-viewed' %}

This ensures the “Recently Viewed Products” section appears on product pages.

 

Step 4: Test and Verify the Feature

  1. Save your changes and preview your store.
  2. Visit a few product pages to simulate user behavior.
  3. Verify that the “Recently Viewed Products” section displays the correct products, persists after page refreshes, and is styled appropriately.

 

Conclusion

Adding a “Recently Viewed Products” section to your Shopify store enhances user experience by making it easier for customers to revisit products they’re interested in. By following these steps, you can implement this feature on free Shopify themes like Dawn, Fresh, or Sales without needing premium plugins. Test thoroughly to ensure compatibility with your theme and enjoy the benefits of a more personalized shopping experience!

 

Comments

We Serve clients globally in diverse industries