Problem with Promotions


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

By kalkhovm - Fri 2 Dec 2011
I have completed the upgrade to 1.3005, and have now found there is a problem with the promotions, when one is activiated my site receives an Error and the customer is unable to access any page in the site. the following is the Error Log report

-----------------------------------------------------------------------------
>>     URL:http://orgasmatoys.com/Promotions.aspx
>>     Page:
-----------------------------------------------------------------------------
>>     02/12/2011 00:15:54
>>     82.1.98.131
>>     DESCRIPTION:
System.InvalidCastException: Operator '=' is not defined for type 'DBNull' and type 'Integer'.
   at Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Object Left, Object Right, Boolean TextCompare)
   at BasketBLL.CalculatePromotions(ArrayList& aryPromotions, ArrayList& aryPromotionsDiscount, Boolean blnZeroTotalTaxRate)
   at Templates_BasketView.LoadBasket()
   at Templates_BasketView.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================


-----------------------------------------------------------------------------
>>     URL:http://orgasmatoys.com/Customer.aspx
>>     Page:
-----------------------------------------------------------------------------
>>     02/12/2011 00:15:58
>>     82.1.98.131
>>     DESCRIPTION:
System.InvalidCastException: Operator '=' is not defined for type 'DBNull' and type 'Integer'.
   at Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(Object Left, Object Right, Boolean TextCompare)
   at BasketBLL.CalculatePromotions(ArrayList& aryPromotions, ArrayList& aryPromotionsDiscount, Boolean blnZeroTotalTaxRate)
   at Templates_BasketView.LoadBasket()
   at Templates_BasketView.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

==================================================
By kalkhovm - Tue 13 Dec 2011
I don't suppose we have a solution to this problem yet? I am still unable to use my Promotions
By Mohammad - Wed 14 Dec 2011
Hi,

Can you run the below 2 queries, and attache the results in a text file ?

SELECT * FROM dbo.tblKartrisPromotions;
SELECT * FROM dbo.tblKartrisPromotionParts;
By kalkhovm - Wed 14 Dec 2011
Hi.

I have attached the results as requested

mark
By Mohammad - Thu 15 Dec 2011
The data seems to be okay, which kartris version you are using ?
By kalkhovm - Fri 16 Dec 2011
I am using version 1.3005
By kalkhovm - Fri 16 Dec 2011
OK bit more information, have just run another end to end test with promos active, what is happening, if the cust is not logged in, and adds items to the basket, the basket does not update, when they then try to get to another page the above error occurs.  Then disabled the promos and went back to the site, basket was popluated with the ordered items.
By TheCalicoTree - Mon 15 Jul 2013
HI kalkhovm,

DId you ever get a resolution to the promotions problem? I'm experiencing exactly the same problem with my website.

Thanks

Helen
By kalkhovm - Mon 15 Jul 2013
I have not had the problem since upgrading to the latest version of Kartris. In the earlier version I ended up disabling promotions completely.
By TheCalicoTree - Tue 16 Jul 2013
Thanks for your reply. Has anyone else had this problem with promotions? Kartris - did you get a bug fix releases?

I'm reluctant to upgrade just to fix the issue, am currently running 1.2002.

Thanks
By Paul - Tue 16 Jul 2013
1.2 will be hard to fix as the bulk of the code is compiled.

From v2.0 onwards, the full code is open, which means fixes can be applied to specific parts, so it should mean issues in older versions can still be patched by copying fixes back from the newer releases.