Subversion Repositories SmartDukaan

Rev

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

Rev 6152 Rev 6736
Line 18... Line 18...
18
import java.util.HashMap;
18
import java.util.HashMap;
19
import java.util.List;
19
import java.util.List;
20
import java.util.Map;
20
import java.util.Map;
21
import java.util.StringTokenizer;
21
import java.util.StringTokenizer;
22
 
22
 
-
 
23
import org.apache.commons.lang.StringUtils;
23
import org.apache.log4j.Logger;
24
import org.apache.log4j.Logger;
24
import org.apache.struts2.convention.annotation.Action;
25
import org.apache.struts2.convention.annotation.Action;
25
import org.apache.struts2.convention.annotation.Actions;
26
import org.apache.struts2.convention.annotation.Actions;
26
import org.apache.struts2.convention.annotation.InterceptorRef;
27
import org.apache.struts2.convention.annotation.InterceptorRef;
27
import org.apache.struts2.convention.annotation.Result;
28
import org.apache.struts2.convention.annotation.Result;
Line 73... Line 74...
73
		long cartId = userinfo.getCartId();
74
		long cartId = userinfo.getCartId();
74
		
75
		
75
	    if(cartId != -1){
76
	    if(cartId != -1){
76
        	try {
77
        	try {
77
    			UserContextService.Client userClient = (new UserClient()).getClient();
78
    			UserContextService.Client userClient = (new UserClient()).getClient();
78
    			errorMsg = userClient.validateCart(cartId, sourceId);
79
    			List<String> cartResponse  = userClient.validateCart(cartId, sourceId);
-
 
80
    			errorMsg = cartResponse.get(0);
-
 
81
    			if(StringUtils.isNotEmpty(cartResponse.get(1))) {
-
 
82
    				addActionMessage(cartResponse.get(1));
-
 
83
    			}
79
    			log.info("Error Message rcvd from the service is:" + errorMsg);
84
    			log.info("Cart Change/EMI Message rcvd from the service is:" + errorMsg);
80
    			
85
    			
81
    			// As per ticket #119 in trac
86
    			// As per ticket #119 in trac
82
    			Cart cart = userClient.getCart(cartId);
87
    			Cart cart = userClient.getCart(cartId);
83
    			int totalItems = cart.getLinesSize();
88
    			int totalItems = cart.getLinesSize();
84
    			double totalAmount = cart.getTotalPrice();
89
    			double totalAmount = cart.getTotalPrice();