Magento 2 Quantity Dropdown

Magento 2 Quantity Dropdown lets you enable quantity dropdown list for customers to select the quantity of items instead of quantity input box to set minimum purchase or to restrict bulk purchase due to limited stock.

 

Table of Content

  1. Extension Installation Guide
  2. Configuration
  3. Product Specific Dropdown Settings
  4. Quantity Dropdown in Frontend

 

  1. Extension Installation
    • For Magento Marketplace Customers
      • Find the Composer name and version of the extension in the extension’s composer.json file.
      • Login to your SSH and run:
      • composer require meetanshi/magento2-quantity-dropdown
    • Enter your authentication keys. Your public key is your username; your private key is your password.
    • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
    • To verify that the extension installed properly, run the command:
      • php bin/magento module:status Meetanshi_QuantityDropdown
          • By default, the extension is probably disabled.
          • Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_QuantityDropdown --clear-static-content
      • php bin/magento setup:upgrade
      • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
      • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
      • php bin/magento cache:flush

 

    • For Meetanshi Customers
      • Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
      • Login to your SSH and run below commands step by step:
        • php bin/magento setup:upgrade
        • For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
        • For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
        • php bin/magento cache:flush

 

  1. Configuration
    To configure the extension, login to Magento 2 backend, move to Stores à Configuration à Quantity Dropdown where you can find various settings to configure the extension.
  • Quantity Dropdown: Enable the Quantity Dropdown extension from here.
  • Dropdown Type: Select the dropdown type.
  • Max Quantity Value: Set quantity value to show maximum product quantity in the dropdown for increment type.
  • Custom Value: Add comma separated custom product quantity values for custom value dropdown type.
  • Show Price in Dropdown: Select how you want to show product prices in the dropdown.
  • Hide Quantity Value Which is Larger Than Stock Quantity: Select how to show quantity when value is larger than stock.

 

  1. Product Specific Quantity Dropdown Settings
    Follow the below steps to configure specific settings for each or some products in the store.
  • Quantity Dropdown Type: Set the quantity dropdown type particularly for the selected product.
  • Custom Value: Set the custom value if the quantity dropdown type is set to custom value.

 

  1. Quantity Dropdown in Frontend
    Once the extension is configured, the Quantity Dropdown is seen enabled on the product pages.

     
    • Quantity Dropdown Increment Value Type
      As per the general configuration, the increment value type quantity dropdown is enabled on product page.



 

    • Quantity Dropdown Custom Value Type
      As we have set custom value type dropdown for this particular product, it overrides the general configuration for it and shows dropdown accordingly.

 

    • Quantity Dropdown for Grouped Product Type
      The quantity dropdown is compatible with grouped product type as well. The admin has to set quantity dropdown for each child product and it gets shown in the frontend.