Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build To Order Products in WooCommerce -- overriding product combinations

I am trying to set up a site with very complex "build to order" products. I am using WooCommerce but I realize that it might not be best solution, however, I am not a programmer so I'm trying to work with a pre-existing application. For reference, here is the original site that I'm redesigning: http://www.cabinetstogo.com/ic280Collectionfrm_multiple.asp?prodno=TOFFEE-NS*WC -- click on the tabs to see the detail.

I have explored all the Woo Extensions I can find such as Product Add Ons, Product Bundles, Grouped Products and Composite Products. Currently I am using Product Bundles with Composite Products here: http://www.cabinetstogo.company/product/westminster-glazed-toffee-base-cabinets/ -- the layout is a bit messy but that isn't my issue, the issue is that while you can pick and choose individual products you can't select individual quantity.

With Grouped Products: http://www.cabinetstogo.company/product/grouped-test/ the layout is perfect but I can't add a Grouped Product to a Composite Product.

Ideally what I need to do is:

  1. Create Product Bundles of simple products that have to be sold together
  2. Organized these Product Bundles into Product Groups -- PROBLEM: Bundled products can't be added to Group Products
  3. Add these Product Groups into a Composite Product for a master group of products like Base Cabinets -- PROBLEM: Grouped products can't be added to Composite Products

I have tried Product Add Ons two but the issue with that is there is no way to set individual SKUs for the Add Ons.

Setting them as Variable Products is another idea but you can't select more than one variation at a time. I have also considered the Gravity Forms Add On but that seems to just be for additional product details not the mix and match features.

I know there is no easy solution but any pointing in the right direction would help as I can think of all different ways to go about I don't know where to start.

like image 680
CreativEliza Avatar asked Dec 18 '14 19:12

CreativEliza


1 Answers

It sounds like you're looking for an off the shelf plugin solution for a VERY complicated problem. You're going to need a programmer for this. A good basic plan could be:

FEATURE: Do custom business logic when a particular product is purchased.
   When a customer adds something to the cart
   Then do some custom business logic, like add "bundled" products to the cart

Here are some useful snippets functions:

Do something on cart add:
add_action( 'woocommerce_add_to_cart', 'custom_add_to_cart', 10, 2 );
function custom_add_to_cart( $cart_item_key, $product_id ) {
    if( 123 == $product_id ) { ....

OOP:
add_action( 'woocommerce_thankyou', array($this, 'doSomething') );

Create a product:
$post_id = wp_insert_post( $post, $wp_error );
update_post_meta( $post_id, '_visibility', 'visible' );
update_post_meta( $post_id, '_stock_status', 'instock');
update_post_meta( $post_id, 'total_sales', '0');
update_post_meta( $post_id, '_downloadable', 'no');
update_post_meta( $post_id, '_virtual', 'yes');
update_post_meta( $post_id, '_regular_price', $regularPrice);
update_post_meta( $post_id, '_sale_price', "123" );
like image 184
Jim Maguire Avatar answered Oct 17 '22 19:10

Jim Maguire