Display FREE, not $0.00

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 10 años
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.
Hace 10 años
Have you considered using the download sample for free products?
Hace 10 años
No, how would I do that?  Would it display as FREE?
Hace 10 años
Are your free products downloadable?
Hace 10 años
In this one case, yes.
Hace 10 años
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.
Hace 10 años
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?
Hace 10 años
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
Hace 7 años
Sorry, nevermind
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.