Maximum Purchase for WP E-Commerce


Plugin Description

Maximum Purchase for WP E-Commerce (free) allows you to set up maximum purchase rules for products in your WP E-commerce 3.8+ store. Purchases must meet these rules to proceed to checkout payment.

In the free plugin, rules search by Role/Membership or 'Not logged in' status.     (see the Pro Plugin for all search options).

If a purchase in your store fails a maximum purchase rule, an error message appears at the top of the checkout page, identifying the error situation and rule requirements. The customer must resolve the error, before the purchase can be completed.

Lifetime Purchase Limit by Customer

Lifetime purchase limit is a maximum purchase rule option, which allows you use all rule criteria to set cumulative lifetime limits on purchases by customer. Purchasers are identified by optional criteria, including IP addess, email address, billto name, billto address, shipto name, shipto address. This powerful option is available in   Maximum Purchase Pro.

Changelog Info
  • 1.03 - 2012-12-18 * Lifetime purchase limit option support changes added. Fix to 'nuke' function on options page => repairs the situation where the nuke rules button is hit, and the options record goes away.
  • 1.02 - 2012-10-24 * Upgrade reporting wording, * upgrade currency symbol list, * moved activation hook to is-admin
  • 1.01 - 2012-10-08 * Fix to Table Format Error Reporting in 'Each' and 'Any' mode
  • 1.0 - 2012-09-12 * Initial Public Release

Tutorials

.

Set Up a Basic Maximum Purchase Rule

How does the rule choose what to look at in the cart? [Search Criteria]

  • By Role/Membership

(all other possible criteria available in the Pro Plugin)

Role/Membership is used within Wordpress to control access and capabilities, when a role is given to a user. Wordpress assigns certain roles by default such as Subscriber for new users or Administrator for the site's owner. Roles can also be used to associate a user with a pricing level. Use a role management plugin like User Role Editor to establish custom roles, which you can give to a user or class of users. Then you can associate that role with a Maximum Purchase Rule. So when the user logs into your site, their Role interacts with the appropriate Rule.

How is the rule applied to the cart search results? [Rule applied to]

  • All – work with the total of the units/prices
  • Each – apply the rule to each product in the Rule Population
  • Any – Same as each, but limits the rule testing to the first X number of products

Does the Rule apply to Units Quantity amount or Price amount?

  • Units Quantity Amount
  • Price Amount

Here’s a sample of a maximum purchase rule:

  • If the purchaser is a Subscriber - [search criteria:Subscriber]
  • The maximum total for all purchases - [rule applied to: all]
  • Must be less than $20. - [price amount: $20]

Set Up a 'Cart Contents' Rule

Use Cart Search Criteria of 'Not Logged In'

  • in Cart Search Criteria Box
  • in membership List by Role Box
  • Select 'Not logged in (just visiting)'

With this set up, the rule will act as if it were an 'Apply to all products in the cart' selection, for any customer who is not logged in. This will be very useful, as many stores do not require a login to make a purchase. Equally, similar rules can be set up for specific roles.


Documentation

Maximum purchase rules are applied at checkout time. They are a tested against the cart contents, and if the purchase fails a rule, an error message is produced. And even if the 'continue to payment button' is selected, checkout won't proceed until the error is resolved.

Plugin Requirements

  • WP E-Commerce 3.8+
  • WordPress 3.3+
  • PHP 5+

Plugin Options

If a purchase in your store fails a maximum purchase rule, an error message appears at the top of the checkout page, identifying the error situation and rule requirements. The customer must resolve the error, before the purchase can be completed.

Show Error Messages in Table Format

Error message formatting is offered in text style by default (value="no"), and in table format as an option.

Show Error Messages Just Before Checkout Products List

The error message can be show in two places - just before the checkout products list, and just before the checkeout address area. This option sets the error message to display before the products list.

Show Error Messages Just Before Checkout Products List - HTML Selector

For the Product area error message, this option supplies the ID or Class HTML selector this message appears before. This selector would appear in your theme"s checkout area, just above the products display area. Be sure to include the "." or "#" selector identifier before the selector name.
Default value = ".checkout_cart".

Show Error Messages Just Before Checkout Address List

The error message can be show in two places - just before the checkout products list, and just before the checkeout address area. This is the 2nd second option showing the error message, and becomes particularly useful if your theme's checkout is a multi-pane design.

Show Error Messages Just Before Checkout Address List - HTML Selector

