String storeUrl = null;
String image = voucherTheme.getImage();
image = mediaService.getImageUrl(image);
String amount = null;
Integer orderId = voucher.getOrderId();
Order order = orderAdminModel.get(orderId, Order.class);
// If voucher belongs to an order
if(order!=null){
Integer languageId = order.getLanguageId();
amount = currencyService.format(voucher.getAmount(), order.getCurrencyCode(),
order.getCurrencyValue(), languageId);
storeName = order.getStoreName();
storeUrl = order.getStoreUrl();
}else{
//get default language and currency code TODO: these data should be kept in customer table?
Integer languageId = getSettingService().getConfig(SettingKey.LANGUAGE_ID, Integer.class);
String currencyCode = getSettingService().getConfig(SettingKey.CFG_CURRENCY);