WordPress HowTo

WordPress Tutorials

  • Home
  • Plugins
    • Themes
  • Contact
    • Privacy Policy
  • About

How to Add a Quantity Field to a PayPal Button

Variable Quantity is an extension of the Payment Button for PayPal WordPress plugin (also known as WP PayPal) that can be used to add a quantity field to your PayPal Buy buttons.

In order to add a quantity field you can use the following shortcode.

[wp_paypal button="buynow" name="My product" amount="1.00" quantity=""]

Leaving the quantity parameter empty implies that you wish to allow buyers to enter a quantity for this item.

When the button is rendered on the front end, a quantity box will appear with it.

quantity field created using the WordPress PayPal plugin

Minimum Quantity

In order to restrict buyers to a minimum quantity, you can use the min_qty parameter in the shortcode.

[wp_paypal button="buynow" name="My product" amount="1.00" quantity="" min_qty="2"]

Maximum Quantity

In order to restrict buyers to a maximum quantity, you can use the max_qty parameter in the shortcode.

[wp_paypal button="buynow" name="My product" amount="1.00" quantity="" max_qty="5"]

Quantity Range

You can use both the min_qty and max_qty parameters to restrict the quantities of items that can be purchased.

[wp_paypal button="buynow" name="My product" amount="1.00" quantity="" min_qty="2" max_qty="5"]

Buy the Variable Quantity Extension

WP PayPal Variable Quantity
WP PayPal Variable Quantity
Allow buyers to enter a quantity for your WP PayPal Buy Now buttons.
Price: $39.99
Price: $29.99

Share this:

  • Twitter
  • Facebook
  • Pinterest

Related

Written by Noor Alam · Categorized: plugin, wordpress

Comments

  1. Roland says

    Amazing plugin. Keep it up.

    Reply
    • Noor Alam says

      @Roland, Thank you!

      Reply
  2. Keith Hammerbeck says

    Is there a way to stipulate a minimum or maximum quantity?

    Reply
    • Noor Alam says

      @Keith, There is. You can use the “min_qty” and “max_qty” parameters in the shortcode.

      Reply
      • Keith Hammerbeck says

        Thank you. It isn’t working for me.
        See in progress page at https://grillhappy.com/wordpress/index.php/home/purchase/

        The code for the “Two or more 3oz. bottles” entry is as follows:

        [wp_paypal button="buynow" name="Grill Happy Seasoning - 3oz." amount="9.50" quantity="" min_qty="2" button_image="https://grillhappy.com/wordpress/wp-content/uploads/2022/02/BuyNowD.png" return="https://grillhappy.com/wordpress/index.php/thankyou" cancel_return="https://grillhappy.com/wordpress/index.php/cancell"]

        I am able to enter quantity 1 and get it through to paypal as 1 @9.50.

        Thank you,
        Keith

        Reply
        • Noor Alam says

          @Keith, We have just sent you an email with an update. Let me know if you don’t receive it.

          Reply

Leave a Reply Cancel reply

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

Search WP HowTo

Recent Posts

  • How to Show a Text Box at WP PayPal Checkout to Collect Custom Data from Buyers
  • How to Add a Recurring Price Field to a PayPal Subscription Button
  • How to Add a Quantity Field to a PayPal Button
  • How to Configure Product Variations in WP PayPal
  • How to Make Your WooCommerce Add to Cart Buttons Bigger
  • How To Disable Sticky Header in a Genesis Child Theme
  • How to Center a Tweet in WordPress
  • How to Add a Free SSL Certificate to Your WordPress Site
  • 34 Best Black Friday & Cyber Monday Discounts for WordPress
  • Introducing to WordPress Login & Admin Area on Bluehost

Copyright © 2022 · WordPress HowTo

This website uses cookies to improve your experience. By continuing, you agree to their use.Got it! Learn More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT