Select Page

WooCommerce Splash Popup

For Users

Settings

To find WooCommerce Splash Popup settings follow admin bar WooCommerce Splash Popup.

General

Contains general settings for Splash Popup.

  • Display popup type – how often popups will be displayed
  • Popup Width
  • Popup Height
  • Timer – time in seconds, that customers must wait before they can close popup
  • Close Timer – time in seconds
  • Cookie Expire – time in days, when cookie expires and popups are displayed again
  • Reset Cookie on Login/ Logout – remove cookie on login or logout
  • Force Popup – show popups on every page load
  • All 
    • Monday
    • Tuesday 
    • Wednesday
    • Thursday
    • Friday
    • Saturday
    • Sunday 
  • Not Logged In Page:
    • Page 
      • Blog
      • Cart
      • Checkout
      • Compare
      • Knowledge Base
      • My account
      • Simple Page
      • Shop 
      • Welcome
    • Title
  • Logged In Page (same as for Not Logged In Page)
  • Logged In Customers Page (same as for Not Logged In Page)

Styles

Contains styles settings for popups.

  • Height paddings – sum padding from left and right in pixels or percentage (px|%)
  • Width paddings – sum padding from top and bottom in pixels or percentage (px|%)
  • Border width – popup border width in pixels (px)
  • Border color – popup border color
  • Background color – color block behind popup window
  • Title background color – background color for title in popup window
  • Title font color – font color for title in popup window
  • Title font size – font size in pixels for title in popup window
  • Title height – height in pixels of the title in popup window
  • Close button size – close button size in pixels
  • Close button color – close button font color
  • Close button color on mouse over – close button font color on mouse over
  • Content background color – background color of content in popup window
  • Content font color – font color of content in popup window

Templates

  • Full Footer Buttons
  • Grey Gradient
  • Nice Blue
  • Nice Green
  • Separate Footer
  • Simple & Nice
  • Simple Shadow
  • Sweet Alert

How do I add a new Popup?

  1. Open the Admin Bar of your site and follow BeRocket Splash Popup.
  2. Click on the Add Popup button.
  3. Select the desired settings and press the Save button.
  4. Click on the “+” sign below Conditions and select the desired condition.
  5. Popup Conditions – allows you to add two conditions to display popups. Click on “+” button, which is below the Conditions, and select the needed condition: + button, which is outside any blocks, adds new blocks that are connected as OR; + button, which is inside each block, adds new condition as AND.

Conditions

  • Page ID
    • Equal
    • Not equal 
    • [THANK YOU]
    • [SHOP PAGE]
    • [PRODUCT PAGE]
    • [PRODUCT CATEGORY PAGE]
    • [PRODUCT TAXONOMIES]
    • [PRODUCT TAGS]
    • Blog (ID: 11)
    • Cart (ID: 6)
    • Checkout (ID: 7)
    • Compare (ID: 314)
    • Knowledge Base (ID: 73)
    • My account (ID: 8)
    • Sample Page (ID: 2)
    • Shop (ID: 5)
    • Welcome (ID: 10)
  • Product Attribute
    • Equal
    • Not equal
    • Select attribute
      • Tags 
        • ==Any==
        • external
        • grouped
        • simple
        • variable
      • Tags
      • ==Any==
      • exclude-from-catalog
      • excude-from-search
      • featured
      • ouofstock
      • rate-1 – rate-5
  • Product Search
    • Equal
    • Not equal
  • Product Category
    • Equal
    • Not equal
    • Include subcategories
  • Product 
    • Equal
    • Not equal
    • Input
  • Weekday 
    • Mon – Fri
    • Days of the weekyou can select different popups for different users on different days of the week
  • User Statues
    • Not Logged in – popup for not logged in users
    • Logged in Customers – popup for logged in users
    • Logged in popup for logged in users, that has one or more orders
  • Hide this group on:
    • Mobile
    • Tablet
    • Desktop

General Settings

  • Timer – second(s)
  • Close Timer – second(s)
  • Popup Width
  • Popup Height

Add-ons

Old Popup – deprecated, will be removed soon.

CSS/ Javascript

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

  • 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 On Page Load – runs custom Javascript on page load.
  • Javascript Before Popup Open – Javascript that executes before popup open.
  • Javascript On Popup Close – Javascript that executes when popup was closed.

Settings per-theme

Bridge

Custom CSS Settings

Open the admin bar of your site and follow WooCommerceSplash PopupCustom CSS.

Add this CSS to the field “User custom CSS style”:

.br_splash_popup_window span.screen-reader-text
{
    display: none;
}

Divi

Custom CSS Settings

Open the admin bar of your site and follow WooCommerceSplash PopupCustom CSS.

Add this CSS to the field “User custom CSS style”:

.br_splash_popup_window span.screen-reader-text
{
    display: none;
}

For Developers

Action Hooks

includes/functions.php

br_get_woocommerce_version()

Public function to get WooCommerce version

return string. woocommerce version

woocommerce-splash-popup.php

All of these functions are in the BeRocket_splash_popup class as static functions.

init ()

Function for initializing scripts.

admin_init ()

Function for initializing scripts and settings page in the admin Bar.

options ()

Add option page to admin menu.

br_get_template_part( $name = ” )

Get template part.

  • $name – template name

Default templates are placed in plugins folder woocommerce-splash-popups/templates.

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

login_reset ()

Remove cookie.

Filter Hooks

berocket_splash_popup_user_func

Array with custom Javascript.

Parameters

  1. functions – array with custom JavaScript field: 
    • js_page_loadstring with Javascript code that is run on page load
    • before_popupstring with Javascript code that is run  before popup open
    • close_popupstring with  Javascript code that is run  on popup close

Usage

<?php
function change_berocket_splash_popup_user_func ( $functions ) {
//your code here
    return $functions;
}

add_filter( 'berocket_splash_popup_user_func', 'change_berocket_splash_popup_user_func', 10, 2 );
?>

splash_popup_get_template_part

Template that is used in plugin.

Parameters

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

Usage

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

add_filter( 'splash_popup_get_template_part', 'change_splash_popup_get_template_part', 10, 2 );
?>

Files

  • woocommerce-splash-popup.php – main plugin file
  • css – folder with CSS files
    • admin.css – styles for admin bar
    • 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 bar settings
    • colpick.js – Javascript for color picker in admin bar settings
    • jquery.cookie.js – jQuery plugin for cookie
  • templates – templates for settings and other
    • pages.php – settings to select pages for popup on settings page and on pages
    • settings.php – plugin settings page
    • wp_footer_popup.php – popup template, that will be add to page