Class ShippingEvents
java.lang.Object
org.apache.ofbiz.order.shoppingcart.shipping.ShippingEvents
ShippingEvents - Events used for processing shipping fees
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BigDecimal
getExternalShipEstimate
(LocalDispatcher dispatcher, GenericValue storeShipMeth, Map<String, Object> context) static BigDecimal
getGenericShipEstimate
(LocalDispatcher dispatcher, GenericValue storeShipMeth, Map<String, ? extends Object> context) static String
getShipEstimate
(HttpServletRequest request, HttpServletResponse response) getShipEstimate
(LocalDispatcher dispatcher, Delegator delegator, OrderReadHelper orh, String shipGroupSeqId) getShipGroupEstimate
(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, String supplierPartyId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId) getShipGroupEstimate
(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, String supplierPartyId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId, BigDecimal totalAllowance) getShipGroupEstimate
(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId) getShipGroupEstimate
(LocalDispatcher dispatcher, Delegator delegator, ShoppingCart cart, int groupNo) static String
getShipmentCustomMethod
(Delegator delegator, String shipmentCustomMethodId) static List<GenericValue>
getShipmentTimeEstimates
(Delegator delegator, String shipmentMethodTypeId, String partyId, String roleTypeId, List<String> geoIdFroms, List<String> geoIdTos) static List<GenericValue>
getShipmentTimeEstimates
(Delegator delegator, String shipmentMethodTypeId, String partyId, String roleTypeId, GenericValue shippingAddress, GenericValue originAddress) static GenericValue
getShippingOriginContactMech
(Delegator delegator, String supplierPartyId) Attempts to get the supplier's shipping origin address and failing that, the general location.static GenericValue
getShippingOriginContactMechFromFacility
(Delegator delegator, String facilityId) static GenericValue
getShippingTimeEstimate
(GenericValue storeCarrierShipMethod, List<GenericValue> shippingTimeEstimates) Return theGenericValue
ShipmentTimeEstimate matching the carrier shipment methodstatic Double
getShippingTimeEstimateInDay
(LocalDispatcher dispatcher, GenericValue storeCarrierShipMethod, List<GenericValue> shippingTimeEstimates) Return the number of days estimated for shipping
-
Constructor Details
-
ShippingEvents
public ShippingEvents()
-
-
Method Details
-
getShipEstimate
-
getShipGroupEstimate
public static Map<String,Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, ShoppingCart cart, int groupNo) -
getShipEstimate
public static Map<String,Object> getShipEstimate(LocalDispatcher dispatcher, Delegator delegator, OrderReadHelper orh, String shipGroupSeqId) -
getShipGroupEstimate
public static Map<String,Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId) -
getShipGroupEstimate
public static Map<String,Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, String supplierPartyId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId) -
getShipGroupEstimate
public static Map<String,Object> getShipGroupEstimate(LocalDispatcher dispatcher, Delegator delegator, String orderTypeId, String shipmentMethodTypeId, String carrierPartyId, String carrierRoleTypeId, String shippingContactMechId, String productStoreId, String supplierPartyId, List<Map<String, Object>> itemInfo, BigDecimal shippableWeight, BigDecimal shippableQuantity, BigDecimal shippableTotal, String partyId, String productStoreShipMethId, BigDecimal totalAllowance) -
getGenericShipEstimate
public static BigDecimal getGenericShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, Map<String, ? extends Object> context) throws GeneralException- Throws:
GeneralException
-
getShipmentCustomMethod
-
getExternalShipEstimate
public static BigDecimal getExternalShipEstimate(LocalDispatcher dispatcher, GenericValue storeShipMeth, Map<String, Object> context) throws GeneralException- Throws:
GeneralException
-
getShippingOriginContactMech
public static GenericValue getShippingOriginContactMech(Delegator delegator, String supplierPartyId) throws GeneralException Attempts to get the supplier's shipping origin address and failing that, the general location.- Throws:
GeneralException
-
getShippingOriginContactMechFromFacility
public static GenericValue getShippingOriginContactMechFromFacility(Delegator delegator, String facilityId) throws GeneralException - Throws:
GeneralException
-
getShipmentTimeEstimates
public static List<GenericValue> getShipmentTimeEstimates(Delegator delegator, String shipmentMethodTypeId, String partyId, String roleTypeId, GenericValue shippingAddress, GenericValue originAddress) -
getShipmentTimeEstimates
-
getShippingTimeEstimate
public static GenericValue getShippingTimeEstimate(GenericValue storeCarrierShipMethod, List<GenericValue> shippingTimeEstimates) Return theGenericValue
ShipmentTimeEstimate matching the carrier shipment method- Parameters:
storeCarrierShipMethod
- ShipmentMethod used for estimationshippingTimeEstimates
- available configured estimation- Returns:
-
getShippingTimeEstimateInDay
public static Double getShippingTimeEstimateInDay(LocalDispatcher dispatcher, GenericValue storeCarrierShipMethod, List<GenericValue> shippingTimeEstimates) Return the number of days estimated for shipping- Parameters:
dispatcher
-storeCarrierShipMethod
- ShipmentMethod used for estimationshippingTimeEstimates
- available configured estimation- Returns:
-