Add Promotions Feature with Push Notifications#60
Merged
roncodes merged 2 commits intodev-v0.4.8from Dec 5, 2025
Merged
Conversation
Frontend Changes: - Added promotions route with push-notifications sub-route - Created PromotionsController with tab navigation - Created PushNotificationsController with form logic - Added promotions template with TabNavigation component - Added push-notifications template with form (title, body, customer selection) - Added Promotions link to sidebar navigation (above Settings) - Exported all routes, controllers, and templates from app directory Backend Changes: - Added sendPushNotification endpoint to ActionController - Created PromotionalPushNotification notification class - Added route for send-push-notification in routes.php - Implemented APN and FCM push notification support Translations: - Added all required translation keys for promotions feature - Added sidebar navigation label - Added form labels, placeholders, help text, and validation messages
Frontend Changes: - Added selectAllCustomers toggle to PushNotificationsController - Updated template with Toggle component for select all option - Customer selector now hidden when select all is enabled - Updated validation to allow select all without individual selection - Form reset now includes selectAllCustomers flag Backend Changes: - Added select_all parameter handling in sendPushNotification method - Backend now queries all customers when select_all is true - Validation updated to allow empty customer array when select_all is true Translations: - Added select-all-customers label - Added select-all-customers-help-text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a complete Promotions feature with Push Notifications functionality for the storefront.
Overview
This feature allows store owners to send promotional push notifications to their customers through a new "Promotions" section in the storefront console.
Frontend Implementation
Routing & Navigation
promotionsroute withpush-notificationssub-route (set as default path/)Controllers
Templates
type="customer")Features
Backend Implementation
API Endpoint
POST /storefront/int/v1/actions/send-push-notificationendpointNotification Class
PromotionalPushNotificationclassController Method
sendPushNotificationmethod toActionControllerTranslations
All translation keys added to
en-us.yaml:Files Changed
Testing Recommendations
Future Enhancements
The promotions route structure is designed to accommodate additional features such as: