Site Coupons
Article Topics: NATS Admin, Sites
Site Coupons Table

The Site Coupons Table displays general information about each coupon, including:
Coupon: This displays the coupon code, as well as its ID and its status.
Site: The site in which the coupon will be used.
Join Options: The join options that have been enabled for that specific coupon.
Start: The date that the coupon will actively work.
End: The date that the coupon will be deactivated.
Options: This column displays some of the options set for the coupon.
Filtering
To filter the results on the Site Coupons table, click the "Filter" button under the "Add New Coupon" button.

Status: Results can display coupons that are scheduled to start in the Future, coupons that are already Active, and/or Expired coupons.
Coupon Name: The actual coupon code.
Sites: Filter by site shortnames for all sites within your system.
Sorting
To sort the results on the Site Coupons table, click the sorting button next to the "Filter" button.

You can choose to sort your result by the coupon code or by the coupon ID, in either Ascending or Descending order. You can also set how many results will be displayed per page.
Adding a New Coupon
Click the "Add New Coupon" button at the top right of the Site Coupons page to create a new coupon.
To add a new coupon, you will need to fill in the fields on the page. These fields include:
Coupon Code: The coupon code that a surfer will enter when signing up for a site using your coupon.
Please note that once you create a code, the same code cannot be used for any other offer and this code cannot be deleted.
Site: The site that will use this coupon deal. Click on the field and a list will drop down displaying the available sites.
Enabled Options: The join options that will have this coupon enabled. Clicking on the field will display the list of join options for this site that can be used for the coupon deal.
Note: This field will only appear AFTER you have chosen the site.
Start Time: The date and time that the coupon will be valid. The coupon will not be valid before this date and time. This can either be set to "Now" or a specific date and time using the date picker.
End Time: The date and time, as well as any time after, that the coupon will no longer be valid. This can either be set to "Never" or a specific date and time using the date picker.
Program Change: Forces the program of the surfer to change when using the coupon. If the affiliate associated with the surfer is not allowed to sue the program you are changing to, the coupon will not be valid.
Max Redemptions Allowed: The number of redemptions that can be used before the coupon stops being valid.
Options (One Per Member): If this is set, the coupon will not be valid for returning members who have already used it.
Once you are finished, click the "Add Coupon" button.
Modifying Your Join Form
You can choose to offer a Coupon Code System through the Site Templates section by editing your join template for the site you want to offer, or by creating a duplicate join form that can be used by passing the template name in the URL.
If you want to offer the coupon code system for the default join template: Go to the Site Templates section and select the site that you want to offer a coupon code system on. Locate the join template, click the "Actions" button to the right of it, and click "Customize Template". You will be taken to the "Edit Template" page, where you can modify the code for that template.
You can either replace your existing template with the example_join_coupon template by copy/pasting the contents or use it as a reference to make the necessary changes to your existing template. Go to the template list and locate the example_join_coupon template. Click the "Actions" button and then click "Customize Template" to view the smarty code and compare it with your existing join form.
If you want to offer the coupon code system only when a specific variable value is passed in the URL: Go to the Site Templates section and select the site that you want to offer a coupon code system on. Locate the join template, click the "Actions" button to the right of it, and click "Duplicate Template". Another template called join2 will be available to edit. You can tehn use the example_join_coupon template as a reference or copy and replace the join2 template with it.
Go to the template list and locate the example_join_coupon template. Click the "Actions" button and then click "Customize Template" to view the smarty code and compare with your existing join form.
In order to call this new template in your join process, pass the template name in the URL. (For example, adding a &tpl=join2 to your join page link.)
In the example_join_coupon template, a customer can provide their coupon code and hit apply.
If the coupon code is valid, a new join option will be available to select.
Custom Coupon Code Validation
For advanced/custom setups outside of our example template, you can leverage our ajax coupon validation function, ajax_signup_validate_coupon, in your custom scripts.
For example, you can compose a request:
https://<linkdomain>.com/ajax_data.php?function=ajax_signup_validate_coupon&natscode=<natscode>&coupon_code=<coupon_code>Where you would replace:
<linkdomain>with your linkdomain<natscode>with the surfer NATS code<coupon_code>with the coupon code you want to validate
Call Response
The response from the call would be one of these possibilities:
Should NATS have any options to 'unlock' from this coupon code, the output would be in the format of
{"id":"name"}This will be a comma separated list of all available options should there be more than one option.
For example, using a coupon code that unlocks optionid 3 & 4, the response would be:
{"3":"coupon name 1","4":"coupon name 2"}"3" & "4" are the optionids
"coupon name 1" & "coupon name 2" are the option's Join Form Text values.
Should the request be incorrect or disabled, or no remaining redemptions left on the coupon, the response would be:
falseShould your request be invalid for any reason, the response would be:
'ERROR'Related Articles
Site Coupon OverviewLast updated
Was this helpful?