Dev - Fix for "Add All to Cart"

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

Dev - Fix for "Add All to Cart"

Fred Forester-2

Hi All,

add all to cart was incorrectly checking for rental items.

Thanx
Fred


Index: applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java
===================================================================
--- applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (revision 44)
+++ applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartHelper.java (working copy)
@@ -243,11 +243,16 @@
                 itemIter = null;
             }
 
+            String orderItemTypeId = null;
             if (itemIter != null && itemIter.hasNext()) {
                 while (itemIter.hasNext()) {
                     GenericValue orderItem = (GenericValue) itemIter.next();
+                    orderItemTypeId = orderItem.getString("orderItemTypeId");
+                    // do not store rental items
+                    if (orderItemTypeId.equals("RENTAL_ORDER_ITEM"))
+                        continue;
                     // never read: int itemId = -1;
-                    if (orderItem.get("productId") != null && orderItem.get("quantity") != null && ("RENTAL_ORDER_ITEM").equals(orderItem.getString("orderItemTypeId"))) { // do not store rental items
+                    if (orderItem.get("productId") != null && orderItem.get("quantity") != null) {
                         double amount = 0.00;
                         if (orderItem.get("selectedAmount") != null) {
                             amount = orderItem.getDouble("selectedAmount").doubleValue();

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Fix for "Add All to Cart"

Hans Bakker
Hi Fred,

We now have set up Jira on the apache server at:
http://issues.apache.org/jira/browse/OFBIZ

can you please add this there so it will not get lost?

--
Regards,
Hans Bakker
ANT Websystems Co.,Ltd (http://www.antwebsystems.com)

If you want to verify that this message really originates from
from the above person, download the public key from:
http://www.antwebsystems.com/hbakkerAntwebsystems.asc

On Thursday 01 June 2006 21:25, Fred Forester wrote:
> Hi All,
>
> add all to cart was incorrectly checking for rental items.
>
> Thanx
> Fred


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

attachment0 (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Fix for "Add All to Cart"

Fred Forester-2

thanx Hans. I didn't know it moved already.

http://issues.apache.org/jira/browse/OFBIZ-13

Fred

Hans Bakker wrote:

> Hi Fred,
>
> We now have set up Jira on the apache server at:
> http://issues.apache.org/jira/browse/OFBIZ
>
> can you please add this there so it will not get lost?
>
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev