• Hello,

    I am using bootstrap. In single product page, when I arrange window size smaller and when image is big enough, product-summary place is in downer to images and it is in right.

    To solve this problem I added an action to product-image.php end of the file (copy in the themes/woocommerce/single-product).

    <?php do_action( 'woocommerce_after_single_product_images' ); ?>

    add to style.css in my theme:

    .woocommerce #content div.product div.summary, .woocommerce div.product div.summary, .woocommerce-page #content div.product div.summary, .woocommerce-page div.product div.summary {
        float: left;
        width: 100%;
    }

    and I added my functions.php these lines:

    function woocommerce_before_single_product_summary_vk() {
    ?>
        <div class="row">
          <div class="col-sm-6 col-md-6 col-lg-6">
    <?php
    }
    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_before_single_product_summary_vk', 10, 2 );
    
    function woocommerce_after_single_product_images_vk() {
    ?>
    
        </div>
        <div class="col-sm-6 col-md-6 col-lg-6">
    <?php
    }
    add_action( 'woocommerce_after_single_product_images', 'woocommerce_after_single_product_images_vk', 10, 2 );
    
    function woocommerce_after_single_product_summary_vk() {
    ?>
          </div>
        </div>
    <?php
    }
    add_action( 'woocommerce_after_single_product_summary', 'woocommerce_after_single_product_summary_vk', 10, 2 );

    Now, my product page is good. Image is smaller like I expected (because of bootstrapt) when I make window smaller and product-summary place.

    And I suggest, please next version add

    <?php do_action( 'woocommerce_after_single_product_images' ); ?>

    line end of the product-image.php file.

    Regards,

    https://www.ads-software.com/plugins/woocommerce/

  • The topic ‘single-product page summary float: right; problem and suggestion’ is closed to new replies.