Class ShoppingCartItem
- java.lang.Object
-
- org.apache.ofbiz.order.shoppingcart.ShoppingCartItem
-
- All Implemented Interfaces:
java.io.Serializable
public class ShoppingCartItem extends java.lang.Object implements java.io.Serializable
Title: ShoppingCartItem.java
Description: Shopping cart item object.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String[]
attributeNames
static java.math.MathContext
generalRounding
static java.lang.String
module
static java.lang.String
resource
static java.lang.String
resource_error
-
Constructor Summary
Constructors Modifier Constructor Description protected
ShoppingCartItem()
Cannot create shopping cart item with no parametersprotected
ShoppingCartItem(Delegator delegator, java.lang.String itemTypeId, java.lang.String description, java.lang.String categoryId, java.math.BigDecimal basePrice, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, ShoppingCart.ShoppingCartItemGroup itemGroup)
Creates new ShopingCartItem object.protected
ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup)
protected
ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher)
Creates new ShoppingCartItem object.protected
ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, GenericValue parentProduct)
Creates new ShoppingCartItem object.ShoppingCartItem(ShoppingCartItem item)
Clone an item.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
addAdjustment(GenericValue adjustment)
Add an adjustment to the order item; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is createdvoid
addAllProductFeatureAndAppls(java.util.Map<java.lang.String,GenericValue> productFeatureAndApplsToAdd)
void
addContactMech(java.lang.String contactMechPurposeTypeId, java.lang.String contactMechId)
Add a contact mech to this purpose; the contactMechPurposeTypeId is requiredjava.math.BigDecimal
addPromoQuantityCandidateUse(java.math.BigDecimal quantityDesired, GenericValue productPromoCondAction, boolean checkAvailableOnly)
void
calcDepositAdjustments()
static java.lang.String
checkAvailability(java.lang.String productId, java.math.BigDecimal quantity, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, ShoppingCart cart)
returns "OK" when the product can be booked or returns a string with the dates the related fixed Asset is not availablevoid
clearPromoRuleUseInfo()
void
confirmPromoRuleUse(java.lang.String productPromoId, java.lang.String productPromoRuleId)
boolean
equals(java.lang.Object obj)
boolean
equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object with this cart item.boolean
equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.String> orderItemAttributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object order item attributes.boolean
equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item including rental data.boolean
equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item.boolean
equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object with this cart item.boolean
equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item.boolean
equals(ShoppingCartItem item)
java.util.List<ShoppingCartItem>
explodeItem(ShoppingCart cart, LocalDispatcher dispatcher)
static GenericValue
findProduct(Delegator delegator, boolean skipProductChecks, java.lang.String prodCatalogId, java.lang.String productId, java.util.Locale locale)
java.lang.String
getAccommodationMapId()
Returns accommodationMapIdjava.lang.String
getAccommodationSpotId()
Returns accommodationSpotIdGenericValue
getAdditionalProductFeatureAndAppl(java.lang.String productFeatureTypeId)
java.util.Map<java.lang.String,GenericValue>
getAdditionalProductFeatureAndAppls()
java.util.List<GenericValue>
getAdjustments()
java.util.List<java.lang.String>
getAlternativeOptionProductIds()
java.lang.String
getAssociatedOrderId()
Returns the associatedId.java.lang.String
getAssociatedOrderItemSeqId()
Returns the associatedOrderItemSeqId.java.lang.Object
getAttribute(java.lang.String name)
Return a specific attribute.java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Returns the attributes for the item.java.math.BigDecimal
getBasePrice()
Returns the base price.java.sql.Timestamp
getCancelBackOrderDate()
Returns the cancel back order dateProductConfigWrapper
getConfigWrapper()
java.lang.String
getContactMech(java.lang.String contactMechPurposeTypeId)
Get the contactMechId for this item given the contactMechPurposeTypeIdDelegator
getDelegator()
java.lang.String
getDescription(LocalDispatcher dispatcher)
Returns the item's description.java.sql.Timestamp
getDesiredDeliveryDate()
Returns the item's customer desired delivery date.java.math.BigDecimal
getDisplayItemRecurringSubTotal()
java.math.BigDecimal
getDisplayItemRecurringSubTotalNoAdj()
java.math.BigDecimal
getDisplayItemSubTotal()
java.math.BigDecimal
getDisplayItemSubTotalNoAdj()
java.math.BigDecimal
getDisplayPrice()
java.sql.Timestamp
getEstimatedShipDate()
Returns the date to EstimatedShipDatejava.lang.String
getExternalId()
java.util.Map<java.lang.String,java.math.BigDecimal>
getFeatureIdQtyMap(java.math.BigDecimal quantity)
java.util.Set<java.lang.String>
getFeatureSet()
Returns a Set of the item's featuresjava.util.List<GenericValue>
getFeaturesForSupplier(LocalDispatcher dispatcher, java.lang.String partyId)
Returns a List of the item's features for supplierboolean
getIsModifiedPrice()
Returns isModifiedPriceboolean
getIsPromo()
java.lang.String
getItemComment()
Returns the item's comment.ShoppingCart.ShoppingCartItemGroup
getItemGroup()
Returns the item group.java.util.Map<java.lang.String,java.lang.Object>
getItemProductInfo()
java.math.BigDecimal
getItemSubTotal()
java.math.BigDecimal
getItemSubTotal(java.math.BigDecimal quantity)
Returns the total line price.java.lang.String
getItemType()
Returns the item type.java.lang.String
getItemTypeDescription()
Returns the item type description.GenericValue
getItemTypeGenericValue()
Returns the item type.java.math.BigDecimal
getListPrice()
Returns the list price.java.lang.String
getName()
Deprecated.use getName(LocalDispatcher dispatcher)java.lang.String
getName(LocalDispatcher dispatcher)
Returns the item's description or PRODUCT_NAME from content.java.util.Map<java.lang.String,java.util.List<GenericValue>>
getOptionalProductFeatures()
java.lang.String
getOrderItemAssocTypeId()
Returns the OrderItemAssocTypeId.java.lang.String
getOrderItemAttribute(java.lang.String name)
Return an OrderItemAttribute.java.util.Map<java.lang.String,java.lang.String>
getOrderItemAttributes()
java.util.Map<java.lang.String,java.lang.String>
getOrderItemContactMechIds()
java.util.List<GenericValue>
getOrderItemPriceInfos()
java.lang.String
getOrderItemSeqId()
java.math.BigDecimal
getOtherAdjustments()
Returns the "other" adjustments.java.math.BigDecimal
getOtherAdjustmentsRecurring()
Returns the "other" adjustments.GenericValue
getParentProduct()
java.lang.String
getParentProductId()
long
getPiecesIncluded()
Returns the item's pieces includedjava.lang.String
getProdCatalogId()
GenericValue
getProduct()
Gets the Product entity.java.lang.String
getProductCategoryId()
Returns the productCategoryId for the item or null if none.java.lang.String
getProductId()
Returns the item's productId.java.math.BigDecimal
getPromoQuantityAvailable()
java.math.BigDecimal
getPromoQuantityCandidateUse(GenericValue productPromoCondAction)
java.math.BigDecimal
getPromoQuantityCandidateUseActionAndAllConds(GenericValue productPromoAction)
java.math.BigDecimal
getPromoQuantityUsed()
static java.lang.String
getPurchaseOrderItemDescription(GenericValue product, GenericValue supplierProduct, java.util.Locale locale, LocalDispatcher dispatcher)
java.math.BigDecimal
getQuantity()
Returns the quantity.java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>>
getQuantityUsedPerPromoActualIter()
java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>>
getQuantityUsedPerPromoCandidateIter()
java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>>
getQuantityUsedPerPromoFailedIter()
java.lang.String
getQuoteId()
Returns the quoteId.java.lang.String
getQuoteItemSeqId()
Returns the quoteItemSeqId.java.math.BigDecimal
getRecurringBasePrice()
java.math.BigDecimal
getRecurringDisplayPrice()
java.math.BigDecimal
getRentalAdjustment()
calculates for a reservation the percentage/100 extra for more than 1 person.java.lang.String
getRequirementId()
Returns the requirementId.java.math.BigDecimal
getReserv2ndPPPerc()
get the percentage for the second personjava.sql.Timestamp
getReserveAfterDate()
Returns the date to ship afterjava.math.BigDecimal
getReservLength()
Returns the reservation length.java.math.BigDecimal
getReservNthPPPerc()
get the percentage for the third and following personjava.math.BigDecimal
getReservPersons()
Returns the reservation number of persons.java.sql.Timestamp
getReservStart()
Returns the reservation start date.java.sql.Timestamp
getReservStart(java.math.BigDecimal addDays)
Returns the reservation start date with a number of days added.java.math.BigDecimal
getSelectedAmount()
Returns the user selected amountjava.sql.Timestamp
getShipAfterDate()
Returns the date to ship afterjava.sql.Timestamp
getShipBeforeDate()
Returns the date to ship beforejava.lang.String
getShoppingListId()
java.lang.String
getShoppingListItemSeqId()
java.math.BigDecimal
getSize()
Returns the item's size (length + girth)java.math.BigDecimal
getSpecialPromoPrice()
java.util.List<GenericValue>
getStandardFeatureList()
Returns a list of the item's standard featuresjava.lang.String
getStatusId()
java.lang.String
getSupplierProductId()
Returns the item's supplierProductId.java.math.BigDecimal
getWeight()
Returns the item's unit weightint
hashCode()
boolean
isInItemGroup(java.lang.String groupNumber)
protected boolean
isInventoryAvailableOrNotRequired(java.math.BigDecimal quantity, java.lang.String productStoreId, LocalDispatcher dispatcher)
static void
isValidCartProduct(ProductConfigWrapper configWrapper, GenericValue product, java.sql.Timestamp nowTimestamp, java.util.Locale locale)
static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, java.lang.String itemType, java.lang.String itemDescription, java.lang.String productCategoryId, java.math.BigDecimal basePrice, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool)
Makes a non-product ShoppingCartItem and adds it to the cart.static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp reserveAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks)
Makes a ShoppingCartItem and adds it to the cart.static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks)
static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks)
Makes a ShoppingCartItem and adds it to the cart.static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, GenericValue product, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp reserveAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, GenericValue parentProduct, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks)
Makes a ShoppingCartItem and adds it to the cart.static ShoppingCartItem
makeItem(java.lang.Integer cartLocation, GenericValue product, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, GenericValue parentProduct, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks)
Makes a ShoppingCartItem and adds it to the cart.static ShoppingCartItem
makePurchaseOrderItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue supplierProduct, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp cancelBackOrderDate)
Makes a ShoppingCartItem for a purchase order item and adds it to the cart.void
putAdditionalProductFeatureAndAppl(GenericValue additionalProductFeatureAndAppl)
GenericValue
removeAdditionalProductFeatureAndAppl(java.lang.String productFeatureTypeId)
void
removeAdjustment(int index)
void
removeAdjustment(GenericValue adjustment)
void
removeAttribute(java.lang.String name)
Removes an item attribute.java.lang.String
removeContactMech(java.lang.String contactMechPurposeTypeId)
Remove the contactMechId from this item given the contactMechPurposeTypeIdvoid
removeFeatureAdjustment(java.lang.String productFeatureId)
void
removeOrderItemAttribute(java.lang.String name)
Remove an OrderItemAttribute.void
resetPromoRuleUse(java.lang.String productPromoId, java.lang.String productPromoRuleId)
void
setAccommodationId(java.lang.String accommodationMapId, java.lang.String accommodationSpotId)
Sets accommodationId using the reservationvoid
setAlternativeOptionProductIds(java.util.List<java.lang.String> alternativeOptionProductIds)
void
setAssociatedOrderId(java.lang.String associatedOrderId)
Sets the associatedOrderId.void
setAssociatedOrderItemSeqId(java.lang.String associatedOrderItemSeqId)
Sets the associatedOrderItemSeqId.void
setAttribute(java.lang.String name, java.lang.Object value)
Sets an item attribute.void
setBasePrice(java.math.BigDecimal basePrice)
Sets the base price for the item; use with cautionvoid
setCancelBackOrderDate(java.sql.Timestamp date)
Sets the cancel back order datevoid
setDesiredDeliveryDate(java.sql.Timestamp ddDate)
Sets the item's customer desired delivery date.void
setDisplayPrice(java.math.BigDecimal displayPrice)
Sets the display price for the item; use with cautionvoid
setEstimatedShipDate(java.sql.Timestamp date)
Sets the date to EstimatedShipDatevoid
setExternalId(java.lang.String externalId)
void
setIsModifiedPrice(boolean isModifiedPrice)
Set isModifiedPricevoid
setIsPromo(boolean isPromo)
void
setItemComment(java.lang.String itemComment)
Sets the item comment.void
setItemGroup(java.lang.String groupNumber, ShoppingCart cart)
Sets the item group.void
setItemGroup(ShoppingCart.ShoppingCartItemGroup itemGroup)
Sets the item group.void
setItemType(java.lang.String itemType)
Sets the item type.void
setListPrice(java.math.BigDecimal listPrice)
protected void
setLocale(java.util.Locale locale)
Set the item's locale (from ShoppingCart.setLocale)void
setName(java.lang.String itemName)
Set the item's description.void
setOrderItemAssocTypeId(java.lang.String orderItemAssocTypeId)
Sets the orderItemAssocTypeId.void
setOrderItemAttribute(java.lang.String name, java.lang.String value)
Creates an OrderItemAttribute entry.void
setOrderItemSeqId(java.lang.String orderItemSeqId)
void
setProductCategoryId(java.lang.String productCategoryId)
void
setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart)
Sets the quantity for the item and validates the change in quantity, etcvoid
setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps)
Sets the quantity for the item and validates the change in quantity, etcvoid
setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup)
Sets the quantity for the item and validates the change in quantity, etcvoid
setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice)
Sets the quantity for the item and validates the change in quantity, etcprotected void
setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks)
void
setQuoteId(java.lang.String quoteId)
Sets the quoteId.void
setQuoteItemSeqId(java.lang.String quoteItemSeqId)
Sets the quoteItemSeqId.void
setRecurringBasePrice(java.math.BigDecimal recurringBasePrice)
Sets the base price for the item; use with cautionvoid
setRecurringDisplayPrice(java.math.BigDecimal recurringDisplayPrice)
Sets the display price for the item; use with cautionvoid
setRequirementId(java.lang.String requirementId)
Sets the requirementId.void
setReserv2ndPPPerc(java.math.BigDecimal reserv2ndPPPerc)
Sets the extra % for second personvoid
setReserveAfterDate(java.sql.Timestamp date)
Sets the date to ship aftervoid
setReservLength(java.math.BigDecimal reservLength)
Sets the reservation lengthvoid
setReservNthPPPerc(java.math.BigDecimal reservNthPPPerc)
Sets the extra % for third and following personvoid
setReservPersons(java.math.BigDecimal reservPersons)
Sets number of persons using the reservationvoid
setReservStart(java.sql.Timestamp reservStart)
Sets the reservation start datevoid
setSelectedAmount(java.math.BigDecimal selectedAmount)
Sets the user selected amountvoid
setShipAfterDate(java.sql.Timestamp date)
Sets the date to ship aftervoid
setShipBeforeDate(java.sql.Timestamp date)
Sets the date to ship beforevoid
setShoppingList(java.lang.String shoppingListId, java.lang.String itemSeqId)
void
setSpecialPromoPrice(java.math.BigDecimal specialPromoPrice)
void
setStatusId(java.lang.String statusId)
void
setSupplierProductId(java.lang.String supplierProductId)
Set the item's supplierProductId.boolean
shippingApplies()
Returns true if shipping charges apply to this item.boolean
taxApplies()
Returns true if tax charges apply to this item.void
updatePrice(LocalDispatcher dispatcher, ShoppingCart cart)
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
resource_error
public static final java.lang.String resource_error
- See Also:
- Constant Field Values
-
attributeNames
protected static final java.lang.String[] attributeNames
-
generalRounding
public static final java.math.MathContext generalRounding
-
-
Constructor Detail
-
ShoppingCartItem
public ShoppingCartItem(ShoppingCartItem item)
Clone an item.
-
ShoppingCartItem
protected ShoppingCartItem()
Cannot create shopping cart item with no parameters
-
ShoppingCartItem
@Deprecated protected ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup)
Deprecated.Creates new ShoppingCartItem object.
-
ShoppingCartItem
protected ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher)
Creates new ShoppingCartItem object.- Parameters:
dispatcher
- TODO
-
ShoppingCartItem
protected ShoppingCartItem(GenericValue product, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.util.Locale locale, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, GenericValue parentProduct)
Creates new ShoppingCartItem object.
-
ShoppingCartItem
protected ShoppingCartItem(Delegator delegator, java.lang.String itemTypeId, java.lang.String description, java.lang.String categoryId, java.math.BigDecimal basePrice, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.util.Locale locale, ShoppingCart.ShoppingCartItemGroup itemGroup)
Creates new ShopingCartItem object.
-
-
Method Detail
-
makePurchaseOrderItem
public static ShoppingCartItem makePurchaseOrderItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue supplierProduct, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp cancelBackOrderDate) throws CartItemModifyException, ItemNotFoundException
Makes a ShoppingCartItem for a purchase order item and adds it to the cart. NOTE: This method will get the product entity and check to make sure it can be purchased.- Parameters:
cartLocation
- The location to place this item; null will place at the endproductId
- The primary key of the product being addedquantity
- The quantity to addadditionalProductFeatureAndAppls
- Product feature/appls mapattributes
- All unique attributes for this item (NOT features)prodCatalogId
- The catalog this item was added fromconfigWrapper
- The product configuration wrapper (null if the product is not configurable)dispatcher
- LocalDispatcher object for doing promotions, etccart
- The parent shopping cart object this item will belong tosupplierProduct
- GenericValue of SupplierProduct entity, containing product description and pricesshipBeforeDate
- Request that the shipment be made before this dateshipAfterDate
- Request that the shipment be made after this datecancelBackOrderDate
- The date which if crossed causes order cancellation- Returns:
- a new ShoppingCartItem object
- Throws:
CartItemModifyException
ItemNotFoundException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks) throws CartItemModifyException, ItemNotFoundException
Makes a ShoppingCartItem and adds it to the cart. NOTE: This method will get the product entity and check to make sure it can be purchased.- Parameters:
cartLocation
- The location to place this item; null will place at the endproductId
- The primary key of the product being addedselectedAmount
- Optional. Defaults to 0.0. If a selectedAmount is needed (complements the quantity value), pass it in here.quantity
- Required. The quantity to add.unitPrice
- Optional. Defaults to 0.0, which causes calculation of price.reservStart
- Optional. The start of the reservation.reservLength
- Optional. The length of the reservation.reservPersons
- Optional. The number of persons taking advantage of the reservation.shipBeforeDate
- Optional. The date to ship the order by.shipAfterDate
- Optional. Wait until this date to ship.additionalProductFeatureAndAppls
- Optional. Product feature/appls map.attributes
- Optional. All unique attributes for this item (NOT features).prodCatalogId
- Optional, but strongly recommended. The catalog this item was added from.configWrapper
- Optional. The product configuration wrapper (null if the product is not configurable).itemType
- Optional. Specifies the type of cart item, corresponds to an OrderItemType and should be a valid orderItemTypeId.itemGroup
- Optional. Specifies which item group in the cart this should belong to, if item groups are needed/desired.dispatcher
- Required (for price calculation, promos, etc). LocalDispatcher object for doing promotions, etc.cart
- Required. The parent shopping cart object this item will belong to.triggerExternalOpsBool
- Optional. Defaults to true. Trigger external operations (like promotions and such)?triggerPriceRulesBool
- Optional. Defaults to true. Trigger the price rules to calculate the price for this item?- Returns:
- a new ShoppingCartItem object
- Throws:
CartItemModifyException
ItemNotFoundException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks) throws CartItemModifyException, ItemNotFoundException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, java.lang.String productId, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp reserveAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, java.lang.String parentProductId, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks) throws CartItemModifyException, ItemNotFoundException
Makes a ShoppingCartItem and adds it to the cart.- Parameters:
accommodationMapId
- Optional. reservations add into workeffortaccommodationSpotId
- Optional. reservations add into workeffort- Throws:
CartItemModifyException
ItemNotFoundException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, GenericValue product, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, GenericValue parentProduct, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks) throws CartItemModifyException
Makes a ShoppingCartItem and adds it to the cart. WARNING: This method does not check if the product is in a purchase category. rental fields were added.- Parameters:
cartLocation
- The location to place this item; null will place at the endproduct
- The product entity relating to the product being addedselectedAmount
- Optional. Defaults to 0.0. If a selectedAmount is needed (complements the quantity value), pass it in here.quantity
- Required. The quantity to add.unitPrice
- Optional. Defaults to 0.0, which causes calculation of price.reservStart
- Optional. The start of the reservation.reservLength
- Optional. The length of the reservation.reservPersons
- Optional. The number of persons taking advantage of the reservation.shipBeforeDate
- Optional. The date to ship the order by.shipAfterDate
- Optional. Wait until this date to ship.additionalProductFeatureAndAppls
- Optional. Product feature/appls map.attributes
- Optional. All unique attributes for this item (NOT features).prodCatalogId
- Optional, but strongly recommended. The catalog this item was added from.configWrapper
- Optional. The product configuration wrapper (null if the product is not configurable).itemType
- Optional. Specifies the type of cart item, corresponds to an OrderItemType and should be a valid orderItemTypeId.itemGroup
- Optional. Specifies which item group in the cart this should belong to, if item groups are needed/desired.dispatcher
- Required (for price calculation, promos, etc). LocalDispatcher object for doing promotions, etc.cart
- Required. The parent shopping cart object this item will belong to.triggerExternalOpsBool
- Optional. Defaults to true. Trigger external operations (like promotions and such)?triggerPriceRulesBool
- Optional. Defaults to true. Trigger the price rules to calculate the price for this item?- Returns:
- a new ShoppingCartItem object
- Throws:
CartItemModifyException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, GenericValue product, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.math.BigDecimal unitPrice, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.sql.Timestamp shipBeforeDate, java.sql.Timestamp shipAfterDate, java.sql.Timestamp reserveAfterDate, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool, java.lang.Boolean triggerPriceRulesBool, GenericValue parentProduct, java.lang.Boolean skipInventoryChecks, java.lang.Boolean skipProductChecks) throws CartItemModifyException
Makes a ShoppingCartItem and adds it to the cart.- Parameters:
accommodationMapId
- Optional. reservations add into workeffortaccommodationSpotId
- Optional. reservations add into workeffort- Throws:
CartItemModifyException
-
findProduct
public static GenericValue findProduct(Delegator delegator, boolean skipProductChecks, java.lang.String prodCatalogId, java.lang.String productId, java.util.Locale locale) throws ItemNotFoundException
- Throws:
ItemNotFoundException
-
isValidCartProduct
public static void isValidCartProduct(ProductConfigWrapper configWrapper, GenericValue product, java.sql.Timestamp nowTimestamp, java.util.Locale locale) throws CartItemModifyException
- Throws:
CartItemModifyException
-
makeItem
public static ShoppingCartItem makeItem(java.lang.Integer cartLocation, java.lang.String itemType, java.lang.String itemDescription, java.lang.String productCategoryId, java.math.BigDecimal basePrice, java.math.BigDecimal selectedAmount, java.math.BigDecimal quantity, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ShoppingCart.ShoppingCartItemGroup itemGroup, LocalDispatcher dispatcher, ShoppingCart cart, java.lang.Boolean triggerExternalOpsBool) throws CartItemModifyException
Makes a non-product ShoppingCartItem and adds it to the cart. NOTE: This is only for non-product items; items without a product entity (work items, bulk items, etc)- Parameters:
cartLocation
- The location to place this item; null will place at the enditemType
- The OrderItemTypeId for the item being addeditemDescription
- The optional description of the itemproductCategoryId
- The optional category the product *will* go inbasePrice
- The price for this itemselectedAmount
-quantity
- The quantity to addattributes
- All unique attributes for this item (NOT features)prodCatalogId
- The catalog this item was added fromdispatcher
- LocalDispatcher object for doing promotions, etccart
- The parent shopping cart object this item will belong totriggerExternalOpsBool
- Indicates if we should run external operations (promotions, auto-save, etc)- Returns:
- a new ShoppingCartItem object
- Throws:
CartItemModifyException
-
getProdCatalogId
public java.lang.String getProdCatalogId()
-
setExternalId
public void setExternalId(java.lang.String externalId)
-
getExternalId
public java.lang.String getExternalId()
-
setSelectedAmount
public void setSelectedAmount(java.math.BigDecimal selectedAmount)
Sets the user selected amount
-
getSelectedAmount
public java.math.BigDecimal getSelectedAmount()
Returns the user selected amount
-
setBasePrice
public void setBasePrice(java.math.BigDecimal basePrice)
Sets the base price for the item; use with caution
-
setDisplayPrice
public void setDisplayPrice(java.math.BigDecimal displayPrice)
Sets the display price for the item; use with caution
-
setRecurringBasePrice
public void setRecurringBasePrice(java.math.BigDecimal recurringBasePrice)
Sets the base price for the item; use with caution
-
setRecurringDisplayPrice
public void setRecurringDisplayPrice(java.math.BigDecimal recurringDisplayPrice)
Sets the display price for the item; use with caution
-
setSpecialPromoPrice
public void setSpecialPromoPrice(java.math.BigDecimal specialPromoPrice)
-
setReserv2ndPPPerc
public void setReserv2ndPPPerc(java.math.BigDecimal reserv2ndPPPerc)
Sets the extra % for second person
-
setReservNthPPPerc
public void setReservNthPPPerc(java.math.BigDecimal reservNthPPPerc)
Sets the extra % for third and following person
-
setReservStart
public void setReservStart(java.sql.Timestamp reservStart)
Sets the reservation start date
-
setReservLength
public void setReservLength(java.math.BigDecimal reservLength)
Sets the reservation length
-
setReservPersons
public void setReservPersons(java.math.BigDecimal reservPersons)
Sets number of persons using the reservation
-
setAccommodationId
public void setAccommodationId(java.lang.String accommodationMapId, java.lang.String accommodationSpotId)
Sets accommodationId using the reservation
-
setQuantity
public void setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart) throws CartItemModifyException
Sets the quantity for the item and validates the change in quantity, etc- Throws:
CartItemModifyException
-
setQuantity
public void setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps) throws CartItemModifyException
Sets the quantity for the item and validates the change in quantity, etc- Throws:
CartItemModifyException
-
setQuantity
public void setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup) throws CartItemModifyException
Sets the quantity for the item and validates the change in quantity, etc- Throws:
CartItemModifyException
-
setQuantity
public void setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice) throws CartItemModifyException
Sets the quantity for the item and validates the change in quantity, etc- Throws:
CartItemModifyException
-
checkAvailability
public static java.lang.String checkAvailability(java.lang.String productId, java.math.BigDecimal quantity, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, ShoppingCart cart)
returns "OK" when the product can be booked or returns a string with the dates the related fixed Asset is not available
-
isInventoryAvailableOrNotRequired
protected boolean isInventoryAvailableOrNotRequired(java.math.BigDecimal quantity, java.lang.String productStoreId, LocalDispatcher dispatcher) throws CartItemModifyException
- Throws:
CartItemModifyException
-
setQuantity
protected void setQuantity(java.math.BigDecimal quantity, LocalDispatcher dispatcher, ShoppingCart cart, boolean triggerExternalOps, boolean resetShipGroup, boolean updateProductPrice, boolean skipInventoryChecks) throws CartItemModifyException
- Throws:
CartItemModifyException
-
calcDepositAdjustments
public void calcDepositAdjustments()
-
updatePrice
public void updatePrice(LocalDispatcher dispatcher, ShoppingCart cart) throws CartItemModifyException
- Throws:
CartItemModifyException
-
getQuantity
public java.math.BigDecimal getQuantity()
Returns the quantity.
-
getReservStart
public java.sql.Timestamp getReservStart()
Returns the reservation start date.
-
getReservStart
public java.sql.Timestamp getReservStart(java.math.BigDecimal addDays)
Returns the reservation start date with a number of days added.
-
getReservLength
public java.math.BigDecimal getReservLength()
Returns the reservation length.
-
getReservPersons
public java.math.BigDecimal getReservPersons()
Returns the reservation number of persons.
-
getAccommodationMapId
public java.lang.String getAccommodationMapId()
Returns accommodationMapId
-
getAccommodationSpotId
public java.lang.String getAccommodationSpotId()
Returns accommodationSpotId
-
getPromoQuantityUsed
public java.math.BigDecimal getPromoQuantityUsed()
-
getPromoQuantityAvailable
public java.math.BigDecimal getPromoQuantityAvailable()
-
getQuantityUsedPerPromoActualIter
public java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>> getQuantityUsedPerPromoActualIter()
-
getQuantityUsedPerPromoCandidateIter
public java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>> getQuantityUsedPerPromoCandidateIter()
-
getQuantityUsedPerPromoFailedIter
public java.util.Iterator<java.util.Map.Entry<GenericPK,java.math.BigDecimal>> getQuantityUsedPerPromoFailedIter()
-
addPromoQuantityCandidateUse
public java.math.BigDecimal addPromoQuantityCandidateUse(java.math.BigDecimal quantityDesired, GenericValue productPromoCondAction, boolean checkAvailableOnly)
-
getPromoQuantityCandidateUse
public java.math.BigDecimal getPromoQuantityCandidateUse(GenericValue productPromoCondAction)
-
getPromoQuantityCandidateUseActionAndAllConds
public java.math.BigDecimal getPromoQuantityCandidateUseActionAndAllConds(GenericValue productPromoAction)
-
resetPromoRuleUse
public void resetPromoRuleUse(java.lang.String productPromoId, java.lang.String productPromoRuleId)
-
confirmPromoRuleUse
public void confirmPromoRuleUse(java.lang.String productPromoId, java.lang.String productPromoRuleId)
-
clearPromoRuleUseInfo
public void clearPromoRuleUseInfo()
-
setItemComment
public void setItemComment(java.lang.String itemComment)
Sets the item comment.
-
getItemComment
public java.lang.String getItemComment()
Returns the item's comment.
-
setDesiredDeliveryDate
public void setDesiredDeliveryDate(java.sql.Timestamp ddDate)
Sets the item's customer desired delivery date.
-
getDesiredDeliveryDate
public java.sql.Timestamp getDesiredDeliveryDate()
Returns the item's customer desired delivery date.
-
setShipBeforeDate
public void setShipBeforeDate(java.sql.Timestamp date)
Sets the date to ship before
-
getShipBeforeDate
public java.sql.Timestamp getShipBeforeDate()
Returns the date to ship before
-
setShipAfterDate
public void setShipAfterDate(java.sql.Timestamp date)
Sets the date to ship after
-
getShipAfterDate
public java.sql.Timestamp getShipAfterDate()
Returns the date to ship after
-
setReserveAfterDate
public void setReserveAfterDate(java.sql.Timestamp date)
Sets the date to ship after
-
getReserveAfterDate
public java.sql.Timestamp getReserveAfterDate()
Returns the date to ship after
-
setCancelBackOrderDate
public void setCancelBackOrderDate(java.sql.Timestamp date)
Sets the cancel back order date
-
getCancelBackOrderDate
public java.sql.Timestamp getCancelBackOrderDate()
Returns the cancel back order date
-
setEstimatedShipDate
public void setEstimatedShipDate(java.sql.Timestamp date)
Sets the date to EstimatedShipDate
-
getEstimatedShipDate
public java.sql.Timestamp getEstimatedShipDate()
Returns the date to EstimatedShipDate
-
setItemType
public void setItemType(java.lang.String itemType)
Sets the item type.
-
getItemType
public java.lang.String getItemType()
Returns the item type.
-
getItemTypeGenericValue
public GenericValue getItemTypeGenericValue()
Returns the item type.
-
setItemGroup
public void setItemGroup(ShoppingCart.ShoppingCartItemGroup itemGroup)
Sets the item group.
-
setItemGroup
public void setItemGroup(java.lang.String groupNumber, ShoppingCart cart)
Sets the item group.
-
getItemGroup
public ShoppingCart.ShoppingCartItemGroup getItemGroup()
Returns the item group.
-
isInItemGroup
public boolean isInItemGroup(java.lang.String groupNumber)
-
getItemTypeDescription
public java.lang.String getItemTypeDescription()
Returns the item type description.
-
getProductCategoryId
public java.lang.String getProductCategoryId()
Returns the productCategoryId for the item or null if none.
-
setProductCategoryId
public void setProductCategoryId(java.lang.String productCategoryId)
-
setOrderItemSeqId
public void setOrderItemSeqId(java.lang.String orderItemSeqId)
-
getOrderItemSeqId
public java.lang.String getOrderItemSeqId()
-
setShoppingList
public void setShoppingList(java.lang.String shoppingListId, java.lang.String itemSeqId)
-
getShoppingListId
public java.lang.String getShoppingListId()
-
getShoppingListItemSeqId
public java.lang.String getShoppingListItemSeqId()
-
setRequirementId
public void setRequirementId(java.lang.String requirementId)
Sets the requirementId.
-
getRequirementId
public java.lang.String getRequirementId()
Returns the requirementId.
-
setQuoteId
public void setQuoteId(java.lang.String quoteId)
Sets the quoteId.
-
getQuoteId
public java.lang.String getQuoteId()
Returns the quoteId.
-
setQuoteItemSeqId
public void setQuoteItemSeqId(java.lang.String quoteItemSeqId)
Sets the quoteItemSeqId.
-
getQuoteItemSeqId
public java.lang.String getQuoteItemSeqId()
Returns the quoteItemSeqId.
-
setOrderItemAssocTypeId
public void setOrderItemAssocTypeId(java.lang.String orderItemAssocTypeId)
Sets the orderItemAssocTypeId.
-
getOrderItemAssocTypeId
public java.lang.String getOrderItemAssocTypeId()
Returns the OrderItemAssocTypeId.
-
setAssociatedOrderId
public void setAssociatedOrderId(java.lang.String associatedOrderId)
Sets the associatedOrderId.
-
getAssociatedOrderId
public java.lang.String getAssociatedOrderId()
Returns the associatedId.
-
setAssociatedOrderItemSeqId
public void setAssociatedOrderItemSeqId(java.lang.String associatedOrderItemSeqId)
Sets the associatedOrderItemSeqId.
-
getAssociatedOrderItemSeqId
public java.lang.String getAssociatedOrderItemSeqId()
Returns the associatedOrderItemSeqId.
-
getStatusId
public java.lang.String getStatusId()
-
setStatusId
public void setStatusId(java.lang.String statusId)
-
shippingApplies
public boolean shippingApplies()
Returns true if shipping charges apply to this item.
-
taxApplies
public boolean taxApplies()
Returns true if tax charges apply to this item.
-
getProductId
public java.lang.String getProductId()
Returns the item's productId.
-
getSupplierProductId
public java.lang.String getSupplierProductId()
Returns the item's supplierProductId.
-
setSupplierProductId
public void setSupplierProductId(java.lang.String supplierProductId)
Set the item's supplierProductId.
-
setLocale
protected void setLocale(java.util.Locale locale)
Set the item's locale (from ShoppingCart.setLocale)
-
setName
public void setName(java.lang.String itemName)
Set the item's description.
-
getName
@Deprecated public java.lang.String getName()
Deprecated.use getName(LocalDispatcher dispatcher)Returns the item's description.
-
getName
public java.lang.String getName(LocalDispatcher dispatcher)
Returns the item's description or PRODUCT_NAME from content.
-
getDescription
public java.lang.String getDescription(LocalDispatcher dispatcher)
Returns the item's description.
-
getConfigWrapper
public ProductConfigWrapper getConfigWrapper()
-
getWeight
public java.math.BigDecimal getWeight()
Returns the item's unit weight
-
getPiecesIncluded
public long getPiecesIncluded()
Returns the item's pieces included
-
getFeatureSet
public java.util.Set<java.lang.String> getFeatureSet()
Returns a Set of the item's features
-
getStandardFeatureList
public java.util.List<GenericValue> getStandardFeatureList()
Returns a list of the item's standard features
-
getFeaturesForSupplier
public java.util.List<GenericValue> getFeaturesForSupplier(LocalDispatcher dispatcher, java.lang.String partyId)
Returns a List of the item's features for supplier
-
getSize
public java.math.BigDecimal getSize()
Returns the item's size (length + girth)
-
getItemProductInfo
public java.util.Map<java.lang.String,java.lang.Object> getItemProductInfo()
-
getBasePrice
public java.math.BigDecimal getBasePrice()
Returns the base price.
-
getDisplayPrice
public java.math.BigDecimal getDisplayPrice()
-
getSpecialPromoPrice
public java.math.BigDecimal getSpecialPromoPrice()
-
getRecurringBasePrice
public java.math.BigDecimal getRecurringBasePrice()
-
getRecurringDisplayPrice
public java.math.BigDecimal getRecurringDisplayPrice()
-
getListPrice
public java.math.BigDecimal getListPrice()
Returns the list price.
-
setListPrice
public void setListPrice(java.math.BigDecimal listPrice)
-
getIsModifiedPrice
public boolean getIsModifiedPrice()
Returns isModifiedPrice
-
setIsModifiedPrice
public void setIsModifiedPrice(boolean isModifiedPrice)
Set isModifiedPrice
-
getReserv2ndPPPerc
public java.math.BigDecimal getReserv2ndPPPerc()
get the percentage for the second person
-
getReservNthPPPerc
public java.math.BigDecimal getReservNthPPPerc()
get the percentage for the third and following person
-
getOtherAdjustments
public java.math.BigDecimal getOtherAdjustments()
Returns the "other" adjustments.
-
getOtherAdjustmentsRecurring
public java.math.BigDecimal getOtherAdjustmentsRecurring()
Returns the "other" adjustments.
-
getRentalAdjustment
public java.math.BigDecimal getRentalAdjustment()
calculates for a reservation the percentage/100 extra for more than 1 person.
-
getItemSubTotal
public java.math.BigDecimal getItemSubTotal(java.math.BigDecimal quantity)
Returns the total line price.
-
getItemSubTotal
public java.math.BigDecimal getItemSubTotal()
-
getDisplayItemSubTotal
public java.math.BigDecimal getDisplayItemSubTotal()
-
getDisplayItemSubTotalNoAdj
public java.math.BigDecimal getDisplayItemSubTotalNoAdj()
-
getDisplayItemRecurringSubTotal
public java.math.BigDecimal getDisplayItemRecurringSubTotal()
-
getDisplayItemRecurringSubTotalNoAdj
public java.math.BigDecimal getDisplayItemRecurringSubTotalNoAdj()
-
addAllProductFeatureAndAppls
public void addAllProductFeatureAndAppls(java.util.Map<java.lang.String,GenericValue> productFeatureAndApplsToAdd)
-
putAdditionalProductFeatureAndAppl
public void putAdditionalProductFeatureAndAppl(GenericValue additionalProductFeatureAndAppl)
-
getAdditionalProductFeatureAndAppl
public GenericValue getAdditionalProductFeatureAndAppl(java.lang.String productFeatureTypeId)
-
removeAdditionalProductFeatureAndAppl
public GenericValue removeAdditionalProductFeatureAndAppl(java.lang.String productFeatureTypeId)
-
getAdditionalProductFeatureAndAppls
public java.util.Map<java.lang.String,GenericValue> getAdditionalProductFeatureAndAppls()
-
getFeatureIdQtyMap
public java.util.Map<java.lang.String,java.math.BigDecimal> getFeatureIdQtyMap(java.math.BigDecimal quantity)
-
removeAttribute
public void removeAttribute(java.lang.String name)
Removes an item attribute.
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)
Sets an item attribute.
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
Return a specific attribute.
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Returns the attributes for the item.
-
removeOrderItemAttribute
public void removeOrderItemAttribute(java.lang.String name)
Remove an OrderItemAttribute.
-
setOrderItemAttribute
public void setOrderItemAttribute(java.lang.String name, java.lang.String value)
Creates an OrderItemAttribute entry.
-
getOrderItemAttribute
public java.lang.String getOrderItemAttribute(java.lang.String name)
Return an OrderItemAttribute.
-
getOrderItemAttributes
public java.util.Map<java.lang.String,java.lang.String> getOrderItemAttributes()
-
addAdjustment
public int addAdjustment(GenericValue adjustment)
Add an adjustment to the order item; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is created
-
removeAdjustment
public void removeAdjustment(GenericValue adjustment)
-
removeAdjustment
public void removeAdjustment(int index)
-
getAdjustments
public java.util.List<GenericValue> getAdjustments()
-
removeFeatureAdjustment
public void removeFeatureAdjustment(java.lang.String productFeatureId)
-
getOrderItemPriceInfos
public java.util.List<GenericValue> getOrderItemPriceInfos()
-
addContactMech
public void addContactMech(java.lang.String contactMechPurposeTypeId, java.lang.String contactMechId)
Add a contact mech to this purpose; the contactMechPurposeTypeId is required
-
getContactMech
public java.lang.String getContactMech(java.lang.String contactMechPurposeTypeId)
Get the contactMechId for this item given the contactMechPurposeTypeId
-
removeContactMech
public java.lang.String removeContactMech(java.lang.String contactMechPurposeTypeId)
Remove the contactMechId from this item given the contactMechPurposeTypeId
-
getOrderItemContactMechIds
public java.util.Map<java.lang.String,java.lang.String> getOrderItemContactMechIds()
-
setIsPromo
public void setIsPromo(boolean isPromo)
-
getIsPromo
public boolean getIsPromo()
-
getAlternativeOptionProductIds
public java.util.List<java.lang.String> getAlternativeOptionProductIds()
-
setAlternativeOptionProductIds
public void setAlternativeOptionProductIds(java.util.List<java.lang.String> alternativeOptionProductIds)
-
equals
public boolean equals(ShoppingCartItem item)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item. Defaults isPromo to false. Default to no itemGroup.
-
equals
public boolean equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item. Defaults isPromo to false.
-
equals
public boolean equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, java.math.BigDecimal selectedAmount)
Compares the specified object with this cart item including rental data. Defaults isPromo to false.
-
equals
public boolean equals(java.lang.String productId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object with this cart item. Defaults isPromo to false.
-
equals
public boolean equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object with this cart item.
-
equals
public boolean equals(java.lang.String productId, java.sql.Timestamp reservStart, java.math.BigDecimal reservLength, java.math.BigDecimal reservPersons, java.lang.String accommodationMapId, java.lang.String accommodationSpotId, java.util.Map<java.lang.String,GenericValue> additionalProductFeatureAndAppls, java.util.Map<java.lang.String,java.lang.Object> attributes, java.util.Map<java.lang.String,java.lang.String> orderItemAttributes, java.lang.String prodCatalogId, java.math.BigDecimal selectedAmount, ProductConfigWrapper configWrapper, java.lang.String itemType, ShoppingCart.ShoppingCartItemGroup itemGroup, boolean isPromo)
Compares the specified object order item attributes.
-
getProduct
public GenericValue getProduct()
Gets the Product entity. If it is not already retreived gets it from the delegator
-
getParentProduct
public GenericValue getParentProduct()
-
getParentProductId
public java.lang.String getParentProductId()
-
getOptionalProductFeatures
public java.util.Map<java.lang.String,java.util.List<GenericValue>> getOptionalProductFeatures()
-
getDelegator
public Delegator getDelegator()
-
explodeItem
public java.util.List<ShoppingCartItem> explodeItem(ShoppingCart cart, LocalDispatcher dispatcher) throws CartItemModifyException
- Throws:
CartItemModifyException
-
getPurchaseOrderItemDescription
public static java.lang.String getPurchaseOrderItemDescription(GenericValue product, GenericValue supplierProduct, java.util.Locale locale, LocalDispatcher dispatcher)
-
-