use of com.salesmanager.shop.model.catalog.product.attribute.ReadableProductOptionValue in project shopizer by shopizer-ecommerce.
the class ReadableProductVariationMapper method optionValue.
private ReadableProductOptionValue optionValue(ProductOptionValue val, MerchantStore store, Language language) {
ReadableProductOptionValue value = new ReadableProductOptionValue();
value.setCode(val.getCode());
value.setId(val.getId());
ProductOptionValueDescription desc = optionValueDescription(val.getDescriptions(), language);
if (desc != null) {
value.setName(desc.getName());
}
return value;
}
use of com.salesmanager.shop.model.catalog.product.attribute.ReadableProductOptionValue in project shopizer by shopizer-ecommerce.
the class ReadableProductOptionSetMapper method optionValue.
private ReadableProductOptionValue optionValue(List<Long> ids, ProductOptionValue optionValue, MerchantStore store, Language language) {
if (!ids.contains(optionValue.getId())) {
ReadableProductOptionValue value = new ReadableProductOptionValue();
value.setCode(optionValue.getCode());
value.setId(optionValue.getId());
ProductOptionValueDescription desc = optionValueDescription(optionValue.getDescriptions(), language);
if (desc != null) {
value.setName(desc.getName());
}
ids.add(optionValue.getId());
return value;
} else {
return null;
}
}
Aggregations