Site icon MageComp Blog

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

Magento 2 Display Free for product with price of 000

Magento 2 Display Free for product with price of 000

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!

Exit mobile version