info.magnolia.module.shop.beans
Class DefaultShoppingCartImpl
java.lang.Object
ch.fastforward.magnolia.ocm.beans.OCMBean
ch.fastforward.magnolia.ocm.beans.OCMNumberedBean
info.magnolia.module.shop.beans.DefaultShoppingCartImpl
- All Implemented Interfaces:
- ShoppingCart, Serializable
public class DefaultShoppingCartImpl
- extends ch.fastforward.magnolia.ocm.beans.OCMNumberedBean
- implements ShoppingCart, Serializable
A default shopping cart implementation with order, billing and shipping
addresses allowing only one cart item per product (i.e. when adding the same
product multiple times, the quantity of the cart item will be increased).
- Author:
- will
- See Also:
- Serialized Form
Methods inherited from class ch.fastforward.magnolia.ocm.beans.OCMNumberedBean |
getName, setName |
Methods inherited from class ch.fastforward.magnolia.ocm.beans.OCMBean |
getParentPath, getPath, getUuid, setParentPath, setPath, setUuid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultShoppingCartImpl
public DefaultShoppingCartImpl()
DefaultShoppingCartImpl
public DefaultShoppingCartImpl(javax.jcr.Node priceCategory)
addToShoppingCart
public int addToShoppingCart(String productUUID,
int quantity)
- Addes a product to the cart. If there is already a cart item for this
product the items quantity will be increased
- Specified by:
addToShoppingCart
in interface ShoppingCart
- Parameters:
productUUID
- quantity
-
- Returns:
addToShoppingCart
public int addToShoppingCart(String productUUID,
int quantity,
Map<String,CartItemOption> options)
- Specified by:
addToShoppingCart
in interface ShoppingCart
removeFromShoppingCart
public void removeFromShoppingCart(String productUUID)
- Removes the cart item containing the product with the passed in UUID.
- Specified by:
removeFromShoppingCart
in interface ShoppingCart
- Parameters:
productUUID
-
indexOfProduct
public int indexOfProduct(String productUUID)
- Parameters:
productUUID
-
- Returns:
- the index of the cart item containing the desired product
indexOfProduct
public int indexOfProduct(String productUUID,
Map<String,CartItemOption> options)
getCartItems
public ArrayList<ShoppingCartItem> getCartItems()
- Specified by:
getCartItems
in interface ShoppingCart
getPriceCategoryUUID
public String getPriceCategoryUUID()
setPriceCategoryUUID
public void setPriceCategoryUUID(String uuid)
addCartItem
public void addCartItem(ShoppingCartItem newItem)
getCartItemsCount
public int getCartItemsCount()
- Specified by:
getCartItemsCount
in interface ShoppingCart
getOrderAddressCompany
public String getOrderAddressCompany()
setOrderAddressCompany
public void setOrderAddressCompany(String orderAddressCompany)
getOrderAddressCompany2
public String getOrderAddressCompany2()
setOrderAddressCompany2
public void setOrderAddressCompany2(String orderAddressCompany2)
getTermsAccepted
public Boolean getTermsAccepted()
setTermsAccepted
public void setTermsAccepted(Boolean termsAccepted)
getOrderAddressFirstname
public String getOrderAddressFirstname()
setOrderAddressFirstname
public void setOrderAddressFirstname(String orderAddressFirstname)
getOrderAddressLastname
public String getOrderAddressLastname()
setOrderAddressLastname
public void setOrderAddressLastname(String orderAddressLastname)
getOrderAddressSex
public String getOrderAddressSex()
setOrderAddressSex
public void setOrderAddressSex(String orderAddressSex)
getOrderAddressTitle
public String getOrderAddressTitle()
setOrderAddressTitle
public void setOrderAddressTitle(String orderAddressTitle)
getOrderAddressStreet
public String getOrderAddressStreet()
setOrderAddressStreet
public void setOrderAddressStreet(String orderAddressStreet)
getOrderAddressStreet2
public String getOrderAddressStreet2()
setOrderAddressStreet2
public void setOrderAddressStreet2(String orderAddressStreet2)
getOrderAddressZip
public String getOrderAddressZip()
setOrderAddressZip
public void setOrderAddressZip(String orderAddressZip)
getOrderAddressCity
public String getOrderAddressCity()
setOrderAddressCity
public void setOrderAddressCity(String orderAddressCity)
getOrderAddressState
public String getOrderAddressState()
setOrderAddressState
public void setOrderAddressState(String orderAddressState)
getOrderAddressCountry
public String getOrderAddressCountry()
setOrderAddressCountry
public void setOrderAddressCountry(String orderAddressCountry)
getOrderAddressPhone
public String getOrderAddressPhone()
setOrderAddressPhone
public void setOrderAddressPhone(String orderAddressPhone)
getOrderAddressMobile
public String getOrderAddressMobile()
setOrderAddressMobile
public void setOrderAddressMobile(String orderAddressMobile)
getOrderAddressMail
public String getOrderAddressMail()
setOrderAddressMail
public void setOrderAddressMail(String orderAddressMail)
getShippingAddressCompany
public String getShippingAddressCompany()
setShippingAddressCompany
public void setShippingAddressCompany(String shippingAddressCompany)
getShippingAddressCompany2
public String getShippingAddressCompany2()
setShippingAddressCompany2
public void setShippingAddressCompany2(String shippingAddressCompany2)
getShippingAddressFirstname
public String getShippingAddressFirstname()
setShippingAddressFirstname
public void setShippingAddressFirstname(String shippingAddressFirstname)
getShippingAddressLastname
public String getShippingAddressLastname()
setShippingAddressLastname
public void setShippingAddressLastname(String shippingAddressLastname)
getShippingAddressSex
public String getShippingAddressSex()
setShippingAddressSex
public void setShippingAddressSex(String shippingAddressSex)
getShippingAddressTitle
public String getShippingAddressTitle()
setShippingAddressTitle
public void setShippingAddressTitle(String shippingAddressTitle)
getShippingAddressStreet
public String getShippingAddressStreet()
setShippingAddressStreet
public void setShippingAddressStreet(String shippingAddressStreet)
getShippingAddressStreet2
public String getShippingAddressStreet2()
setShippingAddressStreet2
public void setShippingAddressStreet2(String shippingAddressStreet2)
getShippingAddressZip
public String getShippingAddressZip()
setShippingAddressZip
public void setShippingAddressZip(String shippingAddressZip)
getShippingAddressCity
public String getShippingAddressCity()
setShippingAddressCity
public void setShippingAddressCity(String shippingAddressCity)
getShippingAddressState
public String getShippingAddressState()
setShippingAddressState
public void setShippingAddressState(String shippingAddressState)
getShippingAddressCountry
public String getShippingAddressCountry()
setShippingAddressCountry
public void setShippingAddressCountry(String shippingAddressCountry)
getShippingAddressPhone
public String getShippingAddressPhone()
setShippingAddressPhone
public void setShippingAddressPhone(String shippingAddressPhone)
getShippingAddressMobile
public String getShippingAddressMobile()
setShippingAddressMobile
public void setShippingAddressMobile(String shippingAddressMobile)
getShippingAddressMail
public String getShippingAddressMail()
setShippingAddressMail
public void setShippingAddressMail(String shippingAddressMail)
getLanguage
public String getLanguage()
- Specified by:
getLanguage
in interface ShoppingCart
setLanguage
public void setLanguage(String language)
- Specified by:
setLanguage
in interface ShoppingCart
getOrderDate
public Date getOrderDate()
setOrderDate
public void setOrderDate(Date orderDate)
getUserIP
public String getUserIP()
setUserIP
public void setUserIP(String userIP)
getBillingAddressCompany
public String getBillingAddressCompany()
setBillingAddressCompany
public void setBillingAddressCompany(String billingAddressCompany)
getBillingAddressCompany2
public String getBillingAddressCompany2()
setBillingAddressCompany2
public void setBillingAddressCompany2(String billingAddressCompany2)
getBillingAddressFirstname
public String getBillingAddressFirstname()
setBillingAddressFirstname
public void setBillingAddressFirstname(String billingAddressFirstname)
getBillingAddressLastname
public String getBillingAddressLastname()
setBillingAddressLastname
public void setBillingAddressLastname(String billingAddressLastname)
getBillingAddressSex
public String getBillingAddressSex()
setBillingAddressSex
public void setBillingAddressSex(String billingAddressSex)
getBillingAddressTitle
public String getBillingAddressTitle()
setBillingAddressTitle
public void setBillingAddressTitle(String billingAddressTitle)
getBillingAddressStreet
public String getBillingAddressStreet()
setBillingAddressStreet
public void setBillingAddressStreet(String billingAddressStreet)
getBillingAddressStreet2
public String getBillingAddressStreet2()
setBillingAddressStreet2
public void setBillingAddressStreet2(String billingAddressStreet2)
getBillingAddressZip
public String getBillingAddressZip()
setBillingAddressZip
public void setBillingAddressZip(String billingAddressZip)
getBillingAddressCity
public String getBillingAddressCity()
setBillingAddressCity
public void setBillingAddressCity(String billingAddressCity)
getBillingAddressState
public String getBillingAddressState()
setBillingAddressState
public void setBillingAddressState(String billingAddressState)
getBillingAddressCountry
public String getBillingAddressCountry()
setBillingAddressCountry
public void setBillingAddressCountry(String billingAddressCountry)
getBillingAddressPhone
public String getBillingAddressPhone()
setBillingAddressPhone
public void setBillingAddressPhone(String billingAddressPhone)
getBillingAddressMobile
public String getBillingAddressMobile()
setBillingAddressMobile
public void setBillingAddressMobile(String billingAddressMobile)
getBillingAddressMail
public String getBillingAddressMail()
setBillingAddressMail
public void setBillingAddressMail(String billingAddressMail)
getCartDiscountRate
public Double getCartDiscountRate()
setCartDiscountRate
public void setCartDiscountRate(Double cartDiscountRate)
getGrossTotalExclTaxBigDecimal
public BigDecimal getGrossTotalExclTaxBigDecimal()
getGrossTotalExclTax
public double getGrossTotalExclTax()
getGrossTotalInclTaxBigDecimal
public BigDecimal getGrossTotalInclTaxBigDecimal()
getGrossTotalInclTax
public double getGrossTotalInclTax()
getItemTaxTotalBigDecimal
public BigDecimal getItemTaxTotalBigDecimal()
getItemTaxTotal
public double getItemTaxTotal()
getGrossTotal
public double getGrossTotal()
getCartDiscount
public double getCartDiscount()
getNetTotal
public double getNetTotal()
getTargetDeliveryDate
public Date getTargetDeliveryDate()
setTargetDeliveryDate
public void setTargetDeliveryDate(Date targetDeliveryDate)
getDeliveryDate
public Date getDeliveryDate()
setDeliveryDate
public void setDeliveryDate(Date deliveryDate)
getTaxIncluded
public Boolean getTaxIncluded()
- Returns:
- the taxIncluded
setTaxIncluded
public void setTaxIncluded(Boolean taxIncluded)
- Parameters:
taxIncluded
- the taxIncluded to set
getFormStateToken
public String getFormStateToken()
- Returns:
- the formStateToken
setFormStateToken
public void setFormStateToken(String formStateToken)
- Parameters:
formStateToken
- the formStateToken to set
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.