function getContent()
 {
     $partner = new Partner(Application::PARTNER_CODE);
     //compile page array
     $pageValues = array('dictionaryCode' => $this->dictionary->getCode(), 'paymentConfigCode' => $this->provider->getPaymentConfigCode(), 'stripeClientId' => $partner->getConfigValue(PartnerConfig::STRIPE_CLIENTID));
     //done
     return Application::LoadTemplate('stripe-setup.html', $pageValues);
 }
Example #2
0
 function getContent()
 {
     $contactPopup = '';
     if ($this->showContactPopup) {
         $contactPopup = HTML::Tag('script', '$(function() { Site.Contact(); });');
     }
     $pageValues = array_merge(array('contactPopup' => $contactPopup), $this->getDictionaryItems());
     return parent::wrapContent(Application::LoadTemplate('home.html', $pageValues));
 }
 function getContent()
 {
     //compile page array
     $pageValues = array('dictionaryCode' => $this->dictionary->getCode(), 'partnerCode' => Config::Get(Application::CONFIG_PARTNERCODE), 'message' => HTML::Encode($this->message));
     //done
     if ($this->connected) {
         return Application::LoadTemplate('stripe-return.html', $pageValues);
     } else {
         return Application::LoadTemplate('stripe-return-error.html', $pageValues);
     }
 }
