html-edd-order-box.php
106 lines
| 1 | <?php |
| 2 | include_once "function-helper.php"; |
| 3 | |
| 4 | $payment = new EDD_Payment( $payment_id ); |
| 5 | |
| 6 | $meta = $payment->get_meta(); |
| 7 | |
| 8 | ?> |
| 9 | <style> |
| 10 | table.pys_order_meta { |
| 11 | width: 100%;text-align:left |
| 12 | } |
| 13 | table.pys_order_meta td.border span { |
| 14 | border-top: 1px solid #f1f1f1; |
| 15 | display: block; |
| 16 | } |
| 17 | table.pys_order_meta th, |
| 18 | table.pys_order_meta td { |
| 19 | padding:10px |
| 20 | } |
| 21 | </style> |
| 22 | |
| 23 | <div class="inside"> |
| 24 | <?php if(isset($meta['pys_enrich_data'])) : |
| 25 | $data = $meta['pys_enrich_data']; |
| 26 | ?> |
| 27 | <table class="pys_order_meta"> |
| 28 | <tr> |
| 29 | <td colspan="2" ><strong>FIRST VISIT</strong></td> |
| 30 | </tr> |
| 31 | <tr> |
| 32 | <td colspan="2" class="border"><span></span></td> |
| 33 | </tr> |
| 34 | <tr > |
| 35 | <th>Landing Page:</th> |
| 36 | <td><a href="<?=$data['pys_landing']; ?>" target="_blank" ><?=$data['pys_landing']; ?></a></td> |
| 37 | </tr> |
| 38 | <tr> |
| 39 | <th>Traffic source:</th> |
| 40 | <td><?=$data['pys_source']; ?></td> |
| 41 | </tr> |
| 42 | <?php |
| 43 | $utms = explode("|",$data['pys_utm']); |
| 44 | \PixelYourSite\Enrich\printUtm($utms); |
| 45 | ?> |
| 46 | <tr> |
| 47 | <td colspan="2" class="border"><span></span></td> |
| 48 | </tr> |
| 49 | <tr> |
| 50 | <td colspan="2" ><strong>LAST VISIT</strong></td> |
| 51 | </tr> |
| 52 | <tr> |
| 53 | <td colspan="2" class="border"><span></span></td> |
| 54 | </tr> |
| 55 | <tr > |
| 56 | <?php |
| 57 | $lastLanding = isset($data['last_pys_landing']) ? $data['last_pys_landing'] : ""; ?> |
| 58 | <th>Landing Page:</th> |
| 59 | <td><a href="<?=$lastLanding?>" target="_blank" ><?=$lastLanding?></a></td> |
| 60 | </tr> |
| 61 | <tr> |
| 62 | <th>Traffic source:</th> |
| 63 | <td><?= isset($data['last_pys_source']) ? $data['last_pys_source'] : ""?></td> |
| 64 | </tr> |
| 65 | <?php |
| 66 | if(!empty($data['last_pys_utm'])) { |
| 67 | $utms = explode("|",$data['last_pys_utm']); |
| 68 | \PixelYourSite\Enrich\printUtm($utms); |
| 69 | } |
| 70 | |
| 71 | ?> |
| 72 | <tr> |
| 73 | <td colspan="2" class="border"><span></span></td> |
| 74 | </tr> |
| 75 | <?php |
| 76 | $userTime = explode("|",$data['pys_browser_time']); |
| 77 | ?> |
| 78 | <tr > |
| 79 | <th>Client's browser time</th> |
| 80 | <td></td> |
| 81 | </tr> |
| 82 | <tr > |
| 83 | <th>Hour:</th> |
| 84 | <td><?=$userTime[0]; ?></td> |
| 85 | </tr> |
| 86 | <tr > |
| 87 | <th>Day:</th> |
| 88 | <td><?=$userTime[1]; ?></td> |
| 89 | </tr> |
| 90 | <tr > |
| 91 | <th>Month:</th> |
| 92 | <td><?=$userTime[2]; ?></td> |
| 93 | </tr> |
| 94 | |
| 95 | <tr> |
| 96 | <td colspan="2" class="border"<td><span></span></td> |
| 97 | </tr> |
| 98 | |
| 99 | </table> |
| 100 | |
| 101 | <?php else: ?> |
| 102 | <h2>No data</h2> |
| 103 | <?php endif; ?> |
| 104 | </div> |
| 105 | |
| 106 |