• Welcome to KonaKart Community Forum. Please login or sign up.
 

Adding information page

Started by Steveinjava, December 16, 2007, 06:11:12 pm

Previous topic - Next topic

Steveinjava

I am hoping I can (easily  :) ) split the Shipping & Returns page in two. ie a page for each.
I might well want to add other informational pages.
I have found various areas where code handles this- In particular InformationTile.jsp and CatalogShippingAndReturnsBody.jsp but before I start hacking code I thought I would ask.
It seems likely most authors would want to alter the list so it would be a worthwhile document for somebody to write...

julie

InformationTile.jsp  - Is the tile with the link to the page.
CatalogShippingAndReturnsBody.jsp - Is the page itself

To add another page just add a new link to InformationTile.jsp and add new entry to struts-config.xml and tiles-defs.xml.

Steveinjava

Julie, thanks for the reply. I did as you suggest but, although the new links appear on the web page they (both) fail with

HTTP Status 500 - No action instance for path /Shipping could be created

type Status report

message No action instance for path /Shipping could be created

description The server encountered an internal error (No action instance for path /Shipping could be created) that prevented it from fulfilling this request.
Apache Tomcat/5.5.17

I can see the Struts code but would prefer to wait for an 'official' source to confirm I should alter ShippingAndReturnsAction.java
If I create 2 new classes (ShippingAction and ReturnsAction) I will need the source of class com.konakart.al
as their is a ref to Constants.shippingandreturns which (I presume) will need turning into 2 separete constants.
Thanks in advance  :)

julie

Constants.shippingandreturns is just a constant that we use to look up from the message catalog to decide what to write in the breadcrumb navigation. If you create your own page you can just put in a string.

Steveinjava

Julie, well I tried creating ShippingAction & ReturnsAction.java but it doesn't make any difference. (Same error)
From what I remember of Struts I think there is a properties file somewhere that needs to provide an action/class mapping- I have updated struts-config.xml and tiles-defs.xml, so there must be another change required...
Ta in advance!

pete

Steve,

This just sounds like a Struts question and nothing to do with KonaKart.

We don't want to create a Struts forum here, this is for KonaKart questions.

Please give yourself a review on using Struts and then I'm sure you will be able to answer your own questions.

Pete

Steveinjava

Problem solved  :)
I was running my IDE based Tomcat server so the updated files were not being picked up. :-[

rula

Hi Julie,

I want to add ProductFeatures.jsp. All seems to be right but in the breadcrumb-navigation there is a problem with the Translation of the new Entry.

It seems it needs a new Constant for a correct navigation entry, but I can't edit com.kanakart.al.Constants.

In the end of the new action ProductFeatures.java:
/kkAppEng.nav.set(Constants.shippingandreturns, request);
kkAppEng.nav.set("productfeatures", request);
return mapping.findForward("ProductFeatures");

And in the messages.properties:
header.productfeatures=Product Features
productfeatures=Product Features

There is something missing for a correct breadcrumb navigation entry.

regards, rula

julie

Hi,

All it requires is the actual string that you want to set the breadcrumb to. In your case you should provide something like to get it from the message catalog:

kkAppEng.nav.set(getResources(request).getMessage(getLocale(request), "productfeatures"), request);


rula

Hi julie,

thank you,
this works:
kkAppEng.nav.set(getResources(request).getMessage(getLocale(request), "header.productfeatures"), request);

I searched for a cvs-view to show how com.konakart.al.Contants.java is implemented, but only found client-doc.
Can everybody view the cvs repository and if true, how can I access it?

regards, rula

julie

Hi,

No I'm afraid that our CVS repository is private. All of the source code that we supply is in the download package.