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

possible to show only specific category at page "home"?

Started by Anni, November 23, 2007, 10:36:09 am

Previous topic - Next topic

Anni

hi everyone,

for the shop I'm working on I only want to display products of a specific (sub-)category on the shop home. is it possible to do that without hard-coding the category id into the corresponding jsp?

thanks in advance,
anni

julie

Hi Anni,

Another alternative you have is to call the getCats() method of com.konakart.al.CategoryMgr and to traverse the hierarchical tree to attempt to match a name.

Regards,

Julie

Anni

hi julie,

thanks for the reply  :) that's probably just what I need.

regards,

anni

Anni

hi,

is there a method getName() for categories?

regards,
anni

Anni

oh, nevermind, I just found it in another jsp.

but how do I get the subcategories once I'm in a certain category??

regards,
anni

julie

Hi Anni,

Please look at the Javadoc http://www.konakart.com/javadoc/server/ . You'll see that there is a getChildren() method.

Regards,

Julie

Anni

hi julie,

thanks for the link and sorry for being a nuisance. but I didn't know where to find the javadoc before.

thanks again,
anni

Brian

The javadoc is also provided in the download kits - see webapps/javadoc - Brian

Anni

ok, thanks for the info.

I've seen that there is a method called fetchProductsPerCategory(cat) as part of the products manager. how can I use this? as it's just returning an integer I can't assign it to the prodArray.

or is there a way to do it like this:

<bean:define id="prodArray" name="prodMgr" property="newProducts"/>


julie

Hi Anni,

It sets the currentProducts attribute of the ProductManager so you can get them by calling getCurrentProducts().

Anni

hi julie,

is this also possible if I want to specify the category myself? because in my case, there is no category selected, yet.

regards,
anni