Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #803188

    Hi there,
    I am having issues moving the sidebar widget to the right side of the page. I looked at thread #450596 and applied the following codes:

    fuctions.php

    #
    # wrap single product image in an extra div
    #
    
    function avia_add_image_div() {
     echo "<div class='single-product-main-image alpha'>";
    }
    
    function avia_close_image_div() {
     echo "</div>";
    }
    
    #
    # wrap single product summary in an extra div
    #
    
    function avia_add_summary_div() {
     echo "<div class='single-product-summary'>";
    }
    
    function avia_close_summary_div() {
     echo "</div>"; //close out the summary
     get_sidebar();
    }
    
    function avf_product_sidebar_layout_mod($layout){
     if( is_single() )$layout = "sidebar_left";
     return $layout;
    }
    
    add_action('init', 'ava_product_sidebar_mod');
    function ava_product_sidebar_mod() {
     add_action( 'woocommerce_before_single_product_summary', 'avia_add_image_div', 2 );
     add_action( 'woocommerce_before_single_product_summary', 'avia_close_image_div', 20 );
     add_action( 'woocommerce_before_single_product_summary', 'avia_add_summary_div', 25 );
     add_action( 'woocommerce_after_single_product_summary', 'avia_close_summary_div', 3 );
     add_filter( 'avf_product_sidebar_layout', 'avf_product_sidebar_layout_mod', 5);
    }

    config-woocommerce > config.php replaced:

    $sidebar_setting = avia_layout_class( 'main' , false );

    with

    $sidebar_setting = apply_filters( 'avf_product_sidebar_layout', avia_layout_class( 'main' , false ) );

    and added quick css:

    .single-product .product {
    width: 68%;
    margin-right: 4%;
    clear: none;
    float: left;
    }

    After doing this, it still won’t work and sidebar widget still appears below the product. Let me know if any of this doesn’t make sense. Please advise.

    Thanks!

    #803310

    Hey tivo_designs,

    This link ought to help you: https://kriesi.at/support/topic/how-to-display-the-sidebar-on-the-right-of-the-single-product-page/

    Best regards,
    John Torvik

    #804230

    Hi John,

    Thanks for this but it modifying has made the site load up as error. Please advise.

    #805214

    Hi tivo_designs,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look? Can you not do it in the settings?

    Best regards,
    Victoria

    #805222

    Sure thing. Credentials are below..

    Thanks!

    #806718

    Hi,

    The modification above is obsolete Please remove it then add the following code in the functions.php file:

    // adjust settings on init
    add_action('init','ava534345953_init', 50);
    function ava534345953_init() {
    	add_action( 'woocommerce_after_single_product_summary', 'avia_add_sidebar', 25);
    }
    
    function avia_close_image_div() {
    	global $avia_config;
    	echo "</div>
    ";
    }
    
    function avia_add_sidebar() {
    	if(is_product()) {
    	$avia_config['currently_viewing'] = "shop_single";
    	get_sidebar();
    	}
    }

    In the Quick CSS field, add the following css code.

    .single-product-main-image {
        width: 25%;
    }
    
    .single-product-summary {
        overflow: hidden;
        width: 45%;
        float: left;
        margin-right: 5%;
    }
    
    .single-product .sidebar {
        width: 25%;
    }

    Related thread: https://kriesi.at/support/topic/sidebar-rechts-single-page/#post-580220

    Best regards,
    Ismael

    #807181

    Managed to fix the issue with advance builder. It wasn’t loading before but it does now.

    Thanks a lot!

    #807200

    Hi,

    We’re glad that the issue is fixed now!

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/

    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/

    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you.

    Thank you for using Enfold!

    Sarah

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Moving Sidebar on Single Product Pages to the Right’ is closed to new replies.