Changeset 1808686
- Timestamp:
- 01/24/2018 03:16:58 PM (8 years ago)
- Location:
- hq60-fidelity-card/trunk
- Files:
-
- 5 edited
-
hq60fidelitycard.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/Hq60fidelitycard/Frontend/Frontend.php (modified) (1 diff)
-
views/frontend/user-balance.php (modified) (2 diffs)
-
views/frontend/user-campaign-list.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hq60-fidelity-card/trunk/hq60fidelitycard.php
r1805052 r1808686 7 7 Author: TRe Technology And Research S.r.l 8 8 Author URI: http://www.tresrl.it 9 Version: 1. 29 Version: 1.3 10 10 License: GPL-2.0+ 11 11 */ -
hq60-fidelity-card/trunk/readme.txt
r1805052 r1808686 4 4 Requires at least: 4.8.2 5 5 Tested up to: 4.9.2 6 Stable tag: 1. 26 Stable tag: 1.3 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 27 27 == Changelog == 28 28 29 = 1.3 = 30 * Aggiunta tessera abbonamenti 31 * Bugfix 32 29 33 = 1.2 = 30 34 * Aggiunto elenco transazioni per tessera sconto e carta ricaricabile -
hq60-fidelity-card/trunk/src/Hq60fidelitycard/Frontend/Frontend.php
r1807910 r1808686 54 54 public function show_hide_menu_items( $items, $menu, $args ) { 55 55 56 57 if ( isset ( $_SESSION['hq60']['member_card']['logged'] ) ) { 58 59 foreach ( $items as $key => $item ) { 60 61 if ( $item->post_name == 'fidelity-card-login' || $item->url == get_home_url().'/fidelity-card-login/' ) { 62 63 unset( $items[$key] ); 64 65 } 66 67 if ( $item->post_name == 'register' || $item->url == get_home_url().'/fidelity-card-register/' ) { 68 69 unset( $items[$key] ); 70 71 } 72 73 } 74 75 76 } else { 77 78 foreach ( $items as $key => $item ) { 79 80 if ( $item->post_name == 'fidelity-card-logout' || $item->url == get_home_url().'/fidelity-card-logout/' ) { 81 82 unset( $items[$key] ); 83 84 } 85 86 if ( $item->post_name == 'fidelity-card-dashboard' || $item->url == get_home_url().'/fidelity-card-dashboard/' ) { 87 88 unset( $items[$key] ); 89 90 } 91 92 93 94 } 95 56 if ( !is_admin() ) { 57 58 if ( isset ( $_SESSION['hq60']['member_card']['logged'] ) ) { 59 60 foreach ( $items as $key => $item ) { 61 62 if ( $item->post_name == 'fidelity-card-login' || $item->url == get_home_url().'/fidelity-card-login/' ) { 63 64 unset( $items[$key] ); 65 66 } 67 68 if ( $item->post_name == 'register' || $item->url == get_home_url().'/fidelity-card-register/' ) { 69 70 unset( $items[$key] ); 71 72 } 73 74 } 75 76 77 } else { 78 79 foreach ( $items as $key => $item ) { 80 81 if ( $item->post_name == 'fidelity-card-logout' || $item->url == get_home_url().'/fidelity-card-logout/' ) { 82 83 unset( $items[$key] ); 84 85 } 86 87 if ( $item->post_name == 'fidelity-card-dashboard' || $item->url == get_home_url().'/fidelity-card-dashboard/' ) { 88 89 unset( $items[$key] ); 90 91 } 92 93 94 95 } 96 97 } 98 96 99 } 97 100 -
hq60-fidelity-card/trunk/views/frontend/user-balance.php
r1805052 r1808686 78 78 <?php 79 79 80 } //if ( $campaign_type == 'points' ) { 81 80 } //if ( $campaign_type == 'discount' ) { 81 82 /************************ SUBSCRIPTION **************************************/ 83 84 85 86 if ( $campaign_type == 'subscription' ) { 87 88 $decimals = 0; 89 90 if ( isset ( $balance->balance ) ) { 91 92 if ( is_array ( $balance->balance ) && ( count ( $balance->balance ) > 0 ) ) { 93 94 ?> 95 96 <table class="table table-transaction"> 97 98 <thead> 99 <tr> 100 <th><?php _e( 'Prodotto / Servizio' , $this->get_language_domain() )?></th> 101 <th><?php _e( 'Quantità' , $this->get_language_domain() )?></th> 102 </tr> 103 </thead> 104 <tbody> 105 106 <?php 107 108 foreach ( $balance->balance as $bal ) { 109 110 if ( $bal->balance > 0 ) { 111 112 ?> 113 114 <tr> 115 116 <td><?php echo $bal->item ;?></td> 117 <td><?php echo number_format_i18n( $bal->balance, $decimals ) ;?></td> 118 119 </tr> 120 121 <?php 122 123 } 124 125 } 126 127 ?> 128 129 </tbody> 130 </table> 131 132 <?php 133 134 } else { 135 136 ?> 137 138 <p><?php _e('Nessun prodotto o servizio trovato' , $this->get_language_domain() );?></p> 139 140 <?php 141 142 } 143 144 145 146 } else { 147 148 ?> 149 150 <p><?php _e('Nessun prodotto o servizio trovato' , $this->get_language_domain() );?></p> 151 152 <?php 153 154 } 155 156 157 158 } 159 160 161 162 /***************** ELENCO TRANSAZIONI ***********************************/ 163 164 if ( $campaign_type == 'points' ) { 165 166 if ( isset ( $transaction->transaction ) ) { 167 168 $decimals = 0; 169 ?> 170 171 <table class="table table-transaction"> 172 173 <thead> 174 <tr> 175 <th><?php _e( 'Punti' , $this->get_language_domain() )?></th> 176 <th><?php _e( 'Dettaglio' , $this->get_language_domain() )?></th> 177 <th><?php _e( 'Data' , $this->get_language_domain() )?></th> 178 </tr> 179 </thead> 180 <tbody> 181 182 <?php 183 foreach ( $transaction->transaction as $t ) { 184 185 $class = 'positive-number'; 186 187 if ( $t->amount_final < 0 ) { 188 189 $class = 'negative-number'; 190 191 } 192 193 $amount = number_format_i18n( $t->amount_final, $decimals ); 194 $date = date_i18n( 'd/m/Y', strtotime( $t->date ) ); 195 196 echo '<tr>'; 197 echo '<td class="'.$class.'">'; 198 echo $amount; 199 echo '</td>'; 200 echo '<td>'; 201 echo $t->description; 202 echo '</td>'; 203 echo '<td>'; 204 echo $date; 205 echo '</td>'; 206 echo '</tr>'; 207 208 } 209 ?> 210 211 </tbody> 212 213 </table> 214 <?php 215 216 } 217 218 } // IF POINTS 219 220 /*** GIFT CARD // TESSERA SCONTO */ 221 82 222 if ( $campaign_type == 'gift' || $campaign_type == 'discount' ) { 83 223 … … 134 274 } 135 275 136 } 137 138 139 if ( $campaign_type == 'points' ) { 140 141 if ( isset ( $transaction->transaction ) ) { 142 143 $decimals = 0; 144 ?> 145 146 <table class="table table-transaction"> 147 148 <thead> 149 <tr> 150 <th><?php _e( 'Punti' , $this->get_language_domain() )?></th> 151 <th><?php _e( 'Dettaglio' , $this->get_language_domain() )?></th> 152 <th><?php _e( 'Data' , $this->get_language_domain() )?></th> 153 </tr> 154 </thead> 155 <tbody> 156 157 <?php 158 foreach ( $transaction->transaction as $t ) { 159 160 $class = 'positive-number'; 161 162 if ( $t->amount_final < 0 ) { 163 164 $class = 'negative-number'; 165 166 } 167 168 $amount = number_format_i18n( $t->amount_final, $decimals ); 169 $date = date_i18n( 'd/m/Y', strtotime( $t->date ) ); 170 171 echo '<tr>'; 172 echo '<td class="'.$class.'">'; 173 echo $amount; 174 echo '</td>'; 175 echo '<td>'; 176 echo $t->description; 177 echo '</td>'; 178 echo '<td>'; 179 echo $date; 180 echo '</td>'; 181 echo '</tr>'; 182 183 } 184 ?> 185 186 </tbody> 187 188 </table> 189 <?php 190 191 } 192 193 } 276 } // gift card 277 278 /** subscription */ 279 194 280 195 281 -
hq60-fidelity-card/trunk/views/frontend/user-campaign-list.php
r1801667 r1808686 24 24 foreach ( $campaign_list->campaign as $campaign ) { 25 25 26 if ( $campaign->type!='subscription' ) {26 //if ( $campaign->type!='subscription' ) { 27 27 28 28 $name = $campaign->name; … … 35 35 <?php 36 36 37 }37 //} 38 38 39 39
Note: See TracChangeset
for help on using the changeset viewer.