public static interface CommerceSession.CartEntry
CartEntry
represents shopping cart line-items with a certain product and quantity.Modifier and Type | Method and Description |
---|---|
int |
getEntryIndex() |
String |
getPreTaxPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
String |
getPrice(org.apache.commons.collections.Predicate filter)
Shortcut for getting a formatted string of the first matching price.
|
List<PriceInfo> |
getPriceInfo(org.apache.commons.collections.Predicate filter)
Get a list of detailed price info objects for a cart entry filtered by the provided
predicate (usually a
PriceFilter ). |
Product |
getProduct() |
<T> T |
getProperty(String name,
Class<T> type)
Get a cart entry property with the given type.
|
int |
getQuantity() |
String |
getTax()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
String |
getTotalPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
String |
getUnitPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
int getEntryIndex()
Product getProduct() throws CommerceException
Product
for this entryCommerceException
int getQuantity()
List<PriceInfo> getPriceInfo(org.apache.commons.collections.Predicate filter) throws CommerceException
Get a list of detailed price info objects for a cart entry filtered by the provided
predicate (usually a PriceFilter
).
Current components expect price infos with (at least) the following classifiers, in this order:
Example: to get the unit price of a cart entry, you could use the following statement:
cartEntry.getPriceInfo(new PriceFilter("UNIT"));
filter
- An optional predicate used for filtering the PriceInfo
s.
Pass null
to fetch all PriceInfo
s.CommerceException
PriceFilter
String getPrice(org.apache.commons.collections.Predicate filter) throws CommerceException
filter
- An optional predicate used for filtering the PriceInfo
s.CommerceException
getPriceInfo(Predicate)
<T> T getProperty(String name, Class<T> type)
name
- The property's nametype
- The property's typenull
if it doesn't exist
or can not be converted to the given type.@Deprecated String getUnitPrice()
getPrice(org.apache.commons.collections.Predicate)
instead.@Deprecated String getPreTaxPrice()
getPrice(org.apache.commons.collections.Predicate)
instead.@Deprecated String getTax()
getPrice(org.apache.commons.collections.Predicate)
instead.@Deprecated String getTotalPrice()
getPrice(org.apache.commons.collections.Predicate)
instead."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"