Product Sample for Magento 2
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
Features
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.
Magento-2-Google-Translate
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.
Magento-2-Google-Translate-Flush-Cache-1
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).
Magento-2-Google-Translate-lang1
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.
webkul-magento2-sample-product
Consequently, the module will get translated into your desired Language.
csv-lang
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.
Configuration-sample-product
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.
sample-product-settings
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.
Originally Published: - https://webkul.com/blog/magento2-product-sample/