For Users

Installation

First way to install plugin:

  1. Download plugin from your BeRocket account
  2. Open your site admin panel and go to Plugins -> Add New -> Upload Plugin
  3. Click Browse and select downloaded zip file and click Install Now
  4. Click Activate Plugin

 

Second way to install plugin:  

  1. Download plugin from your BeRocket account
  2. Open your site via FTP
  3. Go to WordPress folder/wp-content/plugins
  4. Extract files from downloaded zip file and copy extracted folders to plugins folder
  5. Open your site admin panel and go to Plugins
  6. Find WooCommerce Product Tab Manager and click Activate under it

Setup

Change tabs

Change position of tabs in plugin settings Admin Panel -> WooCommerce -> Product Tabs

New tab you can create there Admin Panel -> Products -> Tabs

Product special tabs you can edit on product page in block Product Data -> Product Tabs

Account/Product Key

BeRocket Account and Product key uses for auto update plugins from BeRocket site.

Where can you find Account Key?

  1. Open BeRocket site and Login (The Login button you can find in header menu)
  2. Go to My Account (The My Account button you can find in header menu)
  3. From right side on page you can find all information about your BeRocket account including Account Key

  4. You can click on account key and copy it
  5. What can you do with Account Key?

Where can you find Product Key?

  1. Open BeRocket site and Login (The Login button you can find in header menu)
  2. Go to My Account (The My Account button you can find in header menu)
  3. Click on key icon on right side from plugin name WooCommerce Products Compare

  4. You can click on Product key and copy it
  5. In left field you can type any notice for this key and click DONE to save
  6. What can you do with Product Key?

Settings

WooCommerce Products Compare have settings in Admin Panel -> WooCommerce -> Currency Exchange

General

Contains general settings for Product Tabs.

  • Category - to select specific tabs to each category
  • Use specific tabs for this category - if disabled, then uses tabs from "All" category
  • Tab list - sorted list of tabs, that will be used on product page
    • You can use each tab only once
    • You can add tabs with help of select box and "Add Tab" button under tabs list
    • Sort tabs with drag and drop

Styles

Contains style settings for Question/Answer type of tabs.

  • Question font size - font size for question text in pixels
  • Answer font size? - font size for answer text in pixels
  • Border color - border color for every question/answer block 
  • Background question color - background color for questions, that is closed
  • Background opened question color - background color for questions, that is opened

CSS

Contains setting to set custom CSS code that will be added to frontend pages.

  • Custom CSS - any CSS code, that you want

License

Plugin key - uses for updates plugin from BeRocket site. You can get this on BeRocket site -> My Account page on click key icon

BeRocket Account

BeRocket account settings are in Admin Panel -> Settings -> BeRocket Account.

Contains field for place BeRocket Account Key

Where can you find Account Key?

  1. Copy Account Key from BeRocket site
  2. Paste this key to Account key field
  3. Press Test button
  4. If you use right Account Key you will see

  5. Then press Save button

Tabs

To add new tab go to Admin Panel -> Products -> Tabs and press Add Tab button

There you can see default editor for posts, where you can use anything, that you can use in posts.

Also under editor you can find some additional settings for tabs:

  • Type of additional info - what will be displayed instead post text
    • 'empty field' - display post text
    • Question/Answer list - display something like FAQ ( Frequently Asked Questions )
      • Add - button to add question-answer pair
      • Question and Answer - if question or answer field will be empty on save, then question-answer pair will be removed
    • Product List - Custom list of products
      • Type of products - Products or Category
        • Products - display products from selected list in field Products to display
        • Category - display products from selected category in field Products category
      • Product count to display - product count, that will be displayed in tab

For Developers

Filter hooks

tab_manager_get_template_part

Template that uses in plugin.

Parameters

  1. template - link to template that will be loaded.
  2. name - template name.

Usage

<?php
function change_tab_manager_get_template_part ( $template, $name ) {
//your code here
    return $template;
}

add_filter( 'tab_manager_get_template_part', 'change_tab_manager_get_template_part', 10, 2 );
?>

Functions

includes/functions.php

br_get_woocommerce_version()

Public function to get WooCommerce version

return string. woocommerce version

br_generate_product_selector($options)

Generate multiple products selector with search field

  • $options - array with options. Elements:
    • option - array with products id
    • block_name - unique name
    • name - name, that used as fields name. Must be array, like "br_tabs[additional_product][products][]"
    • return - if false, then used echo to display HTML code. If true, then return HTML code as string

return string or void. HTML code

woocommerce-tab-manager.php

All of these functions is in class BeRocket_tab_manager as static functions.

init ()

Function for initialize scripts.

admin_init ()

Function for initialize scripts and settings page in admin panel.

options ()

Add option page to admin menu.

br_get_template_part( $name = '' )

Get template part (for templates like the slider).

  • $name - template name

Default templates places in plugins folder woocommerce-product-tab-manager/templates.

To rewrite the template in your theme folder create folder with name woocommerce-tab_manager and places new template with identical name in this folder.

Options

All settings you can find in BeRocket_tab_manager class in static variables $defaults.

public static $defaults = array(
        'custom_css'        => '',
        'script'            => array(
            'js_page_load'      => '',
        ),
        'sortable'          => array('description' => 0, 'additional_information' => 1, 'reviews' => 2),
        'sortable_name'     => array(),
        'use_cat_tabs'      => array(),
        'styles'            => array(
            'question_size'     => '',
            'answer_size'       => '',
            'border_color'      => 'aaaaaa',
            'question_color'    => 'eeeeee',
            'q_opened_color'    => '',
        ),
        'plugin_key'        => '',
    );

Files

  • woocommerce-tab-manager.php - main plugin file
  • css - folder with CSS files
    • admin.css - styles for admin panel
    • colpick.css - styles for color picker block
    • font-awesome.css - standard Font Awesome styles
  • fonts - Font Awesome fonts
  • includes - folder with additional PHP files
    • functions.php - public functions
    • updater.php - BeRocket Updater for plugins update from BeRocket site
  • js - folder with JavaScript files
    • admin.js - JavaScript for admin panel settings
    • colpick.js - JavaScript for color picker in admin panel settings
  • templates - templates for settings, list style and buttons
    • meta_setting.php - setting template for tab create page
    • settings.php - plugin settings page
    • tabs.php - sort, select and add tab template