Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #562173

    Everything seems to be fine apart from the styling on the online shop product page.

    As you can see from the attached link the product images are now full width which is not right.

    I remember using a recommendation by the Enfold support staff to hack in a sidebar on the right side of product pages (the fact this has to be done is a joke btw). So I think the CSS has broken with the updates.

    Any help is very much appreciated.

    Luke

    #562375

    Hi Luke86,

    Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #563051

    see private data.

    #563759

    Hi!

    I’m sorry but the theme doesn’t support conventional sidebars for the single product pages. The ‘hack” is required and it has been updated. Please try to replace the code in the functions.php file:

    #
    # 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() {
            global $avia_config;
            echo "</div>"; //close out the summary	
            $avia_config['currently_viewing'] = "shop_single";
    	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);
    }

    Edit config-woocommerce > config.php file, look for this code:

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

    Replace it with:

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

    Add this to the Quick CSS field:

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

    https://kriesi.at/support/topic/single-product-page-is-strange-sidebar-appears-under-product/#post-451940

    Regards,
    Ismael

    #565532

    Works, thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Updated Enfold & WordPress & Woocommerce’ is closed to new replies.