KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: holger on January 21, 2008, 10:08:47 pm

Title: Product with customfields
Post by: holger on January 21, 2008, 10:08:47 pm
Hello Users,

i have fillout 4 customfields at the product properties. As i can use the fields in the product detail?

I don't finde a documentation or an example for this. I have from 10 products, 3 product with 4 fields. This 4 fields must fillout the customer at produktdetails-site and then the user can put it to the shopcard. For this can i use this customfields, or?

regards,
Holger
Title: Re: Product with customfields
Post by: kate on January 22, 2008, 05:54:53 am
Hi Holger,

I'm afraid I don't understand the question.

You can use up to 5 custom fields on a product.   These custom fields are retireved along with the other product attributes when you retrieve a product through the API so you can use them in your application.

Prior to version 2.2.2.0 (to be released this week) when an array of products is returned from the API, only the first 2 custom fields are populated.  For the others you have to retrieve the product with a second call that will retrieve all the custom fields and the long description field.  This was done this way for performance reasons.

From version 2.2.2.0 there is a small change to this behaviour.  In 2.2.2.0 and beyond, ALL custom fields are returned when an array of products is retruned from the API.

Kate
Title: Re: Product with customfields
Post by: julie on January 22, 2008, 06:21:37 am
Hi Holger,

The product custom fields are used to add extra information to the product, and at that point they apply to all products so they cannot be set to different values by individual customers.

Our next release 2.2.2.0 out very soon (probably today), has custom fields for basket items and for order product items. These fields can be set by each customer to add extra information to the product that has been added to the basket and to the order.

-Julie
Title: Re: Product with customfields
Post by: holger on January 22, 2008, 09:23:18 am
Hi Juli and Kate,

thanks, i wait for the new version and then i look with this feature.

regards,

Holger
Title: Re: Product with customfields
Post by: holger on January 26, 2008, 11:28:42 pm
Hello Juli and Kate,

i install the new release 2.2.2.0 (copy file to server an, run updatescript for my database), but how can i use this function? I don't find any point. In the admin - product pages nothing to find?

Have you a documentation for this funktion?

regards,
Holger
Title: Re: Product with customfields
Post by: julie on January 27, 2008, 07:13:54 am
Hi,

You can see the new fields by looking at the Javadoc http://www.konakart.com/javadoc/server/ . In order to use them you need to customize the struts action classes. For example if you look at AddToCartSubmitAction.java you will see how we create a new basket item and add it to the cart. At this point you can add extra information in the custom fields.

Also if you take a look at CheckoutDeliveryAction.java you will see that that is where we create the order. At this point you could loop through the order products and add data in custom fields that you get from the basket items.

Hope this helps.
Title: Re: Product with customfields
Post by: holger on February 01, 2008, 12:28:02 pm
Hey Julie,

i find to create the order, but how can add my CustomFields1 to 5 from the basket? At the action ShowCartItems, i add the fields, but become error's!


if (reset == null)
            {
                // Create an order object that we will use for the checkout process
                kkAppEng.getOrderMgr().createCheckoutOrder();
            }


Can you help me?

reagrds,
Holger
Title: Re: Product with customfields
Post by: julie on February 01, 2008, 12:50:52 pm
In CheckoutDeliveryAction.java the order is created. You need to get it after it has been created (kkAppEng.getOrderMgr().getCheckoutOrder() ) and go through its OrderProducts to set the custom fields. When eventually the order is saved, these fields will also be saved.

-Julie
Title: Re: Product with customfields
Post by: holger on February 01, 2008, 01:47:41 pm
Hello Julie,

i get that not! My Java apparent do not know quite for it out.

But thanks.

regards,
Holger