Class ShoppingCart
java.lang.Object
org.apache.ofbiz.order.shoppingcart.ShoppingCart
- All Implemented Interfaces:
Serializable
,Iterable<ShoppingCartItem>
- Direct Known Subclasses:
WebShoppingCart
Shopping Cart Object
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
don't allow empty constructorShoppingCart
(Delegator delegator, String productStoreId, String webSiteId, Locale locale, String currencyUom) Creates new empty ShoppingCart object.ShoppingCart
(Delegator delegator, String productStoreId, String webSiteId, Locale locale, String currencyUom, String billToCustomerPartyId, String billFromVendorPartyId) Creates new empty ShoppingCart object.ShoppingCart
(Delegator delegator, String productStoreId, Locale locale, String currencyUom) Creates a new empty ShoppingCart object.ShoppingCart
(ShoppingCart cart) Creates a new cloned ShoppingCart Object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalPartyRole
(String partyId, String roleTypeId) Associates a party with a role to the order.int
addAdjustment
(GenericValue adjustment) Add an adjustment to the order; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is createdvoid
addContactMech
(String contactMechPurposeTypeId, String contactMechId) Add a contact mech to this purpose; the contactMechPurposeTypeId is requiredvoid
addFreeShippingProductPromoAction
(GenericValue productPromoAction) Adds a ProductPromoAction to be used for free shipping (must be of type free shipping, or nothing will be done).void
addInternalOrderNote
(String note) Add internal order note.int
addItem
(int index, ShoppingCartItem item) Add an item to the shopping cart.addItemGroup
(String groupName, String parentGroupNumber) Creates a new Item Group and returns the groupNumber that represents itaddItemGroup
(GenericValue itemGroupValue) Add item group shopping cart item group.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an accommodation(rental)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an accommodation(rental)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersonsDbl, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an accommodation(rental/aggregated)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an (rental)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an (rental)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an (rental/aggregated)item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, ProductConfigWrapper configWrapper, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an item to the shopping cart.int
addItemToEnd
(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, Object> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an item to the shopping cart.int
addItemToEnd
(ShoppingCartItem item) Add an item to the shopping cart.int
addNonProductItem
(String itemType, String description, String categoryId, BigDecimal price, BigDecimal quantity, Map<String, Object> attributes, String prodCatalogId, String itemGroupNumber, LocalDispatcher dispatcher) Add a non-product item to the shopping cart.void
addOrderNote
(String note) Add order note.int
addOrderTerm
(String termTypeId, String orderItemSeqId, BigDecimal termValue, Long termDays, String textValue, String description) Add order term int.int
addOrderTerm
(String termTypeId, BigDecimal termValue, Long termDays) Add an orderTerm to the orderint
addOrderTerm
(String termTypeId, BigDecimal termValue, Long termDays, String textValue) Add an orderTerm to the orderint
addOrderTerm
(GenericValue orderTerm) Add an orderTerm to the orderint
addOrIncreaseItem
(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Timestamp reserveAfterDate, Map<String, GenericValue> features, Map<String, Object> attributes, Map<String, String> orderItemAttributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cart and order item attributesint
addOrIncreaseItem
(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, Object> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cartint
addOrIncreaseItem
(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, Object> attributes, Map<String, String> orderItemAttributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cart and order item attributesint
addOrIncreaseItem
(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, Object> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) Add an item to the shopping cart, or if already there, increase the quantity.addPayment
(String id) adds a payment method/payment method typeaddPaymentAmount
(String id, BigDecimal amount) adds a payment method/payment method typeaddPaymentAmount
(String id, BigDecimal amount, boolean isSingleUse) adds a payment method/payment method typeaddPaymentAmount
(String id, BigDecimal amount, String refNum, String authCode, boolean isSingleUse, boolean isPresent, boolean replace) adds a payment method/payment method typevoid
addPaymentRef
(String id, String ref, String authCode) adds a payment refaddProductPromoCode
(String productPromoCodeId, LocalDispatcher dispatcher) Adds a promotion code to the cart, checking if it is valid.void
addProductPromoUse
(String productPromoId, String productPromoCodeId, BigDecimal totalDiscountAmount, BigDecimal quantityLeftInActions, Map<ShoppingCartItem, BigDecimal> usageInfoMap) add product promo useint
Add ship info int.protected boolean
checkShipItemInfovoid
cleanUpShipGroupsvoid
clear()
Clears out the cart.void
clear all adjustmentsvoid
clear all item statusvoid
clear all promotion adjustmentsvoid
clear all promotion informationvoid
clear cart item use in promo infovoid
clearDeclinedPaymentMethods
(Delegator delegator) remove declined payment methods for an order from cart.void
Clear internal order notes.void
Clear item ship info.void
Clear order notes.void
clearPayment
(int index) removes a specific payment info from the listvoid
clearPayment
(String id) removes a specific payment method/payment method typevoid
clearPaymentMethodsById
(List<String> paymentMethodIdsToRemove) remove all the paymentMethods based on the paymentMethodIdsvoid
clears all payment method/payment method typesvoid
clear out info for general promo usevoid
confirmPromoRuleUse
(String productPromoId, String productPromoRuleId) confirm promo rule useboolean
contain all work effort cart item checkboolean
Contain any work effort cart items boolean.boolean
Check to see if the cart contains only Digital Goods, ie no Finished Goods and no Finished/Digital Goods, et cetera.boolean
containOnlyDigitalGoods
(int shipGroupIdx) Check to see if the ship group contains only Digital Goods, ie no Finished Goods and no Finished/Digital Goods, et cetera.createDropShipGroups
(LocalDispatcher dispatcher) Examine each item of each ship group and create new ship groups if the item should be drop shippedvoid
deleteItemGroup
(String groupNumber) Delete item group.void
ensureItemsQuantity
(List<ShoppingCartItem> cartItems, LocalDispatcher dispatcher, BigDecimal quantity) Ensure item total quantityensureItemsTotalQuantity
(List<ShoppingCartItem> cartItems, LocalDispatcher dispatcher, BigDecimal quantity) Ensure item total quantityvoid
explodeItems
(List<ShoppingCartItem> shoppingCartItems, LocalDispatcher dispatcher) Does an "explode", or "unitize" operation on a list of cart items.findAllCartItems
(String productId) Get all ShoppingCartItems from the cart object with the given productId.findAllCartItems
(String productId, String groupNumber) Get all ShoppingCartItems from the cart object with the given productId and optional groupNumber to limit it to a specific item groupfindAllCartItemsInCategory
(String productCategoryId, String groupNumber) Get all ShoppingCartItems from the cart object with the given productCategoryId and optional groupNumber to limit it to a specific item groupfindCartItem
(int index) Get a ShoppingCartItem from the cart object.findCartItem
(String orderItemSeqId) find an item from the cart object.findCartItem
(String productId, Map<String, GenericValue> features, Map<String, Object> attributes, String prodCatalogId, BigDecimal selectedAmount) Get a ShoppingCartItem from the cart object.get additional party role mapgetAdjustment
(int index) Gets adjustment.int
getAdjustmentPromoIndex
(String productPromoId) Gets adjustment promo index.Get a List of adjustments on the order (ie cart)getAggregatedInstanceId
(ShoppingCartItem item, LocalDispatcher dispatcher) Returns the Id of an AGGREGATED_CONF product having exact configId.Gets agreement id.get all desired alternative gift by action copy<T> T
getAttribute
(String name) get attributeget auto order shopping list idGets auto save list id.Gets auto user login.Gets bill from vendor party id.Returns the amount to be billed to the billing account.Returns the billing message string.Gets billing account payment preference total.getBillingAddressGets bill to customer party id.Gets cancel back order date.Gets carrier party id.getCarrierPartyId
(int idx) Gets carrier party id.Gets cart created time.getCartItemsInGroup
(String groupNumber) Gets cart items in group.Gets cart items in no group.Gets channel type.getContactMech
(String contactMechPurposeTypeId) Get the contactMechId for this cart given the contactMechPurposeTypeIdGets credit card payment preference total.getCreditCardsGet the current currency setting.Gets default item comment.Gets default item delivery date.Gets default reserve after date.Gets default ship after date.Gets default ship before date.get delegatorgetDesiredAlternateGiftByAction
(GenericPK productPromoActionPK) get desired alternate gift by actionReturns the total from the cart, including tax/shipping.Gets display recurring sub total.Gets display sub total.Gets display tax included.boolean
get do promotionsGets end user customer party id.Gets external id.get facility idgetFeatureIdQtyMap
(int idx) Returns a Map of all features applied to products in the cart with quantities for a specific ship group.Returns the first attempt order ID associated with this cart or null if no order has been created yet.get free shipping product promo actionGets gift card payment preference total.getGiftCardsgetGiftCertSettingFromStore
(Delegator delegator) Returns ProductStoreFinActSetting based on cart's productStoreId and FinAccountHelper's defined giftCertFinAcctTypeIdgetGiftMessagegetGiftMessage
(int idx) getGiftMessageReturns the total from the cart, including tax/shipping.boolean
get hold orderGets internal code.Gets internal order notes.Gets is gift.getIsGift
(int idx) Gets is gift.getItemGroupByNumber
(String groupNumber) Gets item group by number.int
getItemIndex
(ShoppingCartItem item) Returns this item's index.getItemShipGroupEstimate
(int idx) Gets item ship group estimate.int
getItemShipGroupIndex
(int itemId) Return index of the ship group where the item is locatedgetItemShipGroupQty
(int itemIndex, int idx) getItemShipGroupQtygetItemShipGroupQty
(ShoppingCartItem item, int idx) Gets item ship group qty.static List<GenericValue>
getItemsProducts
(List<ShoppingCartItem> cartItems) static BigDecimal
getItemsTotalQuantity
(List<ShoppingCartItem> cartItems) Returns the item-total in the cart (not including discount/tax/shipping).Gets last list restore.getLineListOrderedByBasePrice
(boolean ascending) get line list ordered by base priceget localeGets may split.getMaySplit
(int idx) Returns Boolean.TRUE if the order may be split (null if unspecified)static BigDecimal
getMinimumOrderQuantity
(Delegator delegator, BigDecimal itemBasePrice, String itemProductId) Gets order additional emails.getOrderAttribute
(String name) get order attributeget order attributesGets order contact mech ids.get order dateGets order global adjustments.Returns the order ID associated with this cart or null if no order has been created yet.get order nameGets order notes.Gets order other adjustment total.Gets order party id.getOrderPaymentPreferenceTotalByType
(String paymentMethodTypeId) Get the total payment amount by payment type.Returns the order level shipping amountget order status idget order status stringGet a List of orderTerms on the order (ie cart)Returns the order type.getOriginAddress
(int idx) Gets origin address.getPartyDaysSinceCreated
(Timestamp nowTimestamp) Gets party days since created.Gets party id.returns the payment method/payment method type amountgetPaymentInfo
(int index) Locates an existing CartPaymentInfo object by indexgetPaymentInfo
(String id) Locates an existing (or creates a new) CartPaymentInfo objectgetPaymentInfo
(String id, String refNum, String authCode, BigDecimal amount) Locates an existing (or creates a new) CartPaymentInfo objectgetPaymentInfo
(String id, String refNum, String authCode, BigDecimal amount, boolean update) Locates an existing (or creates a new) CartPaymentInfo objectint
getPaymentInfoIndex
(String id, String refNum) Locates the index of an existing CartPaymentInfo object or -1 if none foundgetPaymentInfos
(boolean isPaymentMethod, boolean isPaymentMethodType, boolean hasRefNum) Returns the CartPaymentInfo objects which have matching fieldsReturns the Payment Method IdsReturns a list of PaymentMethod value objects selected in the cartgetPaymentMethodTypeId
(String paymentMethodId) Gets payment method type id.Returns the Payment Method Type IdsReturns a list of PaymentMethodType value objects selected in the cartgetPaymentRef
(String id) get a payment refreturns the total payment amountsGets placing customer party id.Returns the po number.get product promo codes enteredint
getProductPromoCodeUse
(String productPromoCodeId) get product promo code useget product promo totalint
getProductPromoUseCount
(String productPromoId) get product promo use countget product promo use info itergetProductPromoUseTotalDiscount
(String productPromoId) Get total discount for a given ProductPromo, or for ANY ProductPromo if the passed in productPromoId is null.get product storeGets product store ship meth id.getProductStoreShipMethId
(int idx) Gets product store ship meth id.Gets quote id.Get ship after date for ship group 0getShipAfterDate
(int idx) Get ship after date for a particular ship groupGet ship before date for ship group 0getShipBeforeDate
(int idx) Get ship before date for a particular ship groupGets ship from vendor party id.getShipGroupFacilityId
(int idx) Gets ship group facility id.getShipGroupItems
(int idx) Returns the ShoppingCartItem (key) and quantity (value) associated with the ship groupGets ship groups.getShipGroups
(int itemIndex) Gets ship groups.Gets ship groups.getShipGroupsBySupplier
(String supplierPartyId) get ship groups by suppliergetShipGroupSeqId
(int idx) Gets ship group seq id.int
Gets ship group size.getShipGroupVendorPartyId
(int idx) Gets ship group vendor party id.getShipInfo
(int idx) Gets ship info.int
getShipInfoIndex
(String shipGroupSeqId) getShipInfoIndexint
get ship info sizegetShipmentMethodType
(int idx) Returns the shipment method type.getShipmentMethodTypeIdgetShipmentMethodTypeId
(int idx) Returns the shipment method type IDgetShippableItemInfo
(int idx) Returns a List of shippable item info (quantity, size, weight) for a specific ship groupgetShippableQuantity
(int idx) Returns the total SHIPPABLE quantity in the cart for a specific ship group.getShippableSizes
(int idx) Returns a List of shippable item's size for a specific ship group.getShippableTotal
(int idx) Returns the SHIPPABLE item-total in the cart for a specific ship group.getShippableWeight
(int idx) Returns the total SHIPPABLE weight in the cart for a specific ship group.Gets shipping address.getShippingAddress
(int idx) Gets shipping address.getShippingContactMechIdgetShippingContactMechId
(int idx) Returns the shipping contact mech id.getShippingInstructionsgetShippingInstructions
(int idx) Returns the shipping instructions.Gets ship to customer party id.Returns the sub-total in the cart (item-total - discount).Returns the sub-total in the cart (item-total - discount).getSubTotalForPromotions
(Set<String> productIds) Gets sub total for promotions.Gets supplier agent party id.getSupplierAgreementId
(int idx) Returns the supplier Agreement for the given ship group (drop shipment).getSupplierPartyId
(int idx) Returns the supplier for the given ship group (drop shipment).getSupplierProduct
(String productId, BigDecimal quantity, LocalDispatcher dispatcher) Gets supplier product.get terminal idReturns the total quantity in the cart.Returns the tax amount from the cart object.getTotalSalesTax
(int shipGroup) Returns the tax amount for a ship group.Returns the shipping amount from the cart object.Returns the total weight in the cart.get transaction idGets the userLogin associated with the cart; may be nullGets web site id.get workeffort idvoid
handleNewUser
(LocalDispatcher dispatcher) Handle new user.boolean
hasOrderTerm
(String termTypeId) Has order term boolean.boolean
Is order term set boolean.boolean
determines if the id supplied is a payment method or not by searching in the entity engineboolean
is Payment Selectedboolean
isPinRequiredForGC
(Delegator delegator) Determines whether pin numbers are required for gift cards, based on ProductStoreFinActSetting.boolean
Is purchase order boolean.boolean
Is read only cart boolean.boolean
Is sales order boolean.boolean
isValidateGCFinAccount
(Delegator delegator) Returns whether the cart should validate gift cards against FinAccount (ie, internal gift certificates).items()
Returns a Collection of items in the cart object.iterator()
Returns an iterator of cart items.make a list of all adjustments including order adjustments, order line adjustments, and special adjustments (shipping and tax if applicable)make All Order AttributesmakeAllOrderAttributes
(String orderId, int mode) make all order attributesmake a list of OrderContactMechs from the ShoppingCart and the ShoppingCartItemsmake all order item associationsmake All Order Item AttributesmakeAllOrderItemAttributes
(String orderId, int mode) make All Order Item Attributesmake a list of OrderContactMechs from the ShoppingCart and the ShoppingCartItemsmake a list of OrderItemPriceInfos from the ShoppingCartItemsmake a list of SurveyResponse object to update with order information setmakeAllOrderPaymentInfos
(LocalDispatcher dispatcher) make a list of all OrderPaymentPreferences and Billing info including all payment methods and typesmake a list of all quote adjustments including header adjustments, line adjustments, and special adjustments (shipping and tax if applicable).makeAllShipGroupInfos
(LocalDispatcher dispatcher) Return all OrderItemShipGroup, OrderContactMech, OrderAdjustment and OrderItemShipGroupAssoc from ShoppingCart in a single list ofGenericValue
makeCartMap
(LocalDispatcher dispatcher, boolean explodeItems) Returns a Map of cart values to pass to the storeOrder servicemake order item groupsmakeOrderItems
(boolean explodeItems, boolean replaceAggregatedId, LocalDispatcher dispatcher) make order itemsmakeOrderItems
(LocalDispatcher dispatcher) make order itemsmakePaymentInfo
(String id, String refNum, String authCode, BigDecimal amount) Creates a CartPaymentInfo object with a possible authCode (may be null)makePaymentInfo
(String id, String refNum, BigDecimal amount) Creates a CartPaymentInfo objectmake product promo usescreate WorkEfforts from the shoppingcart items when itemType = RENTAL_ORDER_ITEMvoid
moveCartItem
(int fromIndex, int toIndex) Moves a line item to a different index.void
positionItemToGroup
(int itemIndex, BigDecimal quantity, int fromIndex, int toIndex, boolean clearEmptyGroups) positionItemToGroupvoid
positionItemToGroup
(ShoppingCartItem item, BigDecimal quantity, int fromIndex, int toIndex, boolean clearEmptyGroups) positionItemToGroupvoid
removeAdditionalPartyRole
(String partyId, String roleTypeId) Removes a previously associated party to the order.void
removeAdjustment
(int index) Remove adjustment.void
removeAdjustmentByType
(String orderAdjustmentTypeId) go through the order adjustments and remove all adjustments with the given typevoid
remove all desired alternative gift by actionvoid
remove all free shipping product promo actionvoid
removeAttribute
(String name) remove attributevoid
removeCartItem
(int index, LocalDispatcher dispatcher) Remove an item from the cart object.void
removeCartItem
(ShoppingCartItem item, LocalDispatcher dispatcher) Remove an item from the cart object.removeContactMech
(String contactMechPurposeTypeId) Remove the contactMechId from this cart given the contactMechPurposeTypeIdvoid
Remove quantity 0 ShoppingCartItems from the cart object.void
removeExtraItems
(List<ShoppingCartItem> multipleItems, LocalDispatcher dispatcher, int maxItems) remove extra itemsvoid
removeFreeShippingProductPromoAction
(GenericPK productPromoActionPK) Removes a free shipping ProductPromoAction by trying to find one in the list with the same primary key.void
removeOrderAttribute
(String name) remove order attributevoid
removeOrderTerm
(int index) Remove order term.void
Remove order terms.void
removeProductPromoUse
(String productPromoId) remove product promo usevoid
resetPromoRuleUse
(String productPromoId, String productPromoRuleId) reset promo rule useint
returns size of paymentInfovoid
setAgreementId
(String agreementId) Sets agreement id.void
setAllCarrierPartyId
(String carrierPartyId) Sets @param carrierPartyId in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllGiftMessage
(String giftMessage) Sets @param giftMessage in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllIsGift
(Boolean isGift) Sets @param isGift in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllMaySplit
(Boolean maySplit) Sets @param maySplit in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllProductStoreShipMethId
(String productStoreShipMethId) Sets @param productStoreShipMethId in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllShipmentMethodTypeId
(String shipmentMethodTypeId) Sets @param shipmentMethodTypeId in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllShippingContactMechId
(String shippingContactMechId) Sets @param shippingContactMechId in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAllShippingInstructions
(String shippingInstructions) Sets @param shippingInstructions in all ShipInfo(ShipGroups) associated with this ShoppingCartvoid
setAttribute
(String name, Object value) set attributevoid
setAutoOrderShoppingListId
(String autoOrderShoppingListId) set auto order shopping list idvoid
Sets auto save list id.protected void
setAutoUserLogin
(GenericValue autoUserLogin) Sets auto user login.void
setAutoUserLogin
(GenericValue autoUserLogin, LocalDispatcher dispatcher) Sets auto user login.void
setBillFromVendorPartyId
(String billFromVendorPartyId) Sets bill from vendor party id.void
setBillingAccount
(String billingAccountId, BigDecimal amount) Sets the billing account id string.void
setBillToCustomerPartyId
(String billToCustomerPartyId) Sets bill to customer party id.void
setCancelBackOrderDate
(Timestamp cancelBackOrderDate) Sets cancel back order date.void
setCarrierPartyId
(int idx, String carrierPartyId) Sets carrier party id.void
setChannelType
(String channelType) Sets channel type.void
setCurrency
(LocalDispatcher dispatcher, String currencyUom) Sets the currency for the cart.void
setDefaultCheckoutOptions
(LocalDispatcher dispatcher) Preset with default values some of the checkout options to get a quicker checkout process.void
setDefaultItemComment
(String comment) Sets default item comment.void
Sets default item delivery date.void
setDefaultReserveAfterDate
(Timestamp defaultReserveAfterDate) Sets default reserve after date.void
setDefaultShipAfterDate
(Timestamp defaultShipAfterDate) Sets default ship after date.void
setDefaultShipBeforeDate
(Timestamp defaultShipBeforeDate) Sets default ship before date.void
setDesiredAlternateGiftByAction
(GenericPK productPromoActionPK, String productId) set all desired alternative gift by actionvoid
setDoPromotions
(boolean doPromotions) set do promotionsvoid
setEndUserCustomerPartyId
(String endUserCustomerPartyId) Sets end user customer party id.void
setExternalId
(String externalId) Sets external id.void
setFacilityId
(String facilityId) set facility idvoid
setFirstAttemptOrderId
(String orderId) TODO: Sets the first attempt orderId for this cart.void
setGiftMessage
(int idx, String giftMessage) Sets gift message.void
setHoldOrder
(boolean b) set hold ordervoid
setInternalCode
(String internalCode) Sets internal code.void
Sets is gift.void
setItemShipGroupEstimate
(BigDecimal amount, int idx) Sets item ship group estimate.void
setItemShipGroupQty
(int itemIndex, BigDecimal quantity, int idx) Sets item ship group qty.void
setItemShipGroupQty
(ShoppingCartItem item, int itemIndex, BigDecimal quantity, int idx) Sets item ship group qty.void
setItemShipGroupQty
(ShoppingCartItem item, BigDecimal quantity, int idx) Sets item ship group qty.void
setLastListRestore
(Timestamp time) Sets last list restore.void
set localevoid
setMaySplit
(int idx, Boolean maySplit) setMaySplitvoid
setNextItemSeq
(long seq) set next item seqvoid
setOrderAdditionalEmails
(String orderAdditionalEmails) Sets order additional emails.void
setOrderAttribute
(String name, String value) set order attributevoid
setOrderAttributes
(Map<String, String> orderAttributes) set order attributesvoid
set order datevoid
setOrderId
(String orderId) Sets the orderId associated with this cart.void
setOrderName
(String orderName) set order namevoid
setOrderPartyId
(String orderPartyId) Sets order party id.void
setOrderStatusId
(String orderStatusId) set order status idvoid
setOrderStatusString
(String orderStatusString) set order status stringvoid
setOrderTermSet
(boolean orderTermSet) Sets order term set.void
setOrderType
(String orderType) Sets the order type.void
setPlacingCustomerPartyId
(String placingCustomerPartyId) Sets placing customer party id.void
setPoNumber
(String poNumber) Sets the PO Number in the cart.void
setProductStoreId
(String productStoreId) This is somewhat of a dangerous method, changing the productStoreId changes a lot of stuff including: - some items in the cart may not be valid in any catalog in the new store - promotions need to be recalculated for the products that remain - what else? lots of settings on the ProductStore...void
setProductStoreShipMethId
(int idx, String productStoreShipMethId) Sets product store ship meth id.void
setQuoteId
(String quoteId) Sets quote id.void
setReadOnlyCart
(boolean readOnlyCart) Sets read only cart.void
setShipAfterDate
(int idx, Timestamp shipAfterDate) Set ship after date for a particular ship groupvoid
setShipAfterDate
(Timestamp shipAfterDate) Set ship after date for a particular ship groupvoid
setShipBeforeDate
(int idx, Timestamp shipBeforeDate) Set ship before date for a particular ship groupvoid
setShipBeforeDate
(Timestamp shipBeforeDate) Set ship before date for ship group 0void
setShipFromVendorPartyId
(String shipFromVendorPartyId) Sets ship from vendor party id.void
setShipGroupFacilityId
(int idx, String facilityId) Sets ship group facility id.void
setShipGroupSeqId
(int idx, String shipGroupSeqId) Sets ship group seq id.void
Updates the shipBefore and shipAfterDates of all ship groups that the item belongs to, re-setting ship group ship before date if item ship before date is before it and ship group ship after date if item ship after date is before it.void
setShipGroupVendorPartyId
(int idx, String vendorPartyId) Sets ship group vendor party id.void
setShipmentMethodTypeId
(int idx, String shipmentMethodTypeId) Sets the shipment method type.void
setShippingContactMechId
(int idx, String shippingContactMechId) Sets the shipping contact mech id.void
setShippingInstructions
(int idx, String shippingInstructions) Sets the shipping instructions.void
setShipToCustomerPartyId
(String shipToCustomerPartyId) Sets ship to customer party id.void
setSupplierAgentPartyId
(String supplierAgentPartyId) Sets supplier agent party id.void
setSupplierAgreementId
(int idx, String supplierAgreementId) Sets the supplier agreement for the given ship group (drop shipment).void
setSupplierPartyId
(int idx, String supplierPartyId) Sets the supplier for the given ship group (drop shipment).void
setTerminalId
(String terminalId) set terminal idvoid
setTransactionId
(String transactionId) set transaction idprotected void
setUserLogin
(GenericValue userLogin) Sets user login.void
setUserLogin
(GenericValue userLogin, LocalDispatcher dispatcher) Sets user login.void
setViewCartOnAdd
(boolean viewCartOnAdd) Returns true if the user wishes to view the cart everytime an item is added.void
setWebSiteId
(String webSiteId) Sets web site id.void
setWorkEffortId
(String workEffortId) set work effort idboolean
Returns true when there are shippable items in the cartint
size()
Returns the number of items in the cart object.boolean
Returns true when there are taxable items in the cartboolean
Returns true if the user wishes to view the cart everytime an item is added.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
ALL
public static final int ALL- See Also:
-
EMPTY_ONLY
public static final int EMPTY_ONLY- See Also:
-
FILLED_ONLY
public static final int FILLED_ONLY- See Also:
-
-
Constructor Details
-
ShoppingCart
protected ShoppingCart()don't allow empty constructor -
ShoppingCart
Creates a new cloned ShoppingCart Object. -
ShoppingCart
public ShoppingCart(Delegator delegator, String productStoreId, String webSiteId, Locale locale, String currencyUom, String billToCustomerPartyId, String billFromVendorPartyId) Creates new empty ShoppingCart object. -
ShoppingCart
public ShoppingCart(Delegator delegator, String productStoreId, String webSiteId, Locale locale, String currencyUom) Creates new empty ShoppingCart object. -
ShoppingCart
Creates a new empty ShoppingCart object.
-
-
Method Details
-
getDelegator
get delegator -
getProductStoreId
get product store -
getDoPromotions
public boolean getDoPromotions()get do promotions -
setDoPromotions
public void setDoPromotions(boolean doPromotions) set do promotions -
setProductStoreId
This is somewhat of a dangerous method, changing the productStoreId changes a lot of stuff including: - some items in the cart may not be valid in any catalog in the new store - promotions need to be recalculated for the products that remain - what else? lots of settings on the ProductStore... So for now this can only be called if the cart is empty... otherwise it wil throw an exception -
getTransactionId
get transaction id -
setTransactionId
set transaction id -
getTerminalId
get terminal id -
setTerminalId
set terminal id -
getAutoOrderShoppingListId
get auto order shopping list id -
setAutoOrderShoppingListId
set auto order shopping list id -
getFacilityId
get facility id -
setFacilityId
set facility id -
getLocale
get locale -
setLocale
set locale -
setOrderName
set order name -
getOrderName
get order name -
setWorkEffortId
set work effort id -
getWorkEffortId
get workeffort id -
setAttribute
set attribute -
removeAttribute
remove attribute -
getAttribute
get attribute -
removeOrderAttribute
remove order attribute -
setOrderAttribute
set order attribute -
getOrderAttribute
get order attribute -
setHoldOrder
public void setHoldOrder(boolean b) set hold order -
getHoldOrder
public boolean getHoldOrder()get hold order -
setOrderDate
set order date -
getOrderDate
get order date -
setCurrency
public void setCurrency(LocalDispatcher dispatcher, String currencyUom) throws CartItemModifyException Sets the currency for the cart.- Throws:
CartItemModifyException
-
getCurrency
Get the current currency setting. -
getCartCreatedTime
Gets cart created time.- Returns:
- the cart created time
-
getSupplierProduct
public GenericValue getSupplierProduct(String productId, BigDecimal quantity, LocalDispatcher dispatcher) Gets supplier product.- Parameters:
productId
- the product idquantity
- the quantitydispatcher
- the dispatcher- Returns:
- the supplier product
-
addOrIncreaseItem
public int addOrIncreaseItem(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) Add an item to the shopping cart, or if already there, increase the quantity.- Returns:
- the new/increased item index
- Throws:
CartItemModifyException
ItemNotFoundException
-
addOrIncreaseItem
public int addOrIncreaseItem(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cart -
addOrIncreaseItem
public int addOrIncreaseItem(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Map<String, GenericValue> features, Map<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, Map<String, String> orderItemAttributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cart and order item attributes -
addOrIncreaseItem
public int addOrIncreaseItem(String productId, BigDecimal selectedAmount, BigDecimal quantity, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfterDate, Timestamp reserveAfterDate, Map<String, GenericValue> features, Map<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, Map<String, String> orderItemAttributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, String itemGroupNumber, String parentProductId, LocalDispatcher dispatcher) add rental (with accommodation) item to cart and order item attributes -
addNonProductItem
public int addNonProductItem(String itemType, String description, String categoryId, BigDecimal price, BigDecimal quantity, Map<String, Object> attributes, String prodCatalogId, String itemGroupNumber, LocalDispatcher dispatcher) throws CartItemModifyExceptionAdd a non-product item to the shopping cart.- Returns:
- the new item index
- Throws:
CartItemModifyException
-
addItem
Add an item to the shopping cart.- Throws:
CartItemModifyException
-
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, ProductConfigWrapper configWrapper, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an (rental)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an (rental)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an (rental/aggregated)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules) Add an accommodation(rental)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an accommodation(rental)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersonsDbl, String accommodationMapId, String accommodationSpotId, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, ProductConfigWrapper configWrapper, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an accommodation(rental/aggregated)item to the shopping cart. -
addItemToEnd
public int addItemToEnd(String productId, BigDecimal amount, BigDecimal quantity, BigDecimal unitPrice, HashMap<String, GenericValue> features, HashMap<String, throws CartItemModifyException, ItemNotFoundExceptionObject> attributes, String prodCatalogId, String itemType, LocalDispatcher dispatcher, Boolean triggerExternalOps, Boolean triggerPriceRules, Boolean skipInventoryChecks, Boolean skipProductChecks) Add an item to the shopping cart. -
addItemToEnd
Add an item to the shopping cart.- Throws:
CartItemModifyException
-
findCartItem
public ShoppingCartItem findCartItem(String productId, Map<String, GenericValue> features, Map<String, Object> attributes, String prodCatalogId, BigDecimal selectedAmount) Get a ShoppingCartItem from the cart object. -
findAllCartItems
Get all ShoppingCartItems from the cart object with the given productId. -
findAllCartItems
Get all ShoppingCartItems from the cart object with the given productId and optional groupNumber to limit it to a specific item group -
findAllCartItemsInCategory
public List<ShoppingCartItem> findAllCartItemsInCategory(String productCategoryId, String groupNumber) Get all ShoppingCartItems from the cart object with the given productCategoryId and optional groupNumber to limit it to a specific item group -
removeEmptyCartItems
public void removeEmptyCartItems()Remove quantity 0 ShoppingCartItems from the cart object. -
removeExtraItems
public void removeExtraItems(List<ShoppingCartItem> multipleItems, LocalDispatcher dispatcher, int maxItems) throws CartItemModifyException remove extra items- Throws:
CartItemModifyException
-
getItemsTotalQuantity
-
getItemsProducts
-
ensureItemsQuantity
public void ensureItemsQuantity(List<ShoppingCartItem> cartItems, LocalDispatcher dispatcher, BigDecimal quantity) throws CartItemModifyException Ensure item total quantity- Throws:
CartItemModifyException
-
ensureItemsTotalQuantity
public BigDecimal ensureItemsTotalQuantity(List<ShoppingCartItem> cartItems, LocalDispatcher dispatcher, BigDecimal quantity) throws CartItemModifyException Ensure item total quantity- Throws:
CartItemModifyException
-
containAnyWorkEffortCartItems
public boolean containAnyWorkEffortCartItems()Contain any work effort cart items boolean.- Returns:
- the boolean
-
containAllWorkEffortCartItems
public boolean containAllWorkEffortCartItems()contain all work effort cart item check -
containOnlyDigitalGoods
public boolean containOnlyDigitalGoods()Check to see if the cart contains only Digital Goods, ie no Finished Goods and no Finished/Digital Goods, et cetera. This is determined by making sure no Product has a type where ProductType.isPhysical!=N. -
containOnlyDigitalGoods
public boolean containOnlyDigitalGoods(int shipGroupIdx) Check to see if the ship group contains only Digital Goods, ie no Finished Goods and no Finished/Digital Goods, et cetera. This is determined by making sure no Product has a type where ProductType.isPhysical!=N. -
getItemIndex
Returns this item's index. -
findCartItem
Get a ShoppingCartItem from the cart object. -
findCartItem
find an item from the cart object. -
removeCartItem
public void removeCartItem(ShoppingCartItem item, LocalDispatcher dispatcher) throws CartItemModifyException Remove an item from the cart object.- Throws:
CartItemModifyException
-
removeCartItem
Remove an item from the cart object.- Throws:
CartItemModifyException
-
moveCartItem
public void moveCartItem(int fromIndex, int toIndex) Moves a line item to a different index. -
size
public int size()Returns the number of items in the cart object. -
items
Returns a Collection of items in the cart object. -
iterator
Returns an iterator of cart items.- Specified by:
iterator
in interfaceIterable<ShoppingCartItem>
-
getItemGroupByNumber
Gets item group by number.- Parameters:
groupNumber
- the group number- Returns:
- the item group by number
-
addItemGroup
Creates a new Item Group and returns the groupNumber that represents it -
addItemGroup
public ShoppingCart.ShoppingCartItemGroup addItemGroup(GenericValue itemGroupValue) throws GenericEntityException Add item group shopping cart item group.- Parameters:
itemGroupValue
- the item group value- Returns:
- the shopping cart item group
- Throws:
GenericEntityException
- the generic entity exception
-
getCartItemsInNoGroup
Gets cart items in no group.- Returns:
- the cart items in no group
-
getCartItemsInGroup
Gets cart items in group.- Parameters:
groupNumber
- the group number- Returns:
- the cart items in group
-
deleteItemGroup
Delete item group.- Parameters:
groupNumber
- the group number
-
getUserLogin
Gets the userLogin associated with the cart; may be null -
setUserLogin
public void setUserLogin(GenericValue userLogin, LocalDispatcher dispatcher) throws CartItemModifyException Sets user login.- Parameters:
userLogin
- the user logindispatcher
- the dispatcher- Throws:
CartItemModifyException
- the cart item modify exception
-
setUserLogin
Sets user login.- Parameters:
userLogin
- the user login
-
getAutoUserLogin
Gets auto user login.- Returns:
- the auto user login
-
setAutoUserLogin
public void setAutoUserLogin(GenericValue autoUserLogin, LocalDispatcher dispatcher) throws CartItemModifyException Sets auto user login.- Parameters:
autoUserLogin
- the auto user logindispatcher
- the dispatcher- Throws:
CartItemModifyException
- the cart item modify exception
-
setAutoUserLogin
Sets auto user login.- Parameters:
autoUserLogin
- the auto user login
-
handleNewUser
Handle new user.- Parameters:
dispatcher
- the dispatcher- Throws:
CartItemModifyException
- the cart item modify exception
-
getExternalId
Gets external id.- Returns:
- the external id
-
setExternalId
Sets external id.- Parameters:
externalId
- the external id
-
getInternalCode
Gets internal code.- Returns:
- the internal code
-
setInternalCode
Sets internal code.- Parameters:
internalCode
- the internal code
-
getWebSiteId
Gets web site id.- Returns:
- the web site id
-
setWebSiteId
Sets web site id.- Parameters:
webSiteId
- the web site id
-
setShipBeforeDate
Set ship before date for a particular ship group- Parameters:
idx
-shipBeforeDate
-
-
setShipBeforeDate
Set ship before date for ship group 0- Parameters:
shipBeforeDate
-
-
getShipBeforeDate
Get ship before date for a particular ship group- Parameters:
idx
- the ship group number- Returns:
- ship before date for a given ship group
-
getShipBeforeDate
Get ship before date for ship group 0- Returns:
- ship before date for the first ship group
-
setShipAfterDate
Set ship after date for a particular ship group- Parameters:
idx
- the ship group numbershipAfterDate
- the ship after date to be set for the given ship group
-
getShipAfterDate
Get ship after date for a particular ship group- Parameters:
idx
- the ship group number- Returns:
- return the ship after date for the given ship group
-
getShipAfterDate
Get ship after date for ship group 0- Returns:
- return the ship after date for the first ship group
-
setShipAfterDate
Set ship after date for a particular ship group- Parameters:
shipAfterDate
- the ship after date to be set for the first ship group
-
setDefaultShipBeforeDate
Sets default ship before date.- Parameters:
defaultShipBeforeDate
- the default ship before date
-
getDefaultShipBeforeDate
Gets default ship before date.- Returns:
- the default ship before date
-
setDefaultShipAfterDate
Sets default ship after date.- Parameters:
defaultShipAfterDate
- the default ship after date
-
setCancelBackOrderDate
Sets cancel back order date.- Parameters:
cancelBackOrderDate
- the cancel back order date
-
getCancelBackOrderDate
Gets cancel back order date.- Returns:
- the cancel back order date
-
getDefaultShipAfterDate
Gets default ship after date.- Returns:
- the default ship after date
-
setDefaultReserveAfterDate
Sets default reserve after date.- Parameters:
defaultReserveAfterDate
- the default reserve after date
-
getDefaultReserveAfterDate
Gets default reserve after date.- Returns:
- the default reserve after date
-
getOrderPartyId
Gets order party id.- Returns:
- the order party id
-
setOrderPartyId
Sets order party id.- Parameters:
orderPartyId
- the order party id
-
getPlacingCustomerPartyId
Gets placing customer party id.- Returns:
- the placing customer party id
-
setPlacingCustomerPartyId
Sets placing customer party id.- Parameters:
placingCustomerPartyId
- the placing customer party id
-
getBillToCustomerPartyId
Gets bill to customer party id.- Returns:
- the bill to customer party id
-
setBillToCustomerPartyId
Sets bill to customer party id.- Parameters:
billToCustomerPartyId
- the bill to customer party id
-
getShipToCustomerPartyId
Gets ship to customer party id.- Returns:
- the ship to customer party id
-
setShipToCustomerPartyId
Sets ship to customer party id.- Parameters:
shipToCustomerPartyId
- the ship to customer party id
-
getEndUserCustomerPartyId
Gets end user customer party id.- Returns:
- the end user customer party id
-
setEndUserCustomerPartyId
Sets end user customer party id.- Parameters:
endUserCustomerPartyId
- the end user customer party id
-
getBillFromVendorPartyId
Gets bill from vendor party id.- Returns:
- the bill from vendor party id
-
setBillFromVendorPartyId
Sets bill from vendor party id.- Parameters:
billFromVendorPartyId
- the bill from vendor party id
-
getShipFromVendorPartyId
Gets ship from vendor party id.- Returns:
- the ship from vendor party id
-
setShipFromVendorPartyId
Sets ship from vendor party id.- Parameters:
shipFromVendorPartyId
- the ship from vendor party id
-
getSupplierAgentPartyId
Gets supplier agent party id.- Returns:
- the supplier agent party id
-
setSupplierAgentPartyId
Sets supplier agent party id.- Parameters:
supplierAgentPartyId
- the supplier agent party id
-
getPartyId
Gets party id.- Returns:
- the party id
-
setAutoSaveListId
Sets auto save list id.- Parameters:
id
- the id
-
getAutoSaveListId
Gets auto save list id.- Returns:
- the auto save list id
-
setLastListRestore
Sets last list restore.- Parameters:
time
- the time
-
getLastListRestore
Gets last list restore.- Returns:
- the last list restore
-
getPartyDaysSinceCreated
Gets party days since created.- Parameters:
nowTimestamp
- the now timestamp- Returns:
- the party days since created
-
clear
public void clear()Clears out the cart. -
setOrderType
Sets the order type. -
getOrderType
Returns the order type. -
setChannelType
Sets channel type.- Parameters:
channelType
- the channel type
-
getChannelType
Gets channel type.- Returns:
- the channel type
-
isPurchaseOrder
public boolean isPurchaseOrder()Is purchase order boolean.- Returns:
- the boolean
-
isSalesOrder
public boolean isSalesOrder()Is sales order boolean.- Returns:
- the boolean
-
setPoNumber
Sets the PO Number in the cart. -
getPoNumber
Returns the po number. -
setDefaultItemDeliveryDate
Sets default item delivery date.- Parameters:
date
- the date
-
getDefaultItemDeliveryDate
Gets default item delivery date.- Returns:
- the default item delivery date
-
setDefaultItemComment
Sets default item comment.- Parameters:
comment
- the comment
-
getDefaultItemComment
Gets default item comment.- Returns:
- the default item comment
-
setAgreementId
Sets agreement id.- Parameters:
agreementId
- the agreement id
-
getAgreementId
Gets agreement id.- Returns:
- the agreement id
-
setQuoteId
Sets quote id.- Parameters:
quoteId
- the quote id
-
getQuoteId
Gets quote id.- Returns:
- the quote id
-
getPaymentMethodTypeId
Gets payment method type id.- Parameters:
paymentMethodId
- the payment method id- Returns:
- the payment method type id
-
makePaymentInfo
Creates a CartPaymentInfo object -
makePaymentInfo
public ShoppingCart.CartPaymentInfo makePaymentInfo(String id, String refNum, String authCode, BigDecimal amount) Creates a CartPaymentInfo object with a possible authCode (may be null) -
getPaymentInfoIndex
Locates the index of an existing CartPaymentInfo object or -1 if none found -
getPaymentInfos
public List<ShoppingCart.CartPaymentInfo> getPaymentInfos(boolean isPaymentMethod, boolean isPaymentMethodType, boolean hasRefNum) Returns the CartPaymentInfo objects which have matching fields -
getPaymentInfo
Locates an existing CartPaymentInfo object by index -
getPaymentInfo
public ShoppingCart.CartPaymentInfo getPaymentInfo(String id, String refNum, String authCode, BigDecimal amount, boolean update) Locates an existing (or creates a new) CartPaymentInfo object -
getPaymentInfo
public ShoppingCart.CartPaymentInfo getPaymentInfo(String id, String refNum, String authCode, BigDecimal amount) Locates an existing (or creates a new) CartPaymentInfo object -
getPaymentInfo
Locates an existing (or creates a new) CartPaymentInfo object -
addPaymentAmount
public ShoppingCart.CartPaymentInfo addPaymentAmount(String id, BigDecimal amount, String refNum, String authCode, boolean isSingleUse, boolean isPresent, boolean replace) adds a payment method/payment method type -
addPaymentAmount
public ShoppingCart.CartPaymentInfo addPaymentAmount(String id, BigDecimal amount, boolean isSingleUse) adds a payment method/payment method type -
addPaymentAmount
adds a payment method/payment method type -
addPayment
adds a payment method/payment method type -
getPaymentAmount
returns the payment method/payment method type amount -
addPaymentRef
adds a payment ref -
getPaymentRef
get a payment ref -
getPaymentTotal
returns the total payment amounts -
selectedPayments
public int selectedPayments()returns size of paymentInfo -
isPaymentSelected
is Payment Selected -
clearPayment
removes a specific payment method/payment method type -
clearPayment
public void clearPayment(int index) removes a specific payment info from the list -
clearPayments
public void clearPayments()clears all payment method/payment method types -
clearPaymentMethodsById
remove all the paymentMethods based on the paymentMethodIds -
clearDeclinedPaymentMethods
remove declined payment methods for an order from cart. The idea is to call this after an attempted order is rejected -
getPaymentMethodIds
Returns the Payment Method Ids -
getPaymentMethodTypeIds
Returns the Payment Method Type Ids -
getPaymentMethods
Returns a list of PaymentMethod value objects selected in the cart -
getPaymentMethodTypes
Returns a list of PaymentMethodType value objects selected in the cart -
getCreditCards
getCreditCards -
getGiftCards
getGiftCards -
isPaymentMethodType
determines if the id supplied is a payment method or not by searching in the entity engine -
getBillingAddress
getBillingAddress -
getGiftCertSettingFromStore
Returns ProductStoreFinActSetting based on cart's productStoreId and FinAccountHelper's defined giftCertFinAcctTypeId- Parameters:
delegator
- the delegator- Returns:
- returns ProductStoreFinActSetting based on cart's productStoreId
- Throws:
GenericEntityException
-
isPinRequiredForGC
Determines whether pin numbers are required for gift cards, based on ProductStoreFinActSetting. Default to true.- Parameters:
delegator
- the delegator- Returns:
- returns true whether pin numbers are required for gift card
-
isValidateGCFinAccount
Returns whether the cart should validate gift cards against FinAccount (ie, internal gift certificates). Defaults to false.- Parameters:
delegator
- the delegator- Returns:
- returns true whether the cart should validate gift cards against FinAccount
-
setBillingAccount
Sets the billing account id string. -
getBillingAccountId
Returns the billing message string. -
getBillingAccountAmount
Returns the amount to be billed to the billing account. -
getOrderShipping
Returns the order level shipping amount -
addShipInfo
public int addShipInfo()Add ship info int.- Returns:
- the int
-
getShipGroups
Gets ship groups.- Returns:
- the ship groups
-
getShipGroups
Gets ship groups.- Parameters:
item
- the item- Returns:
- the ship groups
-
getShipGroups
Gets ship groups.- Parameters:
itemIndex
- the item index- Returns:
- the ship groups
-
getShipInfo
Gets ship info.- Parameters:
idx
- the idx- Returns:
- the ship info
-
getShipGroupSize
public int getShipGroupSize()Gets ship group size.- Returns:
- the ship group size
-
getShipGroupItems
Returns the ShoppingCartItem (key) and quantity (value) associated with the ship group -
clearItemShipInfo
Clear item ship info.- Parameters:
item
- the item
-
setItemShipGroupEstimate
Sets item ship group estimate.- Parameters:
amount
- the amountidx
- the idx
-
setShipGroupShipDatesFromItem
Updates the shipBefore and shipAfterDates of all ship groups that the item belongs to, re-setting ship group ship before date if item ship before date is before it and ship group ship after date if item ship after date is before it.- Parameters:
item
-
-
getItemShipGroupEstimate
Gets item ship group estimate.- Parameters:
idx
- the idx- Returns:
- the item ship group estimate
-
setItemShipGroupQty
Sets item ship group qty.- Parameters:
itemIndex
- the item indexquantity
- the quantityidx
- the idx
-
setItemShipGroupQty
Sets item ship group qty.- Parameters:
item
- the itemquantity
- the quantityidx
- the idx
-
setItemShipGroupQty
Sets item ship group qty.- Parameters:
item
- the itemitemIndex
- the item indexquantity
- the quantityidx
- the idx
-
getItemShipGroupQty
Gets item ship group qty.- Parameters:
item
- the itemidx
- the idx- Returns:
- the item ship group qty
-
getItemShipGroupQty
getItemShipGroupQty -
positionItemToGroup
public void positionItemToGroup(int itemIndex, BigDecimal quantity, int fromIndex, int toIndex, boolean clearEmptyGroups) positionItemToGroup -
positionItemToGroup
public void positionItemToGroup(ShoppingCartItem item, BigDecimal quantity, int fromIndex, int toIndex, boolean clearEmptyGroups) positionItemToGroup -
checkShipItemInfo
protected boolean checkShipItemInfo(ShoppingCart.CartShipInfo csi, ShoppingCart.CartShipInfo.CartShipItemInfo csii) checkShipItemInfo -
cleanUpShipGroups
public void cleanUpShipGroups()cleanUpShipGroups -
getShipInfoIndex
getShipInfoIndex -
getItemShipGroupIndex
public int getItemShipGroupIndex(int itemId) Return index of the ship group where the item is located- Returns:
-
setShippingContactMechId
Sets the shipping contact mech id. -
setAllShippingContactMechId
Sets @param shippingContactMechId in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
shippingContactMechId
-
-
getShippingContactMechId
Returns the shipping contact mech id. -
getShippingContactMechId
getShippingContactMechId -
setShipmentMethodTypeId
Sets the shipment method type. -
setAllShipmentMethodTypeId
Sets @param shipmentMethodTypeId in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
shipmentMethodTypeId
-
-
getShipmentMethodTypeId
Returns the shipment method type ID -
getShipmentMethodTypeId
getShipmentMethodTypeId -
getShipmentMethodType
Returns the shipment method type. -
setSupplierPartyId
Sets the supplier for the given ship group (drop shipment). -
getSupplierPartyId
Returns the supplier for the given ship group (drop shipment). -
setSupplierAgreementId
Sets the supplier agreement for the given ship group (drop shipment). -
getSupplierAgreementId
Returns the supplier Agreement for the given ship group (drop shipment). -
setShippingInstructions
Sets the shipping instructions. -
setAllShippingInstructions
Sets @param shippingInstructions in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
shippingInstructions
-
-
getShippingInstructions
Returns the shipping instructions. -
getShippingInstructions
getShippingInstructions -
setMaySplit
setMaySplit -
setAllMaySplit
Sets @param maySplit in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
maySplit
-
-
getMaySplit
Returns Boolean.TRUE if the order may be split (null if unspecified) -
getMaySplit
Gets may split.- Returns:
- the may split
-
setGiftMessage
Sets gift message.- Parameters:
idx
- the idxgiftMessage
- the gift message
-
setAllGiftMessage
Sets @param giftMessage in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
giftMessage
-
-
getGiftMessage
getGiftMessage -
getGiftMessage
getGiftMessage -
setIsGift
Sets is gift.- Parameters:
idx
- the idxisGift
- the is gift
-
setAllIsGift
Sets @param isGift in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
isGift
-
-
getIsGift
Gets is gift.- Parameters:
idx
- the idx- Returns:
- the is gift
-
getIsGift
Gets is gift.- Returns:
- the is gift
-
setCarrierPartyId
Sets carrier party id.- Parameters:
idx
- the idxcarrierPartyId
- the carrier party id
-
setAllCarrierPartyId
Sets @param carrierPartyId in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
carrierPartyId
-
-
getCarrierPartyId
Gets carrier party id.- Parameters:
idx
- the idx- Returns:
- the carrier party id
-
getCarrierPartyId
Gets carrier party id.- Returns:
- the carrier party id
-
getProductStoreShipMethId
Gets product store ship meth id.- Parameters:
idx
- the idx- Returns:
- the product store ship meth id
-
getProductStoreShipMethId
Gets product store ship meth id.- Returns:
- the product store ship meth id
-
setProductStoreShipMethId
Sets product store ship meth id.- Parameters:
idx
- the idxproductStoreShipMethId
- the product store ship meth id
-
setAllProductStoreShipMethId
Sets @param productStoreShipMethId in all ShipInfo(ShipGroups) associated with this ShoppingCart- Parameters:
productStoreShipMethId
-
-
setShipGroupFacilityId
Sets ship group facility id.- Parameters:
idx
- the idxfacilityId
- the facility id
-
getShipGroupFacilityId
Gets ship group facility id.- Parameters:
idx
- the idx- Returns:
- the ship group facility id
-
setShipGroupVendorPartyId
Sets ship group vendor party id.- Parameters:
idx
- the idxvendorPartyId
- the vendor party id
-
getShipGroupVendorPartyId
Gets ship group vendor party id.- Parameters:
idx
- the idx- Returns:
- the ship group vendor party id
-
setShipGroupSeqId
Sets ship group seq id.- Parameters:
idx
- the idxshipGroupSeqId
- the ship group seq id
-
getShipGroupSeqId
Gets ship group seq id.- Parameters:
idx
- the idx- Returns:
- the ship group seq id
-
setOrderAdditionalEmails
Sets order additional emails.- Parameters:
orderAdditionalEmails
- the order additional emails
-
getOrderAdditionalEmails
Gets order additional emails.- Returns:
- the order additional emails
-
getShippingAddress
Gets shipping address.- Parameters:
idx
- the idx- Returns:
- the shipping address
-
getOriginAddress
Gets origin address.- Parameters:
idx
- the idx- Returns:
- the origin address
-
getShippingAddress
Gets shipping address.- Returns:
- the shipping address
-
getInternalOrderNotes
Gets internal order notes.- Returns:
- the internal order notes
-
getOrderNotes
Gets order notes.- Returns:
- the order notes
-
addInternalOrderNote
Add internal order note.- Parameters:
note
- the note
-
clearInternalOrderNotes
public void clearInternalOrderNotes()Clear internal order notes. -
clearOrderNotes
public void clearOrderNotes()Clear order notes. -
addOrderNote
Add order note.- Parameters:
note
- the note
-
setDefaultCheckoutOptions
Preset with default values some of the checkout options to get a quicker checkout process. -
getTotalSalesTax
Returns the tax amount for a ship group. -
getTotalSalesTax
Returns the tax amount from the cart object. -
getTotalShipping
Returns the shipping amount from the cart object. -
getItemTotal
Returns the item-total in the cart (not including discount/tax/shipping). -
getSubTotal
Returns the sub-total in the cart (item-total - discount). -
getGrandTotal
Returns the total from the cart, including tax/shipping. -
getDisplaySubTotal
Gets display sub total.- Returns:
- the display sub total
-
getOrderGlobalAdjustments
Gets order global adjustments.- Returns:
- the order global adjustments
-
getDisplayTaxIncluded
Gets display tax included.- Returns:
- the display tax included
-
getDisplayRecurringSubTotal
Gets display recurring sub total.- Returns:
- the display recurring sub total
-
getDisplayGrandTotal
Returns the total from the cart, including tax/shipping. -
getOrderOtherAdjustmentTotal
Gets order other adjustment total.- Returns:
- the order other adjustment total
-
getSubTotalForPromotions
Returns the sub-total in the cart (item-total - discount). -
getSubTotalForPromotions
Gets sub total for promotions.- Parameters:
productIds
- the product ids- Returns:
- the sub total for promotions
-
getOrderPaymentPreferenceTotalByType
Get the total payment amount by payment type. Specify null to get amount over all types. -
getCreditCardPaymentPreferenceTotal
Gets credit card payment preference total.- Returns:
- the credit card payment preference total
-
getBillingAccountPaymentPreferenceTotal
Gets billing account payment preference total.- Returns:
- the billing account payment preference total
-
getGiftCardPaymentPreferenceTotal
Gets gift card payment preference total.- Returns:
- the gift card payment preference total
-
addContactMech
Add a contact mech to this purpose; the contactMechPurposeTypeId is required -
getContactMech
Get the contactMechId for this cart given the contactMechPurposeTypeId -
removeContactMech
Remove the contactMechId from this cart given the contactMechPurposeTypeId -
getOrderContactMechIds
Gets order contact mech ids.- Returns:
- the order contact mech ids
-
getAdjustments
Get a List of adjustments on the order (ie cart) -
getAdjustmentPromoIndex
Gets adjustment promo index.- Parameters:
productPromoId
- the product promo id- Returns:
- the adjustment promo index
-
addAdjustment
Add an adjustment to the order; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is created -
removeAdjustment
public void removeAdjustment(int index) Remove adjustment.- Parameters:
index
- the index
-
getAdjustment
Gets adjustment.- Parameters:
index
- the index- Returns:
- the adjustment
-
getOrderTerms
Get a List of orderTerms on the order (ie cart) -
addOrderTerm
Add an orderTerm to the order -
addOrderTerm
Add an orderTerm to the order -
addOrderTerm
public int addOrderTerm(String termTypeId, String orderItemSeqId, BigDecimal termValue, Long termDays, String textValue, String description) Add order term int.- Parameters:
termTypeId
- the term type idorderItemSeqId
- the order item seq idtermValue
- the term valuetermDays
- the term daystextValue
- the text valuedescription
- the description- Returns:
- the int
-
addOrderTerm
Add an orderTerm to the order -
removeOrderTerm
public void removeOrderTerm(int index) Remove order term.- Parameters:
index
- the index
-
removeOrderTerms
public void removeOrderTerms()Remove order terms. -
isOrderTermSet
public boolean isOrderTermSet()Is order term set boolean.- Returns:
- the boolean
-
setOrderTermSet
public void setOrderTermSet(boolean orderTermSet) Sets order term set.- Parameters:
orderTermSet
- the order term set
-
hasOrderTerm
Has order term boolean.- Parameters:
termTypeId
- the term type id- Returns:
- the boolean
-
isReadOnlyCart
public boolean isReadOnlyCart()Is read only cart boolean.- Returns:
- the boolean
-
setReadOnlyCart
public void setReadOnlyCart(boolean readOnlyCart) Sets read only cart.- Parameters:
readOnlyCart
- the read only cart
-
removeAdjustmentByType
go through the order adjustments and remove all adjustments with the given type -
getTotalWeight
Returns the total weight in the cart. -
getTotalQuantity
Returns the total quantity in the cart. -
getShippableTotal
Returns the SHIPPABLE item-total in the cart for a specific ship group. -
getShippableQuantity
Returns the total SHIPPABLE quantity in the cart for a specific ship group. -
getShippableWeight
Returns the total SHIPPABLE weight in the cart for a specific ship group. -
getShippableSizes
Returns a List of shippable item's size for a specific ship group. -
getShippableItemInfo
Returns a List of shippable item info (quantity, size, weight) for a specific ship group -
shippingApplies
public boolean shippingApplies()Returns true when there are shippable items in the cart -
taxApplies
public boolean taxApplies()Returns true when there are taxable items in the cart -
getFeatureIdQtyMap
Returns a Map of all features applied to products in the cart with quantities for a specific ship group. -
viewCartOnAdd
public boolean viewCartOnAdd()Returns true if the user wishes to view the cart everytime an item is added. -
setViewCartOnAdd
public void setViewCartOnAdd(boolean viewCartOnAdd) Returns true if the user wishes to view the cart everytime an item is added. -
getOrderId
Returns the order ID associated with this cart or null if no order has been created yet. -
getFirstAttemptOrderId
Returns the first attempt order ID associated with this cart or null if no order has been created yet. -
setOrderId
Sets the orderId associated with this cart. -
setNextItemSeq
set next item seq- Throws:
GeneralException
-
setFirstAttemptOrderId
TODO: Sets the first attempt orderId for this cart. -
removeAllFreeShippingProductPromoActions
public void removeAllFreeShippingProductPromoActions()remove all free shipping product promo action -
removeFreeShippingProductPromoAction
Removes a free shipping ProductPromoAction by trying to find one in the list with the same primary key. -
addFreeShippingProductPromoAction
Adds a ProductPromoAction to be used for free shipping (must be of type free shipping, or nothing will be done). -
getFreeShippingProductPromoActions
get free shipping product promo action -
removeAllDesiredAlternateGiftByActions
public void removeAllDesiredAlternateGiftByActions()remove all desired alternative gift by action -
setDesiredAlternateGiftByAction
set all desired alternative gift by action -
getDesiredAlternateGiftByAction
get desired alternate gift by action -
getAllDesiredAlternateGiftByActionCopy
get all desired alternative gift by action copy -
addProductPromoUse
public void addProductPromoUse(String productPromoId, String productPromoCodeId, BigDecimal totalDiscountAmount, BigDecimal quantityLeftInActions, Map<ShoppingCartItem, BigDecimal> usageInfoMap) add product promo use -
removeProductPromoUse
remove product promo use -
clearProductPromoUseInfo
public void clearProductPromoUseInfo()clear out info for general promo use -
clearCartItemUseInPromoInfo
public void clearCartItemUseInPromoInfo()clear cart item use in promo info -
getProductPromoUseInfoIter
get product promo use info iter -
getProductPromoTotal
get product promo total -
getProductPromoUseTotalDiscount
Get total discount for a given ProductPromo, or for ANY ProductPromo if the passed in productPromoId is null. -
getProductPromoUseCount
get product promo use count -
getProductPromoCodeUse
get product promo code use -
clearAllPromotionInformation
public void clearAllPromotionInformation()clear all promotion information -
clearAllPromotionAdjustments
public void clearAllPromotionAdjustments()clear all promotion adjustments -
clearAllAdjustments
public void clearAllAdjustments()clear all adjustments -
clearAllItemStatus
public void clearAllItemStatus()clear all item status -
addProductPromoCode
Adds a promotion code to the cart, checking if it is valid. If it is valid this will return null, otherwise it will return a message stating why it was not valid- Parameters:
productPromoCodeId
- The promotion code to check and add- Returns:
- String that is null if valid, and added to cart, or an error message of the code was not valid and not added to the cart.
-
getProductPromoCodesEntered
get product promo codes entered -
resetPromoRuleUse
reset promo rule use -
confirmPromoRuleUse
confirm promo rule use -
addAdditionalPartyRole
Associates a party with a role to the order.- Parameters:
partyId
- identifier of the party to associate to orderroleTypeId
- identifier of the role used in party-order association
-
removeAdditionalPartyRole
Removes a previously associated party to the order.- Parameters:
partyId
- identifier of the party to associate to orderroleTypeId
- identifier of the role used in party-order association
-
getAdditionalPartyRoleMap
get additional party role map -
getAggregatedInstanceId
Returns the Id of an AGGREGATED_CONF product having exact configId. If AGGREGATED_CONF product do not exist, creates one, associates it to the AGGREGATED product, and copy its production run template.- Parameters:
item
-dispatcher
-
-
makeOrderItemGroups
make order item groups -
explodeItems
Does an "explode", or "unitize" operation on a list of cart items. Resulting state for each item with quantity X is X items of quantity 1.- Parameters:
shoppingCartItems
-dispatcher
-
-
makeOrderItems
make order items -
makeOrderItems
public List<GenericValue> makeOrderItems(boolean explodeItems, boolean replaceAggregatedId, LocalDispatcher dispatcher) make order items -
makeWorkEfforts
create WorkEfforts from the shoppingcart items when itemType = RENTAL_ORDER_ITEM -
makeAllAdjustments
make a list of all adjustments including order adjustments, order line adjustments, and special adjustments (shipping and tax if applicable) -
makeAllQuoteAdjustments
make a list of all quote adjustments including header adjustments, line adjustments, and special adjustments (shipping and tax if applicable). Internally, the quote adjustments are created from the order adjustments. -
makeAllOrderPaymentInfos
make a list of all OrderPaymentPreferences and Billing info including all payment methods and types -
makeAllOrderItemPriceInfos
make a list of OrderItemPriceInfos from the ShoppingCartItems -
makeProductPromoUses
make product promo uses -
makeAllOrderItemSurveyResponses
make a list of SurveyResponse object to update with order information set -
makeAllOrderContactMechs
make a list of OrderContactMechs from the ShoppingCart and the ShoppingCartItems -
makeAllOrderItemContactMechs
make a list of OrderContactMechs from the ShoppingCart and the ShoppingCartItems -
makeAllShipGroupInfos
Return all OrderItemShipGroup, OrderContactMech, OrderAdjustment and OrderItemShipGroupAssoc from ShoppingCart in a single list ofGenericValue
- Parameters:
dispatcher
-- Returns:
-
getShipInfoSize
public int getShipInfoSize()get ship info size -
makeAllOrderItemAttributes
make All Order Item Attributes -
makeAllOrderItemAttributes
make All Order Item Attributes -
makeAllOrderAttributes
make All Order Attributes -
makeAllOrderAttributes
make all order attributes -
makeAllOrderItemAssociations
make all order item associations -
makeCartMap
Returns a Map of cart values to pass to the storeOrder service -
getLineListOrderedByBasePrice
get line list ordered by base price -
getShipGroupsBySupplier
get ship groups by supplier -
createDropShipGroups
public Map<String,Object> createDropShipGroups(LocalDispatcher dispatcher) throws CartItemModifyException Examine each item of each ship group and create new ship groups if the item should be drop shipped- Parameters:
dispatcher
-- Throws:
CartItemModifyException
-
getOrderAttributes
get order attributes -
setOrderAttributes
set order attributes -
getOrderStatusId
get order status id -
setOrderStatusId
set order status id -
getOrderStatusString
get order status string -
setOrderStatusString
set order status string -
getMinimumOrderQuantity
public static BigDecimal getMinimumOrderQuantity(Delegator delegator, BigDecimal itemBasePrice, String itemProductId) throws GenericEntityException - Throws:
GenericEntityException
-