Search in sources :

Example 6 with ProductAttribute

use of com.salesmanager.core.model.catalog.product.attribute.ProductAttribute in project shopizer by shopizer-ecommerce.

the class ProductOptionFacadeImpl method saveAttribute.

@Override
public ReadableProductAttributeEntity saveAttribute(Long productId, PersistableProductAttribute attribute, MerchantStore store, Language language) {
    Validate.notNull(productId, "Product id cannot be null");
    Validate.notNull(attribute, "ProductAttribute cannot be null");
    Validate.notNull(attribute.getOption(), "ProductAttribute option cannot be null");
    Validate.notNull(attribute.getOptionValue(), "ProductAttribute option value cannot be null");
    Validate.notNull(store, "Store cannot be null");
    attribute.setProductId(productId);
    ProductAttribute attr = new ProductAttribute();
    if (attribute.getId() != null && attribute.getId().longValue() > 0) {
        attr = productAttributeService.getById(attribute.getId());
        if (attr == null) {
            throw new ResourceNotFoundException("Product attribute [" + attribute.getId() + "] not found");
        }
        if (productId != attr.getProduct().getId().longValue()) {
            throw new ResourceNotFoundException("Product attribute [" + attribute.getId() + "] not found for product [" + productId + "]");
        }
    }
    attr = persistableProductAttributeMapper.merge(attribute, attr, store, language);
    try {
        productAttributeService.saveOrUpdate(attr);
    } catch (ServiceException e) {
        throw new ServiceRuntimeException("Exception while saving ProductAttribute", e);
    }
    // refresh
    attr = productAttributeService.getById(attr.getId());
    ReadableProductAttributeEntity readable = readableProductAttributeMapper.convert(attr, store, language);
    return readable;
}
Also used : ServiceException(com.salesmanager.core.business.exception.ServiceException) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) PersistableProductAttribute(com.salesmanager.shop.model.catalog.product.attribute.PersistableProductAttribute) ReadableProductAttributeEntity(com.salesmanager.shop.model.catalog.product.attribute.api.ReadableProductAttributeEntity) ResourceNotFoundException(com.salesmanager.shop.store.api.exception.ResourceNotFoundException) ServiceRuntimeException(com.salesmanager.shop.store.api.exception.ServiceRuntimeException)

Example 7 with ProductAttribute

use of com.salesmanager.core.model.catalog.product.attribute.ProductAttribute in project shopizer by shopizer-ecommerce.

the class ProductOptionFacadeImpl method getAttribute.

@Override
public ReadableProductAttributeEntity getAttribute(Long productId, Long attributeId, MerchantStore store, Language language) {
    ProductAttribute attr = productAttributeService.getById(attributeId);
    if (attr == null) {
        throw new ResourceNotFoundException("ProductAttribute not found for [" + attributeId + "] and store [" + store.getCode() + "]");
    }
    if (attr.getProduct().getId().longValue() != productId) {
        throw new ResourceNotFoundException("ProductAttribute not found for [" + attributeId + "] and product [" + productId + "]");
    }
    if (attr.getProduct().getMerchantStore().getId().intValue() != store.getId().intValue()) {
        throw new ResourceNotFoundException("ProductAttribute not found for [" + attributeId + "] and product [" + productId + "] and store [" + store.getCode() + "]");
    }
    ReadableProductAttributeEntity readable = readableProductAttributeMapper.convert(attr, store, language);
    return readable;
}
Also used : ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) PersistableProductAttribute(com.salesmanager.shop.model.catalog.product.attribute.PersistableProductAttribute) ReadableProductAttributeEntity(com.salesmanager.shop.model.catalog.product.attribute.api.ReadableProductAttributeEntity) ResourceNotFoundException(com.salesmanager.shop.store.api.exception.ResourceNotFoundException)

Example 8 with ProductAttribute

use of com.salesmanager.core.model.catalog.product.attribute.ProductAttribute in project shopizer by shopizer-ecommerce.

the class PersistableProductPopulator method populate.

