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() |
java.lang.String |
getPreTaxPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
java.lang.String |
getPrice(Predicate filter)
Shortcut for getting a formatted string of the first matching price.
|
java.util.List<PriceInfo> |
getPriceInfo(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(java.lang.String name,
java.lang.Class<T> type)
Get a cart entry property with the given type.
|
int |
getQuantity() |
java.lang.String |
getTax()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
java.lang.String |
getTotalPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
java.lang.String |
getUnitPrice()
Deprecated.
since 5.6, use
getPrice(org.apache.commons.collections.Predicate) instead. |
int getEntryIndex()
Product getProduct() throws CommerceException
Product for this entryCommerceExceptionint getQuantity()
java.util.List<PriceInfo> getPriceInfo(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 PriceInfos.
Pass null to fetch all PriceInfos.CommerceExceptionPriceFilterjava.lang.String getPrice(Predicate filter) throws CommerceException
filter - An optional predicate used for filtering the PriceInfos.CommerceExceptiongetPriceInfo(Predicate)<T> T getProperty(java.lang.String name,
java.lang.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 java.lang.String getUnitPrice()
getPrice(org.apache.commons.collections.Predicate) instead.@Deprecated java.lang.String getPreTaxPrice()
getPrice(org.apache.commons.collections.Predicate) instead.@Deprecated java.lang.String getTax()
getPrice(org.apache.commons.collections.Predicate) instead.@Deprecated java.lang.String getTotalPrice()
getPrice(org.apache.commons.collections.Predicate) instead.Copyright © 2010 - 2023 Adobe. All Rights Reserved