Changeset 1803652
- Timestamp:
- 01/16/2018 09:19:12 AM (8 years ago)
- Location:
- hq60-fidelity-card
- Files:
-
- 2 added
- 5 edited
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.jpg (added)
-
trunk/hq60fidelitycard.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Hq60/Hq60.php (modified) (1 diff)
-
trunk/src/Hq60fidelitycard/Frontend/Frontend.php (modified) (1 diff)
-
trunk/views/frontend/user-balance.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hq60-fidelity-card/trunk/hq60fidelitycard.php
r1801667 r1803652 7 7 Author: TRe Technology And Research S.r.l 8 8 Author URI: http://www.tresrl.it 9 Version: 1.0 9 Version: 1.0.1 10 10 License: GPL-2.0+ 11 11 */ -
hq60-fidelity-card/trunk/readme.txt
r1801667 r1803652 3 3 Tags: 4 4 Requires at least: 4.8.2 5 Tested up to: 4. 8.26 Stable tag: 1.0 5 Tested up to: 4.9.1 6 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html 9 9 10 With this plugin you can display balance of fidelity cards present on your software. 10 Con questo plugin puoi permettere ai tuoi Clienti di mostrare il saldo della loro tessera. E' necessaria una licenza attiva con il nostro software fidelity card. Maggiori informazioni su www.nicecard.it 11 11 12 12 13 13 == Description == 14 14 15 With this plugin you can display balance of fidelity cards present on your software. 15 Con questo plugin puoi permettere ai tuoi Clienti di mostrare il saldo della loro tessera. Attenzione! E' necessaria una licenza attiva con il nostro software fidelity card! Maggiori informazioni su www.nicecard.it. 16 I tuoi Clienti possono registrarsi, scegliere una password personale, verificare il saldo e prossimamente richiedere anche i premi online! 16 17 17 18 == Installation == … … 21 22 == Usage == 22 23 23 1. Get a token and insert into settings24 1. Con una licenza attiva e funzionante di NiceCard inserisci il tuo token 24 25 25 26 26 27 == Changelog == 27 28 29 = 1.0.1 = 30 * Aggiunto elenco transazioni per raccolta punti 31 28 32 = 1.0 = 29 33 * First relase -
hq60-fidelity-card/trunk/src/Hq60/Hq60.php
r1801667 r1803652 57 57 } 58 58 59 /** 60 * Get transaction 61 * 62 * @param int the id of member_card 63 * @param int the id campaign 64 * 65 * @since 1.0 66 * 67 * @return object if campaign is found or false if nothing found 68 */ 69 public function get_transaction ( $id_member_card , $id_campaign ) { 70 71 $url = $this->get_base_api_url().'transaction/'.$id_member_card.'?id_campaign='.$id_campaign.'&token='.$this->get_token(); 72 73 $response = $this->perform_get_request( $url ); 74 75 if ( is_object( $response ) ) { 76 77 if ( isset ( $response->code ) ) { 78 79 return false; 80 81 } else { 82 83 return $response; 84 85 } 86 } 87 88 } 89 59 90 60 91 /** -
hq60-fidelity-card/trunk/src/Hq60fidelitycard/Frontend/Frontend.php
r1801667 r1803652 306 306 $title = $single_campaign->campaign[0]->name; 307 307 $balance = $hq60->get_balance ( $id_member_card , $id_campaign ); 308 $transaction = $hq60->get_transaction ( $id_member_card , $id_campaign ); 308 309 309 310 } else { -
hq60-fidelity-card/trunk/views/frontend/user-balance.php
r1801667 r1803652 79 79 80 80 } //if ( $campaign_type == 'points' ) { 81 82 if ( $campaign_type == 'points' ) { 83 84 if ( isset ( $transaction->transaction ) ) { 85 86 $decimals = 0; 87 ?> 88 89 <table class="table table-transaction"> 90 91 <thead> 92 <tr> 93 <th><?php _e( 'Punti' , $this->get_language_domain() )?></th> 94 <th><?php _e( 'Dettaglio' , $this->get_language_domain() )?></th> 95 <th><?php _e( 'Data' , $this->get_language_domain() )?></th> 96 </tr> 97 </thead> 98 <tbody> 99 100 <?php 101 foreach ( $transaction->transaction as $t ) { 102 103 $class = 'positive-number'; 104 105 if ( $t->amount_final < 0 ) { 106 107 $class = 'negative-number'; 108 109 } 110 111 $amount = number_format_i18n( $t->amount_final, $decimals ); 112 $date = date_i18n( 'd/m/Y', strtotime( $t->date ) ); 113 114 echo '<tr>'; 115 echo '<td class="'.$class.'">'; 116 echo $amount; 117 echo '</td>'; 118 echo '<td>'; 119 echo $t->description; 120 echo '</td>'; 121 echo '<td>'; 122 echo $date; 123 echo '</td>'; 124 echo '</tr>'; 125 126 } 127 ?> 128 129 </tbody> 130 131 </table> 132 <?php 133 134 } 135 136 } 81 137 82 138
Note: See TracChangeset
for help on using the changeset viewer.