Adding a field to the order form

Posts: 11
Joined: 01/07/2008

My dilema is that I need customers to choose colors for custom made product. I have the php code, thought I put it in the correct place, but turns up on the create a product page instead, and it doesn't show up correctly there either.

I want to REQUIRE it on the order form, as if they don't choose two colors the item cannot be made, so in order to check out, they have to choose the colors.

No IF this item is one that is already made and available for sale, the color choices would need to be on the create product field, but not REQUIRED. So, if someone wants to help me out with this, let me knw, I'll give you admin rights so you can teach me what to do.

Thanks
Sue

Posts: 1232
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

Just so we're clear, you want to require the person to choose 1 or 2 colors, before they can purchase the product? I think requiring it before they add it to the cart is a better idea.

I think the optimal solution, Überdudes, is to make an option for Requiring an attribute. As it stands now the first option in the drop-down list is the one automatically selected. It'd be better if it read "Choose a [option]" and if one is not selected, kick them back to the form.

To do this, Sue, might require a custom module and the use of hook_form_alter.

EDIT: Hey uberdudes, after working on this, I realized a couple features I'd like to see in the next beta Smiling For Sue's needs at least, her situation would be made easier if she could make an option required, and also, if an attribute could be a multiple select list.

Then we'd have to use hook_form_alter to check and see how many values were selected in the list, and if it wasn't at least 2 (in her case) throw an error and kick back to the add_to_product form. (But the flexibility to choose a combination and require a certain number of options seems an interesting thing to add).

If you think that's doable I can add it to the feature request queue Eye-wink (There is one, right? Hehe.)

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 11
Joined: 01/07/2008

I really appreciate all the help. This is a big project for me, and one that I fear I will use often, so need something to back up so I can come back to it again and again.

Posts: 304
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

We also need this functionality and have been looking into making a module for it. What we require is the default option to read "Please select..." and for that option to prompt the user to select a proper option. I think the ideal solution would be a checkbox next to each option saying something like "default option" or "don't allow checkout". If anyone has better ideas I'd love to hear them. Also, an outline of how to do this in a module would be great before embarking on it and likely getting it wrong!

Posts: 11
Joined: 01/07/2008

Has anyone come up with any solutions to this problem? I have not worked on the sites recently due to family problems, and am now ready to get back into it. I need to know if there is a solution here so that I can include it in the development of the sites.

Hope someone has some good news for me.
Sue

Posts: 304
Joined: 08/28/2007
Early adopter... addicted to alphas.Not KulvikTheminator

This has been fixed in core.