§5.7
Affiliates and campaigns
- Phase 10.7b
- theme 1.7.0
| File | Page | Main variables |
|---|---|---|
affiliate.wcp |
My account › Affiliates (panel) | $status (active / restricted / disabled), $status_message, $code, $ref_url, $level {rank, name, since}, $kpis {total, pending, available, reserved, paid, has_reserved}, $perf {clicks, clients, sales, volume}, $tab, $tabs (key, label, url, active), $terms; per tab: Overview $recent, $earnings_url, $next_level, $level_locked, $progress (label, have, need, pct, ok), $benefits (label, value); Earnings $commissions, $commission_filters, $commission_total, $periods, $earnings_note; Links $links (id, label, target, url, clicks, signups, active, toggle_html), $link_limit, $can_create; Withdrawals $requests (id, number, date, method, amount, status, status_label, tone, reference, actions_html), $available, $minimum, $can_withdraw; Payout details $payout {holder, bank, iban masked} or null, $payout_currency; Support $tickets (subject, date, topic, answered, replies); $blocks: link_form_html, withdraw_form_html, payout_form_html, support_form_html, pagination_html, script_html |
affiliate-apply.wcp |
Affiliate application (panel) | $state (new / pending / info / rejected), $message, $applied_on, $reapply_on, $can_apply, $points (title, text), $terms, $summary (while under review: website, channels, iban masked), $blocks['form_html'] (null when the application is not open) |
affiliate-program.wcp |
Program page (public) | $heading, $lead, $steps (title, text), $levels (rank, name, rate — null when rates are hidden —, benefits), $show_rates, $terms, $register_url (null when registration is closed), $login_url |
campaigns.wcp |
Campaigns (public) | $heading, $lead, $enabled, $is_client, $campaigns (id, title, summary, body_html sanitised, image, until, ending, coupon, claimed_html, claim_html, open), $phone_pending, $subscribed, $subscribed_text, $blocks (phone_html, subscribe_html) |
campaign-message.wcp |
Newsletter confirmation result (public) | $heading, $text (plain text), $campaigns_url, $home_url |
unsubscribe.wcp |
Unsubscribe (public, signed link) | $heading, $to (masked), $done, $can_sms, $home_url, $campaigns_url, $blocks['form_html'] (null once unsubscribed) |
Rules
- Amounts, balances, level criteria and commission states are in the core; the theme does no maths. The referred client's name, email, order / invoice / product details, the administrator's note and the full IBAN never reach the theme. The saved IBAN is not written into a form field either.
- Forms and row actions (
*_html) are core parts: endpoints, CSRF, validation, rate limits, reconciliation consent, captcha, honeypot and fill-time checks stay the same. Copy buttons use the core script (script_html) withdata-af-copy. - A coupon code arrives only as the signed-in client's own code (
claimed_html); a visitor gets a "sent" notice with a masked address. - The unsubscribe page unsubscribes with a button, not by opening the link; repeated requests are idempotent. Marketing consent and mandatory notifications are separate.
- In a minimal theme (no template) the core views are used with the same data.