| Line 92... |
Line 92... |
| 92 |
String categoryName = "";
|
92 |
String categoryName = "";
|
| 93 |
String categoryUrl = "";
|
93 |
String categoryUrl = "";
|
| 94 |
String displayAccessories = "FALSE";
|
94 |
String displayAccessories = "FALSE";
|
| 95 |
String breadCrumb = "";
|
95 |
String breadCrumb = "";
|
| 96 |
String parentCategory = "";
|
96 |
String parentCategory = "";
|
| - |
|
97 |
String compareCategory = "";
|
| 97 |
try {
|
98 |
try {
|
| 98 |
setSnippets();
|
99 |
setSnippets();
|
| 99 |
htmlSnippets.put("PRODUCT_PROPERTIES", snippets.get(PRODUCT_PROERTIES_SNIPPET_KEY));
|
100 |
htmlSnippets.put("PRODUCT_PROPERTIES", snippets.get(PRODUCT_PROERTIES_SNIPPET_KEY));
|
| 100 |
JSONObject productPropertiesInJson = new JSONObject(htmlSnippets.get("PRODUCT_PROPERTIES"));
|
101 |
JSONObject productPropertiesInJson = new JSONObject(htmlSnippets.get("PRODUCT_PROPERTIES"));
|
| 101 |
entityUrl = productPropertiesInJson.getString("entityUrl");
|
102 |
entityUrl = productPropertiesInJson.getString("entityUrl");
|
| Line 105... |
Line 106... |
| 105 |
categoryName = productPropertiesInJson.getString("categoryName");
|
106 |
categoryName = productPropertiesInJson.getString("categoryName");
|
| 106 |
categoryUrl = productPropertiesInJson.getString("categoryUrl");
|
107 |
categoryUrl = productPropertiesInJson.getString("categoryUrl");
|
| 107 |
displayAccessories = productPropertiesInJson.getString("displayAccessories");
|
108 |
displayAccessories = productPropertiesInJson.getString("displayAccessories");
|
| 108 |
breadCrumb = productPropertiesInJson.getString("breadCrumb");
|
109 |
breadCrumb = productPropertiesInJson.getString("breadCrumb");
|
| 109 |
parentCategory = productPropertiesInJson.getString("parentCategory");
|
110 |
parentCategory = productPropertiesInJson.getString("parentCategory");
|
| - |
|
111 |
compareCategory = productPropertiesInJson.getString("compareCategory");
|
| 110 |
}
|
112 |
}
|
| 111 |
catch (JSONException e) {
|
113 |
catch (JSONException e) {
|
| 112 |
log.warn("Unable to parse product properties JSON", e);
|
114 |
log.warn("Unable to parse product properties JSON", e);
|
| 113 |
try {
|
115 |
try {
|
| 114 |
CatalogClient catalogClientService = new CatalogClient();
|
116 |
CatalogClient catalogClientService = new CatalogClient();
|
| Line 143... |
Line 145... |
| 143 |
htmlSnippets.put("SLIDE_GUIDE", snippets.get(PRODUCT_SLIDEGUIDE_KEY));
|
145 |
htmlSnippets.put("SLIDE_GUIDE", snippets.get(PRODUCT_SLIDEGUIDE_KEY));
|
| 144 |
htmlSnippets.put("PAGE_TITLE", pageTitle.trim());
|
146 |
htmlSnippets.put("PAGE_TITLE", pageTitle.trim());
|
| 145 |
htmlSnippets.put("PAGE_METADESC", metaDescription);
|
147 |
htmlSnippets.put("PAGE_METADESC", metaDescription);
|
| 146 |
htmlSnippets.put("BREADCRUMB", breadCrumb);
|
148 |
htmlSnippets.put("BREADCRUMB", breadCrumb);
|
| 147 |
htmlSnippets.put("PARENT_CATEGORY", parentCategory);
|
149 |
htmlSnippets.put("PARENT_CATEGORY", parentCategory);
|
| - |
|
150 |
htmlSnippets.put("COMPARE_CATEGORY", compareCategory);
|
| 148 |
|
151 |
|
| 149 |
if(displayAccessories.equals("TRUE")){
|
152 |
if(displayAccessories.equals("TRUE")){
|
| 150 |
setMobile(true);
|
153 |
setMobile(true);
|
| 151 |
}
|
154 |
}
|
| 152 |
|
155 |
|
| Line 219... |
Line 222... |
| 219 |
|
222 |
|
| 220 |
public String getProductName() {
|
223 |
public String getProductName() {
|
| 221 |
return htmlSnippets.get("PRODUCT_NAME");
|
224 |
return htmlSnippets.get("PRODUCT_NAME");
|
| 222 |
}
|
225 |
}
|
| 223 |
|
226 |
|
| 224 |
public String getParentCategory(){
|
227 |
public String getCompareCategory(){
|
| 225 |
return htmlSnippets.get("PARENT_CATEGORY");
|
228 |
return htmlSnippets.get("COMPARE_CATEGORY");
|
| 226 |
}
|
229 |
}
|
| 227 |
|
230 |
|
| 228 |
public String getParentCategoryLowerCase(){
|
231 |
public String getCompareCategoryLowerCase(){
|
| 229 |
String parentCategory = htmlSnippets.get("PARENT_CATEGORY");
|
232 |
String compareCategory = htmlSnippets.get("COMPARE_CATEGORY");
|
| 230 |
return parentCategory.substring(0,parentCategory.length()-1).toLowerCase();
|
233 |
return compareCategory.toLowerCase();
|
| 231 |
}
|
234 |
}
|
| 232 |
|
235 |
|
| 233 |
public String getCategoryName() {
|
236 |
public String getCategoryName() {
|
| 234 |
return htmlSnippets.get("CATEGORY_NAME");
|
237 |
return htmlSnippets.get("CATEGORY_NAME");
|
| 235 |
}
|
238 |
}
|