User Tools

Site Tools


Sidebar

magento_2:custom_stock_status

For more details see the Custom Stock Status extension page.

Guide for Custom Stock Status for Magento 2

The extension allows you to inform your shoppers about the current stock statuses of your products. You can use variables and quantity ranges to provide clear and catchy statuses to engage your customers.

  • Apply various custom stock statuses via rules
  • Add statuses to multiple products and product groups
  • Display out of stock notifications of configurable items
  • Upload catchy icons for stock statuses
  • Show stock statuses based on quantity

General Settings

To configure the extension, go to Stores → Configuration → Amasty Extensions → Custom Stock Status.

General

Display Default Stock Status with Custom Status - select Yes to display default stock status (in stock\out of stock) next to a custom stock status, set to No to display only custom stock status.

Use Out of Stock Threshold Value for Quantity Ranges - set to Yes to apply Out of Stock Threshold Value to the quality ranged statuses.

Out of stock threshold value indicates the quantity according to which a product is considered to be out of stock. If you use a variable qty_threshold to highlight the precise quantity of the product in your stock status, this number is calculated this way: the product quantity minus stock threshold (the quantity which triggers the out-of-stock status).

To specify out of stock threshold value, please go to Admin Panel → Catalog → Products and choose the product. In the Advanced Inventory tab set the necessary threshold value.

Display Icon Only (No Status Text) - set this option to Yes to display only icons for stock statuses (without a text).

Display Settings

Expand this tab to choose whether to show custom stock statuses on:

  • Product list page;
  • Shopping cart;
  • Order Confirmation Email.

In this tab, you can configure the placement of a custom stock status link.

Show Info Link - enable the feature to display a link below the custom stock status.

Info Link Text - input an anchor text that will be shown to customers.

CMS Page - select the necessary CMS page to direct customers to. A drop-down contains all the CMS pages that you have in the web store.

Info link on the frontend:

Expected Date

The Expected Date section allows you to display the date on product pages when a product will be back in stock.

When the expected date functionality is enabled, the new corresponding attribute is created. Also, the attribute will be automatically added to products.

Use Expected Date — switch this option to 'Yes' to enable the expected date functionality.

Expected Date Format — choose the expected date format.

Hide Expired Expected Dates — enable this option to hide the expected dates when they expire.

For the correct display of the Expected Date on a product page please go to Stores → Product → Custom Stock Status → Manage Option → Add Option and fill the new option with the expected date variable.

Then set the Expected date on product settings and choose the new custom status option from the Custom Stock Status dropdown.

Configurable Products

With the extension, you can use custom statuses for simple options of configurable products.

Please note that these settings switched on may degrade the performance of your store since the module is checking out the status/quantity of simple products before reflecting the status of a configurable product. For the same reason, a page with a higher number of simple products is loading longer.

Show Out of Stock Configurable Attributes:

Set to 'No, Magento logic' to make disabled and out-of-stock products crossed-out and not selectable.

Set to 'Yes, Out of stock options selectable' to make out-of-stock options selectable (not crossed-out) and disabled products crossed-out and not selectable.

Set to 'Yes, Out of stock options selectable and crossed-out' to make out-of-stock options selectable and crossed-out while disabled products will stay not selectable and crossed out. Note, that this functionality is displayed only on product details pages.

Change Configurable Product Status upon Options Selection - enable this option to change product statuses for configurable products.

See how the feature is displayed on the frontend:

Show Custom Status in Dropdowns - select Yes to display custom stock status in the products options dropdowns.

Create Custom Stock Statuses

To create custom stock statuses, please go to Stores → Attributes → Product and select the attribute custom_stock_status.

Add an Option

Navigate to the Properties tab → Manage Options (Values of Your Attribute) section.

Here you can create the necessary options for the custom stock attributes. Easily sort them via drag and drop function or delete if necessary. Use the Add Option button to create a new status.

You can use different variables to generate stock statuses automatically and provide your customers with the necessary message. Also, HTML tags are allowed.

To display current product quantity in particular stock status, use {qty} variable, for example: Hurry up! Only {qty} left in stock!

Use {qty_threshold} variable to display the product quantity minus stock threshold (the number which triggers the out-of-stock status of a product).

