• Resolved bahram421

    (@bahram421)


    Hi

    In variable products, I want the price to be variable instead of the price, and the price to change with each choice of variables.
    In the photo below, I showed my meaning completely

    https://prnt.sc/nu8jog

    Thank you for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • What you’re trying to do isn’t possible with WooCommerce “out of the box”. It would require some custom code. Per our support policy however:

    https://woocommerce.com/support-policy/

    … that’s not something we can help with ourselves. ?? We can only support the default features and functionality of our extensions.

    If you would like this functionality changed for your site, you have some options:

    – Post a new feature request on our Ideas Board: https://ideas.woocommerce.com/forums/133476-woocommerce or add your vote to an existing request if one exists. The more popular an idea becomes, the more of a priority it is for our developers to review.
    – Learn enough PHP, HTML, CSS, and/or JavaScript to be able to write your own custom code. There’s an abundance of free resources available online for each of those topics, which you can find by searching “free PHP tutorial”, for example.
    – Contact a developer who can help. For assistance with customization or development with your site, we recommend reaching out to someone on our customizations page: https://woocommerce.com/customizations/.

    Hopefully this helps point you in the right direction! ?? I’ll also leave this thread open for a bit to see if anyone from the community would like to contribute.

    @bahram421 please try adding the following snippet to your functions.php

    This will move the price for variable products above the qty input and below the variation options

    add_action( 'the_post',  'wdc_move_price_order', 99  );
    function wdc_move_price_order(){
        if(is_product()){
            global $product;
            if($product->is_type( 'variable' )):
                remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
                add_action( 'woocommerce_single_variation', 'woocommerce_template_single_price', 15 );
            endif;
        }
    }

    Hi @bahram421

    We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, the above reply was helpful! If you have further questions, please feel free to open a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Move woocommerce variation price’ is closed to new replies.