Subversion Repositories SmartDukaan

Rev

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

Rev 9218 Rev 9280
Line 37... Line 37...
37
		productUrl = productUrl.replaceAll("/", "-");
37
		productUrl = productUrl.replaceAll("/", "-");
38
		url = url + productUrl;
38
		url = url + productUrl;
39
		url = url.replaceAll("-+", "-");
39
		url = url.replaceAll("-+", "-");
40
		return url;
40
		return url;
41
	}
41
	}
-
 
42
 
-
 
43
	/**
-
 
44
	 * Get url of the entity without beginSlash. 
-
 
45
	 * @param expEntity
-
 
46
	 * @return
-
 
47
	 */
-
 
48
	public static String getEntityNoSlashURL(ExpandedEntity expEntity){
-
 
49
		String url = expEntity.getCategory().getParentCategory().getLabel().toLowerCase().replace(' ', '-') + "/";
-
 
50
		if(expEntity.getCategory().getParentCategory().getID() == Utils.ROOT_CATAGOEY){
-
 
51
			url = expEntity.getCategory().getLabel().toLowerCase().replace(' ', '-') + "/";
-
 
52
		}
-
 
53
		
-
 
54
		String productName = getProductName(expEntity);
-
 
55
		String productUrl = productName.toLowerCase().replace(' ', '-') + "-" + expEntity.getID();
-
 
56
		productUrl = productUrl.replaceAll("/", "-");
-
 
57
		url = url + productUrl;
-
 
58
		url = url.replaceAll("-+", "-");
-
 
59
		return url;
-
 
60
	}
42
	
61
	
43
	/**
62
	/**
44
	 * Gets media prefix to be used for naming files
63
	 * Gets media prefix to be used for naming files
45
	 *
64
	 *
46
	 * @param expEntity
65
	 * @param expEntity