Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Thanks for your response!

    Yes, I know how downloadable/digital products works on WooCommerce. My problem is : I want to sell unique downloadable/digital product for my clients, but based on the same product.

    Please, read the workflow :

    I am a sports coach, and I want to sell unique nutrition program for my clients. I would like to create one digital product on WooCommerce called “Nutrition Program”. After the payment, I will work on the writing of this program (PDF), and would like to share it with my client through WooCommerce interface. The main idea is that my client will easily find his nutrition program in his WooCommerce account page, via Downloads tabs.

    Thanks a lot!

    Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Great, thanks a lot!

    Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Hi,
    Thanks it’s working !

    Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Hi,
    Thanks, all done ! Price is now correct, but I still have the same problem from 0,7 (next number is 7,99).
    Regards,

    Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Hi,
    Nothing changed. Display price is not correct if I do not refresh the page, and from 0,7 next number is 0,799. See : https://netmove.fr/wordpress/produit/popeline-de-coton/

    Thanks,

    Thread Starter ceciestmonsurnom

    (@ceciestmonsurnom)

    Hi,
    Thanks for your response.

    I specified in Unit Price “0,10” and added this code into my theme’s functions file :

    add_filter( 'upw_skip_args_validation', '__return_true' );
    add_filter( 'upw_product_min_value', 'upw_set_min_value' );
    add_filter( 'upw_variation_min_qty', 'upw_set_min_value' );
    add_filter( 'woocommerce_update_cart_validation', 'upw_apply_min_quantity', 10, 4 );
    
    function upw_set_min_value( $step ) {
    	$min_values = [
    		'0.10'	=> '0.50',
    		'0.10'	=> '0.50',
    	];
    	return isset( $min_values[ $step ] ) ? $min_values[ $step ] : $step;
    }
    
    function upw_apply_min_quantity( $passed, $cart_item_key, $values, $quantity ) {
    	$min_values = [
    		'0.10'	=> '0.50',
    		'0.10'	=> '0.50',
    	];
    	$step = $values['data']->get_meta( '_upw_step' );
    	if ( $step && isset( $min_values[ $step ] ) && $quantity < $min_values[ $step ] ) {
    		wc_add_notice( __( 'A minimum order amount', 'woocommerce' ) . ' (' . $values['data']->get_name() . '): ' . $min_values[ $step ], 'error' );
    		return false;
    	}
    	return $passed;
    }

    Unfortunately it does not work correctly, I’m sure I’m missing something ! Can you please help ?

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)