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

Product with customfields

Started by holger, January 21, 2008, 10:08:47 pm

Previous topic - Next topic

holger

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

kate

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

julie

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

holger

Hi Juli and Kate,

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

regards,

Holger

holger

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

julie

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.

holger

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

julie

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

holger

Hello Julie,

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

But thanks.

regards,
Holger