Negative Weight Error


https://forum.kartris.com/Topic6858.aspx
Print Topic | Close Window

By shulemj - Thu 23 Feb 2017
I have been having difficulties setting a negative weight value to an option.

If set with a negative value, it cannot save the options within the product. No issues when setting up the option group with options; only within product.

Here's the error log:
-----------------------------------------------------------------------------
>> OptionsBLL._CreateProductOptions
-----------------------------------------------------------------------------
>> System.ApplicationException
>> 2/23/2017 10:54:53 AM
>> Version:2.9005
>> URL:http://www.SITE.com/Admin/_ModifyProduct.aspx?ProductID=1366&CategoryID=271&strParent=&strTab=options
>> CUSTOM MESSAGE:
Error occurred while processing the operation.
>> MESSAGE:
Error occurred while processing the operation.
>> STACK:
at OptionsBLL._CreateProductOptions(Int32 pProductID, DataTable ptblOptionGroupList, DataTable ptblOptionsList, String& strMsg)
==================================================
By Tiggywiggler - Sat 25 Feb 2017
Negative weights changes are not allowed.

ALTER TABLE [dbo].[tblKartrisProductOptionLink] WITH CHECK ADD CONSTRAINT [CK_ProductOptionLink_WeightChangeValidation] CHECK (([P_OPT_WeightChange]>=(0)))
By shulemj - Sun 26 Feb 2017
I guess so, but the setup screen says it's okay.

(see screenshot)
By Tiggywiggler - Tue 28 Feb 2017
You are correct that it says +/-.

That will need to be corrected for the next release. Thank you for raising it.
By shulemj - Tue 28 Feb 2017
Thanks for the clarification.