After installing the extension just follow the below steps to the Free Sample Product Module.

  1. Go to Catalog->Category. Click on the “ Add Subcategory”. Fill the necessary details according to the requirement and Save the Category. Note down the category of the Id.
    Note: Make sure this category is not included in the navigation.
  2. Click on the Category which we have created in Step 1 and repeat the procedure as in  Step 1.
    Note: Make sure this category is not included in the navigation.
  3. Go to Stores → Configuration → Zestard Technologies → Sample Product
    • Module Enable: Select “Yes” to enable the extension.
    • Sample Root Category Id: Parent Category Id in which the free products are assigned. (Add the category Id  from Step 1)
    • Minicart Layout Key: Layout key for the mini cart to update mini cart when operations related to sample cart is performed
    • Minicart Container ID/Class:  To append the mini cart.
  4. Go to Catalog->Products->Select “ Sample Product” from the drop-down.Select the Enable to Yes. Fill out the required details. Set the price of the product to  “zero”. Tax class as “None”.
  5. Set Quantity as per the stock available. Click on the “Advanced Inventory”. Set “Minimum Qty Allowed in Shopping Cart” to 1  and “ Maximum Qty Allowed in Shopping Cart”  to 1.
    Note: The sample product will be added in mini cart as per the Min Qty Allowed and it should always be 1 for both maximum as well as minimum qty allowed in cart.

  6. Set the “Stock Status” as  “In stock”. Select the category which we created in Step 1 and Step 2. Make sure this product is not assigned to any other category. Set the “Visibility”  of the product to  “Not Visible Individually ”.
  7. Click on  Free Sample Product Menu than  Sample Product Ranges.Click on the Add New Range. Fill the Price Range amount on which the user can avail the Free Sample Product and in Samples the number of products to be allowed as Free Sample Product.
  8. Click on the  “Select  Sample and Confirm” Button to add free products to the cart.
  9. If the subtotal is not as per the settings from the backend and when clicked on the button user will get a pop-up which will show the min amount to avail the free products.

Notes

Following are some of the conditions of how  Free Sample Product Works:

  • Products that are available for free should be not assigned to any other product whether Configurable or Bundle.
  • Product’s visibility should always set to Not Visible Individually
  • Product Should be always “In Stock
  • Free Product will get deleted if the conditions which are set by Admin are not satisfied.

E.g: If we have set that if cart subtotal is  50 and can avail the 2 free products and other conditions is if subtotal is 25 can avail 1  free product. So if the user adds a product of price 25 with quantity 2. He can avail of 2 free sample products. If adds to sample products and then decreases the main product quantity  1 then the last added free product will be removed from the cart.