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 Min and Max Quantities and click Activate under it

Setup

Limitations

Global limitations you can find in plugin settings Admin Panel -> WooCommerce -> Min/Max Quantity?

Products limitation fields exist in every products in general settings and in every variations Minimum Quantity, Maximum Quantity? and Quantity Group field to group products

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 -> Compare Products

General

Contains general settings for Products Compare page and global limitations.

  • Products in cart cost - limitation by products cost in cart
    • Minimum - minimum required products price
    • Maximum - Maximum products price limit
  • Quantity of products in cart - limitation by products count in cart
    • Minimum - minimum required products count
    • Maximum - Maximum products count limit
  • Groups manager - limit products in group. Create group first and after select this group in products
  • Category manager -  limit products in categories
  • Attributes manager - limit products with same attribute term

CSS

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

  • Custom CSS - custom CSS code

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

For Developers

Filter hooks

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

add_filter( 'mm_quantity_get_template_part', 'change_mm_quantity_get_template_part', 10, 2 );
?>

Functions

includes/functions.php

br_get_woocommerce_version()

Public function to get WooCommerce version

return string. woocommerce version

woocommerce-minmax-quantity.php

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

init ()

Function for initialize scripts.

register_mm_quantity_options ()

Function for initialize scripts and settings page in admin panel.

mm_quantity_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-minmax-quantity/templates.

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

Options

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

public static $defaults = array(
        'cart_min_price'    => '',
        'cart_max_price'    => '',
        'cart_min_quantity' => '',
        'cart_max_quantity' => '',
        'groups'            => array(),
        'custom_css'        => '',
        'plugin_key'        => '',
    );

Files

  • woocommerce-minmax-quantity.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
    • shop.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
    • colpick.js - JavaScript for color picker in admin panel settings
  • templates - templates for settings, list style and buttons
    • settings.php - plugin settings page