Friday, September 26, 2008

Tips & Tricks for Customizing iStore pages

Tips to develop JSPs:

1. Two types of block comments – JSP and HTML.

1.1. JSP Comments - "<%"-- these comments will not show in source code of HTML page --%>

1.2. HTML comments - 2. In iStore, pages you want to modify for template purposes almost always end in I.

2.1. IStore Naming Convention: ibeCZzdError.jsp

2.2. Ibe is the prefix indicating it’s an iStore page. (I think this may tie to being a customer facing page as well but I can’t confirm it)

2.4. The zd indicates it’s a display page. If it had tp it would indicate a processing page.

2.5. In display template pages, the JSPs are paired, with a processing page (e.g. ibeCZtpSpecialPage.jsp) and a display page (e.g. ibeCZzdSpecialPageI.jsp). The pairs are normally named the same with a differentiation on the zd and the appended I. The processing page will also reference the display page programatically through its Programattic Access Name, stored within oracle iStore. (you can find the programmatic display name via the processing JSP - find DisplayManager.getTemplate and you’ll see the programmatic accessname in all caps)

3. Directories where JSPs are held - $OA_HTML

4. Flags to set in zone.properties to speed development of JSP –

4.1. Autoreload.classes = true

4.2. Autoreload. file=true

4.3. developer_mode=true

Tricks to develop pages:

1) Always see if a profile option can do the trick. Lots of the iStore bins can be turned on and off via templates or profile options. Read Appendix A and D in the IBE Administrator guide prior to making changes to the JSP.

2) When modifying JSPs, set all border=0 to border=1 in the JSP. This will allow you to see the layout while you make changes.

3) Errors such as Catch without Try or If statement errors normally point to a missing closing bracket or semicolon.

Creating Templates in iStore Administrator:

Templates in iStore consists of two types of JSPs:

1) A processing page – e.g. ibeCCtpLfStMsL.jsp

2) A display page (also known as the INCLUDE) – e.g. ibeCCtdLfStMsLI.jsp

When creating a new template, you must create BOTH pages.

I. Processing Page:

This page calls the display programatically. There is a specific change to be made in the processing page, found under DisplayManager.getTemplate(SOME_NAME).

SOME_NAME must be changed to the programmatic access name of the display page. (This name is selected by you, but when entering the display page in the Display Manager, it must correspond to the name you have entered in the processing page)

Additioonally, when creating a new template type for the processing page, you must choose the type of template it is –

· Section Contains Products Only

· Section contains Navigational Subsections only

· Section contains Featured Subsection

There’s a few others that are available, but the top two will be the most commonly used. As you gain sophistication in iStore and web sales in general, you may determine a need for featured sections, which can also be created here.

II. Display Page

This page displays the items or sections as you determine.

When adding this page into the template manager, ensure that:

· Its template type is “Others”

· Its Programattic Access Name corresponds to the name chosen in the Processing Page.