The “Maximum Products per User” plugin provides various settings to customize how purchase limits are displayed and enforced on your WooCommerce storefront.
Message Placeholders
The plugin offers a range of message placeholders you can use to create informative messages for your customers.
These placeholders include
- %limit%: The maximum purchase limit for the product or user.
- %bought%: The number of units the user has already purchased.
- %remaining%: The remaining quantity the user can still purchase.
- %in_cart%: The number of units currently in the user’s cart.
- And more! (See the full list in the article)
Frontend Options Breakdown
- Validate on add to cart: This option determines when purchase limit checks are performed. Enabling it prevents users from adding products to their cart if they exceed the limit.
- Cart notice: Choose how to display limit information in the cart.
- Disable: No message is displayed.
- Enable (as text): A customizable text message is shown.
- Multiple notices: This displays separate notices for each product exceeding the limit in the cart.
- Block checkout page: Prevent users from reaching checkout if they exceed limits. They’ll be redirected to their cart.
- Product limit message: Add messages displaying current product limits on the single product page. Choose from displaying it in the product summary or description.
Customization Options
- Cart notice type: Select the message type (notice, error, or success) for cart limit messages.
- Customer message: Customize the message content displayed to users exceeding limits. You can use shortcodes like [alg_wc_mppu_customer_msg] to dynamically insert relevant information.
- Message content condition: Set specific conditions (e.g., %remaining% == 0) to trigger different messages based on remaining purchase quantities.
- Variations: Control whether limit messages are displayed for product variations.
My Account Tab
- Enable tab: Add a dedicated tab to the user’s “My Account” page, displaying their current purchase limits.
- Tab customization: Configure the tab’s ID, title, icon (using Font Awesome codes), and content. This content can utilize shortcodes like [alg_wc_mppu_user_product_limits] to show the user’s limits for specific products and [alg_wc_mppu_user_terms_limits] for limits based on product categories or tags.
By effectively utilizing these frontend options, you can create a clear and user-friendly experience for your customers while enforcing purchase limits in your WooCommerce store.