Tuesday 26 February 2013

Customize Storefront Pages (Existing jsp)

Here we will see how to introduce a new link in an existing jsp page, for example, in the below image we will introduce a new link "My New Page"





Follow the below steps:

1)Open \workspace\Stores\WebContent\ConsumerDirect\include\styles\style1
             \CachedHeaderDisplay.jsp
2)Search for the string "End: GiftRegistryCode" and under that write the below code
3)Introduce the below code:
<td class="m_line">
          <img src="<c:out value="${jspStoreImgDir}${vfileColor}m_line.gif"/>" alt="" width="19"
                                                                                                            height="31" border="0"></td>
          <td class="m_top" height="31" id="WC_CachedHeaderDisplay_TableCell_41">
         <a href="<c:out value="${MyNewPageURL}"/>" class="m_top_link"   
                   id="WC_CachedHeaderDisplay_Link_2">
         <fmt:message key="MY_NEW_PAGE" bundle="${storeText}" /></a>&nbsp;&nbsp;&nbsp;
 </td>
4)Open \workspace\Stores\src\ConsumerDirect\storetext_en_US.properties
5)introduce a constant : MY_NEW_PAGE=My New Page
6)After the above steps, clean the project -> build->restart server->Add and remove WC project
7)Add and remove WC project is required because all the properties files are loaded at deployment time itself, so what ever entry me make in existing properties file or if we introduce a new properties file (it has to go in \workspace\Stores\src\<<project name>>) restart/republish of WC is required.

output looks like:





8)If we don't Add or remove project we see output as below: