Select Page

WooCommerce Wish/Wait List

For Users

Installation of Free Version

Plugin installation Method 1:

  1. Download the plugin from berocket.com or wordpress.org.
  2. Open your website’s admin bar and follow: Plugins Add new Upload plugin.
  3. Click on Browser Dialog to open it, select the downloaded zip-file and click Install.
  4. Click on Activate Plugin.

Plugin installation method 2 :  

  1. Download the plugin from berocket.com or wordpress.org.
  2. Access your website using FTP.
  3. Navigate to WordPress/wp-content/plugins folder.
  4. Open the downloaded zip-file and unzip its content and copy the unzipped files to WordPress/wp-content/plugins folder.
  5. Open your website’s admin bar and open Plugins.
  6. Browse to select Plugin and click on Activate.

Settings

To find the WooCommerce Wish/Wait List settings follow: admin bar WooCommerce Wish/Wait List.

General

Contains general settings for Wish/Wait page and buttons.

  • Only for logged-in users – when enabled, the Wish/Wait buttons will be displayed to customers who are logged in
  • Wish Page – page for displaying products from wish list
  • Wait Page – page for displaying products from wait list
  • Disable wish list button – disable wish buttons under products
  • Disable wait list button – disable wait buttons under products
  • Enable cookie usage popup – when the setting is enabled, a pop-up window is displayed about the use of cookies

Style

Contains settings for wish/wait list buttons visual customization.

  • Position for buttons – position where wish; wait and wish/wait buttons will be displayed:
    • Before all
    • After image
    • After title
    • AFter price
    • After add to cart button
    • Single product page
  • Wish list button icon – icon for button that adds products to wish list (Upload/Font Awesome/Remove).
  • Wait list button icon – icon for button that adds products to wait list (Upload/Font Awesome/Remove).
  • Update status icon – icon for buttons for adding to wish/wait list.
  • Buttons styles – settings for wait and wish button with different states: normal, on mouse over, selected, selected on mouse over.
  • Wish/Wait Twin Buttons Style
  • 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 removing buttons on each product
    • Remove button on mouse over – styles for removing buttons on each product, when mouse over button

Set the following settings to all settings listed above in Wish and Wait list styles:

  • Wish and Wait list styles
    • Font size
    • Font color
    • Backgound color
    • Border width
    • Border color
    • Border radius
    • Width
    • Height
    • Padding from top inside button
    • Padding from bottoms inside button
    • Padding from left inside button
    • Padding from right inside 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
  • Product instock Email FROM name
  • Product instock Email FROM Email
  • Product instock Email subject
  • Product instock Email message:
    • %product_title% – product title
    • %product_link% – link to product page
    • %product_image% – main product image link
    • %product_price% – product formated price
    • %product_description% – product description
  • Special variables for Email subject and message fields:
    • %product_short_description% – product short description
    • %user_id% – user ID
    • %user_first_name% – user first name
    • %user_last_name% – user last name
    • %user_email% – user Email
    • %user_display_name% – user display name
  • Guest product instock Email subject
  • Guest product instock Email message
  • Cookie usage popup message – The text of the cookie confirmation message
  • Cookie usage popup button – The text of the cookie confirmation button
  • Wishlist empty – Text when Wishlist is empty
  • Waitlist empty – Text when Waitlist is empty

Custom CSS/JavaScript

  • Disable Font Awesome: do not upload the CSS file for Font Awesome to the site. Disable it only if you do not use Font Awesome icons in widgets or you have Font Awesome in your theme.
  • Font Awesome Version – version of Font Awesome, which will be used in the settings and the front end pages of the shop. Please select the version that is in your theme.
  • Custom CSS – field for custom CSS; contains custom CSS code settings to be displayed on the front end pages. Custom CSS is the CSS as you want it to be.
  • JavaScript After add to wish list – execute after added to wish list
  • JavaScript Before add to wish list – execute before on click on add to wish list button
  • JavaScript Before add to wait list – execute before on click on add to wait list button
  • JavaScript After add to wait list – execute after added to wait list

Widgets

This is the WooCommerce Wish/Wait List widget. You can place this widget to any widget area like any other widgets.

  • Title – widget title
  • Product type – type of widget:
    • Top products from wait list – products to be added to waitlist
    • Top products from wish list – products to be added to wishlist
    • Related products from user wait list – products, that are related to products on customer waitlist
    • Related products from user wish list – products, that arw related to products on customer wishlist
    • Products in user wait list in stock – products on customer waitlist, that are in stock
    • Products in user wish list on sale – products on customer wishlist, that are on sale
  • Type – visual style of suggested products
    • Default
    • Image
    • Image with Title
    • Image with Title and Price
    • Title
    • Title with Price
    • Slider
    • Slider with Title
  • 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
  • Products count – maximum products count, that can be displayed

For Developers

Action Hooks

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 are static functions in the BeRocket_Wish_List class.

init ()

Function for initializing scripts and adding buttons.

br_get_template_part( $name = ” )

Get template part (for templates like the slider).

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

To rewrite the template in your theme folder create folder with name woocommerce-wish-list and place 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.

berocket_before_wish_button

Used for displaying 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 displaying 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 displaying 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 displaying 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 displaying 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 displaying 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 these 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 clicking on Add to wishlist button
    • after_wish – execute after added to wishlist
    • before_wait – execute before clicking on Add to waitlist button
    • after_wait – execute after added to waitlist

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 is used in the 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 );
?>

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