Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #979404

    Daniel Eichar
    Participant

    Hello,

    I am trying to move the product option (variation) area and add to cart button under the main product image. See example below of where. I have searched for how to change layout for WooCommerce and cannot figure it out.

    Here is the link to the product detail page…

    http://pelicanc.nextmp.net/index.php/product/perfection-dk/

    #979856

    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would like to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.

    // Custom Single Product layout
    // =============================================================================
    function move_variations(){ ?>
      </div>
      <div class="custom-summary">
    <?php }
    add_action('woocommerce_single_product_summary', 'move_variations', 25);
    // =============================================================================

    And then after that you also need to add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .custom-summary {
      clear: both;
      display: block;
      margin-top: 30px;
    }

    We would loved to know if this has work for you. Thank you.