@Override
public Product populate(PersistableProduct source, Product target, MerchantStore store, Language language) throws ConversionException {
    Validate.notNull(target, "Product must not be null");
    try {
        target.setSku(source.getSku());
        target.setAvailable(source.isAvailable());
        target.setPreOrder(source.isPreOrder());
        target.setRefSku(source.getRefSku());
        if (source.getId() != null && source.getId().longValue() == 0) {
            target.setId(null);
        } else {
            target.setId(source.getId());
        }
        // PRODUCT TYPE
        if (!StringUtils.isBlank(source.getType())) {
            ProductType type = productTypeService.getByCode(source.getType(), store, language);
            if (type == null) {
                throw new ConversionException("Product type [" + source.getType() + "] does not exist");
            }
            target.setType(type);
        }
        if (source.getOwner() != null && source.getOwner().getId() != null) {
            com.salesmanager.core.model.customer.Customer owner = customerService.getById(source.getOwner().getId());
            target.setOwner(owner);
        }
        if (!StringUtils.isBlank(source.getDateAvailable())) {
            target.setDateAvailable(DateUtil.getDate(source.getDateAvailable()));
        }
        target.setMerchantStore(store);
        List<Language> languages = new ArrayList<Language>();
        Set<ProductDescription> descriptions = new HashSet<ProductDescription>();
        if (!CollectionUtils.isEmpty(source.getDescriptions())) {
            for (com.salesmanager.shop.model.catalog.product.ProductDescription description : source.getDescriptions()) {
                ProductDescription productDescription = new ProductDescription();
                Language lang = languageService.getByCode(description.getLanguage());
                if (lang == null) {
                    throw new ConversionException("Language code " + description.getLanguage() + " is invalid, use ISO code (en, fr ...)");
                }
                if (!CollectionUtils.isEmpty(target.getDescriptions())) {
                    for (ProductDescription desc : target.getDescriptions()) {
                        if (desc.getLanguage().getCode().equals(description.getLanguage())) {
                            productDescription = desc;
                            break;
                        }
                    }
                }
                productDescription.setProduct(target);
                productDescription.setDescription(description.getDescription());
                productDescription.setProductHighlight(description.getHighlights());
                productDescription.setName(description.getName());
                productDescription.setSeUrl(description.getFriendlyUrl());
                productDescription.setMetatagKeywords(description.getKeyWords());
                productDescription.setMetatagDescription(description.getMetaDescription());
                productDescription.setTitle(description.getTitle());
                languages.add(lang);
                productDescription.setLanguage(lang);
                descriptions.add(productDescription);
            }
        }
        if (descriptions.size() > 0) {
            target.setDescriptions(descriptions);
        }
        if (source.getProductSpecifications() != null) {
            target.setProductHeight(source.getProductSpecifications().getHeight());
            target.setProductLength(source.getProductSpecifications().getLength());
            target.setProductWeight(source.getProductSpecifications().getWeight());
            target.setProductWidth(source.getProductSpecifications().getWidth());
            if (source.getProductSpecifications().getManufacturer() != null) {
                Manufacturer manuf = null;
                if (!StringUtils.isBlank(source.getProductSpecifications().getManufacturer())) {
                    manuf = manufacturerService.getByCode(store, source.getProductSpecifications().getManufacturer());
                }
                if (manuf == null) {
                    throw new ConversionException("Invalid manufacturer id");
                }
                if (manuf != null) {
                    if (manuf.getMerchantStore().getId().intValue() != store.getId().intValue()) {
                        throw new ConversionException("Invalid manufacturer id");
                    }
                    target.setManufacturer(manuf);
                }
            }
        }
        target.setSortOrder(source.getSortOrder());
        target.setProductVirtual(source.isProductVirtual());
        target.setProductShipeable(source.isProductShipeable());
        if (source.getRating() != null) {
            target.setProductReviewAvg(new BigDecimal(source.getRating()));
        }
        target.setProductReviewCount(source.getRatingCount());
        if (CollectionUtils.isNotEmpty(source.getProductPrices())) {
            // get product availability
            // create new ProductAvailability
            ProductAvailability productAvailability = new ProductAvailability(target, store);
            // todo now support for specific regions
            productAvailability.setRegion(Constants.ALL_REGIONS);
            productAvailability.setProductQuantity(source.getQuantity());
            productAvailability.setProductQuantityOrderMin(1);
            productAvailability.setProductQuantityOrderMax(1);
            productAvailability.setAvailable(Boolean.valueOf(target.isAvailable()));
            for (com.salesmanager.shop.model.catalog.product.PersistableProductPrice priceEntity : source.getProductPrices()) {
                ProductPrice price = new ProductPrice();
                price.setProductAvailability(productAvailability);
                price.setDefaultPrice(priceEntity.isDefaultPrice());
                price.setProductPriceAmount(priceEntity.getOriginalPrice());
                price.setCode(priceEntity.getCode());
                price.setProductPriceSpecialAmount(priceEntity.getDiscountedPrice());
                if (priceEntity.getDiscountStartDate() != null) {
                    Date startDate = DateUtil.getDate(priceEntity.getDiscountStartDate());
                    price.setProductPriceSpecialStartDate(startDate);
                }
                if (priceEntity.getDiscountEndDate() != null) {
                    Date endDate = DateUtil.getDate(priceEntity.getDiscountEndDate());
                    price.setProductPriceSpecialEndDate(endDate);
                }
                productAvailability.getPrices().add(price);
                target.getAvailabilities().add(productAvailability);
                for (Language lang : languages) {
                    ProductPriceDescription ppd = new ProductPriceDescription();
                    ppd.setProductPrice(price);
                    ppd.setLanguage(lang);
                    ppd.setName(ProductPriceDescription.DEFAULT_PRICE_DESCRIPTION);
                    // price appender
                    Optional<com.salesmanager.shop.model.catalog.product.ProductPriceDescription> description = priceEntity.getDescriptions().stream().filter(d -> d.getLanguage() != null && d.getLanguage().equals(lang.getCode())).findFirst();
                    if (description.isPresent()) {
                        ppd.setPriceAppender(description.get().getPriceAppender());
                    }
                    price.getDescriptions().add(ppd);
                }
            }
        } else {
            // create
            ProductAvailability productAvailability = null;
            ProductPrice defaultPrice = null;
            if (!CollectionUtils.isEmpty(target.getAvailabilities())) {
                for (ProductAvailability avail : target.getAvailabilities()) {
                    Set<ProductPrice> prices = avail.getPrices();
                    for (ProductPrice p : prices) {
                        if (p.isDefaultPrice()) {
                            if (productAvailability == null) {
                                productAvailability = avail;
                                defaultPrice = p;
                                break;
                            }
                            p.setDefaultPrice(false);
                        }
                    }
                }
            }
            if (productAvailability == null) {
                productAvailability = new ProductAvailability(target, store);
                target.getAvailabilities().add(productAvailability);
            }
            productAvailability.setProductQuantity(source.getQuantity());
            productAvailability.setProductQuantityOrderMin(1);
            productAvailability.setProductQuantityOrderMax(1);
            productAvailability.setRegion(Constants.ALL_REGIONS);
            productAvailability.setAvailable(Boolean.valueOf(target.isAvailable()));
            if (defaultPrice != null) {
                defaultPrice.setProductPriceAmount(source.getPrice());
            } else {
                defaultPrice = new ProductPrice();
                defaultPrice.setDefaultPrice(true);
                defaultPrice.setProductPriceAmount(source.getPrice());
                defaultPrice.setCode(ProductPriceEntity.DEFAULT_PRICE_CODE);
                defaultPrice.setProductAvailability(productAvailability);
                productAvailability.getPrices().add(defaultPrice);
                for (Language lang : languages) {
                    ProductPriceDescription ppd = new ProductPriceDescription();
                    ppd.setProductPrice(defaultPrice);
                    ppd.setLanguage(lang);
                    ppd.setName(ProductPriceDescription.DEFAULT_PRICE_DESCRIPTION);
                    defaultPrice.getDescriptions().add(ppd);
                }
            }
        }
        // image
        if (source.getImages() != null) {
            for (PersistableImage img : source.getImages()) {
                ProductImage productImage = new ProductImage();
                productImage.setImageType(img.getImageType());
                productImage.setDefaultImage(img.isDefaultImage());
                if (img.getImageType() == 1) {
                    productImage.setProductImageUrl(img.getImageUrl());
                    productImage.setImage(new ByteArrayInputStream(new byte[0]));
                } else {
                    ByteArrayInputStream in = new ByteArrayInputStream(img.getBytes());
                    productImage.setImage(in);
                }
                productImage.setProduct(target);
                productImage.setProductImage(img.getName());
                target.getImages().add(productImage);
            }
        }
        // attributes
        if (source.getAttributes() != null) {
            for (com.salesmanager.shop.model.catalog.product.attribute.PersistableProductAttribute attr : source.getAttributes()) {
                ProductAttribute attribute = persistableProductAttributeMapper.convert(attr, store, language);
                attribute.setProduct(target);
                target.getAttributes().add(attribute);
            }
        }
        // categories
        if (!CollectionUtils.isEmpty(source.getCategories())) {
            for (com.salesmanager.shop.model.catalog.category.Category categ : source.getCategories()) {
                Category c = null;
                if (!StringUtils.isBlank(categ.getCode())) {
                    c = categoryService.getByCode(store, categ.getCode());
                } else {
                    Validate.notNull(categ.getId(), "Category id nust not be null");
                    c = categoryService.getById(categ.getId(), store.getId());
                }
                if (c == null) {
                    throw new ConversionException("Category id " + categ.getId() + " does not exist");
                }
                if (c.getMerchantStore().getId().intValue() != store.getId().intValue()) {
                    throw new ConversionException("Invalid category id");
                }
                target.getCategories().add(c);
            }
        }
        return target;
    } catch (Exception e) {
        throw new ConversionException(e);
    }
}
Also used : ProductPrice(com.salesmanager.core.model.catalog.product.price.ProductPrice) Date(java.util.Date) DateUtil(com.salesmanager.shop.utils.DateUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) StringUtils(org.apache.commons.lang3.StringUtils) ProductOptionValueService(com.salesmanager.core.business.services.catalog.product.attribute.ProductOptionValueService) TaxClassService(com.salesmanager.core.business.services.tax.TaxClassService) CollectionUtils(org.apache.commons.collections4.CollectionUtils) LanguageService(com.salesmanager.core.business.services.reference.language.LanguageService) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Inject(javax.inject.Inject) Language(com.salesmanager.core.model.reference.language.Language) BigDecimal(java.math.BigDecimal) PersistableProduct(com.salesmanager.shop.model.catalog.product.PersistableProduct) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) ByteArrayInputStream(java.io.ByteArrayInputStream) Manufacturer(com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer) CategoryService(com.salesmanager.core.business.services.catalog.category.CategoryService) ManufacturerService(com.salesmanager.core.business.services.catalog.product.manufacturer.ManufacturerService) PersistableProductAttributeMapper(com.salesmanager.shop.mapper.catalog.PersistableProductAttributeMapper) Constants(com.salesmanager.core.business.constants.Constants) CustomerService(com.salesmanager.core.business.services.customer.CustomerService) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) Product(com.salesmanager.core.model.catalog.product.Product) ProductPriceDescription(com.salesmanager.core.model.catalog.product.price.ProductPriceDescription) AbstractDataPopulator(com.salesmanager.core.business.utils.AbstractDataPopulator) Set(java.util.Set) Category(com.salesmanager.core.model.catalog.category.Category) List(java.util.List) Component(org.springframework.stereotype.Component) Validate(org.apache.commons.lang3.Validate) ProductImage(com.salesmanager.core.model.catalog.product.image.ProductImage) Optional(java.util.Optional) ConversionException(com.salesmanager.core.business.exception.ConversionException) ProductType(com.salesmanager.core.model.catalog.product.type.ProductType) ProductOptionService(com.salesmanager.core.business.services.catalog.product.attribute.ProductOptionService) ProductAvailability(com.salesmanager.core.model.catalog.product.availability.ProductAvailability) PersistableImage(com.salesmanager.shop.model.catalog.product.PersistableImage) ProductDescription(com.salesmanager.core.model.catalog.product.description.ProductDescription) ProductTypeService(com.salesmanager.core.business.services.catalog.product.type.ProductTypeService) ProductPriceEntity(com.salesmanager.shop.model.catalog.product.ProductPriceEntity) Category(com.salesmanager.core.model.catalog.category.Category) ProductImage(com.salesmanager.core.model.catalog.product.image.ProductImage) ArrayList(java.util.ArrayList) ProductPrice(com.salesmanager.core.model.catalog.product.price.ProductPrice) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) Language(com.salesmanager.core.model.reference.language.Language) ProductAvailability(com.salesmanager.core.model.catalog.product.availability.ProductAvailability) PersistableImage(com.salesmanager.shop.model.catalog.product.PersistableImage) Manufacturer(com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer) ProductPriceDescription(com.salesmanager.core.model.catalog.product.price.ProductPriceDescription) HashSet(java.util.HashSet) ConversionException(com.salesmanager.core.business.exception.ConversionException) ProductType(com.salesmanager.core.model.catalog.product.type.ProductType) BigDecimal(java.math.BigDecimal) Date(java.util.Date) ConversionException(com.salesmanager.core.business.exception.ConversionException) ByteArrayInputStream(java.io.ByteArrayInputStream) ProductDescription(com.salesmanager.core.model.catalog.product.description.ProductDescription)

