Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2688777
Position of frequently bought together items on product page
Closed

Comments

  •  1
    Kim started the conversation

    Is there a way to position the frequently bought together products below the main product's quantity and above the cart button?

  •  767
    Janilyn replied

    Hi Kim,

    Thank you for contacting WPClever Support Forum. We've just been back from the Tet Holiday vacation (9-17th Feb). So today, I am able to reach and process your ticket.

    We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,223
    Dustin replied

    Hi Kim,

    I'm so sorry for the late reply!

    Please send me the product link in your screenshot then I can check it first and provide the solution.

    Best regards,
    Dustin

  •  1
  •  1,223
    Dustin replied

    Hi Kim,

    I've checked this product and seen the main product is a variable product and also has a variable product in the "frequently bought together" list. So, please follow these steps:

    1. Install and activate another plugin from us https://wordpress.org/plugins/wpc-variations-radio-buttons/

    2. In WPC Frequently Bought Together please choose https://www.screencast.com/t/YIATw51nR2j

    3. In WPC Variations Radio Button please choose https://www.screencast.com/t/1Scnoybo

    Best regards,
    Dustin

  •  1
    Kim replied

    Thank you, that worked. Now back to my original quesiton: Is there a way to position the frequently bought together products below the main product's quantity and above the cart button?

  •  1,223
    Dustin replied

    Please try to add the below code to current-theme (or child-theme) / functions.php

    add_action( 'wp_footer', 'woobt_footer_scripts_2688777', 99 );
    function woobt_footer_scripts_2688777() {
        ?>
        <script type="text/javascript">
          jQuery(document).on('woobt_init', function() {
            jQuery('.woobt-wrap').each(function() {
              var $this = jQuery(this);
              var $this_atc = $this.closest('form').find('.single_add_to_cart_button');
              $this.insertBefore($this_atc);
            });
          });
        </script>
        <?php
    }

    If it doesn't work, please send me your website info (wp-admin link, username, password) then I can check and fix this problem for you. You also can create a dev/staging site with the same issue then I'll work on it. 

    Best regards,
    Dustin

  •   Kim replied privately
  •  1,223
    Dustin replied

    Sorry about that! 

    I missed adding this line in our plugin https://www.screencast.com/t/972aTpt7r5g. This code will be added to the next updated version of our plugin.

    Check the new snippet here https://www.screencast.com/t/iKug0vDs

    Also, add CSS code:

    .woobt-wrap {
        display: block;
        width: 100%;
        margin-top: 30px;
        clear: both;
    }

    And the result https://www.screencast.com/t/YJxuN5JdG

    Best regards,
    Dustin

  •  1
    Kim replied

    Works beautifully! Thank you very much.

  •  1,223
    Dustin replied

    You're welcome!smile.png

    If you are satisfied with our plugin and support, please reward it with a full five-star ★★★★★ rating.
    https://wordpress.org/support/plugin/woo-bought-together/reviews/?filter=5
    Thank you in advance! <3

    Best regards,
    Dustin