I don't really know if I should post this under development, or under general support.... Anyway:
I was wondering if it is possible to allow negative price adjustments for options in products I have noticed that price adjustments work fine when there is a positive price adjustment ( > 0) but I was hoping that you could also work with discount options (money field < 0).
That means if somebody chooses one of these, the price goes down. At the moment this does not show in the combo box
Maybe you can guide me to where this is processed and I can adjust the code myself?
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)); }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.