Example #4
0
 function wrapContent($content)
 {
     $headers = '';
     //include the page stylesheet if exists
     if (file_exists('css/' . $this->name . '.css')) {
         $headers .= '<link rel="stylesheet" type="text/css" href="/css/' . $this->name . '.css" />' . "\n";
     }
     //include the page script if exists
     if (file_exists('scripts/' . $this->name . '.js')) {
         $headers .= '<script type="text/javascript" src="/scripts/' . $this->name . '.js"></script>' . "\n";
     }
     //values
     $pageValues = array('title' => HTML::Encode($this->getTitle()), 'headers' => $headers, 'content' => $content);
     $pageValues = array_merge($pageValues, $this->getDictionaryItems());
     //return template
     return Application::LoadTemplate($this->baseTemplate, $pageValues);
 }
 function getContent()
 {
     //        $this->provider = new Provider();
     //CORE DETAILS
     //spoken languages
     $spokenLanguages = '';
     foreach ($this->provider->getSpokenLanguages() as $language) {
         if ($spokenLanguages != '') {
             $spokenLanguages .= ', ';
         }
         $spokenLanguages .= HTML::Encode($language->getDictionaryName());
     }
     //IMAGES
     $image = $this->provider->getImage(ProviderImageType::PRIMARY);
     if (is_null($image)) {
         $primaryImage = "We don't have a primary image from you yet, please email us your preferred image, if not we will try to do a screen grab from your website.";
     } else {
         $primaryImage = HTML::Img(Application::GetCdnUri($image, 200, 133));
     }
     $image = $this->provider->getImage(ProviderImageType::SERVICE_LIST);
     if (is_null($image)) {
         $serviceListImage = "You don't have one set so we'll use the primary image.";
     } else {
         $serviceListImage = HTML::Img(Application::GetCdnUri($image, 200, 40));
     }
     //FULFILLMENT
     //hours
     $requestHours = "We'll send you appointment requests ";
     if ($this->provider->getUseRequestOpenRules()) {
         $requestHours .= "using the following schedule:";
         $requestHours .= $this->getHoursTable($this->provider->getRequestHours());
     } else {
         $requestHours .= "whenever you're open using your standard open hours (see above).";
     }
     //sms/email config
     $emailAddress = HTML::Span(HTML::Encode($this->provider->getEmailAddress()), null, 'highlight');
     $smsNumber = HTML::Span(Format::Phone($this->provider->getSmsIdc(), $this->provider->getSmsNumber()), null, 'highlight');
     if ($this->provider->getEmailRequests() && !$this->provider->getSmsRequests()) {
         $requestAction = 'When we receive a request we\'ll send an email to ' . $emailAddress . ' containing the details. ' . 'The email will contain a link to set your availability.';
     } elseif (!$this->provider->getEmailRequests() && $this->provider->getSmsRequests()) {
         $requestAction = 'When we receive a request we\'ll send a text message to ' . $smsNumber . 'containing the details. You will be able to respond to the message or use the link provided to set your availability.';
     } elseif ($this->provider->getEmailRequests() && $this->provider->getSmsRequests()) {
         $requestAction = 'When we receive a request we\'ll send an email to ' . $emailAddress . ' and a text message to ' . $smsNumber . '. ' . 'Both will contain a link to set your availability but you can reply directly to the text.';
     } else {
         $requestAction = 'Currently your profile is not configured to send emails or text messages. ' . 'Until you let us know how you want to receive requests we won\'t be able to put you live in the app.';
     }
     //slot config
     $slotConfig = 'When a customer requests an appointment we will show you ';
     $slotLength = $this->provider->getSlotLength(true);
     $slotStart = $this->provider->getSlotStart(true);
     $slotConfig .= $slotLength;
     $slotConfig .= ' minute slots starting ';
     $slotConfig .= $slotStart == 0 ? 'on the hour.' : 'at ' . $slotStart . ' past the hour.';
     $slotConfig .= HTML::Br() . 'Example: ';
     $slotTime = new DateTime('1974-05-22 13:00');
     $slotTime->modify('+' . $slotStart . ' minutes');
     $periodEnd = new DateTime('1974-05-22 14:00');
     while ($slotTime < $periodEnd) {
         $slotConfig .= HTML::Button(Format::Time($slotTime), null, 'slotButton') . ' ';
         $slotTime->modify('+' . $slotLength . ' minutes');
     }
     //confirmation emails
     if ($this->provider->getSendConfirmationEmail()) {
         $confEmails = 'When a booking is completed by a customer we will send a email to ' . $emailAddress . '.';
     } else {
         $confEmails = 'We will not send you an email when a booking is confirmed.';
     }
     //compile page array
     $pageValues = array_merge(array('dictionaryCode' => $this->dictionary->getCode(), 'partnerCode' => Config::Get(Application::CONFIG_PARTNERCODE), 'verificationCode' => $this->provider->getVerificationCode(), 'phoneNumber' => Format::Phone($this->provider->getPhoneIdc(), $this->provider->getPhoneNumber()), 'openHours' => $this->getHoursTable($this->provider->getOpenHours()), 'spokenLanguages' => $spokenLanguages, 'primaryImage' => $primaryImage, 'serviceListImage' => $serviceListImage, 'fulfillment.requestHours' => $requestHours, 'fulfillment.requestAction' => $requestAction, 'fulfillment.slotConfig' => $slotConfig, 'fulfillment.confEmails' => $confEmails, 'services' => $this->getServices()), Util::PrependArray('provider', $this->provider->toArray()));
     //done
     return Application::LoadTemplate('provider-setup.html', $pageValues);
 }
Example #6
0
 function getContent()
 {
     $pageValues = array_merge(array('langList' => $this->getLangList(), 'dictionaryCode' => $this->dictionary->getCode(), 'partnerCode' => Config::Get(Application::CONFIG_PARTNERCODE), 'zidmiAppUri' => Config::Get(Application::CONFIG_ZIDMIURI), 'backUri' => Application::GetFullUri('/mobile'), 'refererUri' => array_key_exists('HTTP_REFERER', $_SERVER) ? $_SERVER['HTTP_REFERER'] : '', 'landingUri' => array_key_exists('REQUEST_URI', $_SERVER) ? $_SERVER['REQUEST_URI'] : ''), $this->getDictionaryItems());
     return Application::LoadTemplate('mobile.html', $pageValues);
 }
 function getContent()
 {
     $pageValues = $this->getDictionaryItems();
     return parent::wrapContent(Application::LoadTemplate('caravan.html', $pageValues));
 }