Changeset 1567572
- Timestamp:
- 01/04/2017 03:03:18 AM (9 years ago)
- Location:
- pushpress-integration/trunk
- Files:
-
- 6 edited
-
css/pushpress.css (modified) (1 diff)
-
inc/wp_pushpress_model.php (modified) (6 diffs)
-
inc/wp_pushpress_shortcode.php (modified) (2 diffs)
-
pushpress.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/frontend/shortcode_schedules.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pushpress-integration/trunk/css/pushpress.css
r1498520 r1567572 148 148 149 149 .wp-pushpress .schedule-name{ 150 width: 2 4%;150 width: 20%; 151 151 } 152 152 .wp-pushpress .schedule-hour{ 153 width: 2 4%;153 width: 20%; 154 154 } 155 155 .wp-pushpress .schedule-title{ 156 width: 2 4%;156 width: 20%; 157 157 } 158 158 .wp-pushpress .schedule-type{ 159 width: 24%; 159 width: 20%; 160 } 161 .wp-pushpress .schedule-spots{ 162 width: 18%; 160 163 } 161 164 .wp-pushpress .schedule-button{ -
pushpress-integration/trunk/inc/wp_pushpress_model.php
r1532751 r1567572 351 351 $doy = $doyCurrent + $i; 352 352 353 $cache_key = "pp_client_schedule_ " . $doy . "_" . $year . "_class";353 $cache_key = "pp_client_schedule_2" . $doy . "_" . $year . "_class"; 354 354 355 355 if (! $calendar = get_transient($cache_key)){ … … 360 360 'type' => 'Class', 361 361 )); 362 363 362 set_transient($cache_key, $calendar, 600); 364 363 } 365 364 366 365 foreach ($calendar['data'] as $item) { 366 367 367 if (($item->doy) >= $doy) { 368 368 $timestamp = strtotime("$year-01-01 + $doy days 00:00:00"); … … 370 370 $schedulesList[$timestamp][$item->uuid]['end_timestamp'] = $item->end_timestamp; 371 371 $schedulesList[$timestamp][$item->uuid]['title'] = $item->title; 372 $schedulesList[$timestamp][$item->uuid]['attendance_cap'] = $item->attendance_cap; 372 373 373 374 $lastName = substr($item->coach_last_name, 0, 1); … … 378 379 $status['name'] = 'Reservation available'; 379 380 $status['class'] = 'schedule-reservation'; 381 if ($item->attendance_cap) { 382 $status['spots_available'] = $item->attendance_cap - $item->registration_count; 383 } 384 else { 385 $status['spots_available'] = -1; 386 } 380 387 } else { 381 388 $status['name'] = 'Class full'; 382 389 $status['class'] = 'schedule-full'; 390 $status['spots_available'] = 0; 383 391 } 384 392 $schedulesList[$timestamp][$item->uuid]['status'] = $status; … … 758 766 if( !$settingsObj = get_transient( 'pp_client_settings_metrics' ) ){ 759 767 try { 760 $settingsObj = Pushpress_Client::settings('metrics'); 768 $settingsObj = Pushpress_Client::settings('metrics'); 761 769 } 762 770 catch (Exception $e) { 763 771 $settingsObj = array(); 764 772 } 765 set_transient( 'pp_client_settings_metrics', $settingsObj, 3600 ); // 1 hour cache 766 } 767 773 set_transient( 'pp_client_settings_metrics', $settingsObj, 60 ); // 1 minute cache 774 } 768 775 769 776 $metrics = array(); 770 777 foreach ($settingsObj as $item) { 771 778 if (is_array($item)) { 772 foreach ($item as $v) { 779 foreach ($item as $v) { 773 780 $metrics[$v['name']] = $v['value']; 774 781 } 782 } 783 else { 784 $metrics[$item['name']] = $item['value']; 775 785 } 776 786 } … … 778 788 $metrics['average_lead_value'] = 0; 779 789 } 790 780 791 return $metrics; 781 792 } -
pushpress-integration/trunk/inc/wp_pushpress_shortcode.php
r1532751 r1567572 77 77 $timeNow = LocalTime::toGM($client); 78 78 } catch (Exception $e) { 79 echo '<p>Could not show the pushpress Workouts. Please check with Administrator.</p>';79 echo '<p>Could not show the PushPress Schedule. Please check with Administrator.</p>'; 80 80 return; 81 81 } … … 113 113 $timeNow = LocalTime::toGM($client); 114 114 } catch (Exception $e) { 115 echo '<p>Could not show the pushpress Workouts. Please check with Administrator.</p>';115 echo '<p>Could not show the PushPress Workouts. Please check with Administrator.</p>'; 116 116 return; 117 117 } -
pushpress-integration/trunk/pushpress.php
r1542137 r1567572 1 <?php1 <?php 2 2 /** 3 3 * @package WP-PushPress 4 * @version 1.5. 84 * @version 1.5.9 5 5 */ 6 6 /* … … 9 9 Description: Easily integrate your workouts, calendar, products, membership plans, events and more with your Wordpress blog! This plugin is a free add-on for existing PushPress clients. See https://pushpress.com for more info. 10 10 Author: PushPress, Inc 11 Version: 1.5. 811 Version: 1.5.9 12 12 Author URI: https://pushpress.com 13 13 */ 14 14 define('PUSHPRESS_LOCAL', FALSE); 15 15 define('PUSHPRESS_DEV', FALSE); 16 define( 'PP_PLUGIN_VERSION', '1.5. 8');16 define( 'PP_PLUGIN_VERSION', '1.5.9'); 17 17 define( 'PUSHPRESS_ERROR_REPORT', 0 ); 18 18 define( 'PUSHPRESS_BUTTON_CLASS', 'pushpress-button-class-' . rand(0, 10000)); … … 267 267 } 268 268 function update_lead_info(){ 269 269 270 // lead_page_phone_required 270 271 $data = $this->model->get_leads(); … … 518 519 519 520 $metrics = $this->model->facebook_metrics(); 521 520 522 $value = $metrics['average_lead_value']; 521 523 $currency_iso = $this->client->currency_iso; -
pushpress-integration/trunk/readme.txt
r1542174 r1567572 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.5. 86 Stable tag: 1.5.9 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 117 117 = 1.5.8 = 118 118 Fixed bug that was double submitting lead notes when a user entered a note. 119 120 = 1.5.9 = 121 Fixed bug that was calculating average lead value incorrectly for FB Lead conversions. -
pushpress-integration/trunk/templates/frontend/shortcode_schedules.php
r1299350 r1567572 3 3 $linkTo = str_replace('{subdomain}', $this->subdomain, PUSHPRESS_CLIENT) . 'schedule/index/'; 4 4 ?> 5 6 5 <div class="wp-pushpress"> 7 6 <div class="schedule-date"> … … 22 21 <div class="clear"></div> 23 22 </li> 23 <li class="item-header" style="font-weight:bold;"> 24 <span class="schedule-name">Class Time</span> 25 <span class="schedule-hour">Duration</span> 26 <span class="schedule-title">Class</span> 27 <span class="schedule-type"> 28 Coach 29 </span> 30 <span class="schedule-spots"> 31 Spaces Avail. 32 </span> 33 <div class="clear"></div> 34 </li> 24 35 <?php 25 36 foreach ($item as $k => $value) { … … 28 39 <li class="item-other"> 29 40 <span class="schedule-name"><?php echo date('g:i a', $value['start_timestamp']); ?></span> 30 <span class="schedule-hour"><?php echo ( ($value['end_timestamp'] - $value['start_timestamp']) / 3600) . " hr"; ?></span>41 <span class="schedule-hour"><?php echo round(( ($value['end_timestamp'] - $value['start_timestamp']) / 3600 ), 2) . " hr"; ?></span> 31 42 <span class="schedule-title"><?php echo $value['title']; ?></span> 32 <span class="schedule-type"><?php echo $value['fullname']; ?></span> 43 <span class="schedule-type"> 44 <?php if (strlen(trim($value['fullname']))) { 45 echo $value['fullname']; 46 } 47 else { 48 echo 'Coach TBD'; 49 } 50 ?> 51 </span> 52 <span class="schedule-spots"> 53 <?php 54 if ($value['status']['spots_available'] == -1) { 55 echo "Yes"; 56 } 57 else if ($value['status']['spots_available'] == 0) { 58 echo "No"; 59 } 60 else { 61 echo "Yes"; 62 } 63 ?> 64 </span> 33 65 <div class="clear"></div> 34 66 </li>
Note: See TracChangeset
for help on using the changeset viewer.