public function onSystemRegisterEmails($event) { if (class_exists('\\Mailer\\Factory')) { \Mailer\Models\Events::register('shop.new_order', ['title' => 'Thank you for your order', 'copy' => 'Sent to customer when new order is placed', 'app' => 'Shop'], ['event_subject' => 'Thank you for your order', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/new_order.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/new_order.php')]); \Mailer\Models\Events::register('shop.new_order_notification', ['title' => 'New Order Created', 'copy' => 'Sent to admins when a new order is placed', 'app' => 'Shop'], ['event_subject' => 'New Order Notification', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/new_order_notification.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/new_order_notification.php')]); \Mailer\Models\Events::register('shop.abandoned_cart', ['title' => 'Shopping Cart Abandoned', 'copy' => 'Sent after some time of leaving a cart open', 'app' => 'Shop'], ['event_subject' => 'Hey forget something?', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/abandoned_cart.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/abandoned_cart.php')]); \Mailer\Models\Events::register('shop.review_products', ['title' => 'Product Review Request', 'copy' => 'Sent some time after order is placed and askes for reviewing products', 'app' => 'Shop'], ['event_subject' => 'Thank You For Your Order', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/review_products.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/review_products.php')]); \Mailer\Models\Events::register('shop.new_giftcard', ['title' => 'New Gift Card', 'copy' => 'Sent when gift card fulfilled', 'app' => 'Shop'], ['event_subject' => 'New Gift Card', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/new_gift_card.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/new_gift_card.php')]); \Dsc\System::instance()->addMessage('Shop added its emails.'); } }
public function onSystemRegisterEmails($event) { if (class_exists('\\Mailer\\Factory')) { $model = new \Mailer\Models\Events(); \Mailer\Models\Events::register('users.validate_email', ['title' => 'New User - Email Validation', 'copy' => 'Sent when validating a newly-registered email address', 'app' => 'Users'], ['event_subject' => 'Please verify your email address', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/validate_email.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/validate_email.php')]); \Mailer\Models\Events::register('users.password_reset_request', ['title' => 'Password Reset Request', 'copy' => 'Sent when a user requests a password reset.', 'app' => 'Users'], ['event_subject' => 'Password reset request', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/password_reset_request.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/password_reset_request.php')]); \Mailer\Models\Events::register('users.password_reset_notification', ['title' => 'Password Reset Notification', 'copy' => 'Sent when a user resets their password', 'app' => 'Users'], ['event_subject' => 'Password reset notification', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/password_reset_notification.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/password_reset_notification.php')]); \Mailer\Models\Events::register('users.verify_change_email', ['title' => 'Email Change Verification', 'copy' => 'Sent when a user changes their email address', 'app' => 'Users'], ['event_subject' => 'Please verify your email address', 'event_html' => file_get_contents(__DIR__ . '/Emails/html/verify_change_email.php'), 'event_text' => file_get_contents(__DIR__ . '/Emails/text/verify_change_email.php')]); \Dsc\System::instance()->addMessage('Users added its emails.'); } }
/* ?><a class="btn btn-link" href="javascript:void(0);" onclick="ToggleAdvancedFilters();">Advanced Filters</a> */ ?> </li> <li> <select name="filter[publication_status]" class="form-control" onchange="this.form.submit();"> <?php echo \Dsc\Html\Select::options(array(array('text' => 'All Statuses', 'value' => ''), array('text' => 'Published', 'value' => 'published'), array('text' => 'Unpublished', 'value' => 'unpublished')), $state->get('filter.publication_status')); ?> </select> </li> <li> <select name="filter[event_id]" class="form-control" onchange="this.form.submit();"> <option value="">Select an Event</option> <?php foreach (\Mailer\Models\Events::find() as $event) { ?> <option value="<?php echo $event->id; ?> " <?php if ((string) $event->id == (string) $state->get('filter.event_id')) { echo "selected"; } ?> > <?php echo $event->app; ?> | <?php echo $event->title; ?>