You may specify days such as {tomorrow}, {day-after-tomorrow}, {yesterday} or prices, e.g. {special_price}.

If you want to display only an icon without a text for specific statuses, but don’t want to disable text messages for all of them, press Space button in the Default Store View field and leave it empty.

Upload an Icon

Go to the Manage Icons tab to upload noticeable images in order to draw customers’ attention.

In the Preview column you can see how the icon will be displayed on the frontend. Delete icons if needed just ticking them in the appropriate column.

Please, don't forget to save the attribute, otherwise, icons won’t be uploaded.

Statuses Application

Create Custom Stock Status Rules

Starting from version 2.0.0 the extension provides store admins with the capability to apply statuses basing on Custom Stock Status Rules. In the previous versions, it was realized through additional attributes, such as the Quantity Ranges attribute and Product Groups attribute. Now you don't need to create additional attributes. Instead of this, you can assign custom statuses to particular products or product categories using various conditions and quantity ranges within the rule. Upon the upgrade process, the extension will automatically create rules for previously configured statuses and ranges.

To create or manage rules please go to Catalog → Amasty Custom Stock Status → Manage Custom Stock Status Rules

Here on the grid, you can see all the previously created rules. You can see their names, statuses, priority and their visibility by certain store views and customer groups. You may Enable, Disable, Duplicate, or Delete any of the rules right from the grid. Open the needed rule to view the details and to Edit. Create a new one via the button Create New Rule.

Status - enable the toggle to make the rule active.

Rule Name - specify the rule name (for the internal use).

Priority - the setting defines the priority of the rule application. Note, that only one rule can be applied for one product. If there are several rules, the rule with the highest priority will be executed. Here 1 is the highest priority. In the controversial cases, for example, when there are two or more rules with the same priority and the same customer groups, the preference is given to the rule with a lower ID.

Store Views - specify the stores for which the rule will be visible.

Customer Groups - with this setting you can make the rule visible for the particular customer groups.

Main Custom Stock Status - from a dropdown window choose the main stock status for the products that will be specified below in the rule. If you miss the needed stock status, please turn to the Create Custom Stock Status section of this guide and see how to add new statuses, which then will be visible in any rule.

Activate Qty Based Ranges - enable the toggle to activate the quantity ranges. This means, that besides the main custom stock status, within the rule you can apply other custom stock statuses to the products, which fall under a certain quantity ranges. In such cases, the quantity range based status will replace the main custom stock status. But it will be applied for other products, which don't fall under the specified quantity ranges.

Tap the button Add New Range Status to create new quantity ranges and statuses. For the correct rule application, set the exact quantity in the fields Quantity From and Quantity To. Then, from a dropdown, choose the appropriate status in the tab Custom Stock Status. You may easily delete any of the statuses if it is not needed anymore.

'Where to display' conditions - here we can choose conditions to define the products, for which will be displayed the custom stock statuses according to our rule.

Hit the Preview Products button to view the products which match the conditions of the rule. Click Hide Products if you don't need the preview.

Please, don't forget to Save the rule.

For Particular Products

If you need to add or change the status for a particular product, you can also do it from the product settings page. Please, go to Catalog → Products and select a product.

Navigate to the General tab and select the appropriate status for the product using Custom Stock Status dropdown, where all custom statuses are displayed.

Save the configuration.

You can also add custom stock statuses for multiple products from the grid via Mass action. To do this, please go to Catalog → Products. Use the Filters button to find all the products you need.

Tick all the products or the necessary ones you want to add the status to. Click the Update attributes option in the Actions dropdown menu.

In the Attributes tab specify the necessary Custom Stock Status.

Hit the Save button.

Frontend Samples

Display custom stock status on product pages either together with the default status or separately.

Show custom stock status on the shopping cart page.

Add custom stock statuses to a category page and display info links on category pages and direct customers to any CMS page of your webstore.

Improve your shoppers experience adding Amasty One Step Checkout for Magento 2 to Custom Stock Status functionality.

Find out how to install the Custom Stock Status for Magento 2 via Composer.

Rate the user guide
 stars  from 1 votes (Details)
magento_2/custom_stock_status.txt · Last modified: 2020/10/14 08:04 by asemenova