In my use case I'd like to have a simple "add to cart" that doesn't ask me anything and then, instead, I'd like users to be "forced" to compile customized fields in some checkout step (as a validation).

Do you think such a feature belongs to this module?

Do you have any suggestion on how I should do that?

Thank you!

Comments

Slacker’s picture

I need that feature too +1

rszrama’s picture

Status: Active » Fixed

I don't think that would be a feature for this module. This module deals with product-by-product customizations. If you want to do that and use your UX model, you could possibly use a landing page with an "Add to Cart" link themed to look like a button that leads to the actual Add to Cart form or something. Otherwise if you just need to request additional data at the order level, you might try instead adding custom fields to your order type, putting them in a fieldgroup, and turning that fieldgroup into a checkout pane using http://drupal.org/project/commerce_fieldgroup_panes.

bago’s picture

Status: Fixed » Closed (won't fix)

I don't want a custom landing page on the add to cart, and I don't want to add properties to the order.

Mine are product-by-product customizations but I want them to be done during the checkout and not while adding to cart.

I solved this by creating a custom module and creating a form asking for the specific data I need for each item, so not in a generic way. I didn't find a good way to expose an editable view so that user could simply choose what fields to ask later (at the same way people alter product quantities).

BTW I'm changing the status of this issue from "fixed" to "closed (won't fix)" as "fixed" is misleading.

rszrama’s picture

Sure, I think I just assumed it was a support request. ; )

Have you tried http://drupal.org/project/editablefields?

bago’s picture

Yes, I tried editablefields, but I had issues trying to include an editable view inside a checkout panel.

There was a mismatch between the place I could ask the "editable view structure" and the place where I could "inject" that view in the checkout panel.

At least this is what I remember now (it was few months ago) and I'm not a D7 guru, yet, so I don't know if it was due to lack of knowledge or simply not possible with the current extension points.

rszrama’s picture

Ahh, no, you're right. You can't use it on the checkout form b/c it will try to create a "form within a form" when you edit the field, which won't work. The only way around it would be to put the View on a checkout page using a Views block but not inside a checkout pane. So you could set the View to appear in a custom block at the top of the page so it exists outside of the checkout form HTML - that would work fine, but you would want to ensure it was all AJAXy so you didn't have people accidentally losing data they've entered elsewhere on the checkout form when they submit an editable field.

msypes’s picture

Bago,
Could you post some information on how you accomplished this? I'm also trying to capture users' customizations AFTER they add they add a product to cart. In my case, it's a registration for an event. (Yes, I know there are modules for doing just that, and if I could have gotten any them to work reliably, I wouldn't be trying this cockamammy method.)

bago’s picture

It happened a lot of time ago, so I don't remember details, but:

1) I created a custom product type for products needing customization
2) I created a custom line item type for that products, adding the customization fields to this line item entity.
2b) There is a way to tell commerce that a given product type will create a specific line item type.
3) I changed the configuration that allowed "aggregation" for the "same product" in the cart, so that I have 1 line item for each product (and not a single line item saying I want 10 of them).
4) I created a custom checkout pane (there's an hook in commerce) where I look in the cart and for every not-yet-customized line item I prepare a "form part" allowing fills of that properties (unfortunately I didn't know how to show real fields from the line item definitiion, so I manually created form fields using FAPI and on submit I valued the line item.
5) I changed the default cart view for the checkout so to show the custom data from the line item.

That's all.

You can also make #4 like a multistep by letting people customize one lineitem at a time and fail the validation until all of them have been valued.

msypes’s picture

Thanks bago,
I couldn't figure out how to use the callbacks on a checkout pane properly, but I did come up with a simple solution that I think is worth sharing with the community:
I have a piece of javascript added to the add to cart form that hides the line item fields and modifies the add to cart button so that the first click toggles their display back on, and the second actually submits, progressing through the checkout process.

1kenthomas’s picture

Category: Feature request » Support request
Issue summary: View changes
Status: Closed (won't fix) » Active

Re-opening rather than create a potentially duplicate issue.

WRT:

if you just need to request additional data at the order level, you might try instead adding custom fields to your order type, putting them in a fieldgroup, and turning that fieldgroup into a checkout pane using http://drupal.org/project/commerce_fieldgroup_panes.

My situation is that we have an image upload custom line item attached to a product type; unfortunately, imagefield's code resets a _form_alter() when image upload occurs. So we're trying to move that to a separate pane, to avoid the issue...

Will fieldgroup panes allow that in this case? I don't see a way to add Line Items to a fieldgroup.

Thanks in advance, Ken

nvahalik’s picture

Title: Allow customized properties "fill" to happen later while checking out » Add product customization checkout pane (Allow product customization during checkout)