Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.




Section


Column
width50%

Table of Contents

Warning

Firefox user notice:

Please use another web browser to view this document.

Sorry for the inconvenience.



Column
width30%

                                                                                                                                                                                                   Image RemovedImage Added

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. 

Compatibility: Magento Open Source 2.3.X - 2.4.X, Magento Commerce 2.3.X - 2.4.X

Product Page


...

Command Line InstallationComposer Installation


Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database


Panel
borderWidth2px
borderStylesolid

2. Download the Free Shipping Bar installation package


Panel
borderWidth2px
borderStylesolid

 3. Upload contents of the Free Shipping Bar installation package to your store root directory


Panel
borderWidth2px
borderStylesolid

 4. In SSH console of your server navigate to your store root folder:

No Format
cd path_to_the_store_root_folder

run the following command: :

No Format
php -f bin/magento module:enable  Aheadworks_Freeshippinglabel

then:

No Format
php -f bin/magento setup:upgrade

after:

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


Panel
borderWidth2px
borderStylesolid

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


Note

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.




Column
width50%


Panel
borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder

Run the following command:

Panel
borderWidth2px
borderStylesolid
composer config repositories.aheadworks composer https://dist.aheadworks.com/

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



Panel
borderWidth2px
borderStylesolid

To install the extension:

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

Panel
borderWidth2px
borderStylesolid
cd path_to_the_store_root_folder



Panel
borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-free-shipping-label

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-free-shipping-label:<version>


Tip

Specify the version of the extension in <version>


Panel
borderWidth2px
borderStylesolid

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


Note

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

Image Modified



Panel
borderWidth2px
borderStylesolid

4. Install the GeoIP2 library:

Panel
borderWidth2px
borderStylesolid
composer require geoip2/geoip2

Click here to download the library.


Panel
borderWidth2px
borderStylesolid

5. Enable the extension:

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


Tip

Add the product name in <Module_Name>

Next, register the extension:

Panel
borderWidth2px
borderStylesolid
bin/magento setup:upgrade

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

Panel
borderWidth2px
borderStylesolid
bin/magento setup:di:compile

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

Panel
borderWidth2px
borderStylesolid
bin/magento module:status

Clean store cache, by running the following command:

Panel
borderWidth2px
borderStylesolid
bin/magento cache:clean

Log out and Log in the backend again.


Panel
borderWidth2px
borderStylesolid

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.


Code Block
titleUpdate per module name:
composer update aheadworks/module-free-shipping-label


Code Block
titleUpdater per version:
composer require aheadworks/module-free-shipping-label:<version>

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

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





Introducing M2 Free Shipping Bar

...

Section

To enable the extension and start configuring the Bar, proceed to Content > Free Shipping Bar by Aheadworks > Settings. There are seven sections on the Settings 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;
  • Customer Groups - select customer groups to display the free shipping bar to.


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

In order to set up free shipping options proceed to 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. 

Tip

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. 

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:
    • All pages;
    • 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).

Conditions

The Conditions section provides the functionality to exclude products or categories from the free shipping bar promo. 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 toggle.

When the toggle is in the Yes mode, the conditioning block will get 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. 

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 conditionsclick 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:".

Image Modified

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


Info

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.  

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 in 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.  

Variables

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

Code Block
{{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.

Code Block
{{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 feel, 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.

Preview

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



...