Files
esun3d/cms-pages/README-ai-mascot-contest.md
2026-09-15 10:35:56 +08:00

1.9 KiB

AI Mascot Contest CMS page

Magento Admin configuration

Create or edit the CMS page with these values:

  • Page identifier: ai-mascot-contest
  • Layout: Page -- Custom Full Width
  • Custom Layout Update: AiMascotContest
  • Content: copy the contents of cms-pages/ai-mascot-contest.html in HTML mode

The page identifier must remain ai-mascot-contest because the selectable layout file name is tied to that identifier.

The media files are stored in pub/media/ai-mascot-contest/. Deployments that do not include pub/media must upload that folder separately while keeping the same file names.

Registration tracking

Register Now points to ai-mascot/register/start. The controller writes the server-defined campaign code to the customer session for up to two hours and then redirects to Magento's standard registration page. No campaign identifier is accepted from the URL or registration form.

After successful registration, the normalized email is stored in esun_campaign_registration. Unique constraints on campaign/customer and campaign/email make the write idempotent.

Example report query:

SELECT email, customer_id, website_id, store_id, registered_at
FROM esun_campaign_registration
WHERE campaign_code = 'ai_mascot_2026'
ORDER BY registered_at DESC;

The same data is available in Magento Admin under:

Customers > AI Mascot Participants

The grid supports email, customer ID, website, store view, and registration date filters. Its Export menu provides both CSV and Excel XML. If rows are selected, only those rows are exported; otherwise the current filtered result is exported.

Deployment

Run the normal Magento deployment commands after releasing the module and theme files. At minimum, the database schema must be applied and caches refreshed:

php bin/magento setup:upgrade
php bin/magento cache:flush

Production mode also requires the project's normal DI compilation and static content deployment steps.