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

How can I add custom order text fields (to be filled by customer) per product?

Started by mathias.lin, May 20, 2011, 11:26:47 am

Previous topic - Next topic

mathias.lin

How can I add custom text fields to a product?

For example, I want to sell merchandise items like mugs, t-shirts, etc. where the user can have his company name and address printed on.
How can I offer such a text input field for the user to fill out?

I noticed the customer can write a comment with the entire order, there's a text input field for that, but I would need it for each item (type) he orders. Let's say he orders 10 pcs of a certain mug, then he should be able to set a text to be printed on those mugs (all the same for all 100, to keep it simple).

And he should be able to set another text for - let's say - pens, if that's his second order item.

Can I use attributes or custom fields for that? Or does it require some more customized development?

Thanks, M

trevor

You put the text in custom basket fields when the product is added to the basket. When an order is created, these custom fields will be copied to the OrderProduct custom fields so every line item of the order can have its own custom values.

mathias.lin

Where do I (as admin) firstly specify those custom basket fields? In code or via KK Admin? I didn't find anything when searching for "basket fields". I don't mean product attributes/options, as they're only allowing to choose from a predefined list of values.
But I need the customer to enter the text (what he wants printed on his items) on checkout (or when adding the item to the cart) for each item. Do you have a link to an example or documentation? Didn't find anything in the docs. Thanks!

mathias.lin

In this post,
http://www.konakart.com/forum/index.php/topic,285.0.html
I found the information:

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.

However, I don't see where I (as a customer then) can add/fill out those fields in the frontend.

trevor


JamesC

I need to do something similar - ideally I need a sysadmin to be able to configure which fields to add, and which fields are obligatory. Where can I find documentation on these widgets? Is there anyway to do this at runtime?

mathias.lin

Hi James,
we've done that and meanwhile completed the project. We used the custom1, custom2 fields, editable for each product in KK Admin. Then we adjusted the struts form sources accordingly - or if you just need a simple client side validation, you can also do it with javascript, but not so safe.
If you still need assistance, let me know.  8)
Regards,
Mathias
info@opencmsserver.com
http://www.opencmsserver.com

Quote from: JamesC on June 01, 2011, 04:19:53 pm
I need to do something similar - ideally I need a sysadmin to be able to configure which fields to add, and which fields are obligatory. Where can I find documentation on these widgets? Is there anyway to do this at runtime?

lrkwz

I've customized the AddToCartSubmitAction with

if (acf.getEngraving() != null && acf.getEngraving().trim().length() > 0) {
b.setCustom1(acf.getEngraving().trim());
}

kkAppEng.getBasketMgr().addToBasket(b, /* refresh */true);

return mapping.findForward("ShowCart");


but I cannot find the engraving text in the database anyware :-(