My Cart

User Manual - Free Shipping Bar

The Magento 2 Free Shipping Bar module enables a bar on the front-end which notifies customers on the free shipping offer available to them on reaching a certain total of the order.  With every new item placed in Cart, the bar reminds customers how little more money they are to spend to get free shipping. The bar can be displayed for particular customer groups, countries and regions, on selected pages with custom position and timing options. The store Admin can define the content and layout of the free shipping bar, with regard to the three statuses of the Cart. 

 

 

 

Installing M2 Free Shipping Bar

Command Line Installation

  1. Backup your web directory and store database
  2. Download the Free Shipping Bar installation package
  3. Upload contents of the Free Shipping Bar installation package to your store root directory
  4. In SSH console of your server navigate to your store root folder:
cd path_to_the_store_root_folder

run the following command:

php bin/magento module:enable Aheadworks_Freeshippinglabel

then:

php bin/magento setup:upgrade

after:

php bin/magento setup:static-content:deploy -f

     5. Flush store cache; log out from the backend and log in again

Make sure the installation is done from the FTP administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed.

Composer Installation

If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:

     1. Login to your ssh console and navigate to your store folder:

cd path_to_the_store_root_folder

Run the following command:

composer config repositories.aheadworks composer https://dist.aheadworks.com/

After the command was executed successfully, you can use the composer to install the products.

To install the extension:

2. Login to your ssh console and navigate to your store folder:

cd path_to_the_store_root_folder

 3. Run the following command to install the latest version of the extension:

composer require aheadworks/module-freeshippinglabel

if you need to install a specific version, run this command:

composer require aheadworks/module-freeshippinglabel:<version>

 

Specify the version of the extension in <version>

When prompted, enter Public Key (Username) and Private Key (Password):

Public Key (Username) and Private Key (Password) | Free Shipping Bar for Magento 2

Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:

Access keys management | Free Shipping Bar for Magento 2

4. Install the GeoIP2 library:

composer require geoip2/geoip2

Click here to download the library.

5. Enable the extension:

php -f bin/magento module:enable <Module_Name>

 

Add the product name in <Module_Name>

Next, register the extension:

bin/magento setup:upgrade

Recompile your Magento store if you are in the Production mode:

bin/magento setup:di:compile

To verify that the extension is enabled, run this command:

bin/magento module:status

Clean store cache, by running the following command:

bin/magento cache:clean

Log out and Log in the backend again.

To upgrade the extension:

6. To update or upgrade an extension:

Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.

If a composer package exists for the extension, run one of the following.

Update per module name:

composer update aheadworks/module-freeshippinglabel

Updater per version:

composer require aheadworks/module-freeshippinglabel:<version>

Run the following commands to upgrade, deploy, and clean the cache.

php bin/magento setup:upgrade --keep-generated
php bin/magento setup:static-content:deploy
php bin/magento cache:clean

Uninstalling Free Shipping Bar

Since Magento introduced declarative Database you need to be very carefull when uninstalling or disabling the module.

NOTE: Please be very careful when uninstalling/disabling this module. This module uses a declarative DB scheme. Once the module is uninstalled the DB tables will be lost.

Manual Removal

1) Run command: 

bin/magento module:uninstall --non-composer Aheadworks_Freeshippinglabel

It will remove data patches including sample data so you can install it again in future.

2) Disable extension: 

bin/magento module:disable Aheadworks_Freeshippinglabel

3) Run setup upgrade: 

bin/magento setup:upgrade

It will remove module related tables from the system.

4) Remove module files manually: 

app/code/Aheadworks/Freeshippinglabel

Automatic Removal (via Composer)

1) Disable extension:

bin/magento module:disable Aheadworks_Freeshippinglabel

2) Run setup upgrade: 

bin/magento setup:upgrade

3)

php bin/magento module:uninstall Aheadworks_Freeshippinglabel

 

 

 

 

Compatibility

Module Version 

Magento Version 

PHP 

1.2.3  and earlier versions

2.3.Х - 2.3.6

2.4.0 - 2.4.3

7.4 and earlier versions

As of version 1.2.4

2.4.4 - 2.4.5

8.1

As of version 1.2.6

2.4.4 - 2.4.6

8.1

 

 

 

Introducing M2 Free Shipping Bar

About M2 Free Shipping Bar

The Magento 2 Free Shipping Bar module allows online merchants to create the sense of urgency and get more sales by providing shoppers with free shipping services on reaching a conditioned total price of the order. Customers are notified on the latter with the help of a storefront notification bar. With every new item placed in Cart, the bar reminds customers how much money they are to spend to get their shipping free. The calculations are done by distracting the price of the newly added to Cart product from the conditioned total price of the order. The bar can be displayed for selected customer groups, countries and areas. Furthermore, the Admin is able to specify pages to host the free shipping bar, set a position and timing parameters. Moreover, with regard to the status of Cart, the Admin can define the content and layout of the free shipping bar. Finally, the extension makes it possible to specify products or categories eligible for the free shipping offer. 

