header.setShippingMethodName(orderHeader.getShippingMethodName());
Vector<ItemDetailInfo> vector = new Vector<ItemDetailInfo>();
Iterator<?> iterator = orderHeader.getOrderItemDetails().iterator();
while (iterator.hasNext()) {
OrderItemDetail orderItemDetail = (OrderItemDetail) iterator.next();
ItemDetailInfo detail = new ItemDetailInfo();
detail.setItemNum(orderItemDetail.getItemNum());
detail.setItemUpcCd(orderItemDetail.getItemUpcCd());
detail.setItemShortDesc(orderItemDetail.getItemShortDesc());
detail.setItemQty(orderItemDetail.getItemOrderQty().toString());
String result = "";
if (orderItemDetail.getItemTierQty() > 1) {
result = formatter.formatNumber(orderItemDetail.getItemTierQty()) + " / " +
formatter.formatCurrency(orderItemDetail.getItemTierPrice());
}
else {
result = formatter.formatCurrency(orderItemDetail.getItemTierPrice());
}
detail.setItemPrice(result);
detail.setItemSubTotal(formatter.formatCurrency(orderItemDetail.getItemDetailAmount()));
Item item = orderItemDetail.getItem();
Vector<com.jada.content.data.ItemAttributeInfo> v = new Vector<com.jada.content.data.ItemAttributeInfo>();
if (item != null) {
ItemImage itemImage = item.getItemLanguage().getImage();
if (itemImage != null) {
detail.setImageId(itemImage.getImageId().toString());
}
if (!siteProfileClassDefault){
for (ItemLanguage itemLanguage : item.getItemLanguages()) {
if (itemLanguage.getSiteProfileClass().getSiteProfileClassId().equals(siteProfileClassId)) {
if (itemLanguage.getItemImageOverride().equals(String.valueOf(Constants.VALUE_YES))) {
detail.setImageId(itemLanguage.getImage().getImageId().toString());
}
break;
}
}
}
if (item.getItemTypeCd().equals(Constants.ITEM_TYPE_SKU)) {
for (ItemAttributeDetail itemAttributeDetail : item.getItemAttributeDetails()) {
CustomAttribute customAttribute = itemAttributeDetail.getCustomAttributeDetail().getCustomAttribute();
if (customAttribute.getCustomAttribTypeCode() != Constants.CUSTOM_ATTRIBUTE_TYPE_SKU_MAKEUP) {
continue;
}
com.jada.content.data.ItemAttributeInfo itemAttributeInfo = new com.jada.content.data.ItemAttributeInfo();
itemAttributeInfo.setCustomAttribDesc(customAttribute.getCustomAttributeLanguage().getCustomAttribDesc());
if (!siteProfileClassDefault) {
for (CustomAttributeLanguage language : customAttribute.getCustomAttributeLanguages()) {
if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfile.getSiteProfileClass().getSiteProfileClassId())) {
if (language.getCustomAttribDesc() != null) {
itemAttributeInfo.setCustomAttribDesc(language.getCustomAttribDesc());
}
break;
}
}
}
CustomAttributeOption customAttributeOption = itemAttributeDetail.getCustomAttributeOption();
itemAttributeInfo.setCustomAttribValue(customAttributeOption.getCustomAttributeOptionLanguage().getCustomAttribValue());
if (!siteProfileClassDefault) {
for (CustomAttributeOptionLanguage language : customAttributeOption.getCustomAttributeOptionLanguages()) {
if (language.getSiteProfileClass().getSiteProfileClassId().equals(siteProfile.getSiteProfileClass().getSiteProfileClassId())) {
if (language.getCustomAttribValue() != null) {
itemAttributeInfo.setCustomAttribValue(language.getCustomAttribValue());
}
break;
}
}
}
v.add(itemAttributeInfo);
}
}
}
for (OrderAttributeDetail orderAttributeDetail : orderItemDetail.getOrderAttributeDetails()) {
com.jada.content.data.ItemAttributeInfo itemAttributeInfo = new com.jada.content.data.ItemAttributeInfo();
CustomAttribute customAttribute = orderAttributeDetail.getCustomAttributeDetail().getCustomAttribute();
itemAttributeInfo.setCustomAttribDesc(customAttribute.getCustomAttributeLanguage().getCustomAttribDesc());
if (!siteProfileClassDefault) {
for (CustomAttributeLanguage language : customAttribute.getCustomAttributeLanguages()) {