Add the product price in between the variations selection and the add to cart button

This topic has 4 replies, 3 voices, and was last updated 5 months, 3 weeks ago ago by Andrew Mitchell

  • Avatar: carlyliczyk
    carliczyk
    Participant
    June 25, 2024 at 04:57

    Is there a way to add the product price in between the variations selection and the add to cart button?

    I have attached an image to further illustrate.

    Thank you!

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    June 25, 2024 at 06:37

    Hi @carlyliczyk,

    Please try adding this custom codes under functions.php file locates in your child theme:

    
    add_action('wp_footer', 'n2t_wp_footer');
    function n2t_wp_footer(){
        if(is_singular('product')){
    	?>
        <script>
            jQuery( function($){
                $(document).ready(function(){
                    $('[data-widget_type="woocommerce-product-etheme_price.default"]').insertBefore($(".single_variation_wrap button.single_add_to_cart_button"));
                })
            });
        </script>
    	<?php
        }
    }
    

    https://prnt.sc/CvhbgbLC0637

    Hope it helps!

    Avatar: carlyliczyk
    carliczyk
    Participant
    June 25, 2024 at 17:46

    Thanks that worked great for the 1 product, are you able to make it so it does it to all of the products?

    Thanks

    Please contact administrator
    for this information.
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    June 25, 2024 at 17:46

    Dear carlyliczyk,

    As we continue our mission to exceed expectations, your insights become increasingly valuable. Could we, with all due respect, request your thoughtful feedback by giving our theme a deserved 5-star rating on ThemeForest?

    Click here to share your valuable perspective: https://themeforest.net/downloads

    Your time and trust are highly appreciated!

    Best Regards,
    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘Add the product price in between the variations selection and the add to cart button’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.