Example 9 with ProductAttribute

use of com.salesmanager.core.model.catalog.product.attribute.ProductAttribute in project shopizer by shopizer-ecommerce.

the class OrderProductPopulator method populate.

/**
 * Converts a ShoppingCartItem carried in the ShoppingCart to an OrderProduct
 * that will be saved in the system
 */
@Override
public OrderProduct populate(ShoppingCartItem source, OrderProduct target, MerchantStore store, Language language) throws ConversionException {
    Validate.notNull(productService, "productService must be set");
    Validate.notNull(digitalProductService, "digitalProductService must be set");
    Validate.notNull(productAttributeService, "productAttributeService must be set");
    try {
        Product modelProduct = productService.getById(source.getProductId());
        if (modelProduct == null) {
            throw new ConversionException("Cannot get product with id (productId) " + source.getProductId());
        }
        if (modelProduct.getMerchantStore().getId().intValue() != store.getId().intValue()) {
            throw new ConversionException("Invalid product id " + source.getProductId());
        }
        DigitalProduct digitalProduct = digitalProductService.getByProduct(store, modelProduct);
        if (digitalProduct != null) {
            OrderProductDownload orderProductDownload = new OrderProductDownload();
            orderProductDownload.setOrderProductFilename(digitalProduct.getProductFileName());
            orderProductDownload.setOrderProduct(target);
            orderProductDownload.setDownloadCount(0);
            orderProductDownload.setMaxdays(ApplicationConstants.MAX_DOWNLOAD_DAYS);
            target.getDownloads().add(orderProductDownload);
        }
        target.setOneTimeCharge(source.getItemPrice());
        target.setProductName(source.getProduct().getDescriptions().iterator().next().getName());
        target.setProductQuantity(source.getQuantity());
        target.setSku(source.getProduct().getSku());
        FinalPrice finalPrice = source.getFinalPrice();
        if (finalPrice == null) {
            throw new ConversionException("Object final price not populated in shoppingCartItem (source)");
        }
        // Default price
        OrderProductPrice orderProductPrice = orderProductPrice(finalPrice);
        orderProductPrice.setOrderProduct(target);
        Set<OrderProductPrice> prices = new HashSet<OrderProductPrice>();
        prices.add(orderProductPrice);
        // Other prices
        List<FinalPrice> otherPrices = finalPrice.getAdditionalPrices();
        if (otherPrices != null) {
            for (FinalPrice otherPrice : otherPrices) {
                OrderProductPrice other = orderProductPrice(otherPrice);
                other.setOrderProduct(target);
                prices.add(other);
            }
        }
        target.setPrices(prices);
        // OrderProductAttribute
        Set<ShoppingCartAttributeItem> attributeItems = source.getAttributes();
        if (!CollectionUtils.isEmpty(attributeItems)) {
            Set<OrderProductAttribute> attributes = new HashSet<OrderProductAttribute>();
            for (ShoppingCartAttributeItem attribute : attributeItems) {
                OrderProductAttribute orderProductAttribute = new OrderProductAttribute();
                orderProductAttribute.setOrderProduct(target);
                Long id = attribute.getProductAttributeId();
                ProductAttribute attr = productAttributeService.getById(id);
                if (attr == null) {
                    throw new ConversionException("Attribute id " + id + " does not exists");
                }
                if (attr.getProduct().getMerchantStore().getId().intValue() != store.getId().intValue()) {
                    throw new ConversionException("Attribute id " + id + " invalid for this store");
                }
                orderProductAttribute.setProductAttributeIsFree(attr.getProductAttributeIsFree());
                orderProductAttribute.setProductAttributeName(attr.getProductOption().getDescriptionsSettoList().get(0).getName());
                orderProductAttribute.setProductAttributeValueName(attr.getProductOptionValue().getDescriptionsSettoList().get(0).getName());
                orderProductAttribute.setProductAttributePrice(attr.getProductAttributePrice());
                orderProductAttribute.setProductAttributeWeight(attr.getProductAttributeWeight());
                orderProductAttribute.setProductOptionId(attr.getProductOption().getId());
                orderProductAttribute.setProductOptionValueId(attr.getProductOptionValue().getId());
                attributes.add(orderProductAttribute);
            }
            target.setOrderAttributes(attributes);
        }
    } catch (Exception e) {
        throw new ConversionException(e);
    }
    return target;
}
Also used : ConversionException(com.salesmanager.core.business.exception.ConversionException) Product(com.salesmanager.core.model.catalog.product.Product) OrderProduct(com.salesmanager.core.model.order.orderproduct.OrderProduct) DigitalProduct(com.salesmanager.core.model.catalog.product.file.DigitalProduct) ShoppingCartAttributeItem(com.salesmanager.core.model.shoppingcart.ShoppingCartAttributeItem) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) OrderProductAttribute(com.salesmanager.core.model.order.orderproduct.OrderProductAttribute) ConversionException(com.salesmanager.core.business.exception.ConversionException) OrderProductPrice(com.salesmanager.core.model.order.orderproduct.OrderProductPrice) OrderProductAttribute(com.salesmanager.core.model.order.orderproduct.OrderProductAttribute) OrderProductDownload(com.salesmanager.core.model.order.orderproduct.OrderProductDownload) DigitalProduct(com.salesmanager.core.model.catalog.product.file.DigitalProduct) FinalPrice(com.salesmanager.core.model.catalog.product.price.FinalPrice) HashSet(java.util.HashSet)

