I'm not seeing a way to do a negative price adjustment based on the selection of an attribute value. The system does not allow a negative $ amount to be entered into the price adjustment field. Anyone know a way to make negative adjustments?
I have a client who would also like to be able to do this. Will it affect anything down the line if I modify the validation in the admin site to allow negative values?
I've made some changes to the code that seem to be working, however I recommend you do some further testing with this... However, from what I see, it makes the adjustment all the way to checkout. The only thing I don't like is how it displays the negative adjustment, but that can be easily worked out. Example: Black [-(30.00)] looks a little funny to me... I would change the formatting like [-30.00] if it were me.
Line 60... Change to: MinimumValue="-999999" MaximumValue="999999" ValidationGroup="ProductVariantAttributeValue"
Line 70... Change to: MinimumValue="-999999" MaximumValue="999999" ValidationGroup="ProductVariantAttributeValue"
Line 180... Change to: MinimumValue="-999999" MaximumValue="999999" RangeErrorMessage="<% $NopResources:Admin.ProductVariantAttributeValues.New.PriceAdjustment.RangeErrorMessage %>"
Line 194... Change to: MinimumValue="-999999" MaximumValue="999999" RangeErrorMessage="<% $NopResources:Admin.ProductVariantAttributeValues.New.WeightAdjustment.RangeErrorMessage %>"
Libraries\Nop.BusinessLogic\Tax\TaxManager.cs
Line 478... Change to this to comment the line out: //price = decimal.Zero;
//PCTech Mod (This is the if statement I added to handle negative numbers) if (priceAdjustmentBase < decimal.Zero) { pvaValueName += string.Format(" [-{0}]", PriceHelper.FormatPrice(priceAdjustment, false, false)); }
Hi, I have looking for something like this in order to create a way for first installment. so have anyone have this code implemented already in there site without error on the check out?