Custom Option Stock and Images for Magento 2 module allows the admin to display text swatches for custom options selection. The admin can add custom options, manage swatch and manage variations for the product.
The Stock and images module is applicable for simple, virtual, configurable, and downloadable product type. For each custom option, the admin can manage inventory, weight, price and also upload multiple images.
Every text swatch has multiple images according to the variations added. If the customer will select red colour text swatch then the product image will also be of red colour.
Check a brief overview of the plugin –
Module Features
- This module is compatible with simple, virtual, configurable, and downloadable product types.
- Admin can set stock for each option.
- Admin can set to show custom option as swatches.
- Dynamic product image based on the selected custom option combination.
- Show custom option as text swatch.
- Set swatch and custom option labels.
- Manage inventory on purchases and return.
- Ajax based module, so no page reload.
- Mention weight for every custom option variant
- The source code is fully open for customization.
- For custom option admin can add multiple images for single swatch.
- Admin can import custom options swatch and variations in bulk via CSV.
- This extension supports GraphQL APIs.
- It is compatible with the Hyva theme.
Installation – Custom Option with Stock and Images for Magento 2
The installation is quite simple just like the standard Magento 2 extensions.
Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder.
You need to transfer this app folder into the Magento2 root directory on the server as shown below:

After the successful installation, you have to run these commands in the Magento2 root directory.
First command –
php bin/magento setup:upgrade
Second Command –
php bin/magento setup:di:compile
Third Command –
php bin/magento setup:static-content:deploy
After running the commands, you have to flush the cache from the Magento admin panel by navigating through ->System->Cache management as shown below in the snapshot.

Multilingual Support
For the multilingual support, the admin will navigate through Store > Configuration > General > Locale Options and select the locale as German (the language into which admin want to translate his store content).

Module Translation
If a user wants to translate their module from English to German then they need to follow the path app/code/Webkul/Marketplace/i18n in their unzipped Magento Marketplace folder and will get a csv file with name “en_US.csv”.
Now they will rename that csv as “de_DE.csv” and translate all right side content after the comma in the German language.
After editing the CSV, save it and then upload it to the path app/code/Webkul/Marketplace/i18n where they have installed Magento2 on the server.
Now, the module will translate in the German Language. It supports both the LTR and RTL languages.


Product Configuration
Once, the installation of the module is done, the admin will navigate through Catalog > Products.
After that, the admin will create a new product or will use the existing product to add the custom option(s).

The admin will edit the product and select the customizable options. From here the admin can Add options, Manage swatch and Manage variation.
Add Option
The admin will go to the “Option Title” and select “Option Type” ( This module only works with Dropdown & Radio Buttons input type).
Then the admin will add multiple values for the specific custom option created and select the “Required” checkbox.

Note:- It is must to tick on the “Required” checkbox, then only you can “Manage Swatch” & “Manage Variation”.
If you will not tick the Required checkbox then a popup will appear as shown in below image:

Manage Swatch
The admin can manage the text swatch by selecting the Option Label which will be displayed on the product page.
The Option Label which is not selected by the admin will not be visible as a swatch on the product page.

Manage Variations
After creating the custom options, the admin will click on “Manage Variations” from where admin can add images, weight, and quantity which can be same or different for every variation.
After managing the variations admin will save the product.
**Please Note: In the current version of Magento, when the admin enters the stock for any specific variation then it will not affect the global quantity of the product.
Whereas, in previous versions, the global quantity used to change with the value of stock in “Manage Variations”

Mass Upload
This feature helps the admin to upload products in bulk. Now the admin can add multiple products using a CSV file.
To add a CSV file:
Go to the admin dashboard and select “Mass Upload Option” under the “Webkul option with stock and image” on the side panel menu.

You can upload a file by clicking the button “Choose file”.

In the above image, you can see all the products uploaded successfully. You can see all the products under your catalog section.
Customer end
The customer needs to select between the visible text swatches. It is a must for the customer to select one option from each text swatch.

The customer will select the product as per the desired variation and proceed to checkout by adding products to the cart.
After adding the product to the cart, the customer will proceed to check out, enter the shipping details & proceed to the payment review page.

The customer will choose the appropriate payment method and place the order successfully.

Once, the order has been placed, the customer will receive a confirmation email with all the order details.

Product Configuration
After the order placement, the product inventory will automatically get synced in specific product variation.
As shown in below screenshots.
- Global Quantity: The value will be the same as before. There will not be any effect on the main quantity of the product.

- Specific product variation quantity: The value will get deducted from the stock of that particular variation of the product.

Just after the customer placed the order successfully, the admin can create the Invoice and shipment. After that, the admin will create shipment of the product and complete the order.

If the customer desire to return the product, then the admin will have to create a credit memo for the same order.
In that, the admin needs to click on the “Refund offline” (if the order was placed using an offline payment method) option.
This will create a credit memo for the order, and after creating the credit memo, the inventory for the returned product will automatically get updated for the specific product variation.

Once the credit memo is created, the admin will navigate to Sales > Credit Memo to view the existing credit memos to check the details of the refunded order.

Once, the refund is completed, the returned product quantity will get transferred to the stock of the variation of that particular product.
Let’s have a look at the below screenshots for the stock and images :
- Global quantity: The main quantity will remain the same.

- Specific product variation: There will be an increase in the stock amount of product variation which is refunded.

That’s all for the Magento 2 Custom Option Stock and Images module. If you still have any issue, please feel free to add a ticket and let us know your views to make this module better https://webkul.uvdesk.com.
Current Product Version - 5.0.1
Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
Be the first to comment.