Single product page tab - by raymondlee1226

This topic has 20 replies, 4 voices, and was last updated 8 years, 8 months ago ago by Jack Richardson

  • Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 11, 2015 at 10:19

    Hi,

    Please refer to this image:
    https://www.dropbox.com/s/5tucpc02ogesaeq/Screen%20Shot%202015-08-11%20at%205.10.16%20pm.png?dl=0

    1. At “Single product” page, how can I hide “ADDITIONAL INFORMATION” tab?
    2. How to add 2 more additional tabs with content?
    3. How to rearrange the tabs? I want “Reviews” tab to be the last tab.

    Please help.

    Thanks.

    19 Answers
    Avatar: Robert Hall
    Robert Hall
    Support staff
    August 11, 2015 at 11:00

    Hello,

    Please read more here how to edit tabs:
    http://docs.woothemes.com/document/editing-product-data-tabs/

    Regards,
    Robert Hall.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 12, 2015 at 10:11

    Hi Robert,

    Thanks.
    I am trying to re-ordering tabs, but “Reviews” and “Enquires” tabs never change the ordering.

    I’ve add the code to php but I still can’t see the fields for me to fill custom tab contents.
    Please help.

    Avatar: Eva
    Eva Kemp
    Support staff
    August 12, 2015 at 10:17

    Hello,

    Please provide us with wp-admin panel and FTP credentials in Private Content.

    Regards,
    Eva Kemp.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 13, 2015 at 04:20

    Hi Eva,

    Please see the private content.

    Please, contact administrator
    for this information.
    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 13, 2015 at 08:41

    Hi,

    I have another 2 issues need to fix. Both are mobile side problem.

    Please, contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 13, 2015 at 10:12

    Hello,

    Please specify where you added the code to reorder tabs.
    The code mentioned here http://docs.woothemes.com/document/editing-product-data-tabs/ must be added to functions.php file in your child theme.

    1. Add this code in custom css:

    @media (max-width: 480px){.product-content {
      display: flex;
    }}

    2. Unfortunately I don’t see any issues with sorting:
    http://storage2.static.itmages.com/i/15/0813/h_1439457111_5945288_428d1b1154.png

    Best regards,
    Jack Richardson.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 14, 2015 at 02:55

    Hi Jack,

    I will try to add tab one more time and get back to you later.

    1.
    I’ve put your code to our css, but problemstill remains.
    https://www.dropbox.com/s/zmc90z7xmj8o6mj/IMG_1654.PNG?dl=0

    2.
    It happened randomly when displaying on ipad in landscape view.

    Avatar: Eva
    Eva Kemp
    Support staff
    August 14, 2015 at 08:41

    Hello,

    Please check single product page now.

    Regards,
    Eva Kemp.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 17, 2015 at 02:47

    Hi Eva,

    I looked through the single product page. But I didn’t saw any changes. Please advice which issues are you pointing to?
    Thanks.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 17, 2015 at 07:39

    Hi Eva,

    Thanks for the help.

    Please, contact administrator
    for this information.
    Avatar: Eva
    Eva Kemp
    Support staff
    August 17, 2015 at 10:49

    Hello,

    1. New “Custom tab” field won’t be shown in products editor. You need write content in the code you added into functions.php file, for example, this is the code for custom tab:

    add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
    function woo_new_product_tab( $tabs ) {
    	
    	// Adds the new tab
    	
    	$tabs['test_tab'] = array(
    		'title' 	=> __( 'New Product Tab', 'woocommerce' ),
    		'priority' 	=> 50,
    		'callback' 	=> 'woo_new_product_tab_content'
    	);
    
    	return $tabs;
    
    }
    function woo_new_product_tab_content() {
    
    	// The new tab content
    
    	echo '<h2>New Product Tab</h2>';
    	echo '<p>Here\'s your new product tab.</p>';
    	
    }

    You can see the code

    echo '<h2>New Product Tab</h2>';
    echo '<p>Here\'s your new product tab.</p>'

    You need write your content instead of “New Product Tab” and “Here’s your new product tab.”

    2. Try to use this code to order tabs:

    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
    function woo_reorder_tabs( $tabs ) {
    
    $tabs['description']['priority'] = 5;			
    $tabs['additional_information']['priority'] = 10;	
    $tabs['reviews']['priority'] = 15;			
    return $tabs;
    }

    Regards,
    Eva Kemp.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 18, 2015 at 01:55

    Thanks Eva.
    I’ll try.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 18, 2015 at 07:32

    Hello,

    You’re welcome.

    Best regards,
    Jack Richardson.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 18, 2015 at 08:23

    Dear Eva,

    We have followed your instructions to include the code into our website. We can see the new tab at the product page. Unfortunately, the administrator is not able to update the new tab content at the backend.

    Please advise what we must do to add additional tabs and also being able to update the new tabs’ content at the backend without constantly returning to the source code to update them?

    Avatar: Eva
    Eva Kemp
    Support staff
    August 18, 2015 at 08:29

    Hello,

    Unfortunately Woocommerce custom tabs can’t be added in backend and as you can see it’s not mentioned in their tutorial. They give only code that can be included in functions.php file.
    Sorry.

    Regards,
    Eva Kemp.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 21, 2015 at 07:19

    Dear Eva,
    Thank you for your reply.

    Another issue that we are facing is the display of each tab content.
    When we click on each tab, the content should be displaying just below the clicked tab, instead they are displayed below the last tab.

    Avatar: Eva
    Eva Kemp
    Support staff
    August 21, 2015 at 08:01

    Hello,

    The tabs content display has been changed in the new theme version, this is not a bug. If you want to show the content after each tab you can upload tabs.php from the older theme version in wp-content/themes/royal/woocommerce/single-product/tabs directory.

    Regards,
    Eva Kemp.

    Avatar: raymondlee1226
    raymondlee1226
    Participant
    August 24, 2015 at 02:20

    Dear Eva,
    Thanks for your reply.
    How can I get the old theme version? I tried looking into other themes hoping to find something similar but was not successful.
    Can you provide me with the old theme tab.php file?
    Thank you.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    August 24, 2015 at 08:27

    Hello,

    The file has been sent to your email address.
    Please check.

    Best regards,
    Jack Richardson.

  • Viewing 20 results - 1 through 20 (of 20 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.