• So my client has a product they sell that is a steel cable with adjustable support hardware at both ends.

    Price Per Foot: $1.50
    In-House Fee: $27.00 per cable order

    Cable Per Foot Weight: 1 oz.
    Cable Ends Hardware Weight: 1.8 oz.

    The customer orders the cable to their specified length by contacting my client. The In-House Fee is added to each custom length cable orders because they have to cut the cable and install the support hardware at each end.

    Is there a way to set up this product without a add to cart button but with an order form or link to order form. I set it up in products so it would show up in the categories and other auto woocommerce product features.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    This is fairly custom so I can’t tell you how exactly how to do it but I can make some recommendations.

    You can use the WooCommerce Fees API to add the ‘In-House Fee’ when this specific product is in the cart. Read more here: https://docs.woothemes.com/document/add-a-surcharge-to-cart-and-checkout-uses-fees-api/

    You can use the Measurement Price Calculator extension for the product itself. Take a look: https://www.woothemes.com/products/measurement-price-calculator/

    Cheers.

    Thread Starter rwisneske

    (@rwisneske)

    Hey thanks jameskoster for the recommendations. I’m going to just leave instructions in the description for the customer to contact the client with their desired length of steel cable. I just added a contact form in with the product display.

    But my question about the API Surcharge is how do set up the function to only surcharge one chosen product instead of all products?

    Thanks!

    Hey,

    You can use something like this in your function, to check if the specific product is in the cart before adding the surcharge:

    $product_id = 15;
    	$found 		= false;
    
    	foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) {
    		$_product = $values['data'];
    
    		if ( $_product->id == $product_id ) {
    			$found = true;
    		}
    	}

    Just set $product_id to match the ID of the product your surcharge applies to, then only apply that surcharge if $found is true.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Product Custom Length Purchase Problem’ is closed to new replies.