Versions Compared

Key

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


...

width50%

Table of Contents

Warning

Firefox user notice:

Please use a different web browser to view this document.

Sorry for the inconvenience.

...

width35%

Image Modified

Magento 2 Custom Stock Status is a tool for alerting customers on low stock alerts within your store and conducting customer behavior by pushing them to purchase.

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

Product Page

Thank you for choosing Aheadworks!

Installing Custom Stock Status for Magento 2

...

width50%

Command Line Installation

Panel
borderWidth2px
borderStylesolid

1. Backup your web directory and store database

Panel
borderWidth2px
borderStylesolid

2. Download the Custom Stock Status installation package

Panel
borderWidth2px
borderStylesolid

 3. Upload the contents of the Custom Stock Status installation package to your store root directory

...

borderWidth2px
borderStylesolid

 4. In the 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_CustomStockStatus

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

...

width50%

Composer Installation

...

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/

On successful execution of the command you will be able to use the composer to install the extensions.

...

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

...

borderWidth2px
borderStylesolid

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-customstockstatus

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

Panel
borderWidth2px
borderStylesolid
composer require aheadworks/module-customstockstatus:<version>
Tip

Specify the version of the extension in <version>

Panel
borderWidth2px
borderStylesolid

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

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 Removed

...

borderWidth2px
borderStylesolid

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

...

borderWidth2px
borderStylesolid

To upgrade the extension:

5. 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-customstockstatus
Code Block
titleUpdater per version:
composer require aheadworks/module-customstockstatus:<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

Set up cron

The Get Product Status extension uses cron for automatic stock staus updates.

...

width50%

If you have already configured cron jobs for your Magento installation, then you can skip this step. Read the following instructions on setting cron job for your Magento store: Magento user guide.

Generally, it will be enough to run in the SSH console of your server the following command: 

Code Block
languagebash
crontab -e

And insert the following line:  

Code Block
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/update/cron.php
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento setup:cron:run

Don't forget to confirm saving request when exit.

Introducing Custom Stock Status for Magento 2

Section

The Get Product Status extension for Magento 2 presents a customizable block for a stock status display based on specific conditions. With the extension you 

  • Display stock statuses oncategory and product pages, and in a shopping cart;
  • Indicate product quantity and quantity ranges as triggers for rule application;
  • Use icons, images, and text for a stock status block;
  • Allow customers to subscribe to back-in-stock notifications;
  • Select templates for back-in-stock and low-stock alerts.

Supported product types

Section
  • Simple: the status is displayed on the catalog and product page
  • Configurable: the status is displayed on the catalog and product page when a customer has configured a product (e.g. a certain child product was selected)
  • Grouped: not supported, i.e. the status on the product page is not displayed. However, the stock status will be displayed on the cart page because children are considered as separate products;
  • Bundle: not supported.
  • Downloadable/virtual / Gift Card with quantity: The status is displayed on the cart page or in mini cart, because these are the only places where the quantity of items of these product types can be edited;

Extension configuration

...

To start working with Magento 2 Custom Stock Status configure the basics of the extension. Follow Stores > Configuration > Aheadworks extensions > Custom Stock Status

Stock Status Block Settings

First of all, decide whether the Custom Stock Status will be displayed along with the default Stock Status. Enable the option if you need both the stock statuses to cover for each other in case of some issues occurred

The 'Display mode' field defines the options for stock status block customization while creating a rule.

  • 'Text and Icon' allows using icons next to the block.
  • 'Text and image' adds a field for image inserting. 

Display settings help to select where to show custom stock status besides a product page. The 'Category Page' and 'Shopping Cart' options are available for adding.

Image Removed

Notification Settings

The 'Notification Settings' section contains low stock alert & back-in-stock notification configuration.

The notification sender email is specified in a corresponding field.

If the back-in-stock subscription is enabled customers will see a related button next to an out-of-stock product. The notification request pop-up appears upon clicking the button. If you want to display your store Private Policy link in the pop-up choose the relevant option. Also, it is p[ossible to specify the destination of the link in the 'Privacy Policy CMS Page' field.

Low Stock Alert Quantity is the number of products left in stock that triggers low stock alert sending.

Templates for both back-in-stock and low stock alert emails can be selected here in the section.

Image Removed

Rule Management

Rule Grid

All the rules related to custom stock statuses application can be found on the following path: Catalog > Custom Stock Statuses.
You can perform individual actions, such as enabling, disabling, or deleting, to the rules or manage them massively in a single grid.   
From this page you can move to a particular rule page or create a new one by clicking 'Add New Rule' button.

Image Removed

General Settings

General Settings for custom stock status rules are pretty much standard.

  1. Start with naming the rule for your comfortable use.
  2. Decide whether the rule is enabled or not for the moment..
  3. Specify rule priority to apply the rule accordingly in relation to other similar rules.
  4. Select a store view where the rule will be active.

Image Removed

Product Conditions

Product conditions specify the products to which the rule will be bound to.

Image Removed

Display Options

Stock status display options are based on a specified product quantity.

Note

It's possible to set up a few options to the same product if there's a difference in item quantity.

  1. Product quantity field allows setting up the display mode based on several parameters:
    1. less than - the current display mode will be applied if the product quantity is less than a particular number; 
    2. greater than - the current display mode will be applied if the product quantity is greater than a particular number; 
    3. equals or less than - the current display mode will be applied if the stock item quantity matches the number inserted in the field or is less than the number; 
    4. equals or greater than - the current display mode will be applied if the stock item quantity matches the number inserted in the field or is less than the number; 
    5. range - the current display mode will be applied if the stock item quantity is within a particular number range you specify in the fields 'from' & 'to'. 
  2. 'Custom Stock Status Text' is a field for adding a text message on stock status. 
  3. 'Upload image/icon' are boxes for visualizing stock status. They can be added via the drag-and-drop functionality or the standard upload window.
Note

Icon and image display is closely related to the 'Display Mode' setting in the extension configuration section. If you choose 'text & icon' mode no image will be shown. If you settle on the 'text & image' option the icon display will become unavailable.

Image Removed

Notification Requests

The extension allows customers to submit requests for notifications when products of their interest return to stock. Magento 2 Custom Stock Status automates the process of sending back-in-stock alerts you just need to specify the sender and the template for such emails.

All the notification request you can view in Catalog > Notification Requests with the info on a relevant product, customer name and email address, and status of the request to know what actions can be done to satisfy all the customers' needs.

Image Removed

Demand for Out of Stock Items

The grid with customer subscriptions to out of stock products can be found on the following path: Catalog > Demand for Out of Stock Items. The info presented here helps to analyze customer demand by highlighting the number of subscriptions and plan re-supplying according to the data when the product went out of stock.

Image Removed

Frontend View

Custom Stock Status can be displayed on both category and product pages, and in the shopping cart. If specified in the backend settings the notification button is shown along with the particular status.

Category Page Display

Image Removed

Product Page Display

Image Removed

Shopping Cart Display

Image Removed

Notification Request Box

The notification request box appears upon clicking the 'Email Me When Back In Stock' button. 

The compounds are the name and email fields and the Privacy Policy checkbox. Only the email entry is required to be filled to send a notification request successfully.

Image Removed

...

Warning

For more information follow the product user manual on our website

Product Page

Thank you for choosing Aheadworks!


Need Customization?