62d42e69639670aa6fcdbb527af13a5e593ff498.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <?php $__env->startSection('panel_content'); ?>
  2. <section class="py-8 bg-soft-primary">
  3. <div class="container">
  4. <div class="row">
  5. <div class="col-xl-8 mx-auto text-center">
  6. <h1 class="mb-0 fw-700"><?php echo e(translate('Premium Packages for Sellers')); ?></h1>
  7. </div>
  8. </div>
  9. </div>
  10. </section>
  11. <section class="py-4 py-lg-5">
  12. <div class="container">
  13. <div class="row row-cols-xxl-4 row-cols-lg-3 row-cols-md-2 row-cols-1 gutters-10 justify-content-center">
  14. <?php $__currentLoopData = $seller_spread_packages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $seller_spread_package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  15. <div class="col">
  16. <div class="card overflow-hidden">
  17. <div class="card-body">
  18. <div class="text-center mb-4 mt-3">
  19. <img class="mw-100 mx-auto mb-4" src="<?php echo e(uploaded_asset($seller_spread_package->logo)); ?>" height="100">
  20. <h5 class="mb-3 h5 fw-600"><?php echo e($seller_spread_package->getTranslation('name')); ?></h5>
  21. </div>
  22. <ul class="list-group list-group-raw fs-15 mb-5">
  23. <li class="list-group-item py-2">
  24. <i class="las la-check text-success mr-2"></i>
  25. <?php echo e($seller_spread_package->product_upload_limit); ?> <?php echo e(translate('Product Spread Limit')); ?>
  26. </li>
  27. <li class="list-group-item py-2">
  28. <i class="las la-check text-success mr-2"></i>
  29. <?php echo e($seller_spread_package->getTranslation('max_profit')); ?>
  30. </li>
  31. </ul>
  32. <div class="mb-5 d-flex align-items-center justify-content-center">
  33. <?php if($seller_spread_package->amount == 0): ?>
  34. <span class="display-4 fw-600 lh-1 mb-0"><?php echo e(translate('Free')); ?></span>
  35. <?php else: ?>
  36. <span class="display-4 fw-600 lh-1 mb-0"><?php echo e(single_price($seller_spread_package->amount)); ?></span>
  37. <?php endif; ?>
  38. <span class="text-secondary border-left ml-2 pl-2"><?php echo e($seller_spread_package->duration); ?><br><?php echo e(translate('Days')); ?></span>
  39. </div>
  40. <div class="text-center">
  41. <span style="font-size:15px;"><?php echo e(translate('Average Daily')); ?> <?php echo e(single_price(($seller_spread_package->amount)/($seller_spread_package->duration))); ?></span>
  42. </div>
  43. <div class="text-center">
  44. <?php if($seller_spread_package->amount == 0): ?>
  45. <button class="btn btn-primary fw-600" onclick="get_free_package(<?php echo e($seller_spread_package->id); ?>)"><?php echo e(translate('Free Package')); ?></button>
  46. <?php else: ?>
  47. <?php if(addon_is_activated('offline_payment')): ?>
  48. <button class="btn btn-primary fw-600" onclick="select_payment_type(<?php echo e($seller_spread_package->id); ?>)"><?php echo e(translate('Purchase Package')); ?></button>
  49. <?php else: ?>
  50. <button class="btn btn-primary fw-600" onclick="show_price_modal(<?php echo e($seller_spread_package->id); ?>)"><?php echo e(translate('Purchase Package')); ?></button>
  51. <?php endif; ?>
  52. <?php endif; ?>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  58. </div>
  59. </div>
  60. </section>
  61. <?php $__env->stopSection(); ?>
  62. <?php $__env->startSection('modal'); ?>
  63. <!-- Payment For Storehouse Modal -->
  64. <div class="modal fade" id="payment_for_storehouse_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  65. <div class="modal-dialog modal-dialog-centered" role="document">
  66. <div class="modal-content">
  67. <div class="modal-header">
  68. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('Payment For Storehouse')); ?></h5>
  69. <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
  70. </div>
  71. <div class="modal-body">
  72. <option value="paypal"><?php echo e(translate('Paypal')); ?></option>
  73. <div class="row">
  74. <div class="col-12">
  75. <h5 class="text-center"><?php echo e(translate('Pay with wallet')); ?>
  76. <?php
  77. $user = \App\Models\User::find(Auth::user()->id);
  78. ?>
  79. <?php echo e(single_price($user->balance)); ?></h5>
  80. </div>
  81. </div>
  82. <div class="row">
  83. <div class="col-md-9">
  84. <input type="password" lang="en" class="form-control mb-3" id="tpwd" name="tpwd"
  85. placeholder="<?php echo e(translate('Transaction password')); ?>" max=6 required>
  86. </div>
  87. </div>
  88. <div class="form-group text-right">
  89. <button type="button" class="btn btn-sm btn-light transition-3d-hover mr-3" data-dismiss="modal"><?php echo e(translate('Cancel')); ?></button>
  90. <button id="payment_button" type="button" class="btn btn-sm btn-primary transition-3d-hover mr-1"><?php echo e(translate('Payment')); ?></button>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <!-- Select Payment Type Modal -->
  97. <div class="modal fade" id="select_payment_type_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  98. <div class="modal-dialog modal-dialog-centered" role="document">
  99. <div class="modal-content">
  100. <div class="modal-header">
  101. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('Select Payment Type')); ?></h5>
  102. <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
  103. </div>
  104. <div class="modal-body">
  105. <input type="hidden" id="package_id" name="package_id" value="">
  106. <div class="row">
  107. <div class="col-md-3">
  108. <label><?php echo e(translate('Payment Type')); ?></label>
  109. </div>
  110. <div class="col-md-9">
  111. <div class="mb-3">
  112. <select class="form-control aiz-selectpicker" onchange="payment_type(this.value)"
  113. data-minimum-results-for-search="Infinity">
  114. <option value=""><?php echo e(translate('Select One')); ?></option>
  115. <option value="cash"><?php echo e(translate('Wallet')); ?></option>
  116. <option value="online"><?php echo e(translate('Online payment')); ?></option>
  117. <option value="offline"><?php echo e(translate('Offline payment')); ?></option>
  118. </select>
  119. </div>
  120. </div>
  121. </div>
  122. <div class="form-group text-right">
  123. <button type="button" class="btn btn-sm btn-primary transition-3d-hover mr-1" id="select_type_cancel" data-dismiss="modal"><?php echo e(translate('Cancel')); ?></button>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <!-- Online payment Modal-->
  130. <div class="modal fade" id="price_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  131. <div class="modal-dialog modal-dialog-centered" role="document">
  132. <div class="modal-content">
  133. <div class="modal-header">
  134. <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate('Purchase Your Package')); ?></h5>
  135. <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
  136. </div>
  137. <form class="" id="package_payment_form" action="<?php echo e(route('seller_spread_packages.purchase')); ?>" method="post">
  138. <?php echo csrf_field(); ?>
  139. <input type="hidden" name="seller_spread_package_id" value="">
  140. <div class="modal-body">
  141. <div class="row">
  142. <div class="col-md-2">
  143. <label><?php echo e(translate('Payment Method')); ?></label>
  144. </div>
  145. <div class="col-md-10">
  146. <div class="mb-3">
  147. <select class="form-control aiz-selectpicker" data-live-search="true" name="payment_option">
  148. <?php if(get_setting('paypal_payment') == 1): ?>
  149. <option value="paypal"><?php echo e(translate('Paypal')); ?></option>
  150. <?php endif; ?>
  151. <?php if(get_setting('stripe_payment') == 1): ?>
  152. <option value="stripe"><?php echo e(translate('Stripe')); ?></option>
  153. <?php endif; ?>
  154. <?php if(get_setting('mercadopago_payment') == 1): ?>
  155. <option value="mercadopago"><?php echo e(translate('Mercadopago')); ?></option>
  156. <option value="paypal"><?php echo e(translate('Paypal')); ?></option>
  157. <?php endif; ?>
  158. <?php if(get_setting('toyyibpay_payment') == 1): ?>
  159. <option value="toyyibpay"><?php echo e(translate('ToyyibPay')); ?></option>
  160. <?php endif; ?>
  161. <?php if(get_setting('sslcommerz_payment') == 1): ?>
  162. <option value="sslcommerz"><?php echo e(translate('sslcommerz')); ?></option>
  163. <?php endif; ?>
  164. <?php if(get_setting('instamojo_payment') == 1): ?>
  165. <option value="instamojo"><?php echo e(translate('Instamojo')); ?></option>
  166. <?php endif; ?>
  167. <?php if(get_setting('razorpay') == 1): ?>
  168. <option value="razorpay"><?php echo e(translate('RazorPay')); ?></option>
  169. <?php endif; ?>
  170. <?php if(get_setting('paystack') == 1): ?>
  171. <option value="paystack"><?php echo e(translate('PayStack')); ?></option>
  172. <?php endif; ?>
  173. <?php if(get_setting('payhere') == 1): ?>
  174. <option value="payhere"><?php echo e(translate('Payhere')); ?></option>
  175. <?php endif; ?>
  176. <?php if(get_setting('ngenius') == 1): ?>
  177. <option value="ngenius"><?php echo e(translate('Ngenius')); ?></option>
  178. <?php endif; ?>
  179. <?php if(get_setting('iyzico') == 1): ?>
  180. <option value="iyzico"><?php echo e(translate('Iyzico')); ?></option>
  181. <?php endif; ?>
  182. <?php if(get_setting('nagad') == 1): ?>
  183. <option value="nagad"><?php echo e(translate('Nagad')); ?></option>
  184. <?php endif; ?>
  185. <?php if(get_setting('bkash') == 1): ?>
  186. <option value="bkash"><?php echo e(translate('Bkash')); ?></option>
  187. <?php endif; ?>
  188. <?php if(get_setting('aamarpay') == 1): ?>
  189. <option value="aamarpay"><?php echo e(translate('Amarpay')); ?></option>
  190. <?php endif; ?>
  191. <?php if(addon_is_activated('african_pg')): ?>
  192. <?php if(get_setting('mpesa') == 1): ?>
  193. <option value="mpesa"><?php echo e(translate('Mpesa')); ?></option>
  194. <?php endif; ?>
  195. <?php if(get_setting('flutterwave') == 1): ?>
  196. <option value="flutterwave"><?php echo e(translate('Flutterwave')); ?></option>
  197. <?php endif; ?>
  198. <?php if(get_setting('payfast') == 1): ?>
  199. <option value="payfast"><?php echo e(translate('PayFast')); ?></option>
  200. <?php endif; ?>
  201. <?php endif; ?>
  202. </select>
  203. </div>
  204. </div>
  205. </div>
  206. <div class="form-group text-right">
  207. <button type="button" class="btn btn-sm btn-secondary transition-3d-hover mr-1" data-dismiss="modal"><?php echo e(translate('cancel')); ?></button>
  208. <button type="submit" class="btn btn-sm btn-primary transition-3d-hover mr-1"><?php echo e(translate('Confirm')); ?></button>
  209. </div>
  210. </div>
  211. </form>
  212. </div>
  213. </div>
  214. </div>
  215. <!-- offline payment Modal -->
  216. <div class="modal fade" id="offline_seller_spread_package_purchase_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  217. <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
  218. <div class="modal-content">
  219. <div class="modal-header">
  220. <h5 class="modal-title strong-600 heading-5"><?php echo e(translate('Offline Package Payment')); ?></h5>
  221. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  222. <span aria-hidden="true">&times;</span>
  223. </button>
  224. </div>
  225. <div id="offline_seller_spread_package_purchase_modal_body"></div>
  226. </div>
  227. </div>
  228. </div>
  229. <?php $__env->stopSection(); ?>
  230. <?php $__env->startSection('script'); ?>
  231. <script src="/public/assets/js/md5.min.js"></script>
  232. <script type="text/javascript">
  233. function select_payment_type(id){
  234. $('input[name=package_id]').val(id);
  235. $('#select_payment_type_modal').modal('show');
  236. }
  237. function payment_type(type){
  238. var package_id = $('#package_id').val();
  239. if(type == 'online'){
  240. $("#select_type_cancel").click();
  241. show_price_modal(package_id);
  242. }
  243. else if(type == 'cash'){
  244. $("#select_type_cancel").click();
  245. $('#payment_for_storehouse_modal').modal('show');
  246. }
  247. else if (type == 'offline'){
  248. $("#select_type_cancel").click();
  249. $.post('<?php echo e(route('seller.offline_seller_spread_package_purchase_modal')); ?>', {_token:'<?php echo e(csrf_token()); ?>', package_id:package_id}, function(data){
  250. $('#offline_seller_spread_package_purchase_modal_body').html(data);
  251. $('#offline_seller_spread_package_purchase_modal').modal('show');
  252. });
  253. }
  254. }
  255. function show_price_modal(id){
  256. $('input[name=seller_spread_package_id]').val(id);
  257. $('#price_modal').modal('show');
  258. }
  259. function get_free_package(id){
  260. $('input[name=seller_spread_package_id]').val(id);
  261. $('#package_payment_form').submit();
  262. }
  263. $('#payment_button').on('click', function () {
  264. <?php
  265. $tpwd = Auth::user()->tpwd;
  266. ?>
  267. var tpwd = '<?php echo $tpwd; ?>'
  268. var pwd = $("#tpwd").val();
  269. if (md5(pwd) != tpwd) {
  270. AIZ.plugins.notify('danger',
  271. '<?php echo e(translate('password error')); ?>');
  272. return;
  273. }
  274. $.post('<?php echo e(route('orders.buy_spread_cash')); ?>', {
  275. _token: '<?php echo e(csrf_token()); ?>',
  276. package_id: $('#package_id').val()
  277. }, function (data) {
  278. console.log(data)
  279. if (data.success == 1) {
  280. $('#order_details').modal('hide');
  281. AIZ.plugins.notify('success', data.message );
  282. location.reload().setTimeOut(500);
  283. } else {
  284. AIZ.plugins.notify('danger', data.message ? data.message : '出问题了!');
  285. }
  286. });
  287. })
  288. </script>
  289. <?php $__env->stopSection(); ?>
  290. <?php echo $__env->make('seller.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/seller_spread_packages/frontend/seller_spread_packages_list.blade.php ENDPATH**/ ?>