Subversion Repositories SmartDukaan

Rev

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

Rev 2433 Rev 2459
Line 337... Line 337...
337
	 * @param expEntity
337
	 * @param expEntity
338
	 * @return
338
	 * @return
339
	 */
339
	 */
340
	private String getEntityURL(ExpandedEntity expEntity){
340
	private String getEntityURL(ExpandedEntity expEntity){
341
		String url = "/" + expEntity.getCategory().getParentCategory().getLabel().toLowerCase().replace(' ', '-') + "/";
341
		String url = "/" + expEntity.getCategory().getParentCategory().getLabel().toLowerCase().replace(' ', '-') + "/";
-
 
342
		if(expEntity.getCategory().getParentCategory().getID() == Utils.ROOT_CATAGOEY){
-
 
343
			url = "/" + expEntity.getCategory().getLabel().toLowerCase().replace(' ', '-') + "/";
-
 
344
		}
-
 
345
		
342
		String productName = getProductName(expEntity);
346
		String productName = getProductName(expEntity);
343
		String productUrl = productName.toLowerCase().replace(' ', '-') + "-" + expEntity.getID();
347
		String productUrl = productName.toLowerCase().replace(' ', '-') + "-" + expEntity.getID();
344
		productUrl = productUrl.replaceAll("/", "-");
348
		productUrl = productUrl.replaceAll("/", "-");
345
		url = url + productUrl;
349
		url = url + productUrl;
346
		url = url.replaceAll("-+", "-");
350
		url = url.replaceAll("-+", "-");