Class DynamicPriceDiscreteOrderItemImpl

All Implemented Interfaces:
Serializable, Cloneable, org.broadleafcommerce.common.admin.domain.AdminMainEntity, org.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItem>, org.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable, DiscreteOrderItem, DynamicPriceDiscreteOrderItem, OrderItem, SkuAccessor

@Entity public class DynamicPriceDiscreteOrderItemImpl extends DiscreteOrderItemImpl implements DynamicPriceDiscreteOrderItem
Author:
jfischer
See Also:
  • Constructor Details

    • DynamicPriceDiscreteOrderItemImpl

      public DynamicPriceDiscreteOrderItemImpl()
  • Method Details

    • setSku

      public void setSku(Sku sku)
      Specified by:
      setSku in interface DiscreteOrderItem
      Overrides:
      setSku in class DiscreteOrderItemImpl
    • updateSaleAndRetailPrices

      public boolean updateSaleAndRetailPrices()
      Description copied from interface: OrderItem
      Used to reset the base price of the item that the pricing engine uses.

      Generally, this will update the retailPrice and salePrice based on the corresponding value in the SKU.

      If the retail or sale price was manually set, this method will not change those prices.

      For non-manually set prices, prices can change based on system activities such as locale changes and customer authentication, this method is used to ensure that all cart items reflect the current base price before executing other pricing / adjustment operations.

      Other known scenarios that can effect the base prices include the automatic bundling or loading a stale cart from the database.

      See notes in subclasses for specific behavior of this method.

      Specified by:
      updateSaleAndRetailPrices in interface OrderItem
      Overrides:
      updateSaleAndRetailPrices in class DiscreteOrderItemImpl
      Returns:
      true if the base prices changed as a result of this call