Developer forum

Forum » Ecommerce - Standard features » Date fields in Order Fields is cleared

Date fields in Order Fields is cleared

Anders Ebdrup
Reply

Hi Dynamicweb,

 

I have a issue with my date fields created as Order Fields as the valued is cleared when not having the field on the cart. I have pasted some code from Dynamicweb.eCommerce.Cart.Frontend.vb and does not understand the line marked with red and I do not understand why a value which is not in the request is updated?

 

                Dim value As String = Base.Request(orderFieldValue.OrderField.SystemName, False)
                Dim fieldType As String = fieldTypes.GetFieldType(orderFieldValue.OrderField.TypeID).DWName.ToLower()
                ' date/datetime control doesn't produce request with systemname
                If value Is Nothing AndAlso Not {"date", "datetime"}.Contains(fieldType) Then
                    Continue For
                End If

                Dim valueChanged As Boolean = value <> Base.ChkString(orderFieldValue.Value)
                If fieldType.Equals("checkbox") Then
                    valueChanged = Base.ChkBoolean(orderFieldValue.Value) = (value <> "")
                ElseIf fieldType.Equals("date") OrElse fieldType.Equals("datetime") Then
                    valueChanged = Not Base.ChkDate(orderFieldValue.Value).Equals(Dates.ParseAsDate(orderFieldValue.OrderField.SystemName))
                End If

Is tries to compare whether the current date in the OrderField is the same as the SystemName? I hope that someone can solve this for me?

 

Best regards, Anders


Replies

 
Alexander Gubenko
Reply

Hi Anders,

Thank you for your request!
This is bug. I created issue#17346. The fix will appear in next 861 release.

 
Anders Ebdrup
Reply

Hi Alexander,

 

Thanks for your respond. Just to make sure that you are aware that we have two issues?

  1. Date fields are updated even though a matching input field is not in the request
  2. Date fields are updated even though it have the same value as last time

 

Best regards, Anders

 
Alexander Gubenko
Reply

Yes, we was aware! And will fix both soon!

Thanks!

 
Anders Ebdrup
Reply

Hi Alexander,

 

Has this problem been fixed yet? As I cannot see it in the release notes for 8.6.1

 

Best regards, Anders

 
Nicolai Høeg Pedersen
Reply

Hi Anders

It was fixed this Friday and will be released with the next 8.6.1. hotfix.

NP

 
Kristian Kirkholt
Reply

Hi Anders

The problem TFS#17346 (Date or Datetime order fileds always trigger value changed events)  has now been fixed in version 8.6.1.12

You are able to find this build in the download section:

http://developer.dynamicweb-cms.com/downloads/dynamicweb-8.aspx

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum