public class ShoppingUtil
extends java.lang.Object
| Constructor and Description |
|---|
ShoppingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static double |
calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItem item) |
static double |
calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count) |
static double |
calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItemPrice itemPrice) |
static double |
calculateActualSubtotal(java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> orderItems) |
static double |
calculateActualSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculateAlternativeShipping(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
int altShipping) |
static double |
calculateCouponDiscount(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon) |
static double |
calculateCouponDiscount(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon) |
static double |
calculateDiscountPercent(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItem item) |
static double |
calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count) |
static double |
calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItemPrice itemPrice) |
static double |
calculateDiscountSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculateInsurance(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculatePrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count) |
static double |
calculateShipping(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculateSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
static double |
calculateTax(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId) |
static double |
calculateTotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon,
int altShipping,
boolean insure) |
static double |
calculateTotal(com.liferay.portlet.shopping.model.ShoppingOrder order) |
static java.lang.String |
getBreadcrumbs(long categoryId,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse) |
static java.lang.String |
getBreadcrumbs(com.liferay.portlet.shopping.model.ShoppingCategory category,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse) |
static com.liferay.portlet.shopping.model.ShoppingCart |
getCart(javax.portlet.PortletRequest portletRequest) |
static com.liferay.portlet.shopping.model.ShoppingCart |
getCart(com.liferay.portal.theme.ThemeDisplay themeDisplay) |
static java.util.Map<java.lang.String,java.lang.String> |
getEmailDefinitionTerms(javax.portlet.PortletRequest portletRequest,
java.lang.String emailFromAddress,
java.lang.String emailFromName) |
static int |
getFieldsQuantitiesPos(com.liferay.portlet.shopping.model.ShoppingItem item,
com.liferay.portlet.shopping.model.ShoppingItemField[] itemFields,
java.lang.String[] fieldsArray) |
static java.lang.String |
getItemFields(java.lang.String itemId) |
static long |
getItemId(java.lang.String itemId) |
static com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.shopping.model.ShoppingItem> |
getItemOrderByComparator(java.lang.String orderByCol,
java.lang.String orderByType) |
static int |
getMinQuantity(com.liferay.portlet.shopping.model.ShoppingItem item) |
static java.lang.String |
getPayPalNotifyURL(com.liferay.portal.theme.ThemeDisplay themeDisplay) |
static java.lang.String |
getPayPalRedirectURL(ShoppingGroupServiceSettings shoppingGroupServiceSettings,
com.liferay.portlet.shopping.model.ShoppingOrder order,
double total,
java.lang.String returnURL,
java.lang.String notifyURL) |
static java.lang.String |
getPayPalReturnURL(javax.portlet.PortletURL portletURL,
com.liferay.portlet.shopping.model.ShoppingOrder order) |
static java.lang.String |
getPpPaymentStatus(com.liferay.portlet.shopping.model.ShoppingOrder order,
javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getPpPaymentStatus(java.lang.String ppPaymentStatus) |
static boolean |
isInStock(com.liferay.portlet.shopping.model.ShoppingItem item) |
static boolean |
isInStock(com.liferay.portlet.shopping.model.ShoppingItem item,
com.liferay.portlet.shopping.model.ShoppingItemField[] itemFields,
java.lang.String[] fieldsArray,
java.lang.Integer orderedQuantity) |
static boolean |
meetsMinOrder(ShoppingGroupServiceSettings shoppingGroupServiceSettings,
java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) |
public static double calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItem item)
public static double calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateActualPrice(com.liferay.portlet.shopping.model.ShoppingItemPrice itemPrice)
public static double calculateActualSubtotal(java.util.List<com.liferay.portlet.shopping.model.ShoppingOrderItem> orderItems)
public static double calculateActualSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateAlternativeShipping(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
int altShipping)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateCouponDiscount(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateCouponDiscount(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateDiscountPercent(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItem item)
public static double calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateDiscountPrice(com.liferay.portlet.shopping.model.ShoppingItemPrice itemPrice)
public static double calculateDiscountSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateInsurance(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculatePrice(com.liferay.portlet.shopping.model.ShoppingItem item,
int count)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateShipping(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateSubtotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateTax(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateTotal(java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items,
java.lang.String stateId,
com.liferay.portlet.shopping.model.ShoppingCoupon coupon,
int altShipping,
boolean insure)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static double calculateTotal(com.liferay.portlet.shopping.model.ShoppingOrder order)
public static java.lang.String getBreadcrumbs(long categoryId,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String getBreadcrumbs(com.liferay.portlet.shopping.model.ShoppingCategory category,
javax.portlet.RenderRequest renderRequest,
javax.portlet.RenderResponse renderResponse)
throws java.lang.Exception
java.lang.Exceptionpublic static com.liferay.portlet.shopping.model.ShoppingCart getCart(javax.portlet.PortletRequest portletRequest)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static com.liferay.portlet.shopping.model.ShoppingCart getCart(com.liferay.portal.theme.ThemeDisplay themeDisplay)
public static java.util.Map<java.lang.String,java.lang.String> getEmailDefinitionTerms(javax.portlet.PortletRequest portletRequest,
java.lang.String emailFromAddress,
java.lang.String emailFromName)
public static int getFieldsQuantitiesPos(com.liferay.portlet.shopping.model.ShoppingItem item,
com.liferay.portlet.shopping.model.ShoppingItemField[] itemFields,
java.lang.String[] fieldsArray)
public static java.lang.String getItemFields(java.lang.String itemId)
public static long getItemId(java.lang.String itemId)
public static com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.shopping.model.ShoppingItem> getItemOrderByComparator(java.lang.String orderByCol,
java.lang.String orderByType)
public static int getMinQuantity(com.liferay.portlet.shopping.model.ShoppingItem item)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic static java.lang.String getPayPalNotifyURL(com.liferay.portal.theme.ThemeDisplay themeDisplay)
public static java.lang.String getPayPalRedirectURL(ShoppingGroupServiceSettings shoppingGroupServiceSettings, com.liferay.portlet.shopping.model.ShoppingOrder order, double total, java.lang.String returnURL, java.lang.String notifyURL)
public static java.lang.String getPayPalReturnURL(javax.portlet.PortletURL portletURL,
com.liferay.portlet.shopping.model.ShoppingOrder order)
public static java.lang.String getPpPaymentStatus(com.liferay.portlet.shopping.model.ShoppingOrder order,
javax.servlet.http.HttpServletRequest request)
public static java.lang.String getPpPaymentStatus(java.lang.String ppPaymentStatus)
public static boolean isInStock(com.liferay.portlet.shopping.model.ShoppingItem item)
public static boolean isInStock(com.liferay.portlet.shopping.model.ShoppingItem item,
com.liferay.portlet.shopping.model.ShoppingItemField[] itemFields,
java.lang.String[] fieldsArray,
java.lang.Integer orderedQuantity)
public static boolean meetsMinOrder(ShoppingGroupServiceSettings shoppingGroupServiceSettings, java.util.Map<com.liferay.portlet.shopping.model.ShoppingCartItem,java.lang.Integer> items) throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalException