Subversion Repositories SmartDukaan

Rev

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

Rev 1429 Rev 1527
Line 545... Line 545...
545
		
545
		
546
		return getHtmlFromVelocity("templates/"+templateFile, context);
546
		return getHtmlFromVelocity("templates/"+templateFile, context);
547
	}
547
	}
548
 
548
 
549
	
549
	
550
	public String getOrderDetailsHtml(long orderId) {
550
	public String getOrderDetailsHtml(long orderId, long userId) {
551
		String htmlString = "";
551
		String htmlString = "";
552
		VelocityContext context = new VelocityContext();
552
		VelocityContext context = new VelocityContext();
553
		String templateFile = "templates/orderdetails.vm";
553
		String templateFile = "templates/orderdetails.vm";
554
		Order order = null;
554
		Order order = null;
555
		Date orderedOn = null, deliveryEstimate = null;
555
		Date orderedOn = null, deliveryEstimate = null;
556
		Provider provider = null;
556
		Provider provider = null;
557
		try{
557
		try{
558
			TransactionServiceClient transactionServiceClient = new TransactionServiceClient();
558
			TransactionServiceClient transactionServiceClient = new TransactionServiceClient();
559
			in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
559
			in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
560
			order = orderClient.getOrder(orderId);
560
			order = orderClient.getOrderForCustomer(orderId, userId);
561
			orderedOn = new Date(order.getCreated_timestamp());
561
			orderedOn = new Date(order.getCreated_timestamp());
562
			deliveryEstimate = new Date(order.getExpected_delivery_time());
562
			deliveryEstimate = new Date(order.getExpected_delivery_time());
563
 
563
 
564
			if(order.getLogistics_provider_id() != 0){
564
			if(order.getLogistics_provider_id() != 0){
565
				LogisticsServiceClient logisticsServiceClient = new LogisticsServiceClient();
565
				LogisticsServiceClient logisticsServiceClient = new LogisticsServiceClient();