Class ProductStoreWorker


  • public final class ProductStoreWorker
    extends java.lang.Object
    ProductStoreWorker - Worker class for store related functionality
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • getProductStore

        public static GenericValue getProductStore​(java.lang.String productStoreId,
                                                   Delegator delegator)
      • getProductStoreId

        public static java.lang.String getProductStoreId​(ServletRequest request)
      • getStoreCurrencyUomId

        public static java.lang.String getStoreCurrencyUomId​(HttpServletRequest request)
      • getStoreLocale

        public static java.util.Locale getStoreLocale​(HttpServletRequest request)
      • getStoreTimeZone

        public static java.util.TimeZone getStoreTimeZone​(HttpServletRequest request)
      • determineSingleFacilityForStore

        public static java.lang.String determineSingleFacilityForStore​(Delegator delegator,
                                                                       java.lang.String productStoreId)
      • autoSaveCart

        public static boolean autoSaveCart​(Delegator delegator,
                                           java.lang.String productStoreId)
      • autoSaveCart

        public static boolean autoSaveCart​(GenericValue productStore)
      • getProductStorePayToPartyId

        public static java.lang.String getProductStorePayToPartyId​(java.lang.String productStoreId,
                                                                   Delegator delegator)
      • getProductStorePayToPartyId

        public static java.lang.String getProductStorePayToPartyId​(GenericValue productStore)
      • getProductStorePaymentProperties

        public static java.lang.String getProductStorePaymentProperties​(ServletRequest request,
                                                                        java.lang.String paymentMethodTypeId,
                                                                        java.lang.String paymentServiceTypeEnumId,
                                                                        boolean anyServiceType)
      • getProductStorePaymentProperties

        public static java.lang.String getProductStorePaymentProperties​(Delegator delegator,
                                                                        java.lang.String productStoreId,
                                                                        java.lang.String paymentMethodTypeId,
                                                                        java.lang.String paymentServiceTypeEnumId,
                                                                        boolean anyServiceType)
      • getProductStorePaymentSetting

        public static GenericValue getProductStorePaymentSetting​(Delegator delegator,
                                                                 java.lang.String productStoreId,
                                                                 java.lang.String paymentMethodTypeId,
                                                                 java.lang.String paymentServiceTypeEnumId,
                                                                 boolean anyServiceType)
      • getProductStoreShipmentMethods

        public static java.util.List<GenericValue> getProductStoreShipmentMethods​(Delegator delegator,
                                                                                  java.lang.String productStoreId,
                                                                                  java.lang.String shipmentMethodTypeId,
                                                                                  java.lang.String carrierPartyId,
                                                                                  java.lang.String carrierRoleTypeId)
      • getProductStoreShipmentMethod

        public static GenericValue getProductStoreShipmentMethod​(Delegator delegator,
                                                                 java.lang.String productStoreId,
                                                                 java.lang.String shipmentMethodTypeId,
                                                                 java.lang.String carrierPartyId,
                                                                 java.lang.String carrierRoleTypeId)
      • getAvailableStoreShippingMethods

        public static java.util.List<GenericValue> getAvailableStoreShippingMethods​(Delegator delegator,
                                                                                    java.lang.String productStoreId,
                                                                                    GenericValue shippingAddress,
                                                                                    java.util.List<java.math.BigDecimal> itemSizes,
                                                                                    java.util.Map<java.lang.String,​java.math.BigDecimal> featureIdMap,
                                                                                    java.math.BigDecimal weight,
                                                                                    java.math.BigDecimal orderTotal)
      • getRandomSurveyWrapper

        public static ProductStoreSurveyWrapper getRandomSurveyWrapper​(Delegator delegator,
                                                                       java.lang.String productStoreId,
                                                                       java.lang.String groupName,
                                                                       java.lang.String partyId,
                                                                       java.util.Map<java.lang.String,​java.lang.Object> passThruFields)
      • getProductSurveys

        public static java.util.List<GenericValue> getProductSurveys​(Delegator delegator,
                                                                     java.lang.String productStoreId,
                                                                     java.lang.String productId,
                                                                     java.lang.String surveyApplTypeId)
      • getProductSurveys

        public static java.util.List<GenericValue> getProductSurveys​(Delegator delegator,
                                                                     java.lang.String productStoreId,
                                                                     java.lang.String productId,
                                                                     java.lang.String surveyApplTypeId,
                                                                     java.lang.String parentProductId)
      • getSurveys

        public static java.util.List<GenericValue> getSurveys​(Delegator delegator,
                                                              java.lang.String productStoreId,
                                                              java.lang.String groupName,
                                                              java.lang.String productId,
                                                              java.lang.String surveyApplTypeId,
                                                              java.lang.String parentProductId)
      • checkSurveyResponse

        public static int checkSurveyResponse​(HttpServletRequest request,
                                              java.lang.String surveyId)
        Returns the number of responses for this survey by party
      • checkSurveyResponse

        public static int checkSurveyResponse​(Delegator delegator,
                                              java.lang.String partyId,
                                              java.lang.String productStoreId,
                                              java.lang.String surveyId)
        Returns the number of responses for this survey by party
      • isStoreInventoryAvailable

        public static boolean isStoreInventoryAvailable​(ServletRequest request,
                                                        GenericValue product,
                                                        java.math.BigDecimal quantity)
      • isStoreInventoryRequiredAndAvailable

        public static boolean isStoreInventoryRequiredAndAvailable​(ServletRequest request,
                                                                   GenericValue product,
                                                                   java.math.BigDecimal quantity,
                                                                   java.lang.Boolean wantRequired,
                                                                   java.lang.Boolean wantAvailable)
        This method is used in the showcart pages to determine whether or not to show the inventory message and in the productdetail pages to determine whether or not to show the item as out of stock.
        Parameters:
        request - ServletRequest (or HttpServletRequest of course)
        product - GenericValue representing the product in question
        quantity - Quantity desired.
        wantRequired - If true then inventory required must be true for the result to be true, if false must be false; if null don't care
        wantAvailable - If true then inventory avilable must be true for the result to be true, if false must be false; if null don't care
      • isStoreInventoryAvailable

        public static boolean isStoreInventoryAvailable​(ServletRequest request,
                                                        ProductConfigWrapper productConfig,
                                                        java.math.BigDecimal quantity)
      • isStoreInventoryAvailable

        public static boolean isStoreInventoryAvailable​(java.lang.String productStoreId,
                                                        ProductConfigWrapper productConfig,
                                                        java.math.BigDecimal quantity,
                                                        Delegator delegator,
                                                        LocalDispatcher dispatcher)
        check inventory availability for the given catalog, product, quantity, etc
      • getDefaultProductStoreEmailScreenLocation

        public static java.lang.String getDefaultProductStoreEmailScreenLocation​(java.lang.String emailType)