|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.pricing.priceLists.ItemPriceCalculator
atg.commerce.pricing.priceLists.ConfigurableItemPriceListCalculator
public class ConfigurableItemPriceListCalculator
This calculator assumes the ItemListPriceCalculator has already run. That calculator will set the list price and the amount of the ItemPriceInfo based on the ConfigurableSku's price. This calculator will iterate through the subSku's and modify the list price and amount accordingly. For example: if the parentSku is $5, subSkuA is $2 and subSkuB is $1. If we buy 2 of this configurable sku, then coming into this calculator the listPrice will be $5 and the amount will be $10. After this calculator runs the listPrice will be $8 and the amount will be $16.
ItemPriceInfo
,
ConfigurableCommerceItem
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
ConfigurableItemPriceListCalculator()
|
Method Summary | |
---|---|
double |
getConfigurableItemListPrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the list price of the parent item |
double |
getConfigurableItemPrice(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Get the current working price of the parent item |
java.lang.String |
getListPricePropertyName()
the name of the property for the ListPrice |
java.lang.String |
getProfilePriceListPropertyName()
The name of the property in the profile that stores the price list. |
double |
getSubSkuPrice(CommerceItem pSubItem,
CommerceItem pParentItem,
RepositoryItem pPriceList,
RepositoryItem pPrice)
Get the current price for the given subsku |
boolean |
isNoPriceIsError()
If this is true, and the price list is null or there is not price in the price list, then an error is thrown. |
void |
priceItem(ItemPriceInfo pPriceQuote,
CommerceItem pItem,
RepositoryItem pPricingModel,
java.util.Locale pLocale,
RepositoryItem pProfile,
java.util.Map pExtraParameters)
Price a single item in a context. |
void |
setListPricePropertyName(java.lang.String pListPricePropertyName)
the name of the property for the ListPrice |
void |
setNoPriceIsError(boolean pNoPriceIsError)
If this is true, and the price list is null or there is not price in the price list, then an error is thrown. |
void |
setProfilePriceListPropertyName(java.lang.String pProfilePriceListPropertyName)
The name of the property in the profile that stores the price list. |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public ConfigurableItemPriceListCalculator()
Method Detail |
---|
public void setListPricePropertyName(java.lang.String pListPricePropertyName)
pListPricePropertyName
- new value to setpublic java.lang.String getListPricePropertyName()
public void setProfilePriceListPropertyName(java.lang.String pProfilePriceListPropertyName)
setProfilePriceListPropertyName
in class ItemPriceCalculator
pProfilePriceListPropertyName
- The new value to setpublic java.lang.String getProfilePriceListPropertyName()
getProfilePriceListPropertyName
in class ItemPriceCalculator
public void setNoPriceIsError(boolean pNoPriceIsError)
setNoPriceIsError
in class ItemPriceCalculator
pNoIsError
- The new value to setpublic boolean isNoPriceIsError()
isNoPriceIsError
in class ItemPriceCalculator
public void priceItem(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters) throws PricingException
profilePriceListPropertyName
priceItem
in interface ItemPricingCalculator
priceItem
in class ItemPriceCalculator
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to pricepPricingModel
- A RepositoryItem representing a PricingModelpLocale
- The user's localepProfile
- The user's profilepExtraParameters
- A Map of extra parameters to be used in the pricing, may be null
You may override the price list in the profile by providing a price
list (or price list id) in this map. Use profilePriceListPropertyName
as the key
PricingException
ItemPriceCalculator.getItemPriceSource(ItemPriceInfo, CommerceItem, RepositoryItem, Locale, RepositoryItem, Map)
,
ItemPriceCalculator.shouldConsumeSource(ItemPriceSource)
public double getConfigurableItemPrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The user's locale (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getConfigurableItemListPrice(ItemPriceInfo pPriceQuote, CommerceItem pItem, RepositoryItem pPricingModel, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
pPriceQuote
- ItemPriceInfo representing the current price quote for the itempItem
- The item to price (currently ignored)pPricingModel
- A RepositoryItem representing a PricingModel (currently ignored)pLocale
- The user's locale (currently ignored)pProfile
- The user's profile (currently ignored)pExtraParameters
- A Map of extra parameters to be used in the pricing, may be null (currently ignored)public double getSubSkuPrice(CommerceItem pSubItem, CommerceItem pParentItem, RepositoryItem pPriceList, RepositoryItem pPrice)
pSubItem
- The CommerceItem object for the sub skupParentItem
- The CommerceItem object for the parent skupPriceList
- The price list used to get the pricepPrice
- The price
repository item for the sub sku
listPricePropertyName
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |