User-defined Bundle Product Choice on Checkout

I'm trying to develop a way for site users to select a specific product as part of a bundle on checkout by typing in the product SKU.

Example: Users can buy a hat, with the option of bundling with any four buttons on the site. The user should be able to specify which buttons, out of maybe nearly a hundred available in the store. I figure the appropriate time to collect the user's choices would be on checkout, so that the user is asked to specify the correct number of button choices depending on the quantity of hat with button products/bundles in the cart (so there is a field item for each choice to be entered). I decided to not record the user selection on add to cart in the case that bundles are removed from the cart so as to not deal with arbitrarily deleting product choices.

I've been assuming whatever I build will involve some rules, perhaps the commerce bundle module and custom line item types, probably editable fields and possibly some way of adding panes to the checkout form (via a contrib module or code). Also, I've been toying with the idea of loading a VBO view in an overlay via a link in the custom line item to browse available options and update the line item based on the selected choice by passing through some variables.

To make matters more complicated, there isn't a convenient rules event for when a user begins the checkout process, so I've been using the event when an order is updated with a condition on order status, though clicking to checkout from the default cart summary block doesn't change the status of the order.

Any ideas/suggestions would be greatly appreciated. I've hit a road block with most of the ideas I've had so far but still have some others to try.

Posted: Dec 9, 2012


T.Mardi on August 8, 2013

Hi guys, been looking for the same thing for ages now too.

My approach so far has been to create a view using Commerce Add To Cart Extras. I've added arguments so the attributes shown are only relevant to the node being viewed. This is all displayed in a Panel node.

The problem I am having is with Rules. I need to specify that the quantity has to be x amount as defined as an integer value in the node display. As you mentioned in your example, you need the users to only select 4 options, did you find a way to restrict quantity? If the quantity is not reached or exceeded are users promted with a message / stopped form checking out until the required quantity is selected?

Also, the options that the users can select also have a unit price, I need to override these with another value (price of total package). Commerce Product Bundle does this as part of it's functionality, but I can't recreate the Rule they are using to do this. I assume it is a Rule?

Would be great to hear how you guys are getting on with achieving this.