Search in sources :

Example 56 with ConversionException

use of com.salesmanager.core.business.exception.ConversionException in project shopizer by shopizer-ecommerce.

the class CustomerRegistrationController method populateShoppingCartData.

private ShoppingCartData populateShoppingCartData(final ShoppingCart cartModel, final MerchantStore store, final Language language) {
    ShoppingCartDataPopulator shoppingCartDataPopulator = new ShoppingCartDataPopulator();
    shoppingCartDataPopulator.setShoppingCartCalculationService(shoppingCartCalculationService);
    shoppingCartDataPopulator.setPricingService(pricingService);
    try {
        return shoppingCartDataPopulator.populate(cartModel, store, language);
    } catch (ConversionException ce) {
        LOGGER.error("Error in converting shopping cart to shopping cart data", ce);
    }
    return null;
}
Also used : ConversionException(com.salesmanager.core.business.exception.ConversionException) ShoppingCartDataPopulator(com.salesmanager.shop.populator.shoppingCart.ShoppingCartDataPopulator)

Example 57 with ConversionException

use of com.salesmanager.core.business.exception.ConversionException in project shopizer by shopizer-ecommerce.

the class CustomerLoginController method populateShoppingCartData.

private ShoppingCartData populateShoppingCartData(final ShoppingCart cartModel, final MerchantStore store, final Language language) {
    ShoppingCartDataPopulator shoppingCartDataPopulator = new ShoppingCartDataPopulator();
    shoppingCartDataPopulator.setShoppingCartCalculationService(shoppingCartCalculationService);
    shoppingCartDataPopulator.setPricingService(pricingService);
    try {
        return shoppingCartDataPopulator.populate(cartModel, store, language);
    } catch (ConversionException ce) {
        LOG.error("Error in converting shopping cart to shopping cart data", ce);
    }
    return null;
}
Also used : ConversionException(com.salesmanager.core.business.exception.ConversionException) ShoppingCartDataPopulator(com.salesmanager.shop.populator.shoppingCart.ShoppingCartDataPopulator)

Aggregations

ConversionException (com.salesmanager.core.business.exception.ConversionException)57 ConversionRuntimeException (com.salesmanager.shop.store.api.exception.ConversionRuntimeException)17 Language (com.salesmanager.core.model.reference.language.Language)16 HashSet (java.util.HashSet)15 ArrayList (java.util.ArrayList)11 ServiceException (com.salesmanager.core.business.exception.ServiceException)10 Product (com.salesmanager.core.model.catalog.product.Product)10 Customer (com.salesmanager.core.model.customer.Customer)9 ReadableCustomer (com.salesmanager.shop.model.customer.ReadableCustomer)9 PersistableCustomer (com.salesmanager.shop.model.customer.PersistableCustomer)8 BigDecimal (java.math.BigDecimal)8 MerchantStore (com.salesmanager.core.model.merchant.MerchantStore)7 ProductAttribute (com.salesmanager.core.model.catalog.product.attribute.ProductAttribute)6 OrderProduct (com.salesmanager.core.model.order.orderproduct.OrderProduct)6 Country (com.salesmanager.core.model.reference.country.Country)6 Zone (com.salesmanager.core.model.reference.zone.Zone)6 ReadableProduct (com.salesmanager.shop.model.catalog.product.ReadableProduct)6 ServiceRuntimeException (com.salesmanager.shop.store.api.exception.ServiceRuntimeException)6 Date (java.util.Date)6 Category (com.salesmanager.core.model.catalog.category.Category)5