Back to Top

Product Sample for Magento 2

Updated 7 March 2024

Magento 2 sample product extension allows the admin to add sample products for their store products that are helpful for the customers for checking the quality of the product in case of a bulk purchase.

The admin can select the customer groups that can purchase sample products. The admin can enable sample products while adding or editing any product to create its sample.

This module even allows the admin to set the maximum quantity of the same product that a customer can purchase.

The extension is compatible with the Hyva Theme and allows the customer to order a sample unit with the minimum amount of the stock sample they intend to buy, in a smaller quantity first.

Check the overview of the plugin in the video mentioned below :

Searching for an experienced
Magento 2 Company ?
Find out More


  • The admin can enable the sample product feature.
  • Allow the login customer only to purchase sample can be enabled.
  • The admin can select the customer’s groups who are allowed to purchase the sample.
  • The admin can enter the maximum number of the sample that can be ordered by a customer.
  • Enable the sample for a product and its price, quantity can be added by the admin.
  • The admin can enter a custom title for the sample product visible to the customers.
  • The customers can order a sample by adding it to the shopping cart page from the category and product view page.
  • The extension is compatible with the Hyva Theme.

Module Installation

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. And, the extracted folder has an src folder, in the src folder, you will find the app folder.

Then, you will have to transfer this app folder into the Magento 2 root directory on the server as depicted below.


After the successful installation of the Magento 2 (Adobe Commerce) extension, you have to run the command in the Magento 2 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

Fourth Command –

php bin/magento indexer:reindex

Cache Management

Then, after running the commands, you have to flush the cache from the Magento admin panel. So, navigate through->System->Cache management as shown below.


Multilingual Support

Now, the admin will navigate to Stores->Configuration->General ->Locale Options. Here, you can select the locale as German. (Locale is the language into which the admin desires to translate his store content).


Module Translation

If you want to translate the module language from English to German. Then, follow the following path in the unzipped Magento 2 web security folder. src/app/code/Webkul/SampleProduct/i18n.

After that, you will receive a CSV file with the name “en_US.csv”. Now, rename that CSV on your region code and language code “de_DE.csv”. And then translate all right-side content in your language.
After editing the CSV, save it and then you need to upload it where you have installed Magento 2 (Adobe Commerce) on the server.


Consequently, the module will get translated into your desired Language.


Module Configuration

Firstly, to configure the module the admin needs to go to the Stores > Configuration > Sample Product Configuration. Further, the admin needs to enter the inputs for the below fields.


Enable Sample Product: If the admin enables the field sample products can be added for customer orders.

Allow to Only Login Customer: Using this only the logged-in customers can order the sample products if enabled, else not.

Allowed Customer Groups: The selected customer groups can order from the available sample products.

Maximum Allowed Sample Quantities to Order: The specified quantity here by the admin is the maximum unit of sample products that an individual customer can order.

Product Settings

The admin can enable the sample products from the product settings for this go to the CATALOG > Products open the edit section and give input for the below fields.


Enable Sample: The admin can enable the particular product to be available for ordering a sample unit of the product.

Sample Title: The admin can enter a custom title for the sample product option visible to the customers.

Sample Price: The admin can enter the price of the particular sample unit of the product.

The Sample Qty: Moreover, the total quantity of the sample units available needs to be entered here.

Purchase Sample – Category Page

The customer can check from the category page as well if any product is available for purchasing a sample unit. Further, Just click the Get a Sample button.


Product Page – Order Sample

The customers are redirected to the product page right after, clicking the get a sample button. Else a customer can also view a product and then order a sample unit.


The price of the sample unit per quantity is visible to the customer as shown in the above image. Further, click the Get Sample button to proceed to buy.

Note: An error message is delivered if in case a customer tries to order the number of sample units that exceed the specified limit by the admin as shown below.


The customer can then proceed to checkout after adding the sample into his/her shopping cart.


The customer then reaches the shopping cart page with where the customer can also update the quantity if it exceeds the allowed specified quantity.


Under the order summary, the sample product bought with price and quantity is visible select the shipping address and click place order to complete the purchase.


That’s all for the extension. For any question/query, please raise a Ticket at our HelpDesk system. We are more than happy to assist you with your queries.

Explore the Adobe Commerce Cloud development service by Webkul. You may also browse other Magento 2 marketplace addons. Also our quality Magento 2 extensions.

Current Product Version - 4.0.5

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

Table of Content