Search in sources :

Example 1 with ReadableProductPricePopulator

use of com.salesmanager.shop.populator.catalog.ReadableProductPricePopulator in project shopizer by shopizer-ecommerce.

the class ReadableInventoryMapper method prices.

private List<ReadableProductPrice> prices(ProductAvailability source, MerchantStore store, Language language) throws ConversionException {
    ReadableProductPricePopulator populator = null;
    List<ReadableProductPrice> prices = new ArrayList<ReadableProductPrice>();
    for (ProductPrice price : source.getPrices()) {
        populator = new ReadableProductPricePopulator();
        populator.setPricingService(pricingService);
        ReadableProductPrice p = populator.populate(price, new ReadableProductPrice(), store, language);
        prices.add(p);
    }
    return prices;
}
Also used : ReadableProductPricePopulator(com.salesmanager.shop.populator.catalog.ReadableProductPricePopulator) ArrayList(java.util.ArrayList) ProductPrice(com.salesmanager.core.model.catalog.product.price.ProductPrice) ReadableProductPrice(com.salesmanager.shop.model.catalog.product.ReadableProductPrice) ReadableProductPrice(com.salesmanager.shop.model.catalog.product.ReadableProductPrice)

Aggregations

ProductPrice (com.salesmanager.core.model.catalog.product.price.ProductPrice)1 ReadableProductPrice (com.salesmanager.shop.model.catalog.product.ReadableProductPrice)1 ReadableProductPricePopulator (com.salesmanager.shop.populator.catalog.ReadableProductPricePopulator)1 ArrayList (java.util.ArrayList)1