Miva Merchant 5 Module FAQs » Affiliate Manager 5.x (BROK_AFFILIATES5)


Making fields on the "New Affiliate Sign-up" page required

Some of the data I want to collect from new affiliates has to be required. How do I go about this?

Some tokens used in the template for the "New affiliate sign-up" can be made required by adding "req" to the beginning of the token (after the starting %).


So, to make the referal code field required, change the text "referralid" in the token to "reqreferalid".

The tokens will have the exact same form otherwise. If the prospective affiliate does not provide data in the requred field they will be returned to the new affiliate sign-up page.

The message generated by the module (which is configured in the "Error message for "missing fields": field on the "New Affiliate sign-up" tab in the module's admin) will be displayed to the customer via the %error% token.

When a required field is NOT filled out by the new affiliate the module sets an error variable named after the token.  For example, if the token %reqcode% is used in the template but the affiliate fails to provide a code the module will set the variable g.reqcode_Error to 1 (so not filling in a value for the %reqhtmlformat% token would result in the setting of the variable g.reqhtmlformat_Error to 1, etc.).  


You can use this to test for whether or not the field was filled in by using the conditional %begin_if|expression|%...%end_if% token.  For example, setting prompt font to red:

%begin_if|g.reqcode_Error EQ 1|%

<font color="red">Affiliate Code:</font>


<font color="black">Affiliate Code:</font>




Categories for this entry

Last update: 2008-10-22 11:46
Author: Thor
Revision: 1.1

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry