Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1002802

    Hi,

    I try to put the tre price of my product directly under the title. I tried to play with the hook but it ain’t gone well.

    remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10 );
    add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 6 );

    Can you help me ?

    Thanks a lot,

    Clement

    #1003359

    Hey Blue_Bear,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function move_price(){
      ?>
      <script>
      jQuery(window).load(function(){
    jQuery( '.single-product.woocommerce-page' ).each(function() {
    jQuery( this ).find( '.av-woo-purchase-button .woocommerce-Price-amount' ).insertBefore( jQuery(this).find('.special-heading-border') );
    });
    });
      </script>
      <?php
      }
      add_action('wp_footer', 'move_price');

    Then try adding this code in the General Styling > Quick CSS field:

    .single-product.woocommerce-page .av-special-heading-h3 h3.av-special-heading-tag  {
    padding-bottom: 20px !important;
    }

    Please see the screenshot in Private Content area for the expected results.

    Best regards,
    Mike

    #1003508

    Thanks you very much !!!! it’s works perfectly !!

    Just in case, do you have another function if I want to put the price on the right of the quantity ? And furthermore a way that the price change regarding the quantity selected ?

    Enfold Support always the best :)

    Clément

    #1003526

    Hi!

    1) You can try this code to display the price near the quantity input field (maybe it requires additional styling):

    
    function move_price(){
      ?>
      <script>
      jQuery(window).load(function(){
    jQuery( '.single-product.woocommerce-page' ).each(function() {
    jQuery( this ).find( '.av-woo-purchase-button .woocommerce-Price-amount' ).insertAfter( jQuery(this).find('.quantity') );
    });
    });
      </script>
      <?php
      }
      add_action('wp_footer', 'move_price');
    

    2) This would require more work and is beyond the scope of our support forum. Please hire a developer if you need this feature.

    Cheers!
    Peter

    #1003529

    Once again thanks you very much !

    Just one thing that not working : if I want to show a promotion (regular price vs promo price) the regular price have no longer the line-throught decoration as before. If you have an idea ?

    regular price and promo price

    #1003850

    Hi,
    I took a look at your shop, but I didn’t find any items with a sale price, please link to the item with this issue, so we can assist.

    Best regards,
    Mike

    #1004026

    Yeah I disable it. In order for you to have a look can you log in my website withe the credential I gave you and go the page in private content below ? I set the page on private to hide it from customers.

    Thanks,
    Clément

    #1004071

    Hi,
    Thank you for that, I adjusted the code and now it seems to work correctly, Please clear your browser cache and check.

    function move_price(){
      ?>
      <script>
      jQuery(window).load(function(){
    jQuery( '.single-product.woocommerce-page' ).each(function() {
    jQuery( this ).find( '.av-woo-purchase-button p.price' ).insertBefore( jQuery(this).find('.special-heading-border') );
    });
    });
      </script>
      <?php
      }
      add_action('wp_footer', 'move_price');
    

    Best regards,
    Mike

    #1004085

    Almost !! It’s perfect until I choose the items of the pack and click to “add cart” after that the issu start again as you can see below

    • This reply was modified 6 years, 3 months ago by Blue_Bear. Reason: I was to quick to be satisfied :)
    #1004427

    Hi,
    I believe I have it this time, I changed the function in your functions.php to this:

    function move_price(){
      ?>
      <script>
     jQuery(window).load(function(){
      jQuery( '.av-woo-purchase-button p.price:nth-child(odd)' ).insertBefore( '.special-heading-border' );
      });
      </script>
      <?php
      }
      add_action('wp_footer', 'move_price');
    

    and I added this code in the General Styling > Quick CSS field:

    .single-product.woocommerce-page .av-special-heading-h3 p.price:nth-child(odd)  {
    display: none !important;
    }

    to remove the second price.
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1004633

    It works !! thanks a lot !
    You can consider the ticket close.

    Best support !

    Clément

    #1004647

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    For your information, you can take a look at Enfold documentation here
    For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Mike

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Change woocommerce price position on single product page’ is closed to new replies.