Subversion Repositories SmartDukaan

Rev

Rev 4325 | Rev 4815 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4325 Rev 4453
Line 144... Line 144...
144
		context.put("categoryId", categoryId+"");
144
		context.put("categoryId", categoryId+"");
145
		
145
		
146
		htmlString = getHtmlFromVelocity(templateFile, context);
146
		htmlString = getHtmlFromVelocity(templateFile, context);
147
		return htmlString;
147
		return htmlString;
148
	}
148
	}
149
 
-
 
150
 
-
 
151
 
149
	
152
	public String getHeaderHtml(boolean isLoggedIn, String  userName, String url, long catId, boolean displayBestDealsImg) {
150
	public String getHeaderHtml(boolean isLoggedIn, String email, String url, long catId, boolean displayBestDealsImg)	{
153
		VelocityContext context = new VelocityContext();
151
		VelocityContext context = new VelocityContext();
-
 
152
		
154
		if (isLoggedIn) {
153
		if (isLoggedIn)	{
155
			context.put("LOGGED_IN", "TRUE");
154
			context.put("LOGGED_IN", "TRUE");
156
			context.put("WELCOME_MESSAGE", "Welcome " + userName);
155
			context.put("WELCOME_MESSAGE", "Hi " + email.split("@")[0]);
-
 
156
			
157
		} else {
157
		} else	{
158
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
158
			context.put("WELCOME_MESSAGE", "Hi, Welcome to Saholic");
159
			context.put("REDIRECT_URL", url);
159
			context.put("REDIRECT_URL", url);
160
		}		
160
		}
161
		
161
		
162
		context.put("BEST_DEALS_BADGE", displayBestDealsImg);
162
		context.put("BEST_DEALS_BADGE", displayBestDealsImg);
163
		context.put("CAT_ID", catId);
163
		context.put("CAT_ID", catId);
164
		
164
		
165
		String templateFile = "templates/header.vm";
165
		String templateFile = "templates/header.vm";
Line 193... Line 193...
193
			if(order.getLogistics_provider_id() != 0){
193
			if(order.getLogistics_provider_id() != 0){
194
				LogisticsClient logisticsServiceClient = new LogisticsClient();
194
				LogisticsClient logisticsServiceClient = new LogisticsClient();
195
				in.shop2020.logistics.LogisticsService.Client logisticsClient = logisticsServiceClient.getClient();
195
				in.shop2020.logistics.LogisticsService.Client logisticsClient = logisticsServiceClient.getClient();
196
				provider = logisticsClient.getProvider(order.getLogistics_provider_id());
196
				provider = logisticsClient.getProvider(order.getLogistics_provider_id());
197
			}
197
			}
198
		}catch (Exception e){
198
		} catch (Exception e){
199
			
199
			
200
		}
200
		}
201
		
201
		
202
		SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss aa");
202
		SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss aa");
203
		SimpleDateFormat dateformat1 = new SimpleDateFormat("dd/MM/yyyy");
203
		SimpleDateFormat dateformat1 = new SimpleDateFormat("dd/MM/yyyy");