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 Wish/Wait List and click Activate under it

Setup

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 Wish/Wait List

  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 -> Wish/Wait List

  • General
  • Style
  • Text
  • JavaScript
  • License

General

Contains general settings for Wish/Wait page and buttons.

  • Wish Page - page for display products from wish list
  • Wait Page - page for display products from wait list
  • Disable wish list button - disable wish buttons under products
  • Disable wait list button - disable wait buttons under products

Style

Contains settings for wish/wait list buttons visual customization.

  • Position for buttons - position where wish and wait buttons will be displayed
  • Wish list button icon - icon for button that add product to wish list
  • Wait list button icon - icon for button that add product to wait list
  • Update status icon - icon for buttons on adding to wish/wait list
  • Button styles - settings for wait and wish button with different states: normal, on mouse over, selected, selected on mouse over
  • Wish and Wait list styles - settings for different blocks in wish or wait list:
    • Products block - styles for blocks with all products
    • Product block - styles for each product block
    • Product name - styles for name of the prducts
    • Product name on mouse over - styles for name of the prducts, when mouse over name
    • Price - styles for product price
    • Out of stock - styles for block with "Out of stock" text
    • Remove button - styles for remove buttons on each products
    • Remove button on mouse over - styles for remove buttons on each products, when mouse over button

Text

Contains settings for setup custom text on buttons and in tables.

  • Text before wish list - text that display before table with products in wish list
  • Text before wait list - text that display before table with products in wait list
  • Text on button to show all products in wish list - text on button bottom on the wish table
  • Text on button to show all products in wait list - text on button bottom on the wait table

JavaScript

Contains settings for setup custom text on buttons and in tables.

  • Before add to wish list - execute before on click on add to wish list button
  • After add to wish list - execute after added to wish list
  • Before add to wait list - execute before on click on add to wait list button
  • After add to wait list - execute after added to wait list

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

Widgets

The widget from plugin called WooCommerce Wish/Wait List. You can place this widget to any widget area like other widgets.

  • Title - Widget title
  • Product type - type of widget
    • Top products from wait list - Products, that most added to waitlist
    • Top products from wish list - Products, that most added to wishlist
    • Related products from user wait list - Products, that is related to products in customer waitlist
    • Related products from user wish list - Products, that is related to products in customer wishlist
    • Products in user wait list in stock - Products from customer waitlist, that is in stock
    • Products in user wish list on sale - Products from customer wishlist, that is on sale
  • Type - visual style of suggested products
  • Products per line - products count per line or per slider for sliders type
  • Show Add to cart button - dsiplay Add to cart button under products or not
  • Products count - maximum products count, that can be displayed

For Developers

Action hooks

berocket_before_wish_button

Used for display information before wish button under products

Usage

<?php
function my_block_berocket_before_wish_button () {
//your code here
}

add_action( 'berocket_before_wish_button', 'my_block_berocket_before_wish_button' );
?>

berocket_before_wait_button

Used for display information before wait button under products

Usage

<?php
function my_block_berocket_before_wait_button () {
//your code here
}

add_action( 'berocket_before_wait_button', 'my_block_berocket_before_wait_button' );
?>

berocket_after_wait_button

Used for display information after wait button under products

Usage

<?php
function my_block_berocket_after_wait_button () {
//your code here
}

add_action( 'berocket_after_wait_button', 'my_block_berocket_after_wait_button' );
?>

berocket_before_wish_list

Used for display information before products in wish list

Usage

<?php
function my_block_berocket_before_wish_list () {
//your code here
}

add_action( 'berocket_before_wish_list', 'my_block_berocket_before_wish_list' );
?>

berocket_after_wish_list

Used for display information after products in wish list and before wait list

Usage

<?php
function my_block_berocket_after_wish_list () {
//your code here
}

add_action( 'berocket_after_wish_list', 'my_block_berocket_after_wish_list' );
?>

berocket_after_wait_list

Used for display information after products in wait list

Usage

<?php
function my_block_berocket_after_wait_list () {
//your code here
}

add_action( 'berocket_after_wait_list', 'my_block_berocket_after_wait_list' );
?>

Filter hooks

berocket_wish_wait_user_func

You can change or add JavaScript to specific actions. All this functions can be added by users in plugin settings.

Parameters

  1. user_func - array with users JavaScript functions, that can be set in plugin settings
    • before_wish - execute before on click on add to wish list button
    • after_wish - execute after added to wish list
    • before_wait - execute before on click on add to wait list button
    • after_wait - execute after added to wait list

Usage

<?php
function change_berocket_wish_wait_user_func ( $user_func ) {
//your code here
    return $user_func;
}

add_filter( 'berocket_wish_wait_user_func', 'change_berocket_wish_wait_user_func' );
?>

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

add_filter( 'wish_list_get_template_part', 'change_wish_list_get_template_part', 10, 2 );
?>

Functions

includes/functions.php

br_get_woocommerce_version()

Public function to get WooCommerce version

return string. woocommerce version

generate_ww_list ( $terms )

Public function to display wait and wish list

  • $terms - array with terms of products
    • id - product id
    • title - product title
    • image - image html
    • price - price html
    • link - product link
    • availability - stock status html
    • is_in_stock - boolean stock status

wish-list.php

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

init ()

Function for initialize scripts and add buttons.

br_get_template_part( $name = '' )

Get template part (for templates like the slider).

Default templates places in plugins folder woocommerce-wish-wait-list/templates.

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

get_wish_button()

Display add to wish list and add to wait list buttons

wp_head_style ()

Function for set user styles from plugin settings.

Options

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

    public static $defaults = array(
        'br_wish_list_general_settings'     => array(
            'ww_page'                           => '',
            'wish_list'                         => '',
            'wait_list'                         => '',
        ),
        'br_wish_list_style_settings'       => array(
            'icon_wish'                         => 'fa-heart-o',
            'icon_wait'                         => 'fa-clock-o',
            'icon_load'                         => 'fa-cog',
            'selected_back_color'               => 'FFFFFF',
        ),
        'br_wish_list_text_settings'        => array(
            'wish_list'                         => 'Wish List',
            'wait_list'                         => 'Wait List',
            'show_wish'                         => 'Show all products from wish list',
            'show_wait'                         => 'Show all products from wait list',
        ),
        'br_wish_list_javascript_settings'  => array(
            'before_wish'                       => '',
            'before_wait'                       => '',
            'after_wish'                        => '',
            'after_wait'                        => '',
        ),
        'br_wish_list_license_settings'     => array(
            'plugin_key'                        => '',
        ),
    );

Files

  • wish-list.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
    • select_fa.css - styles for Font Awesome selector
    • wish_list.css - front end 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
    • admin_select_fa.js - JavaScript for Font Awesome selector
    • colpick.js - JavaScript for color picker in admin panel settings
    • wish_list.js - JavaScript for front end
  • templates - templates for settings, list style and buttons
    • general_settings.php - template for Buttons tab in settings
    • javascript_settings.php - template for JavaScript tab in settings
    • license_settings.php - template for License tab in settings
    • settings.php - main plugin settings page
    • style_settings.php - template for Style tab in settings
    • text_settings.php - template for Text tab in settings
    • wish_wait.php - template for page with wait and wish lists