svn commit: r1620514 - in /ofbiz/trunk/applications: marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java order/src/org/ofbiz/order/shoppingcart/CartEventListener.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1620514 - in /ofbiz/trunk/applications: marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java order/src/org/ofbiz/order/shoppingcart/CartEventListener.java

jacopoc
Author: jacopoc
Date: Tue Aug 26 05:50:50 2014
New Revision: 1620514

URL: http://svn.apache.org/r1620514
Log:
Removed/simplified applications code that was checking the serverstats properties to log some warning messages about vist/visitor tracking being disabled: this is not required since the warnings are already generated by the VisitHandler.

Modified:
    ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java

Modified: ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java?rev=1620514&r1=1620513&r2=1620514&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java (original)
+++ ofbiz/trunk/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java Tue Aug 26 05:50:50 2014
@@ -188,9 +188,7 @@ public class TrackingCodeEvents {
 
         //persist that info by associating with the current visit
         GenericValue visit = VisitHandler.getVisit(request.getSession());
-        if (visit == null && !UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visit", "false")) {
-            Debug.logWarning("Could not get visit, not associating trackingCode [" + trackingCodeId + "] with visit", module);
-        } else {
+        if (visit != null) {
             GenericValue trackingCodeVisit = delegator.makeValue("TrackingCodeVisit",
                     UtilMisc.toMap("trackingCodeId", trackingCodeId, "visitId", visit.get("visitId"),
                     "fromDate", UtilDateTime.nowTimestamp(), "sourceEnumId", sourceEnumId));
@@ -312,9 +310,7 @@ public class TrackingCodeEvents {
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         java.sql.Timestamp nowStamp = UtilDateTime.nowTimestamp();
         GenericValue visit = VisitHandler.getVisit(request.getSession());
-        if (visit == null && !UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visit", "false")) {
-            Debug.logWarning("Could not get visit, not checking trackingCode cookies to associate with visit", module);
-        } else {
+        if (visit != null) {
             // loop through cookies and look for ones with a name that starts with TKCDT_ for trackable cookies
             Cookie[] cookies = request.getCookies();
 

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java?rev=1620514&r1=1620513&r2=1620514&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CartEventListener.java Tue Aug 26 05:50:50 2014
@@ -70,8 +70,7 @@ public class CartEventListener implement
 
             GenericValue visit = VisitHandler.getVisit(session);
             if (visit == null) {
-            if (UtilProperties.propertyValueEqualsIgnoreCase("serverstats", "stats.persist.visit", "false")) return;
-                Debug.logError("Could not get the current visit, not saving abandoned cart info.", module);
+                Debug.logInfo("Could not get the current visit, not saving abandoned cart info.", module);
                 return;
             }