sample_product

View Magento 2 Sample Product Extension Detail Page for Features and Demo

Documentation for Sample product

Preference

  • Store Admin can Sell Sample Products with custom price added from admin.
  • So customers can buy a sample product.

Installation

There are two ways of installing extension in magento2.

  1. Using COMMAND LINE.
  2. Manually Install extension.

Option 1: Magento 2 install extension using COMMAND LINE (Recommended)

Follow below steps to install extension from the command line.

Step 1: Download the extension and unzip it.

Step 2: Upload it to code directory in your magento installation’s app directory. If code directory does not exists then create.

Step 3: Disable the cache under System → Cache Management.

Step 4: Enter the following at the command line:

           Php bin/magento setup:upgrade
           Php bin/magento setup:static-content:deploy

Step 5: Once you complete above steps log out and log in back to the admin panel and switch to Stores → Configuration → Mageants → Sample product, the module will be displayed in the admin panel.

Option 2: Magento 2 install extension manually

Step 1: Download the extension and unzip it.

Step 2: Upload it to code directory in your magento installation’s app directory If code directory does not exists then create.

Step 3: Disable the cache under System → Cache Management Edit app/etc/config.php file and add one line code: ‘Mageants_sampleproduct’ ⇒ 1

Step 4: Disable the cache under System → Cache Management

Step 5: Once you complete above steps log out and log in back to the admin panel and switch to Stores → Configuration → Mageants → Sample product, the module will be displayed in the admin panel.

Backend Example

After Installation of Extension login to magento admin panel to set configuration of the extension.

Extension Configuration:

Login to Magento Admin → Store → Configuration → Mageants → Sample Product → Enable → Choose Yes/No to Show or hide module.

Enable : Choose Yes will enable the Export order module.

Use this path for Add Sample Product:

Admin→ Catalog→ Products → Select any product → Edit → Sample Product.

Please refer below image for Sample Product setting.

Frontend Example

Below are some screen shot of Extension Functionality on front-end.

Product Details page:

  • The Sample Product module is enabled, then show order sample button in product listing & the details page so customers can easily add sample product on shopping card.

Shopping Cart Page:

  • Sample Products are highlighted with “Sample order : Yes” to differentiate from normal products. Also the QTY is fixed to 1. User not allowed to change the QTY of sample product.
  • Update Cart sample product Qty more than sample product max qty configuration.

Customer Account - Order Detail Page:

  • Customer can easily Differentiate sample products and normal products in order, invoice, and other detail pages.

Backend Orders View:

Hyva front-end Example:

Simple product detail page :

Configurable product detail page:

Mini cart page :

Shopping cart page:

  • Update Cart sample product Qty more than sample product max qty configuration.

sample_product.txt · Last modified: 2025/05/26 13:23