FREE instead 0.00?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Some of our products we offer for free.  Is there a way to have it display FREE text instead of 0.00?

Thank you
Bill
6 years ago
TechBill wrote:
Some of our products we offer for free.  Is there a way to have it display FREE text instead of 0.00?

Thank you
Bill


Unit Price is a string, so you can write a code in PrepareShoppingCartItemModel,PrepareMiniShoppingCartModel, PrepareWishlistItemModel methods of ShoppingCartModelFactory class to display price as "FREE" instead of $0.00. Modify the code after this line in both the methods.
cartItemModel.UnitPrice = _priceFormatter.FormatPrice(shoppingCartUnitPriceWithDiscount);
6 years ago
TechBill wrote:
Some of our products we offer for free.  Is there a way to have it display FREE text instead of 0.00?

Thank you
Bill
.

No need to extra work in controller.

Please check with price field like this.



@If(price field == '$0.00')
{
//Display your own label
}
else
{
//Leave as it is or write default nop containt
}


Hope you will understand..!!
6 years ago
sk5202 wrote:
Some of our products we offer for free.  Is there a way to have it display FREE text instead of 0.00?

Thank you
Bill.

No need to extra work in controller.

Please check with price field like this.



@If(price field == '$0.00')
{
//Display your own label
}
else
{
//Leave as it is or write default nop containt
}


Hope you will understand..!!




What file do I check this in or where do I find it at?

Thank you
Bill
6 years ago
Can anyone give me a little more information on where I edit this into?
6 years ago
TechBill wrote:
Can anyone give me a little more information on where I edit this into?


If you want to add in product box at that time you could add in _productbox.cshtml.

If product detail than you should add productprice page.
6 years ago
TechBill wrote:
Can anyone give me a little more information on where I edit this into?


Hi,

I create a guideline to solves this issue.
Please have a look - Show FREE text instead of 0.00

Hope this helped :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.