Example 10 with ProductAttribute

use of com.salesmanager.core.model.catalog.product.attribute.ProductAttribute in project shopizer by shopizer-ecommerce.

the class ShoppingCartItemPopulator method populate.

@Override
public ShoppingCartItem populate(PersistableOrderProduct source, /**
 * TODO: Fix, target not used possible future bug ! *
 */
ShoppingCartItem target, MerchantStore store, Language language) throws ConversionException {
    Validate.notNull(productService, "Requires to set productService");
    Validate.notNull(productAttributeService, "Requires to set productAttributeService");
    Validate.notNull(shoppingCartService, "Requires to set shoppingCartService");
    Product product = productService.getById(source.getProduct().getId());
    if (source.getAttributes() != null) {
        for (com.salesmanager.shop.model.catalog.product.attribute.ProductAttribute attr : source.getAttributes()) {
            ProductAttribute attribute = productAttributeService.getById(attr.getId());
            if (attribute == null) {
                throw new ConversionException("ProductAttribute with id " + attr.getId() + " is null");
            }
            if (attribute.getProduct().getId().longValue() != source.getProduct().getId().longValue()) {
                throw new ConversionException("ProductAttribute with id " + attr.getId() + " is not assigned to Product id " + source.getProduct().getId());
            }
            product.getAttributes().add(attribute);
        }
    }
    try {
        return shoppingCartService.populateShoppingCartItem(product);
    } catch (ServiceException e) {
        throw new ConversionException(e);
    }
}
Also used : ConversionException(com.salesmanager.core.business.exception.ConversionException) ServiceException(com.salesmanager.core.business.exception.ServiceException) Product(com.salesmanager.core.model.catalog.product.Product) PersistableOrderProduct(com.salesmanager.shop.model.order.PersistableOrderProduct) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute)

