part-nav.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. $user = ptc_get_user_info();
  3. $coupon = get_ptc_get_coupon();
  4. $discount = ptc_get_discount();
  5. ?>
  6. <div class="nav-bar nav-bar--fixed">
  7. <div class="nav-bar-left">
  8. <div class="nav-icons">
  9. <i class="icon-menu" data-toggle=".nav-links"></i>
  10. <i class="icon-logo"></i>
  11. <i class="icon-mine" data-toggle=".nav-dropdown" data-auth></i>
  12. </div>
  13. <div class="nav-menu nav-links hidden" data-fade>
  14. <div class="nav-menu-header">
  15. <i class="logo"></i>
  16. <i class="close" data-toggle=".nav-links"></i>
  17. </div>
  18. <div class="nav-menu-body">
  19. <ul class="nav-links-inner">
  20. <li class="nav-link">
  21. <a href="https://www.ptc.net.au/booking/">REPAIR BOOKING</a>
  22. </li>
  23. <li class="nav-link">
  24. <a href="https://www.ptcshop.com.au/">ONLINE SHOP</a>
  25. </li>
  26. <li class="nav-link active">
  27. <a href="<?php echo home_url('care') ?>">Care Plus</a>
  28. </li>
  29. <li class="nav-link">
  30. <a href="https://www.ptc.net.au/store-locator/">SOTRE LOCATION</a>
  31. </li>
  32. <li class="nav-link">
  33. <a href="https://www.ptc.net.au/contact-us/">CONTACT US</a>
  34. </li>
  35. </ul>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="nav-bar-right">
  40. <div class="user pointer flex-ac" data-toggle=".nav-dropdown" data-auth>
  41. <?php if( $user ){ ?>
  42. <i class="icon-mine"></i>
  43. <span class="user-name ellipsis"><?php echo $user['name'] ?></span>
  44. <?php }else{ ?>
  45. <span class="u-no">LOGIN</span>
  46. <?php } ?>
  47. </div>
  48. <div class="contact">
  49. <i class="icon-phone"></i>
  50. <div>
  51. <p class="tel">1300 000 349</p>
  52. <p class="time">Mon-Fri:&nbsp;9:00 - 16:00</p>
  53. </div>
  54. </div>
  55. </div>
  56. <?php if( $user ): ?>
  57. <div class="nav-menu nav-dropdown hidden" data-fade>
  58. <div class="nav-menu-header">
  59. <i class="logo"></i>
  60. <i class="close" data-toggle=".nav-dropdown"></i>
  61. </div>
  62. <div class="nav-menu-body user-panel">
  63. <div class="info">
  64. <div class="p1">
  65. <p class="name ellipsis">Hi, <?php echo $user['name'] ?></p>
  66. <p class="intro">
  67. <?php echo (is_array( $user['orders'] ) && count( $user['orders'] )) ? 'Pro' : 'Ordinary'; ?> member
  68. </p>
  69. </div>
  70. <?php if(!(is_array( $user['orders'] ) && count( $user['orders'] ))){ ?>
  71. <div class="p2">
  72. <p class="txt">You have not purchased a member
  73. <?php if( $user['num_order_expired'] > 0 ){ ?>
  74. <span>, $<?php echo $discount['amount']; ?> off for additional services</span>
  75. <?php } ?>
  76. </p>
  77. <button class="btn" data-action="buy">BUY</button>
  78. </div>
  79. <?php }else{ ?>
  80. <div class="p3">
  81. <div class="txt">
  82. $<?php echo $discount['amount']; ?> off for additional services |
  83. <strong class="primary pointer" data-action="buy">Buy now ></strong>
  84. </div>
  85. <div id="order-swiper" class="swiper">
  86. <div class="swiper-wrapper">
  87. <?php
  88. if(is_array( $user['orders'] ) && !empty( $user['orders'] )){
  89. foreach( $user['orders'] as $order ):
  90. ?>
  91. <div
  92. class="swiper-slide"
  93. data-order_id="<?php echo $order['id'] ?>"
  94. >
  95. <div class="service">
  96. <div class="service-title">
  97. <i class="service-icon icon-lite fls0"></i>
  98. <div class="service-type ellipsis"><?php echo $order['product_name'] ?></div>
  99. <div class="service-period fls0">
  100. <?php echo str_replace("-", "/", $order['start_time'] ) ?>
  101. to
  102. <?php echo str_replace("-", "/", $order['end_time'] ) ?>
  103. </div>
  104. </div>
  105. <div class="service-model tac ellipsis"><?php echo $order['phone_info'] ?></div>
  106. <?php if( $order['phone_imei'] ){ ?>
  107. <div class="service-code tac"><?php echo $order['phone_imei'] ?></div>
  108. <?php }else{ ?>
  109. <div class="service-code tac">
  110. <a
  111. class="primary bold"
  112. href="/ptc/imei/bind?id={{item.id}}"
  113. >BIND IMEI ></a
  114. >
  115. </div>
  116. <?php } ?>
  117. </div>
  118. </div>
  119. <?php
  120. endforeach;
  121. } // end foeach order
  122. ?>
  123. </div>
  124. </div>
  125. <?php
  126. if(is_array( $user['orders'] ) && !empty( $user['orders'] )){
  127. ?>
  128. <div class="pagination">
  129. <?php
  130. foreach( $user['orders'] as $item ): ?>
  131. <i class="dot"></i>
  132. <?php endforeach; ?>
  133. </div>
  134. <?php } ?>
  135. </div>
  136. <?php } ?>
  137. </div>
  138. <div class="role">
  139. <a href="/ptc/dashboard">
  140. <?php echo (is_array( $user['orders'] ) && count( $user['orders'] )) ? 'Pro' : 'Ordinary'; ?> Member
  141. </a>
  142. </div>
  143. <ul class="dropdown-list">
  144. <?php if( $user['num_order'] > 0 ){ ?>
  145. <li class="dropdown-item i1">
  146. <a href="/ptc/repair/history">MY REPAIR REQUEST</a>
  147. </li>
  148. <li class="dropdown-item i2">
  149. <a href="/ptc/order">MY ORDER</a>
  150. </li>
  151. <?php } ?>
  152. <li class="dropdown-item i3">
  153. <a href="/ptc/gift-card">MY DISCOUNT COUPON</a>
  154. </li>
  155. <li class="dropdown-item i4">
  156. <a href="/ptc/invite">INVITE FRIENDS
  157. <?php if( $coupon ){ ?>
  158. <span class="ptc-tag">Get $<?php echo $coupon['coupon_amount'] * $coupon['coupon_num'] ?> coupon</span>
  159. <?php } ?>
  160. </a>
  161. </li>
  162. <li class="dropdown-item i5">
  163. <a href="/ptc/account">ACCOUNT INFORMATION</a>
  164. </li>
  165. <li class="dropdown-item i6" id="signOut">SIGN OUT</li>
  166. </ul>
  167. </div>
  168. </div>
  169. <?php endif; ?>
  170. </div>
  171. <div class="tabbar">
  172. <a class=" tab <?php echo ( is_home() || is_front_page() || is_page( 'care' ) )? 'active' : '' ?>" href="<?php echo home_url('/care') ?>">HOME</a>
  173. <a class=" tab <?php echo is_page( 'feature' )? 'active' : '' ?>" href="<?php echo home_url('feature') ?>">FEATURE</a>
  174. <a class=" tab <?php echo is_page( 'why' ) ? 'active' : '' ?>" href="<?php echo home_url('why') ?>">WHY PTC</a>
  175. </div>