The key-features of the extension are as follows:

  • Variables for price threshold calculation;
  • Options to position the bar on the storefront;
  • Multi-store support;
  • Support of CSS and most popular Google fonts;
  • Conditions to exclude certain products and categories from the bar; 
  • Instant preview of the bar before publishing;
  • GeoIP2 address detection.

The extension does not allow setting the shipping fee to 'free'. 

To set up free shipping, proceed to the following sections:

Store → Configuration → Sales → Shipping settings

and

Store → Configuration → Sales → Shipping methods

What's New?

The present version of the extension (1.2.3) enables the GeoIP2 functionality to detect customer address by their IP's. This feature helps noticeably in personalizing the free shipping offer with regard to the geographical location of the Customer.

 

 

 

 

 

Configuring M2 Free Shipping Bar

To configure the extension, proceed to Store → Configuration → Aheadworks Extensions → Free Shipping Label. There is only one section in the settings of the extension - GeoIP Settings. GeoIP2 functionality is meant to detect the address of a customer by his/her IP. The GeoIP section requires the following two parameters:

  • License Key - the text-field to contain your license key to the GeoIP2 solution in use;
  • GeoIP2 Database - the Download button to download the GeoIP2 database in use (for further updates, for example).

Configuring M2 Free Shipping Bar | Free Shipping Bar for Magento 2

How can I get a License Key?

Click here to get guidance on retrieving a license key from the MaxMind GeoIP solution.

Follow the steps below to retrieve a license key from the MaxMind GeoIP solution:

  1. Start your account at https://www.maxmind.com/
  2. Log in and go to Account → Services → License Key

License Key | Free Shipping Bar for Magento 2

3. Click on Generate new licence key and complete the form

4. Click on the Confirm button

License Key | Free Shipping Bar for Magento 2

5. You can now copy-paste your license key

License Key | Free Shipping Bar for Magento 2

 

How can I extend the GeoIP2 database?

Click here to get guidance on extending the GeoIP2 database.

 

To extend the GeoIP2 database and add custom geographical locations, follow the instructions below:

  1. Get the GeoIp-Regions.csv file. Do one of the following to get one:
    1. Go to the folder of the extension on your FTP-server and find the /fixtures/ folder. The GeoIp-Regions.csv file is there.
    2. Go to Store > Configuration > Aheadworks Extensions > Free Shipping Label and click the Download button next to the GeoIP2 Database option.
  2. Edit the GeoIp-Regions.csv file. Insert a line of the following format: Country, Country Code, Region Code, Region Name (for example Belarus,BY,MA,Mogilev). The line must be inserted at the end of the document. 
  3. Save the updated file.
  4. Upload it to the /fixtures/ folder.
  5. Run the following command in the SSH console of your server: bin/magento aheadworks-fsl:import

