Subversion Repositories SmartDukaan

Rev

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

Rev 5493 Rev 5760
Line 83... Line 83...
83
	})
83
	})
84
    public String show() throws SecurityException, IOException, JSONException {
84
    public String show() throws SecurityException, IOException, JSONException {
85
    	log.info("id=" + id);
85
    	log.info("id=" + id);
86
 
86
 
87
    	String entityUrl = "";
87
    	String entityUrl = "";
88
    	String metaKeywords = "";
-
 
89
    	String metaDescription = "";
88
    	String metaDescription = "";
90
    	String pageTitle = "";
89
    	String pageTitle = "";
91
    	String productName = "";
90
    	String productName = "";
92
    	String categoryName = "";
91
    	String categoryName = "";
93
    	String categoryUrl = "";
92
    	String categoryUrl = "";
Line 98... Line 97...
98
    	    setSnippets();
97
    	    setSnippets();
99
            htmlSnippets.put("PRODUCT_PROPERTIES", snippets.get(PRODUCT_PROERTIES_SNIPPET_KEY));
98
            htmlSnippets.put("PRODUCT_PROPERTIES", snippets.get(PRODUCT_PROERTIES_SNIPPET_KEY));
100
    	    JSONObject productPropertiesInJson = new JSONObject(htmlSnippets.get("PRODUCT_PROPERTIES"));
99
    	    JSONObject productPropertiesInJson = new JSONObject(htmlSnippets.get("PRODUCT_PROPERTIES"));
101
    	    entityUrl = productPropertiesInJson.getString("entityUrl");
100
    	    entityUrl = productPropertiesInJson.getString("entityUrl");
102
    	    metaDescription = productPropertiesInJson.getString("metaDescription");
101
    	    metaDescription = productPropertiesInJson.getString("metaDescription");
103
    	    metaKeywords = productPropertiesInJson.getString("metaKeywords");
-
 
104
    	    pageTitle = productPropertiesInJson.getString("title");
102
    	    pageTitle = productPropertiesInJson.getString("title");
105
    	    productName = productPropertiesInJson.getString("name");
103
    	    productName = productPropertiesInJson.getString("name");
106
    	    categoryName = productPropertiesInJson.getString("categoryName");
104
    	    categoryName = productPropertiesInJson.getString("categoryName");
107
    	    categoryUrl = productPropertiesInJson.getString("categoryUrl");
105
    	    categoryUrl = productPropertiesInJson.getString("categoryUrl");
108
    	    displayAccessories = productPropertiesInJson.getString("displayAccessories");
106
    	    displayAccessories = productPropertiesInJson.getString("displayAccessories");
Line 142... Line 140...
142
    	htmlSnippets.put("PRODUCT_URL", currentUrl);
140
    	htmlSnippets.put("PRODUCT_URL", currentUrl);
143
    	htmlSnippets.put("ROOT_URL", "http://" + rootUrl);
141
    	htmlSnippets.put("ROOT_URL", "http://" + rootUrl);
144
		htmlSnippets.put("SLIDE_GUIDE", snippets.get(PRODUCT_SLIDEGUIDE_KEY));
142
		htmlSnippets.put("SLIDE_GUIDE", snippets.get(PRODUCT_SLIDEGUIDE_KEY));
145
		htmlSnippets.put("PAGE_TITLE", pageTitle.trim());
143
		htmlSnippets.put("PAGE_TITLE", pageTitle.trim());
146
		htmlSnippets.put("PAGE_METADESC", metaDescription);
144
		htmlSnippets.put("PAGE_METADESC", metaDescription);
147
		htmlSnippets.put("PAGE_METAKEYWORDS", metaKeywords);
-
 
148
		htmlSnippets.put("BREADCRUMB", breadCrumb);
145
		htmlSnippets.put("BREADCRUMB", breadCrumb);
149
		htmlSnippets.put("PARENT_CATEGORY", parentCategory);
146
		htmlSnippets.put("PARENT_CATEGORY", parentCategory);
150
		
147
		
151
		if(displayAccessories.equals("TRUE")){
148
		if(displayAccessories.equals("TRUE")){
152
			setMobile(true);
149
			setMobile(true);
Line 216... Line 213...
216
	
213
	
217
	public String getPageMetaDescSnippet(){
214
	public String getPageMetaDescSnippet(){
218
		return htmlSnippets.get("PAGE_METADESC");
215
		return htmlSnippets.get("PAGE_METADESC");
219
	}
216
	}
220
	
217
	
221
	public String getPageMetaKeywordsSnippet(){
-
 
222
		return htmlSnippets.get("PAGE_METAKEYWORDS");
-
 
223
	}
-
 
224
	
218
	
225
	public String getProductName()	{
219
	public String getProductName()	{
226
		return htmlSnippets.get("PRODUCT_NAME");
220
		return htmlSnippets.get("PRODUCT_NAME");
227
	}
221
	}
228
	
222