Commit Graph

72 Commits

Author SHA1 Message Date
objec
0e10a85248 Change tense on trigger name for consistency
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-29 15:15:50 +04:00
objec
ad901f9c2d Add Receiving type to receiving_complete event trigger
- The type isn't found in the db, so send it to plugins.
- Update documentation

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-21 13:13:48 +04:00
objec
388c8ad631 Add Receivings event trigger
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-21 12:47:53 +04:00
objec
705c61b48c Update documentation
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-20 23:09:58 +04:00
objec
50eead4da4 Updating customers save triggers to pass an array
- Customer CSV import will potentially have many customerIds to send to.
- Rework mailchimp onCustomerSaved() to receive an array of ids instead of a single ID

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-20 19:41:38 +04:00
objec
4c7ac7b5d0 Thin contract triggers
- send only bare required data to trigger callbacks.
- Plugins for now access model, library and helpers but in the future access REST APIs only for data.

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-20 19:27:36 +04:00
objec
bed8a1c34d Error checking and validation
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-20 19:05:23 +04:00
objec
10588867c4 Update configuration form to improve the UI
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-20 17:57:34 +04:00
objec
f650f17181 Push missing language strings file changes and HomeTest
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-19 16:16:27 +04:00
objec
445a506ea8 Plugin Changes
- Remove unneeded language line from MailchimpPlugin
- Update README.md
- Normalized fields_required_message

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-18 16:08:33 +04:00
objec
e5fdea85f3 Update README.md to clarify plugin
Signed-off-by: objec <objecttothis@gmail.com>
2026-05-05 16:00:15 +04:00
objec
cd91ac3ff3 Fix bugs
- Add missing `MailchimpPlugin.` prefix to lang() calls.
- Do not subscribe customer if consent is not true.
- Escape output in tabular_helper.php
- Removed testConnection() as unneeded code
- Fix activity count logic
- Whitelist Sort Column Headers for Plugins.php
- Store encrypted API key as base64 instead of raw binary to prevent truncation
- Rollback on batchSave partial failure.
- Remove dead code.
- Disable plugin before uninstalling it.
- Fix getPluginSettings() internal key leak
- Add action column to plugin headers function
- Automatically add grant to all admins in case person_id 1 is not active

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-05 15:06:04 +04:00
objec
4d266c9b5e Correct mailchimp deletion issues and response codes
- Add function to correctly interpret subscription status from the API
- Error validation on customer deletion.
- Corrected PHPDoc to reflect reponse codes.
- Pass complete data to synchronize subscription function
- Rework request function to properly interpret response
- Add data to trigger
- Unsubscribe customer before deleting them from Mailchimp to prevent error.

