Promo code lottery for the Ovalpet website
What has been done:
• Created a WordPress landing page based on a custom template (page-lottery.php) without using the theme's standard headers and footers.
• Implemented a promo code verification function via AJAX requests to the database (wp_ajax_check_promo).
• Developed a system for submitting winners' forms through AJAX requests (wp_ajax_submit_winner_form) without page reload.
• Connected PhpSpreadsheet for automatic importing of promo code lists from Excel/CSV files into the website database.
• Configured responsive layout with different styles for desktops and mobile devices:
• On desktop — compact and stylish appearance.
• On mobile — enlarged input fields, buttons, and text for comfortable use.
• Integrated a custom class autoloader (autoload.php) without using Composer in an environment with limited internet access.
• Optimized UX: added animation for the appearance of the promo code verification result.
• Secured data processing (cleaning via sanitize_text_field(), sanitize_email()).
Technologies:
• WordPress
• PHP (working with AJAX and database)
• CSS3 (responsive layout, animations)
• JavaScript (plain, without libraries)
• PhpSpreadsheet
• HTML5
Result:
• Users can easily verify their promo codes.
• Winners can fill out the prize claim form without page reload.
• The site operates quickly and displays correctly on all devices.
• Administrators can mass-import new promo codes through the admin panel.
• Created a WordPress landing page based on a custom template (page-lottery.php) without using the theme's standard headers and footers.
• Implemented a promo code verification function via AJAX requests to the database (wp_ajax_check_promo).
• Developed a system for submitting winners' forms through AJAX requests (wp_ajax_submit_winner_form) without page reload.
• Connected PhpSpreadsheet for automatic importing of promo code lists from Excel/CSV files into the website database.
• Configured responsive layout with different styles for desktops and mobile devices:
• On desktop — compact and stylish appearance.
• On mobile — enlarged input fields, buttons, and text for comfortable use.
• Integrated a custom class autoloader (autoload.php) without using Composer in an environment with limited internet access.
• Optimized UX: added animation for the appearance of the promo code verification result.
• Secured data processing (cleaning via sanitize_text_field(), sanitize_email()).
Technologies:
• WordPress
• PHP (working with AJAX and database)
• CSS3 (responsive layout, animations)
• JavaScript (plain, without libraries)
• PhpSpreadsheet
• HTML5
Result:
• Users can easily verify their promo codes.
• Winners can fill out the prize claim form without page reload.
• The site operates quickly and displays correctly on all devices.
• Administrators can mass-import new promo codes through the admin panel.