Subversion Repositories SmartDukaan

Rev

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

Rev 11516 Rev 11526
Line 119... Line 119...
119
 
119
 
120
    public String create() {
120
    public String create() {
121
    	RedirectPojo rp = new RedirectPojo();
121
    	RedirectPojo rp = new RedirectPojo();
122
    	rp.setRedirectUrl("");
122
    	rp.setRedirectUrl("");
123
        try {
123
        try {
124
        	//NotificationPojo np = new NotificationPojo();
124
        	//Try adding to cart
125
            //UserClient userServiceClient = new UserClient();
-
 
126
            //UserContextService.Client userClient = userServiceClient.getClient();
-
 
127
            cartMsg = userClient.addItemToCart(id, itemId, 1, -1);
125
            cartMsg = userClient.addItemToCart(id, itemId, 1, -1);
-
 
126
            //If could not add to cart try to add notification reminder if email exists.
128
            if (!("".equals(cartMsg))) {
127
            if (!("".equals(cartMsg))) {
129
            	String emailId = this.request.getParameter("email");
128
            	String emailId = this.request.getParameter("email");
130
            	log.info("QuesyString" + this.request.getParameterMap().toString());
129
            	log.info("QuesyString" + this.request.getParameterMap().toString());
131
    			if(emailId==null || emailId.equals("")){
130
    			if(emailId==null || emailId.equals("")){
-
 
131
    				//User tries to add to cart but product is actually out of stock
132
    				rp.setMessage("Item is currently out of stock");
132
    				rp.setMessage("Item is currently out of stock");
133
    			} else {	
133
    			} else {	
134
        			try {
134
        			try {
135
	        	        CatalogClient catalogClientService;
135
	        	        CatalogClient catalogClientService;
136
	        			catalogClientService = new CatalogClient();
136
	        			catalogClientService = new CatalogClient();