Display FREE, not $0.00

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