Signed-off-by: objec <objecttothis@gmail.com>
2026-05-05 13:04:30 +04:00
objec
f71af765f8 Add missing customer_tab_nav file for MailchimpPlugin
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-30 14:12:55 +04:00
objec
4246a915c4 - Correct README.md reference to views and information about renderView()
- Fix the output of pluginContent in the pluginHelper
- Register view injection events
- Correct the parameter type in getMailchimpViewData
- Correct the statusOptions creation business logic
- Removed unnecessary view injection point
- Corrected which variable was passed to the customer_saved event
- Assigned $customer_data['person_id'] on customer update
- Added renderView() function to BasePlugin.php

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-30 14:11:54 +04:00
objec
d2d0c8bf37 Add routes file to MailchimpPlugin to handle custom routes
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-30 11:23:56 +04:00
objec
6c55526479 Settings fixes for MailchimpPlugin
- Add PHPdoc including @noinspection to prevent AJAX function from causing a warning.
- Add lists array to settings retrieval in MailchimpPlugin.php
- Close modal window on Submit
- Don't check API key on empty value

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-30 11:22:59 +04:00
objec
fe331c34dd Mailchimp Bugfixes
- Update README.md to reflect information about routes
- Add registerAllNamespaces() function to correctly load plugin  namespaces
- center text in modal title
- Properly decrypt the api key
- Refactor getAllLists to getLists
- Naming simplification of strings when mailchimp_ is redundant or unnecessary
- Do not attempt to decrypt a plaintext api_key pasted into the form
- Register namespaces early on in system init

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 18:25:21 +04:00
objec
6630fb56f6 Fix language discovery bugs
- Remove unneeded keys from Config.php
- Remove unneeded lang() function override from BasePlugin.php
- Update README.md to reflect changes to language loading
- Correct language file string
- Correct lang() function calls to remove `$this->` from the call since we aren't overriding it anymore.
- Add code to correctly register namespace so that languages load.
- Fix plugin view render bug

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 16:31:14 +04:00
objec
2f48e0499f Plugin discovery bugfix
- Fix namespace typo causing plugin to not load
- Code cleanup

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 15:20:08 +04:00
objec
cbabe1d56c Bugfix: Fix recursive view call
- Fix bug causing all plugin views to be rendered on every page.
- Simplify code
- Refactor manage.php view to use bootstrap tables

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 15:02:48 +04:00
objec
8c1c9d85dc Language Refactor
- Correct key name in language files.
- Update translations.
- Correct key usage.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 14:54:16 +04:00
objec
32997d48c0 Fix persistence problem with plugin registration.
- Move the PluginManager creation to a service.
- Move plugin discovery to creation.
- Create static discovery and namespaces variables in the PluginManager.php library
- Refactor persistent namespace declarations
- Refactor redundant code to private function.
- Remove whitespace
- Remove enable setting from MailchimpPlugin. That is handled by the PluginManager.php
- Update Events.php to call the pluginManager service
- Correct typo in enabled setting for BasePlugin to accurately reflect the database naming.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-29 10:31:04 +04:00
objec
1a9e84bd37 Fix bugs preventing plugins from working
- Move Plugins controller and rename to reflect the rest of the code.
- Lazy load event registrations.
- Autoload classes so plugins are discovered.
- Remove TODO
- Remove unneeded use statement
- Correct typo in namespace of MailchimpConnector Library
- Add class names to autoload class map
- Move Plugin discovery to post_controller_constructor event

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-23 16:26:50 +04:00
objec
c796b52c22 Correct mistakes in plugin code related to loading.
- Add plugin module to list of required admin modules.
- Don't trigger autoloader in plugin discovery.
- Delete plugins_config.php which is no longer needed for managing plugins.
- Remove references to plugins_configuration in config views.
- Correct the form submission URL path.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-23 12:42:34 +04:00
objec
f863be68f9 Plugins migration
- Remove blank line
- Add plugin SVG icon to gulpfile.js
- Add plugin details to SQL migration script

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-23 11:25:21 +04:00
objec
54c476a498 MailchimpPlugin simplifications.
- Removed use statements
- Refactored key name
- Refactored MailchimpLibrary.php functions
- Removed
- Refactored function name for clarity
- Removed calls to model functions
- Corrected alignment of `=>` in language files

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-22 18:32:44 +04:00
objec
ec139c477a Removed unnecessary models since information will be fetched directly from the mailchimp API each time.
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-22 17:00:34 +04:00
objec
bae361c637 Langauge file changes
- Added phrase to MailchimpPlugin.php language files
- updated calls to lang to call the correct phrases

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-22 15:32:05 +04:00
objec
dcfdc212da Language Strings refactor
- Add strings representing subscription statuses.
- Resort strings alphabetically per standard practice.
- Aligned strings.
- Corrected es_ES string error

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 18:21:03 +04:00
objec
c217fd770c Language Strings refactor
- Remove the `mailchimp_` prefix from strings as it is redundant.
- Replace `"` with `'` to avoid calling the PHP string parser when not needed.
- Correct the French translation of a phrase for the tooltip.
- Resort strings alphabetically.
- Add strings representing subscription statuses.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 16:37:09 +04:00
objec
6ef6f49693 StatusOptions
- Generate StatusOptions View Data from enum rather than hardcode.
- Add language strings

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 16:20:44 +04:00
objec
eae6417f97 Changed Mailchimp Subscription Status Options to be sent to the view not hardcoded.
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 15:50:05 +04:00
objec
4cfff5388c Refactor Customer Tab View
- Add variables for correct type hinting.
- Refactor lang() calls to call the correct file

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 15:32:38 +04:00
objec
a77b95f0cc Update MailchimpPlugin Modeling
- made updated_at and deleted_at to be nullable
- Add getter for mailchimpId
- Changed primaryKey to customer_id so that baseModel functions could be used natively rather than writing custom code.
- Removed unneeded getByCustomerId() since BaseModel->find() can be used now.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 15:27:11 +04:00
objec
506cded6e9 Update MailchimpLibrary.php
- Corrected access of settings
- Use SubscriptionModel->find() from BaseModel instead of custom function
- Add deleteSubscription() function
- Removed registration for customer_loaded event since it isn't needed for this plugin
- Refactored out customer data injection to library function
- Removed settings parameter from synchronizeSubscription() since these values are loaded when library is instantiated.
- Refactored delete subscription callback to call library function.
- Remove functions that aren't necessary
- added lang() implementation todo

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 15:24:34 +04:00
objec
2639a8b212 Update MailchimpLibrary.php
- Corrected access of settings
- Use SubscriptionModel->find() from BaseModel instead of custom function
- Add deleteSubscription() function

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 14:52:08 +04:00
objec
f6106e7ead Add mailchimp controller class
- AJAX called checkMailchimpApiKey function
- getLists helper function

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 14:50:21 +04:00
objec
202c016dd8 Remove MailchimpController class
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 12:31:22 +04:00
objec
0e5ba88f6c MailchimpLibrary.php rework
- Rework source for mailchimp settings
- Added synchronizeSubscription() function

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 12:28:21 +04:00
objec
d88cf54f99 MailchimpPlugin.php rework
- Remove unneeded using statements
- Register Customer View Tab to MailchimpPlugin
- Create callback function
- Refactor business logic to Library Code
- Refactor naming of Mailchimp_lib to MailchimpLibrary for PSR compliance

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 12:26:42 +04:00
objec
2f200b47c6 Add getByCustomerId method to SubscriptionModel.php
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 12:23:52 +04:00
objec
f819bc92f8 Add casts to Subscription entity
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-21 12:15:44 +04:00
objec
db180d134e Views
- Added injection point into Customers Controller.
- Registered event listeners for the view hook.
- created initial customer tab view.
- Removed unnecessary comments

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-18 00:13:55 +04:00
objec
edd97a3c78 Modeling Data
- Subscription table modeling
- Subscription status table modeling

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-18 00:11:35 +04:00
objec
d73bfd39f6 Refactoring
- PSR compliance refactors
- Added Events trigger for customer save in Customers.php controller
- Temporarily moved code over to the Mailchimp plugin
- Replaced == with === to prevent type coercion.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-17 17:01:24 +04:00
objec
d9d93e0d9d Mailchimp PLugin
- Corrected grammar in PHPdocs
- PSR refactoring of local variables and code blocks
- Moved MailchimpPlugin.php to its own plugin folder
- Refactored out mailchimp code to the plugin
- Created customer_loaded event trigger

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-16 17:29:46 +04:00
objec
bfb4ad4617 Licensing
- Added LICENSE
- Updated README.md to reflect that Plugins need to contain LICENSE

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-15 16:16:49 +04:00
objec
00cd13f735 Move Customer Mailchimp business logic to Mailchimp Plugin space
- Create MailchimpController class
- Refactor Mailchimp_lib class to MailchimpLibrary
- Deleted useless PHPdocs
- Refactored MailchimpConnector class into its own library class
- Refactored out hungarian notation
- PSR compliant naming changes

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-15 15:20:42 +04:00
objec
43972b8f0e Moved Mailchimp_lib.php to the MailchimpPlugin
Signed-off-by: objec <objecttothis@gmail.com>
2026-04-14 18:14:47 +04:00