Skip to main content

How to Add a Social Proof Block in Shopify Product Page (Dawn Theme)

 Adding social proof to your product pages can significantly increase trust and conversion rates. In this tutorial, we'll show you how to add a stylish Verified Testimonials block to your Shopify store using the Dawn theme . This block displays user avatars, names, and a verified icon—all customizable from the theme editor. ✅ Step 1: Open the main-product.liquid file Go to your Shopify Admin. Navigate to: Online Store → Themes → Edit code . Open the file: sections/main-product.liquid . Now add this code exactly as I’ve shown in the video — and yes, make sure to test it on a duplicate theme first! Full Code {%- when 'verified-testimonials' -%} <style> .verified-testimonials-container-{{block.id}} .verified-testimonials-user-icon-img-class { width: {{block.settings.verified_use...

How to Show Megamenu Links on Hover in Shopify

 Enhancing your Shopify store's navigation can greatly improve the user experience, making it easier for customers to find what they’re looking for. A megamenu can organize links into categories and display them in a clean, visually appealing way. In this blog post, I'll guide you through the process of showing megamenu links on hover using Shopify.



Step 1: Open the file snippets/header-mega-menu.liquid

Step 2: Add the Necessary CSS

First, we need to add some CSS to style the megamenu and ensure it displays correctly on hover.

<style>
  .mega-menu-connector {
    position: relative;
    display: flex;
    justify-content: center;
  }

  .mega-menu-connector:after {
    content: '';
    width: 100%;
    position: absolute;
    opacity: 0;
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .menu-6 ul.mega-menu__list.page-width.mega-menu__list--condensed {
    display: block !important;
  }
</style>

Step 3: Add HTML for the Megamenu Connector after this line <details id="Details-HeaderMenu-{{ forloop.index }}" class="mega-menu">

<div class="mega-menu-connector"><holder></holder></div>




Step 4: Add the jQuery Script

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('.mega-menu').hover(
      function() {
        $(this).find('.mega-menu__content').toggleClass('mega-menu-open');
      }
    );

    document.querySelectorAll(".header__inline-menu details.mega-menu").forEach(item => {
      const toggleOpen = (state) => item.toggleAttribute("open", state);
      item.addEventListener("mouseover", () => toggleOpen(true));
      item.addEventListener("mouseleave", () => toggleOpen(false));
      item.querySelector(".mega-menu__content").addEventListener("mouseover", () => toggleOpen(true));
      item.querySelector(".mega-menu__content").addEventListener("mouseleave", () => toggleOpen(false));
    });
  });
</script>

This script uses jQuery to toggle the megamenu's visibility when a user hovers over it. The toggleClass method adds or removes a class to control the display of the megamenu content.


Conclusion

Implementing a hoverable megamenu in your Shopify store is a straightforward process that involves a few CSS, HTML, and jQuery additions. This small enhancement can significantly improve the usability of your store, making it easier for customers to explore and find products. Happy coding!


Comments

Popular posts from this blog

How to create a Image scrolling/marquee section in Shopify theme

We are excited to unveil our latest addition to the customization options for your website: the Image Marquee section. This dynamic feature allows you to create a continuous scrolling display of your brand logos, offering a visually engaging way to showcase your partners, sponsors, or featured brands. Let's dive into the features and customization options available with the Image Marquee section. Key Features Continuous Scrolling Animation : The marquee animation provides a smooth, continuous scroll of images, giving your site a modern and dynamic feel. Responsive Design : The section is fully responsive, ensuring that your logos look great on desktops, tablets, and mobile devices. Customizable Speed and Direction : Adjust the scroll speed and choose the direction of the animation to fit your design preferences. Interactive Elements : You can enable or disable the pause-on-hover feature, giving visitors the option to pause the marquee for a closer look at the logos. Styling Option...

How to Create Fake Sales Pop-Ups on Your Shopify Store

 How to Create Fake Sales Pop-Ups on Your Shopify Store Adding sales pop-ups to your Shopify store can create a sense of urgency and social proof, encouraging potential customers to make a purchase. While it's always best to be transparent and honest with your customers, some store owners may choose to implement fake sales pop-ups to simulate recent purchases. Here's a step-by-step guide on how to create such pop-ups using custom code in your Shopify store. Step 1: Create a New Section First, you'll need to create a new section in your Shopify theme. To do this, follow these steps: Go to the Shopify Admin Dashboard . Navigate to Online Store > Themes . Click on Actions > Edit Code for the theme you want to modify. Under the Sections directory, click on Add a new section . Name the section customer-purchased . Conclusion This guide walks you through creating a fake sales pop-up on your Shopify store using a custom section. Full code ...

Create a Dynamic Video Slider with Customization Options in shopify

 In the fast-paced world of digital content, captivating your audience's attention is crucial. One effective way to engage your viewers is through dynamic video sliders, seamlessly blending visuals with interactivity. Today, we unveil a versatile solution that not only showcases your video content but also offers customization options to align with your brand's identity. Unveiling the Interface Our video slider combines sleek design with intuitive functionality. Let's dive into its key components: Background Customization: Set the stage with a background color of your choice to complement your brand's aesthetic. Engaging Heading and Text: Craft a compelling message with customizable heading and descriptive text, ensuring your audience stays informed and intrigued. Interactive Play Button: Enhance user engagement with a play button overlay, enticing viewers to interact with your video content. Navigation Arrows: Navigate through the slider effortlessly with customiza...