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

Change content in aboutus, Returns et

Started by kameraad759, December 08, 2020, 04:19:47 am

Previous topic - Next topic

kameraad759

How do I change the content text for for instance AboutUs or Returns? I can change it in the AboutUsBody.jsp, but thats not likely the idea of content management. I change some text fields in the database (text) in Content id23, but when I startup the Konakart client and I click on About Us or Returns, I do not see the text in AboutUs field or in Returns field.

So how can I change this text in the database, and see the result in the Konakart client?

Thanks
Hans

marco

Hello Hans,

as pointed out answering your other post, content management through the Admin app is an Enterprise feature ( I'm guessing you are on a Community installation ). And, personally, I don't think tinkering with the database is a good idea.

With the community edition you can choose to change the text in the Return page using messages. Have a look at C:\KonaKart\custom\appn\src\com\konakart\actions\ReturnsAction.java:

returnsContent = kkAppEng.getMsg("common.add.info");

You'll just have to add a proper message in the relevant Messages.properties file, for example:

my.returns.page.message = This is the returns policy

and then refer to that in the action, changing the above row into:

returnsContent = kkAppEng.getMsg("my.returns.page.message");

Or you may just modify the JSP code at your will.



Regards,
marco


kameraad759

Thanks Marco for your reply,

I changed ReturnsAction.java as you wrote.I also add in all the Message.properties files my.returns.page.message = This is returned.

I restarted Konakart server (is this needed?), opened the UI Konakart client, but I do not see the message in Returns field. It still displays "Add your information here" instead of "This is returned".

Do I miss a step? A build or something? How do I display the text in the client?

Thanks

kameraad759

Just an simple example with commands, so the JSP will be build with the new context.

marco

Hello Hans,

have a look at C:\KonaKart\webapps\konakart\WEB-INF\classes folder.

There you'll find different Messages_XX.properties files. For english language ( default one ) you should actually modify Messages_en.properties. ( note the "_en" suffix ).



Regards,
marco

kameraad759

Hello Marco,

I changed C:\Konakart\webapps\konakart\WEB-INF\classes\Messages_en.properties, and also for the other languages. Added:
my.returns.page.message=This is the Return field

I changed C:\KonaKart\custom\appn\src\com\konakart\actions\ReturnsAction.java. Changed the line:
returnsContent = kkAppEng.getMsg("common.add.info");
in
returnsContent = kkAppEng.getMsg("my.returns.page.message");

Restarted Konakart.

Still I see "Add your information here", when I start the client. Is the src directory the right place to change ReturnAction.java? Not some where in the wepapps directory? I did exactly what you wrote, but still I do not see any change in the Return field. What do I miss?

Thanks
Hans



kameraad759

Hello,

The running web application does not look at the C:\KonaKart\custom directory. So any changes made in the src directory are not seen in the output. So there must be another step to make.

Please help me with this, so I do understand how this works.

Thanks
Hans

kameraad759

I want a English and Germans text for Return, AboutUs and other messages. Directly in the JSP is no options. Language text is dependent on the settings. So how do I do it?


Brian



Brian

Quoting from the link I sent you earlier:


Notice that the default build target compiles all the source files and creates the jars. It doesn't move the jars or create any wars.

If after building the jars you wish to move these to your webapp lib directories you should use the "copy_jars" target.

kameraad759