Display FREE, not $0.00

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Version 2.8 ... what would be the recommended way to display a $0.00 price as FREE, everywhere on the site?  I'd like to change the least code possible to make this happen, without negative side-effects.
10 years ago
Have you considered using the download sample for free products?
10 years ago
No, how would I do that?  Would it display as FREE?
10 years ago
Are your free products downloadable?
10 years ago
In this one case, yes.
10 years ago
In admin area you can navigate to:

Configuration  > Languages

Filter value equal to
Download Sample

Resource Name

products.downloadsample


And edit the value accordingly. :-)

That would work for downloadable products that are free.
10 years ago
mwoffenden wrote:
what would be the recommended way to display a $0.00 price as FREE, everywhere on the site?


--------------------------------------------------------------------------------------------------------------
Maybe a work item would be suitable for freebies?


Using Download Sample and changing the button text value to free - does the product still show $0.00?



I'm guessing you would want to select 'mark product as free' option in product administration.

<span class="price equals zero">@Model.ProductPrice.Free?
10 years ago
Hi

This is how I have done it, I changed the _ProductBox view with the following

               @{
                    var cnt = 1;
                    var price = Model.ProductPrice.Price;
                    if (price.Contains("From"))
                    {
                        cnt = 6;
                    }
                    price = price.Remove(0, cnt);  
                  }
                   @if (decimal.Parse(price) > 0)
                    {
                        <span class="price actual-price">@Model.ProductPrice.Price</span>
                    }
            else
            {
                <div>@T("Product.NoChargeText")</div>          
            }

No very elegant but it works
6 years ago
Sorry, nevermind
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.