BSE::UI::Affiliate - set the affiliate code for new orders or display a user info page


# display a user's information or affiliate page name

# set the stored affiliate code and refresh to the top of the site

# set the stored affiliate code and refresh to url


This is the implementation of the manpage.



This is called to set the affiliate code.

Requires that an id parameter be supplied with the affiliate code which is stored in the user session. This is then stored in the order record if the user creates an order before the cookie expires. This id can be any string, it need not be a user on the current site.

Optionally, you can supply a r parameter which will be refreshed to after the affiliate code is set. If this is not supplied there will be a refresh to either default_refresh in [affiliate] in bse.cfg or to the top of the site.

If your site url and site secureurl are different then there will be an intermediate refresh to a_set2 to set the affiliate code on the other side of the site. a_set2 will then refresh to your supplied r parameter or its default.

You can also configure which referer header values are permitted in bse.cfg. See [affiliate] in the config manpage for more information.

If [affiliate].set_cookie is set then it is used as the name of a cookie to set to the affiliate id.

If [affiliate].other_cookies is set then it is used as a comma separated list of cookie names to be set from parameters passed to this target. eg. if other_cookies is set to alpha, and an alpha paremeter is assed to this target, then the alpha cookie is set to that value.


Sets the affiliate code for the "other" side of the site.

This should only be linked to by the a_set target.

This does no referer checks.


Display the affiliate page based on a either a user id number supplied in the id paramater, a logon name supplied in the lo parameter or an affiliate name supplied in the co parameter.

This is the default target, so you do not need to supply a target parameter.

The page is displayed based on the affiliate.tmpl template.

The basic user side tags are available, as well as the siteuser tag which gives access to the site user's record.

Be careful about which information you display.


Tony Cook <>