Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

Zen Cart Coupon Single User

Zen Cart Coupon Single User

A module for Zen Cart™ that allows you to restrict the use of a coupon to a single specific customer. Coupon Single User doesn't change the discount; it just determines whether the coupon may be used or not. If the coupon can be used, the behavior is unchanged.

Relevance: Zen Cart™ 1.3.9, 1.5.x. See interoperability for restrictions.

Current Version: 1.3. Occasionally, new features are documented prior to being publicly available; please check the version history to ensure the feature you want is available in your version.

Support Thread: My commercial software is not supported on the Zen Cart forum. Please email me questions instead.

Cost: $20 (Note: this low price covers software only for self-installation.)

Buy Now

Would you like to ask me questions before buying? I'm happy to help likely purchasers make the right decision. Please use my contact form.

Installed Cost: $120.00 (Professional installation by That Software Guy)

Installation Difficulty: Easy

Installation Instructions: click here

Buy: Buy Coupon Single User.
Pre-purchase questions? No problem! Just Please contact me with your question.

FAQ: click here

Interoperability: This mod is based on the standard Zen Cart checkout flow. It is not compatible with other checkout mods such as COWOA, One Page Checkout, Ajax Easy Checkout, etc.

Additional Notes:
  • Coupon Single User doesn't change the discount; it just determines whether the coupon may be used or not.
  • A common request is "please change coupons to only apply to items not on sale or special" - this requirement is not covered by this module. If you want that change, please see my Zen Cart Coupons No Sale or Special mod *or* just upgrade - this feature is built in to Zen Cart 1.5.6 and above.
  • A much more extensive coupon restriction system is available in Coupon Restrictions - Big Chooser Style.
  • When this mod is used, coupon codes may not contain the '@' sign unless they are intended for for single users.

Overview:

Many vendors have special pricing agreements with specific customers. If those agreements are across the board (for all products), a solution such as the built-in Group Pricing module can be used. But if they are only on specific products, it may be desirable to do discounting via coupons, but have those coupons only apply to that specific customer.

Creating a coupon which may only be used by one customer is simple. Just use a coupon code which begins with the customer's email address (the one they login to your cart with). So for the user joe@gmail.com, the coupon code could be joe@gmail.com or joe@gmail.com-21 or joe@gmail.com_product23. It just has to begin with the customer's email address.

As of version 1.2, you can also restrict coupons to domains. So if you want to permit a coupon to only be used by customers with a "nike.com" email address, you would create a coupon code starting with "@nike.com" - so for example, "@nike.com_save_ten" or "@nike.com-bogo".

Installation Instructions:

  1. Back up everything! Try this in a test environment prior to installing it on a live shop.
  2. Copy the contents of the common_files folder to the root directory of your shop.
    Then copy the contents of the appropriate cart-specific version to the root directory of your shop. Choose the one that's closest to but not above yours. 1.5.0 and 1.5.1 should use the 1.5.0 folder, 1.5.2 and 1.5.3 should use the 1.5.2 folder.
  3. If you have made the Zero Dollar Coupon changes before to use no value coupons with Big Chooser, you will need to make it again; they are not included in the copy of ot_coupon.php that ships with this mod.
  4. NOTE: The coupon_code field in Zen Cart is only 32 characters long. So if you create a coupon for user
    scottcwilsonwebsiteservices@gmail.com
    
    it will be saved as
    scottcwilsonwebsiteservices@gmai
    
    For this reason, I recommend expanding the size of the coupon code field, i.e. running the following from Admin > Tools > Install SQL Patches
    ALTER TABLE coupons MODIFY COLUMN coupon_code varchar(255) NOT NULL default '';
    

Restrictions and Interoperability

This mod is based on the standard Zen Cart checkout flow. It is not compatible with other checkout mods such as COWOA, One Page Checkout, Ajax Easy Checkout, etc.


Files

common_files/includes/functions/extra_functions/coupon_single_user.php
<zen cart version>/includes/modules/order_total/ot_coupon.php



Major Versions

  • Version 1.3 - 04/14/19 - Add 1.5.6 support.
  • Version 1.2 - 12/03/18 - Add domain support.
  • Version 1.1 - 08/01/16 - Fix issue with long email addresses, add 1.5.5.
  • Version 1.0 - 03/01/15 - First release

Bugs

  • In version 1.0, the use of a long email address (e.g. scottcwilsonwebsiteservices@gmail.com) would cause the module to not recognize the entered coupon code.

FAQ

Q: Why is there an Coupon Single User in the first place?
A: Zen Cart has some ability to restrict coupon use but not enough for some shopowners.

Q: I just want to stop coupons from applying to items on sale or special. What do I do?
A: If you want that change, please see my Zen Cart Coupons No Sale or Special mod.

Q: I want the ability to place additional restrictions on coupon use. What can I do?
A: Please look at my Zen Cart Coupon Restrictions - Big Chooser Style mod.

I charge a fee of $20 for Coupon Single User. Buy Now.
The fee covers software only; installation is extra if you require help.