For Users

Installation

First way to install plugin:

  1. Download plugin from your BeRocket account
  2. Disable FREE version of same plugin if you have it
  3. Open your site admin panel and go to Plugins -> Add New -> Upload Plugin
  4. Click Browse and select downloaded zip file and click Install Now
  5. Click Activate Plugin

 

Second way to install plugin:  

  1. Download plugin from your BeRocket account
  2. Disable FREE version of same plugin if you have it
  3. Open your site via FTP
  4. Go to WordPress folder/wp-content/plugins
  5. Extract files from downloaded zip file and copy extracted folders to plugins folder
  6. Open your site admin panel and go to Plugins
  7. Find WooCommerce Advanced Products Labels and click Activate under it

Setup

Label

  • To add new label go to Admin Panel -> Products -> Advanced Labels and click Add Label button.
  • Click + button under Conditions and select needed condition.
  • + button, that outside any blocks add new blocks that connected as OR, but + buttons inside each block add new condition as AND.
  • Select needed content type and enter information for selected content type.

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?

Theme Setup

Avada

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product a.product-images
{
    display: inline-block;
}

 

Clean Commerce

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product h2.woocommerce-loop-product__title
{
    clear: both;
}

 

Divi

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product h2.woocommerce-loop-product__title
{
    clear: both;
}

 

Louis

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product h2.woocommerce-loop-product__title
{
    clear: both;
}

 

NovelLite

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product h2.woocommerce-loop-product__title
{
    clear: both;
}

 

Read More

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product h2.woocommerce-loop-product__title
{
    clear: both;
}

 

X

Setting Custom CSS

Open your site admin panel->WooCommerce->Products Labels->Custom CSS

Add this CSS to the field "User custom CSS style":

ul.products li.product header.entry-header h3
{
    clear: both;
}

 

Settings

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

General

Contains general settings for Advanced Product Labels.

  • Disable global labels? - Disable labels, that added to all products from page Admin Panel -> Products -> Advanced Labels
  • Disable product labels - Disable labels, that added on products edit page
  • Disable labels on product page - Disable labels on product page
  • Start for Better position labels - Position of block with labels on image
  • Attribute data set - How line must be displayed on image(some type work only if line has a lot of label)

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

Labels

To add new label go to Admin Panel -> Products -> Advanced Labels and press Add Label button

There you can add Labels to all products by specific conditions.

  • Title - uses only in admin panel
  • Label Conditions - you can add any conditions to display labels on products. + button, that outside any blocks add new blocks that connected as OR, but + buttons inside each block add new condition as AND
General
  • Content type - type of label content:
    • Text - block of text with background color
    • Image - block with images
    • Time left for discount - block of text ( time for discount end ) with background color
    • Discount percentage - block of text ( percentage of discount ) with background color
    • Product attribute - use attribute values as label(can be text, color or image)
Position
  • Type - type of label position:
    • Label - displayed under product image
    • On image - displayed on images
  • Padding from top - paddings from top of image
  • Padding from left/right - padding from left/right of image
  • Better Position - Enable better positions for label, that uses more settings(paddings, margin, lines of labels)
    • Position Line - Line position, uses to display label one under other. Labels from different line will be displayed verticaly. One by One - uses to display label on next line if previous has label
    • Paddings - Paddings around text, better to use with empty Height and Width in style settings
    • Margin - Paddings around label
  • Position - horizontal label position
  • Rotate - Label rotation around center
  • Z index - specifies the stack order of an element
Style
  • Background Color - Background color for block with images or text
  • Font color - color for font on block with text
  • Border radius - border corner radius for label block
  • Line height - line height for text in label
  • Height - Height of label, empty to set auto height from content
  • Width - Width of label, empty to set auto width from content
  • Font size - font size on block with text
  • Border width - border width for label block
  • Border color - border color for label block

For Developers

Filter hooks

products_label_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_products_label_get_template_part ( $template, $name ) {
//your code here
    return $template;
}

add_filter( 'products_label_get_template_part', 'change_products_label_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-advanced-products-labels.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-advanced-products-labels/templates.

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

Options

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

public static $defaults = array(
        'disable_labels'    => '0',
        'disable_plabels'   => '0',
        'custom_css'        => '',
        'script'            => '',
        'plugin_key'        => '',
    );

Files

  • woocommerce-advanced-products-labels.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
    • frontend.css - styles for front end pages
  • 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
    • label.php - label settings
    • settings.php - plugin settings page