Purchase Limit

“Purchase Limit” Documentation by “WPWeb”

Introduction

Easy Digital Downloads Purchase Limit extension allows you specify purchase limits on a per-product basis. Purchase Limits also allows you to limit the dates Downloads are available to be purchased by setting a start and/or end date.

Features:

  • Easy to setup and use.
  • Set purchase limits on per-product basis.
  • Set variable purchase limits for variable products.
  • Date restrictions: Instead of limiting by number you may limit products by date as well you can set a begin date and/or an end date. This allows you to do things like not allow sales until a date, or close all sales at a certain date, or allow sales only between 2 dates.
  • Customize message format: Allows you to set the buy button for sold out products, reflect count of remaining products, date restrictions error message and also allows you to set an error message in case someone makes it to a checkout page for a sold out product.
  • option to notify admin for low stock products.
  • option to notify admin for out of stock products.
  • A clean & user friendly admin UI to manage everything.

Installing the Plugin

  1. The installation of the plugin is just like any other plugin installation for WordPress. Login to your WordPress site and go to Plugins > Add New.
  2. At the Install Plugins Page click on Upload from the top navigation and then click on browse.
  3. Go to the location on your computer where you saved the downloaded plugin zip file and upload this zipped file. You need to unzip the file first to get the plugin zip file.
  4. Now click on Install Now.
  5. Wait until WordPress has uploaded the file. If it's done click on Activate Plugin.
  6. Now you should see a message 'Plugin activated' at the top of the window.

After installing the extension, The Purchase Limit Options section will be added to the Easy Digital Downloads Extensions tab.

Plugin Settings

Plugin Settings

Sold Out Button Label
Enter the text you want to use for the button on sold out items.

Show Remaining Purchases
Specify whether or not you want to display remaining purchase counts on downloads.

Remaining Purchases Label
Enter the text you want to use for the remaining purchases label.

Enable Date Restriction
Specify whether or not to enable restriction by date range.

Global Start Date
Define a global start date.

Global End Date
Define a global end date.

Pre-Date Label
Enter the text you want to use for items which are not yet available.

Post-Date Label
Enter the text you want to use for items which are no longer available.

Sold Out Error Message
When user click add to cart and if that product is sold out, then this error message will show.

Enable Low Stock Notification
Check this box if you wanted to enable email notification for low stock of downloads.

Low Stock Threshold
Set the number of downloads to trigger the low stock notification.

Low Stock Email Subject
Enter the subject line for the low stock notification email. Available template tags:

  • {product_id} - displays the product ID
  • {product_name} - displays the product name
  • {quantity} - displays the quanity of product

Low Stock Email Body
This is the body, main content of the email for low stock notification. HTML is accepted. Available template tags:

  • {product_id} - displays the product ID
  • {product_name} - displays the product name
  • {quantity} - displays the quanity of product

Enable Out of Stock Notification
Check this box if you wanted to enable email notification for out of stock of downloads.

Out of Stock Threshold
Set the number of downloads to trigger the out of stock notification.

Out of Stock Email Subject
Enter the subject line for the out of stock notification email. Available template tags:

  • {product_id} - displays the product ID
  • {product_name} - displays the product name
  • {quantity} - displays the quanity of product

Out of Stock Email Body
This is the body, main content of the email for out of stock notification. HTML is accepted. Available template tags:

  • {product_id} - displays the product ID
  • {product_name} - displays the product name
  • {quantity} - displays the quanity of product

Notification Email
Enter the email address(es) that should receive a notification for low stock / out of stock, each separated by comma.


Metabox Settings

Limit the number of times a download can be purchased

You can specify purchase limits on a per-product basis or on variation basis.

There are two ways to limit the purchase count for downloads:
1. For the entire download when using a single price option
2. For individual price options when using variable prices

If using a single price option, you will have a new input field that looks like this:

Metabox Purchase Limit

If using variable prices, you will have an input field added to each individual price:

Metabox Purchase Limit

When you set a purchase limit, either for the entire product or for individual prices, and that limit is reached (meaning that many customers have purchased it), new customers will no longer be allowed to purchase the item untill you restock the items.

If using variable prices and wanted to set whole product as sold out when any of the variation is out of stock then please check the box "Disable product when any item sold out" as mentioned in the image below:

Metabox Purchase Limit

Single price downloads will have their entire purchase button changed to "Sold Out":

Frontend

Variable price options will display as sold out:

Frontend

If you wish to change the text that is displayed for sold out options, you can go to Downloads > Settings > Extensions > Purchase Limit Options > Sold Out Button Label and set your own text there.

Limit when downloads can be purchased

In order to limit when Downloads can be purchased, you will need to make sure that the Enable Date Restriction option is enabled in global setting.

Once you have configured the settings to your liking, go to the Edit screen for the download you wish to limit the purchase availability for. You will have a new section added to the screen that looks like this:

Metabox Purchase Limit

To limit when the product can be purchased, simply set the Start Date and End Date options to the dates you want the Download to be available for purchase.

Customers will now only be allowed to purchase the product inside of the specified date range.

When download viewed before start date, the purchase buttons will look something like this:

Frontend

When download viewed after end date, the purchase buttons will look something like this:

Frontend

If you wish to change the text that is displayed for sold out options, you can go to Downloads > Settings > Extensions > Purchase Limit Options > Pre-Date Label & Post-Date Label and set your own text there.

Purchase Limit on the Frontend

Add to Cart Errors

If any download's purchase limit over, then it will display error as below before add to cart.

Add to cart error

Checkout Page Errors

If any download's purchase limit over, then it will display error as below before checkout.

Checkout Error

Frontend Submission Compatibility

Backend Configuration

To use EDD Purchase Limit with EDD FES plugin, you need to do some simple setup. Follow the steps below:

  1. Navigate to "EDD FES" > "Submission Form" page in WordPress.
  2. To add "Purchase Limit" on Vendor Dashboard, click on "Prices and Files" option from "Add Submission Form Fields" metabox as of below screenshot.

    EDD FES - Add Price and Files
  3. To add "Start Date" and "End date" on Vendor Dashboard, click on "Date" option from "Add Custom Fields" metabox to add it in submission form as of below screenshot

    EDD FES - Add Start date and End date

    As shown in above screenshot you need to add meta key for start date and end date. Add _edd_prse_lmt_start_date for Start Date and _edd_prse_lmt_end_date for End Date. Also tick checkbox for time for allowing your vendor to selected date & time.

Frontend Behaviour

After following above steps, vendor will be able to see the Purchase limit fields on "Vendor Dashboard" page as of below screenshot

Add to cart error

Product Creation Limit

You can restrict vendor from creating number of products. See the screenshot below

FES product creation limit global setting

You can also set the different Product creation limit for a specific user from user edit page. See the screenshot below

FES product creation limit user setting

Important Compatibility Notes

Does Purchase Limit support the Frontend Submissions extension?
Yes it does!

Does Purchase Limit support the Wishlists extension?
Yes it does!


Need Support
 
Created: January 21, 2016
By: WPWeb
Email: support@wpweb.co.in
If you have any question which you couldn't get answered within our documentation then feel free to email us on support@wpweb.co.in. If you have valid license key then please raise a ticket through our support system http://support.wpweb.co.in. We would also love to hear if you have any new Ideas for making our plugin even more rich with new features, Do visit our Ideas forum. Thank you.