From ef0c9eb6732dc581163e4b08d668bf65ef83008d Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 18 Jul 2017 11:06:01 -0400 Subject: [PATCH] Added the shortcode/view/model for registrationCart --- .../front/registrations/registrationCart.php | 83 +++++++++++++++++++ setup/shortcodes.php | 10 +++ setup/validActions.php | 2 + .../front/registrations/registrationCart.html | 0 4 files changed, 95 insertions(+) create mode 100644 models/front/registrations/registrationCart.php create mode 100644 views/front/registrations/registrationCart.html diff --git a/models/front/registrations/registrationCart.php b/models/front/registrations/registrationCart.php new file mode 100644 index 0000000..166addd --- /dev/null +++ b/models/front/registrations/registrationCart.php @@ -0,0 +1,83 @@ +accountID = ($_REQUEST['account'] - 0); + + if ($this->accountID <= 0) { + $this->accountID = false; + } + } + + $view = 'registrationCart'; + + switch ( $option ) { + + } + + // Compile template data + $templateData = array( + + ); + // Return status, any suggested view, and any data to controller + return array( + 'status' => true, + 'modelRedirect' => false, + 'view' => 'front/registrations/' . $view . '.html', + 'data' => $templateData + ); + + } + } diff --git a/setup/shortcodes.php b/setup/shortcodes.php index 499f741..cb9b811 100644 --- a/setup/shortcodes.php +++ b/setup/shortcodes.php @@ -127,6 +127,16 @@ $glmMembersRegistrationsShortcodes = array( 'member_only' => false, ) ), + 'glm-registration-cart' => array( + 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'menu' => 'registrations', + 'action' => 'registrationCart', + 'table' => false, + 'attributes' => array( + 'id' => false, + 'member_only' => false, + ) + ), ); $glmMembersRegistrationsShortcodesDescription = ''; diff --git a/setup/validActions.php b/setup/validActions.php index 64ae648..208e067 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -80,6 +80,8 @@ $glmMembersRegistrationsAddOnValidActions = array( 'registrationSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, 'registrationAccountSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, 'registrationSelect' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'registrationCheckout' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, + 'registrationCart' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG, ) ), ); diff --git a/views/front/registrations/registrationCart.html b/views/front/registrations/registrationCart.html new file mode 100644 index 0000000..e69de29 -- 2.17.1