For the Address area error message, this option supplies the ID or Class HTML selector this message appears before. This selector would appear in your theme"s checkout area, just above the products display area. Be sure to include the "." or "#" selector identifier before the selector name.
Default value = ".wpsc_checkout_forms".

Show Rule ID in Error Message

There is an option to show the rule id in the error message. This is useful in testing to track error messages back to their originating rule.

Show Product Category Names in Maximum Purchase Error Message (Pro Only)

This (Pro Only) option allows the display of Product Category names in the error message, if error message criteria is included. This more full explanation of the rule criteria will help the customer resolve any errors.

Show Rule Category Names in Maximum Purchase Error Message (Pro Only)

This (Pro Only) option allows the display of Maximum Purchase Rule Category names in the error message, if error message criteria is included. This more full explanation of the rule criteria will help the customer resolve any errors.

Custom Maximum Purchase Error Message CSS, used at checkout time

There's an option to customize the css of the error message format chosen. Simply place the css in the option field, and it will override the standard css.

Select a Currency Sign

Error message currency sign can be selected from the options available.

Apply More Than 1 Rule to Each Product

Do we apply multiple maximum purchase rules to EACH product in the cart? If not, we apply the FIRST rule we process which applies to a given product. It is ***Strongly Suggested*** that this option be set to "NO", as otherwise the compounding error messages could be quite confusing for the ecommerce customer.

Test Debugging Mode Turned On

The final option turns on the debugging mode. This mode will print to screen all of the structures used in rule testing and error message creation. Only use during testing.


The killer buttons at the bottom of the options screen

Use these buttons wisely. Great to clear out test rules or repair errant structures. Very powerful, handle with care.


Video Tutorials


Installation Instructions

Download and install from WordPress.Org

  1. Use the built-in WordPress plugin installer to download, install and activate the Free version of the plugin hosted at wordpress.org/extend/plugins/maximum-purchase-for-wp-e-commerce
  2. Please Note: WP E-Commerce 3.8 or above is needed to run this plugin successfully.


Tips and Tricks


Max Rule Type - Cart or Lifetime

Selecting a Max Rule Type of "Cart" applies the rule to the current cart only. Selecting "Lifetime" is a Pro-only option (Maximum Purchase Pro), which allows you use all rule criteria to set cumulative lifetime limits on purchases by customer. Customers are identified by optional criteria, including IP addess, email address, billto name, billto address, shipto name, shipto address. You can select which of these optional criteria to use for comparison on the Options screen.


All Products in Cart - a Venn Diagram

A diagram representing how the 'all products in cart' search criteria works with the cart itself.


Role Setup and Usage in Search Criteria

Role Setup

Role/Membership is used within Wordpress to control access and capabilities, when a role is given to a user. Wordpress assigns certain roles by default such as Subscriber for new users or Administrator for the site's owner. New Roles with unique names can be created using a role manager plugin. (As these new new roles are used for search criteria rather than access level, the new roles can have the lowest possible access level.)

Role Usage

Roles have a separate use as well. Think of it as 'logged in as ...' or 'not logged in'. So if a user is 'not logged in', that means the rule applies to anything they buy. Converserly, your store can used the logged in state to separate out tiers of rules. If the user is 'logged in as XXX', any rule with Role XXX in the rule search criteria will be tested against that user's cart contents.

When roles are selected as the sole group criteria, "OR" must be selected in the "And/OR" relationship box just to the left of the Role selection box. Otherwise an error message will be produced, requiring that a category be selected.


All in Population - Error Message Results

When "all in population" is chosen, the rule acts on the totals of the population found to match the rule search criteria.


Each/Any in Population - Error Message Results

When "each in population" or "any in population" is chosen, the rule acts on each individual product in the population found to match the rule search criteria.


Fix Options Setup Page Problems (Reset to Defaults)

If the options setup is irretrievably messed up, there's an easy fix solution:

  • Take a snapshot of your existing setup, to allow you to recover any settings you'd like from the current setup.
  • Find the "Reset to Defaults" button (just below the "save changes" button)
  • Hit the button and all will be returned to default settings.
  • Re-apply those settings updates you desire.


Show all Internal Data in Debugging Mode

If there are any issues that pop up during testing your Maximum Purchase rules, you have the option of turning on Debugging Mode. With Debugging Mode on, all of the rule, cart and decision structures used internally during processing are printed to the screen.

Screenshots




Leave a Comment

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

*


*