Bug reports
Version 2.x > Bug reports > Workaround: How to set FREE ($0.00) products in e-commerce module View modes: 
User avatar
Member
Member
mufasa - 1/17/2008 11:50:21 PM
   
Workaround: How to set FREE ($0.00) products in e-commerce module
We had a client that needed to offer free items on their site. There were several places in the code that restricted prices to > 0.

We haven't fully tested this, but so far, it works if you edit the following code (modifications were done for v2.3a Enterprise):
~/App_Code/CMSEcommerce/EcommerceFunctions.cs:60

Change the conditional from "price > 0" to "price >= 0"
~/CMSDesk/Tools/Ecommerce/Products/NewProduct.ascx.cs:496

Remove the "(skuiObj.SKUPrice == 0)" conditional (and of course the || (OR) operator that went with it). The new code line should be "if (!ValidationHelper.IsPositiveNumber(temp))".