KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: Steveinjava on December 16, 2007, 06:11:12 pm

Title: Adding information page
Post by: Steveinjava on December 16, 2007, 06:11:12 pm
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...
Title: Re: Adding information page
Post by: julie on December 17, 2007, 01:39:56 pm
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.
Title: Re: Adding information page
Post by: Steveinjava on December 17, 2007, 08:50:31 pm
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  :)
Title: Re: Adding information page
Post by: julie on December 18, 2007, 06:21:02 am
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.
Title: Re: Adding information page
Post by: Steveinjava on December 18, 2007, 01:36:07 pm
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!
Title: Re: Adding information page
Post by: pete on December 18, 2007, 01:43:59 pm
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
Title: Re: Adding information page
Post by: Steveinjava on December 18, 2007, 04:00:58 pm
Problem solved  :)
I was running my IDE based Tomcat server so the updated files were not being picked up. :-[
Title: Re: Adding information page
Post by: rula on June 15, 2008, 03:38:33 pm
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
Title: Re: Adding information page
Post by: julie on June 15, 2008, 04:56:29 pm
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);

Title: Re: Adding information page
Post by: rula on June 16, 2008, 08:40:02 am
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
Title: Re: Adding information page
Post by: julie on June 16, 2008, 08:47:41 am
Hi,

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