Magento 2

How to display “Free” for product with $0.00 price in Magento 2

Offering discounts for your online Magento store can be a powerful weapon to drive conversions & customer loyalty. But, besides of that offering free product or services can drastically make an impression on customer mind.

Even some online stores are likely to give the free samples or products to turn their excitement
level up, that makes customer feeling like they’re getting in on something
exclusive and unique. From a business perspective, free stuff is often much
more powerful, and much cheaper than traditional advertising. It’s a simple,
yet useful technique to garners traffic and hook customers as well as encourage
them to make a purchase.

Everyone loves the word ‘FREE’ There’s something about getting free stuff that gets most people’s
blood pumping. Instead of zero pricing product, ‘FREE’ phrase can
help you to grab your customer’s attention easily. That’s why Today I am again
back with a small piece of code that will help you to display “Free” for the
product with $0.00 price of in Magento 2.

You simply need to paste this code into your theme ‘default.phtml‘ file available on below location.
app\design\frontend\YourThemes\Magento_Catalog\templates\product\price\amount\default.phtml

 


getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
    
        
    
    getPriceId()): ?> id=""
        
        data-price-amount=""
        data-price-type=""
        class="price-wrapper ">
        
    
    
        
    
    
        
        
    

    
    Free
    

And that’s it! Now check the price in store frontend and now it will be displayed as “free” instead of “$0.00” amount in your store frontend.
If you are looking for any help regarding above-mentioned code please comment down below.
Happy coding!

Click to rate this post!
[Total: 12 Average: 4.4]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

2 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

2 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

3 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

4 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

6 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

6 days ago