The Region Code and Country Code can be found in the list of countries and towns which is available as a free download in your personal room on https://www.maxmind.com/. To get/check the Region and Country Code, do the following:

  1. Download the list,
  2. Unpack the downloaded file and open GeoLite2-City-Locations-en.csv,
  3. Find the country in the country_name column,
  4. Copy the corresponding Region Code from the subdivision_2_iso_code column. (If this column is empty, then copy the value in the corresponding subdivision_1_iso_code column.

GeoIP2 database | Free Shipping Bar for Magento 2

 

It is essential that you install the GeoIP2 library to use the extension (as of version 1.2.0). See Installing M2 Free Shipping Bar for the instructions on thereof.

 

 

 

 

 

Using M2 Free Shipping Bar

To enable the extension and start configuring the Bar, proceed to Content → Free Shipping Bar by Aheadworks → Label Rules.

This is where you may view, and edit the Label Rules as well as add new ones. 

The Rules are allocated into a table with 10 columns: Rule ID, Rule Name, Status, Priority, Discard Subsequent, Page Type, Layout Position, Website, Customer Group, and Actions, which represent some most important details of rule settings. The table is easily customizable and searchable with the 'Columns', 'Default View', and 'Filters' active elements on the top right of the page.

You may enable, disable, or delete available Rules individually or in bulk. Tick the boxes next to the chosen segments on the left of the table, click the 'Actions' folding list, and opt for an operation.

To add a new label click the 'Add New Label’  button on the top right of the page. These operations will take you to the Edit/New Rule page. 

New/Edit Label Pages

There are seven sections on the Label Rules page: General, Goal Settings, Where to Display, Conditions, Content, Design and Preview.  

General settings

The General Settings section comes with the following settings:

  • Enabled - define if the extension is enabled or disabled;
  • Name - define the name of the label;
  • Website - choose the website to display the free shipping bar;
  • Customer Groups - select customer groups to display the free shipping bar;
  • Priority - the decimal numeric for sorting the overlaying rules;
  • Discard Subsequent Rules - switch the toggle to Yes to discard labels with the same value in the “Layout Position” setting.

General settings | Free Shipping Bar for Magento 2

The extension does not allow setting the shipping fee to 'free'. 

In order to set up free shipping options proceed to the following sections:

Store → Configuration → Sales → Shipping settings

and

Store → Configuration → Sales → Shipping methods

 

Goal Settings

The Goal Settings section has two parameters to set-up:

  • Country - the drop-box with country names;
  • Region - the drop-box with the names of regions as per the chosen country (if the GeoIP2 database does not specify regions for the chosen country, the Regions drop-box is not shown);
  • Goal - the text-box to contain the value (in base currency) of the total order price that enables the Customer for free shipping.

You can set one goal for one country at a time. To add countries, click on the Add button below the Country drop-box. To add regions, click on the Add button below the Region drop-box.

The Free Shipping Bar will be displayed to the selected herein countries and regions only. The geographical location of the customer is checked by the GeopIP2 functionality. 

Goal Settings | Free Shipping Bar for Magento 2

A note on the use of All Countries and All Regions

Never mind the order in the list herein, if you specify countries and at the same time use All Countries, then all countries but for the specified ones will have the goal within to the All Countries entry. The specified countries will retain their goal values. 

The same logic applies to the use of All Regions and specific regions.

Where to Display

This is where you can decide on which pages of the store the free shipping bar is to be displayed. The Where to Display section comes with the following settings:

  • Pages - define on which pages the bar is to be displayed. The options are:
    • Home page;
    • Catalog pages;
    • Product pages;
    • Shopping cart;
    • Checkout.
  • Layout Position - define where exactly on the store pages the bar is to be displayed. The options are:
    • Page top;
    • Page top, fixed (sticky header);
    • Page bottom;
    • Page bottom, fixed (sticky footer);
    • Content top
    • Content bottom.
  • Display with delay after page load, seconds - indicate a whole number to tell the delay on page load after which the bar is to be displayed (0 - no delay).

Where to Display | Free Shipping Bar for Magento 2

Conditions

The Conditions section provides the functionality to exclude products or categories from the free shipping bar promo and exclude tax from goals calculation. The free shipping bar will be displayed on the products or categories conditioned herein. The restricting functionality is switched on/off with the help of the Exclude the products and categories and Exclude tax from goals calculation toggle.

When the toggle of the Exclude the products and categories option is in the Yes mode, the conditioning block will be displayed. 

The general condition "If ALL of these conditions are TRUE" contains two variables which may receive correspondingly the following values:

  • All (by default) or Any
  • True (by default) of False 

To change the default value, click on the variable and select the desired value from the drop-box.

To add a condition, click on the green '+' icon and choose a product attribute for conditioning. Each attribute will bear a specific set of variables and their values to be used in the condition. 

Conditions | Free Shipping Bar for Magento 2

To create a sequence of separate conditions, click on the '+' icon inside the condition area (indicated with vertical dots) and select Product attribute combination/Product attribute. The following condition will appear "If an item is FOUND in the cart with ALL of these conditions true:".

To create a combination of conditions, click on the '+' icon outside the condition area (indicated with vertical dots) and select Conditions combination. The following condition will appear "If ALL of these conditions are TRUE:".

Conditions | Free Shipping Bar for Magento 2

To delete a condition click the red 'x' icon next to the condition phrasing.

In the example above the Training category is excluded from the free shipping promo. It contains un-shippable products: video downloads and passes to training classes.  

Category | Free Shipping Bar for Magento 2

Content

The Content section allows the Admin to set up the content of the free shipping bar with regard to the three states:

  • The Cart is empty;
  • The Cart is not empty, but the Cart total is lower than the free shipping goal;
  • The free shipping goal is reached.

Each message on the free shipping bar can be edited and assigned to a store view. This is particularly important if you own a multi-language store. To add a store view, click the Add button below the Store View selector.  

Content | Free Shipping Bar for Magento 2

Variables

To get the most of the extension there are two variables that can be used in a message on the free shipping bar:

{ruleGoal}

This variable fetches the value of the Free Shipping Goal setting. Please note, that it doesn't fetch the actual value of the free shipping set up in Store > Configuration > Sales > Shipping settings.

{ruleGoalLeft}

This variable calculates the margin between the Cart Total value and Free Shipping Goal and displays the difference on the free shipping bar.

Design

The Design section allows adjusting the free shipping bar look and feels, that is font (Open Sans by default), font size (16 px by default), font weight, font color, font color of Goal, background color.

Additionally, CSS styles can be applied to the bar to match the custom store theme. To do so, paste the CSS code into the CSS text-box.

Design | Free Shipping Bar for Magento 2

Preview

The Preview section shows in real time the lookout of the three types of the free shipping bar. 

Preview | Free Shipping Bar for Magento 2

 

Free Shipping Bar | Free Shipping Bar for Magento 2

Product Page

Write Your Own Review

Already used our product?

We would appreciate your feedback. Please, leave a review.

Only registered users can write reviews. Please Sign in or create an account
Report incorrect information

Still Have Questions?

Our customer care team is here for you!

Contact Us