Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #531314

    Hi Team,

    Wonder if you can help me with this.

    I’m using woocommerce Recent Reviews widget on the home page.

    I’ve remove the review tab

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
    
      unset( $tabs['reviews'] ); 			// Remove the reviews tab
    
        return $tabs;
    
    }

    I’ve moved the Review Tab out of the product data tabs and placed it directly below.

    add_action('woocommerce_after_single_product_summary', create_function( '$args', 'call_user_func(\'comments_template\');'), 30);

    When I click the review link http://domain.com/product-name//#comment-21 (from the sidebar widget) it brings me to the review.

    All works fine at this stage.

    The problem is the product data tabs content (description, additional information) does not display. I checked and it is set as display:none. When I removed the #comment-21 from the url, the tabs content displayed normally.

    I believe it is because the review is “opened” and the rest of the tabs are “closed”. I’ve been trying to make the tabs content to display as normal after the shift of the review content out of the tab.

    I understand it is non theme related but wonder if you have encountered this before and know the fix at your fingertips. I’m trying my luck here as I’ve been spending almost a week to solve this. I’ll appreciate it greatly if you can point me to the right direction if you know.

    Thanks

    • This topic was modified 8 years, 4 months ago by senso.
    #531794

    Hey senso!

    Thank you for using Enfold.

    Try this:

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
        unset( $tabs['reviews'] );		// Remove the reviews tab
    	$tabs['description'] = $tabs['description'];
    	$tabs['additional_information'] =  $tabs['additional_information'];
    
        return $tabs;
    }
    
    add_action('woocommerce_after_single_product_summary', create_function( '$args', 'call_user_func(\'comments_template\');'), 30);

    Cheers!
    Ismael

    #531815

    Many thanks Ismael!

    It is still the same. The product tabs panel is still display none.

    View post on imgur.com

    It seems like an easy fix but is driving me crazy not able to fix it.

    The tabs’ content shows when the tab’s title (description / additional information) is clicked. My guess is the review content that is moved below is “open” and thus the other tabs is “closed”. However, when the hashtag #comment-21 is removed from the url, the tabs’ contents load properly.

    Been searching everywhere and trying all possible ways I can think of…. …. but to no avail.

    #532323

    Hey!

    It does work on my end. Please check your css modifications, maybe you declare the tabs to not display. This is what I have in my end when I added the code:

    The additional information is missing because the example above is a simple product (not variable) but you can see the product description. Note that you have to add the excerpt or product description in the Product Short Description editor.

    Cheers!
    Ismael

    #532356

    Hi Ismael,

    Really appreciate your help!

    It displays normally when the single product page is viewed.
    However, if it is access via Woocommerce Recent Review Widget, the url is http://domain.com/product-name/#comment-21, It anchors at #comment-21 but the tabs contents is missing/closed as the above attached. The tabs’ contents displays only when it is clicked.

    • This reply was modified 8 years, 4 months ago by senso.
    #533033

    Hi!

    The additional information looks empty because you’re looking on a simple product and we force it to show on the previous code. Try to replace the code with this:

    function woo_remove_product_tabs( $tabs ) {
             unset( $tabs['reviews'] );		// Remove the reviews tab
    	 $tabs['description'] = $tabs['description'];
             return $tabs;
    }
    
    add_action('woocommerce_after_single_product_summary', create_function( '$args', 'call_user_func(\'comments_template\');'), 30);

    Make sure that you added a product description. For more info, please contact the plugin author.

    Best regards,
    Ismael

    #533065

    Hi Ismael,

    The above code (#533033) tried but does not remove review tab.

    The content(product description,additional information) is there but it needs to be clicked to show.

    I’ve tried to disable all plugins except woocommerce and is not caused by any plugins.
    I tried to set min-width for the tabs but the content is still not showing.
    I tried to add clear:both to tabs and #reviews but still no avail.
    Completely clueless what is causing this

    Sigh…………

    • This reply was modified 8 years, 4 months ago by senso.
    #533130

    This html output produces

    <div id="tab-description" class="panel entry-content wc-tab" style="display:none;">

    However, I’ve searched everywhere but couldn’t find reference of style=”display:none;” to change it to block. Anyone knows where and how?

    #533202

    Hi Ismael,

    If I may trouble you, can I verify if you are able to replicate the problem that I mentioned? If I interpret your posts correctly, you seem not to have this problem?

    To double and triple check, I tried it on a default set up with enfold and woocommerce. The problem is there. I’ll try to explain again

    – I use the snippet posted on #531794
    – The page and tabs load correctly as intended if I access the single product page directly http://www.domain.com/shop/product-name
    – Homepage is set up with a right sidebar and woocommerce recent reviews widget, if I click on the links via recent reviews widget, the url produced is http://www.domain.com/shop/product-name/#comment-25. The page is anchored at #comment-25 but the tabs contents do not show (refer to screenshot posted on #531815)
    – The tabs content is visible if I clicked on the tab heading.

    I’ve spent more than a week trying to find a fix for this but to no avail. It is driving me insane …… I appreciate if anyone can let me know if I am the only one who have this problem?

    Thanks greatly!

    #538687

    Hi!

    I’m sorry for the delay. If possible, please contact the plugin author for more info regarding the issue. Note that we don’t or can’t provide support for third party plugins as stated on our support policy but we try to help as much as possible. A link to the actual page would be nice.

    Best regards,
    Ismael

    #541313

    You have been a great help! Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Product Data Tabs Display’ is closed to new replies.