Aggregations

ProductAttribute (com.salesmanager.core.model.catalog.product.attribute.ProductAttribute)41 Product (com.salesmanager.core.model.catalog.product.Product)25 ArrayList (java.util.ArrayList)20 Language (com.salesmanager.core.model.reference.language.Language)18 MerchantStore (com.salesmanager.core.model.merchant.MerchantStore)16 FinalPrice (com.salesmanager.core.model.catalog.product.price.FinalPrice)15 ServiceException (com.salesmanager.core.business.exception.ServiceException)13 ProductOptionValue (com.salesmanager.core.model.catalog.product.attribute.ProductOptionValue)12 ProductAvailability (com.salesmanager.core.model.catalog.product.availability.ProductAvailability)12 BigDecimal (java.math.BigDecimal)12 HashSet (java.util.HashSet)12 ResourceNotFoundException (com.salesmanager.shop.store.api.exception.ResourceNotFoundException)11 ServiceRuntimeException (com.salesmanager.shop.store.api.exception.ServiceRuntimeException)11 List (java.util.List)11 ProductOption (com.salesmanager.core.model.catalog.product.attribute.ProductOption)10 Date (java.util.Date)10 Category (com.salesmanager.core.model.catalog.category.Category)9 ProductOptionDescription (com.salesmanager.core.model.catalog.product.attribute.ProductOptionDescription)9 ProductOptionValueDescription (com.salesmanager.core.model.catalog.product.attribute.ProductOptionValueDescription)9 ProductDescription (com.salesmanager.core.model.catalog.product.description.ProductDescription)8