bb7fc6a5448b69bc5c8153b72575b7c24ed3a9f2.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. <!DOCTYPE html>
  2. <?php if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1): ?>
  3. <html dir="rtl" lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
  4. <?php else: ?>
  5. <html lang="<?php echo e(str_replace('_', '-', app()->getLocale())); ?>">
  6. <?php endif; ?>
  7. <head>
  8. <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
  9. <meta name="app-url" content="<?php echo e(getBaseURL()); ?>">
  10. <meta name="file-base-url" content="<?php echo e(getFileBaseURL()); ?>">
  11. <title><?php echo $__env->yieldContent('meta_title', get_setting('website_name').' | '.get_setting('site_motto')); ?></title>
  12. <meta charset="utf-8">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. <meta name="robots" content="index, follow">
  15. <meta name="description" content="<?php echo $__env->yieldContent('meta_description', get_setting('meta_description') ); ?>" />
  16. <meta name="keywords" content="<?php echo $__env->yieldContent('meta_keywords', get_setting('meta_keywords') ); ?>">
  17. <?php echo $__env->yieldContent('meta'); ?>
  18. <?php if(!isset($detailedProduct) && !isset($customer_product) && !isset($shop) && !isset($page) && !isset($blog)): ?>
  19. <!-- Schema.org markup for Google+ -->
  20. <meta itemprop="name" content="<?php echo e(get_setting('meta_title')); ?>">
  21. <meta itemprop="description" content="<?php echo e(get_setting('meta_description')); ?>">
  22. <meta itemprop="image" content="<?php echo e(uploaded_asset(get_setting('meta_image'))); ?>">
  23. <!-- Twitter Card data -->
  24. <meta name="twitter:card" content="product">
  25. <meta name="twitter:site" content="@publisher_handle">
  26. <meta name="twitter:title" content="<?php echo e(get_setting('meta_title')); ?>">
  27. <meta name="twitter:description" content="<?php echo e(get_setting('meta_description')); ?>">
  28. <meta name="twitter:creator" content="@author_handle">
  29. <meta name="twitter:image" content="<?php echo e(uploaded_asset(get_setting('meta_image'))); ?>">
  30. <!-- Open Graph data -->
  31. <meta property="og:title" content="<?php echo e(get_setting('meta_title')); ?>" />
  32. <meta property="og:type" content="website" />
  33. <meta property="og:url" content="<?php echo e(route('home')); ?>" />
  34. <meta property="og:image" content="<?php echo e(uploaded_asset(get_setting('meta_image'))); ?>" />
  35. <meta property="og:description" content="<?php echo e(get_setting('meta_description')); ?>" />
  36. <meta property="og:site_name" content="<?php echo e(env('APP_NAME')); ?>" />
  37. <meta property="fb:app_id" content="<?php echo e(env('FACEBOOK_PIXEL_ID')); ?>">
  38. <?php endif; ?>
  39. <!-- Favicon -->
  40. <link rel="icon" href="<?php echo e(uploaded_asset(get_setting('site_icon'))); ?>">
  41. <!-- Google Fonts -->
  42. <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&display=swap" rel="stylesheet">
  43. <!-- CSS Files -->
  44. <link rel="stylesheet" href="<?php echo e(static_asset('assets/css/vendors.css')); ?>">
  45. <?php if(\App\Models\Language::where('code', Session::get('locale', Config::get('app.locale')))->first()->rtl == 1): ?>
  46. <link rel="stylesheet" href="<?php echo e(static_asset('assets/css/bootstrap-rtl.min.css')); ?>">
  47. <?php endif; ?>
  48. <link rel="stylesheet" href="<?php echo e(static_asset('assets/css/aiz-core.css')); ?>">
  49. <link rel="stylesheet" href="<?php echo e(static_asset('assets/css/custom-style.css')); ?>">
  50. <script>
  51. var AIZ = AIZ || {};
  52. AIZ.local = {
  53. nothing_selected: '<?php echo translate('Nothing selected', null, true); ?>',
  54. nothing_found: '<?php echo translate('Nothing found', null, true); ?>',
  55. choose_file: '<?php echo e(translate('Choose file')); ?>',
  56. file_selected: '<?php echo e(translate('File selected')); ?>',
  57. files_selected: '<?php echo e(translate('Files selected')); ?>',
  58. add_more_files: '<?php echo e(translate('Add more files')); ?>',
  59. adding_more_files: '<?php echo e(translate('Adding more files')); ?>',
  60. drop_files_here_paste_or: '<?php echo e(translate('Drop files here, paste or')); ?>',
  61. browse: '<?php echo e(translate('Browse')); ?>',
  62. upload_complete: '<?php echo e(translate('Upload complete')); ?>',
  63. upload_paused: '<?php echo e(translate('Upload paused')); ?>',
  64. resume_upload: '<?php echo e(translate('Resume upload')); ?>',
  65. pause_upload: '<?php echo e(translate('Pause upload')); ?>',
  66. retry_upload: '<?php echo e(translate('Retry upload')); ?>',
  67. cancel_upload: '<?php echo e(translate('Cancel upload')); ?>',
  68. uploading: '<?php echo e(translate('Uploading')); ?>',
  69. processing: '<?php echo e(translate('Processing')); ?>',
  70. complete: '<?php echo e(translate('Complete')); ?>',
  71. file: '<?php echo e(translate('File')); ?>',
  72. files: '<?php echo e(translate('Files')); ?>',
  73. }
  74. </script>
  75. <style>
  76. body{
  77. font-family: 'Open Sans', sans-serif;
  78. font-weight: 400;
  79. }
  80. :root{
  81. --primary: <?php echo e(get_setting('base_color', '#e62d04')); ?>;
  82. --hov-primary: <?php echo e(get_setting('base_hov_color', '#c52907')); ?>;
  83. --soft-primary: <?php echo e(hex2rgba(get_setting('base_color','#e62d04'),.15)); ?>;
  84. }
  85. #map{
  86. width: 100%;
  87. height: 250px;
  88. }
  89. #edit_map{
  90. width: 100%;
  91. height: 250px;
  92. }
  93. .pac-container { z-index: 100000; }
  94. </style>
  95. <?php if(get_setting('google_analytics') == 1): ?>
  96. <!-- Global site tag (gtag.js) - Google Analytics -->
  97. <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo e(env('TRACKING_ID')); ?>"></script>
  98. <script>
  99. window.dataLayer = window.dataLayer || [];
  100. function gtag(){dataLayer.push(arguments);}
  101. gtag('js', new Date());
  102. gtag('config', '<?php echo e(env('TRACKING_ID')); ?>');
  103. </script>
  104. <?php endif; ?>
  105. <?php if(get_setting('facebook_pixel') == 1): ?>
  106. <!-- Facebook Pixel Code -->
  107. <script>
  108. !function(f,b,e,v,n,t,s)
  109. {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  110. n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  111. if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  112. n.queue=[];t=b.createElement(e);t.async=!0;
  113. t.src=v;s=b.getElementsByTagName(e)[0];
  114. s.parentNode.insertBefore(t,s)}(window, document,'script',
  115. 'https://connect.facebook.net/en_US/fbevents.js');
  116. fbq('init', '<?php echo e(env('FACEBOOK_PIXEL_ID')); ?>');
  117. fbq('track', 'PageView');
  118. </script>
  119. <noscript>
  120. <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=<?php echo e(env('FACEBOOK_PIXEL_ID')); ?>&ev=PageView&noscript=1"/>
  121. </noscript>
  122. <!-- End Facebook Pixel Code -->
  123. <?php endif; ?>
  124. <?php
  125. echo get_setting('header_script');
  126. ?>
  127. </head>
  128. <body>
  129. <!-- aiz-main-wrapper -->
  130. <div class="aiz-main-wrapper d-flex flex-column">
  131. <!-- Header -->
  132. <?php echo $__env->make('frontend.inc.nav', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  133. <?php echo $__env->yieldContent('content'); ?>
  134. <?php echo $__env->make('frontend.inc.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  135. </div>
  136. <?php if(get_setting('show_cookies_agreement') == 'on'): ?>
  137. <div class="aiz-cookie-alert shadow-xl">
  138. <div class="p-3 bg-dark rounded">
  139. <div class="text-white mb-3">
  140. <?php
  141. echo get_setting('cookies_agreement_text');
  142. ?>
  143. </div>
  144. <button class="btn btn-primary aiz-cookie-accept">
  145. <?php echo e(translate('Ok. I Understood')); ?>
  146. </button>
  147. </div>
  148. </div>
  149. <?php endif; ?>
  150. <?php if(get_setting('show_website_popup') == 'on'): ?>
  151. <div class="modal website-popup removable-session d-none" data-key="website-popup" data-value="removed">
  152. <div class="absolute-full bg-black opacity-60"></div>
  153. <div class="modal-dialog modal-dialog-centered modal-dialog-zoom modal-md">
  154. <div class="modal-content position-relative border-0 rounded-0">
  155. <div class="aiz-editor-data">
  156. <?php echo get_setting('website_popup_content'); ?>
  157. </div>
  158. <?php if(get_setting('show_subscribe_form') == 'on'): ?>
  159. <div class="pb-5 pt-4 px-5">
  160. <form class="" method="POST" action="<?php echo e(route('subscribers.store')); ?>">
  161. <?php echo csrf_field(); ?>
  162. <div class="form-group mb-0">
  163. <input type="email" class="form-control" placeholder="<?php echo e(translate('Your Email Address')); ?>" name="email" required>
  164. </div>
  165. <button type="submit" class="btn btn-primary btn-block mt-3">
  166. <?php echo e(translate('Subscribe Now')); ?>
  167. </button>
  168. </form>
  169. </div>
  170. <?php endif; ?>
  171. <button class="absolute-top-right bg-white shadow-lg btn btn-circle btn-icon mr-n3 mt-n3 set-session" data-key="website-popup" data-value="removed" data-toggle="remove-parent" data-parent=".website-popup">
  172. <i class="la la-close fs-20"></i>
  173. </button>
  174. </div>
  175. </div>
  176. </div>
  177. <?php endif; ?>
  178. <?php echo $__env->make('frontend.partials.modal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  179. <div class="modal fade" id="addToCart">
  180. <div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-zoom product-modal" id="modal-size" role="document">
  181. <div class="modal-content position-relative">
  182. <div class="c-preloader text-center p-3">
  183. <i class="las la-spinner la-spin la-3x"></i>
  184. </div>
  185. <button type="button" class="close absolute-top-right btn-icon close z-1" data-dismiss="modal" aria-label="Close">
  186. <span aria-hidden="true" class="la-2x">&times;</span>
  187. </button>
  188. <div id="addToCart-modal-body">
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <?php echo $__env->yieldContent('modal'); ?>
  194. <!-- SCRIPTS -->
  195. <script src="<?php echo e(static_asset('assets/js/vendors.js')); ?>"></script>
  196. <script src="<?php echo e(static_asset('assets/js/aiz-core.js')); ?>"></script>
  197. <?php if(get_setting('facebook_chat') == 1): ?>
  198. <script type="text/javascript">
  199. window.fbAsyncInit = function() {
  200. FB.init({
  201. xfbml : true,
  202. version : 'v3.3'
  203. });
  204. };
  205. (function(d, s, id) {
  206. var js, fjs = d.getElementsByTagName(s)[0];
  207. if (d.getElementById(id)) return;
  208. js = d.createElement(s); js.id = id;
  209. js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';
  210. fjs.parentNode.insertBefore(js, fjs);
  211. }(document, 'script', 'facebook-jssdk'));
  212. </script>
  213. <div id="fb-root"></div>
  214. <!-- Your customer chat code -->
  215. <div class="fb-customerchat"
  216. attribution=setup_tool
  217. page_id="<?php echo e(env('FACEBOOK_PAGE_ID')); ?>">
  218. </div>
  219. <?php endif; ?>
  220. <script>
  221. <?php $__currentLoopData = session('flash_notification', collect())->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  222. AIZ.plugins.notify('<?php echo e($message['level']); ?>', '<?php echo e($message['message']); ?>');
  223. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  224. </script>
  225. <script>
  226. $(document).ready(function() {
  227. $('.category-nav-element').each(function(i, el) {
  228. $(el).on('mouseover', function(){
  229. if(!$(el).find('.sub-cat-menu').hasClass('loaded')){
  230. $.post('<?php echo e(route('category.elements')); ?>', {_token: AIZ.data.csrf, id:$(el).data('id')}, function(data){
  231. $(el).find('.sub-cat-menu').addClass('loaded').html(data);
  232. });
  233. }
  234. });
  235. });
  236. if ($('#lang-change').length > 0) {
  237. $('#lang-change .dropdown-menu a').each(function() {
  238. $(this).on('click', function(e){
  239. e.preventDefault();
  240. var $this = $(this);
  241. var locale = $this.data('flag');
  242. $.post('<?php echo e(route('language.change')); ?>',{_token: AIZ.data.csrf, locale:locale}, function(data){
  243. location.reload();
  244. });
  245. });
  246. });
  247. }
  248. if ($('#currency-change').length > 0) {
  249. $('#currency-change .dropdown-menu a').each(function() {
  250. $(this).on('click', function(e){
  251. e.preventDefault();
  252. var $this = $(this);
  253. var currency_code = $this.data('currency');
  254. $.post('<?php echo e(route('currency.change')); ?>',{_token: AIZ.data.csrf, currency_code:currency_code}, function(data){
  255. location.reload();
  256. });
  257. });
  258. });
  259. }
  260. });
  261. $('#search').on('keyup', function(){
  262. search();
  263. });
  264. $('#search').on('focus', function(){
  265. search();
  266. });
  267. function search(){
  268. var searchKey = $('#search').val();
  269. if(searchKey.length > 0){
  270. $('body').addClass("typed-search-box-shown");
  271. $('.typed-search-box').removeClass('d-none');
  272. $('.search-preloader').removeClass('d-none');
  273. $.post('<?php echo e(route('search.ajax')); ?>', { _token: AIZ.data.csrf, search:searchKey}, function(data){
  274. if(data == '0'){
  275. // $('.typed-search-box').addClass('d-none');
  276. $('#search-content').html(null);
  277. $('.typed-search-box .search-nothing').removeClass('d-none').html('Sorry, nothing found for <strong>"'+searchKey+'"</strong>');
  278. $('.search-preloader').addClass('d-none');
  279. }
  280. else{
  281. $('.typed-search-box .search-nothing').addClass('d-none').html(null);
  282. $('#search-content').html(data);
  283. $('.search-preloader').addClass('d-none');
  284. }
  285. });
  286. }
  287. else {
  288. $('.typed-search-box').addClass('d-none');
  289. $('body').removeClass("typed-search-box-shown");
  290. }
  291. }
  292. function updateNavCart(view,count){
  293. $('.cart-count').html(count);
  294. $('#cart_items').html(view);
  295. }
  296. function removeFromCart(key){
  297. $.post('<?php echo e(route('cart.removeFromCart')); ?>', {
  298. _token : AIZ.data.csrf,
  299. id : key
  300. }, function(data){
  301. updateNavCart(data.nav_cart_view,data.cart_count);
  302. $('#cart-summary').html(data.cart_view);
  303. AIZ.plugins.notify('success', "<?php echo e(translate('Item has been removed from cart')); ?>");
  304. $('#cart_items_sidenav').html(parseInt($('#cart_items_sidenav').html())-1);
  305. });
  306. }
  307. function addToCompare(id){
  308. $.post('<?php echo e(route('compare.addToCompare')); ?>', {_token: AIZ.data.csrf, id:id}, function(data){
  309. $('#compare').html(data);
  310. AIZ.plugins.notify('success', "<?php echo e(translate('Item has been added to compare list')); ?>");
  311. $('#compare_items_sidenav').html(parseInt($('#compare_items_sidenav').html())+1);
  312. });
  313. }
  314. function addToWishList(id){
  315. <?php if(Auth::check() && (Auth::user()->user_type == 'customer' || Auth::user()->user_type == 'seller')): ?>
  316. $.post('<?php echo e(route('wishlists.store')); ?>', {_token: AIZ.data.csrf, id:id}, function(data){
  317. if(data != 0){
  318. $('#wishlist').html(data);
  319. AIZ.plugins.notify('success', "<?php echo e(translate('Item has been added to wishlist')); ?>");
  320. }
  321. else{
  322. AIZ.plugins.notify('warning', "<?php echo e(translate('Please login first')); ?>");
  323. }
  324. });
  325. <?php else: ?>
  326. AIZ.plugins.notify('warning', "<?php echo e(translate('Please login first')); ?>");
  327. <?php endif; ?>
  328. }
  329. function showAddToCartModal(id){
  330. if(!$('#modal-size').hasClass('modal-lg')){
  331. $('#modal-size').addClass('modal-lg');
  332. }
  333. $('#addToCart-modal-body').html(null);
  334. $('#addToCart').modal();
  335. $('.c-preloader').show();
  336. $.post('<?php echo e(route('cart.showCartModal')); ?>', {_token: AIZ.data.csrf, id:id}, function(data){
  337. $('.c-preloader').hide();
  338. $('#addToCart-modal-body').html(data);
  339. AIZ.plugins.slickCarousel();
  340. AIZ.plugins.zoom();
  341. AIZ.extra.plusMinus();
  342. getVariantPrice();
  343. });
  344. }
  345. $('#option-choice-form input').on('change', function(){
  346. getVariantPrice();
  347. });
  348. function getVariantPrice(){
  349. if($('#option-choice-form input[name=quantity]').val() > 0 && checkAddToCartValidity()){
  350. $.ajax({
  351. type:"POST",
  352. url: '<?php echo e(route('products.variant_price')); ?>',
  353. data: $('#option-choice-form').serializeArray(),
  354. success: function(data){
  355. $('.product-gallery-thumb .carousel-box').each(function (i) {
  356. if($(this).data('variation') && data.variation == $(this).data('variation')){
  357. $('.product-gallery-thumb').slick('slickGoTo', i);
  358. }
  359. })
  360. $('#option-choice-form #chosen_price_div').removeClass('d-none');
  361. $('#option-choice-form #chosen_price_div #chosen_price').html(data.price);
  362. $('#available-quantity').html(data.quantity);
  363. $('.input-number').prop('max', data.max_limit);
  364. if(parseInt(data.in_stock) == 0 && data.digital == 0){
  365. $('.buy-now').addClass('d-none');
  366. $('.add-to-cart').addClass('d-none');
  367. $('.out-of-stock').removeClass('d-none');
  368. }
  369. else{
  370. $('.buy-now').removeClass('d-none');
  371. $('.add-to-cart').removeClass('d-none');
  372. $('.out-of-stock').addClass('d-none');
  373. }
  374. AIZ.extra.plusMinus();
  375. }
  376. });
  377. }
  378. }
  379. function checkAddToCartValidity(){
  380. var names = {};
  381. $('#option-choice-form input:radio').each(function() { // find unique names
  382. names[$(this).attr('name')] = true;
  383. });
  384. var count = 0;
  385. $.each(names, function() { // then count them
  386. count++;
  387. });
  388. if($('#option-choice-form input:radio:checked').length == count){
  389. return true;
  390. }
  391. return false;
  392. }
  393. function addToCart(){
  394. if(checkAddToCartValidity()) {
  395. $('#addToCart').modal();
  396. $('.c-preloader').show();
  397. $.ajax({
  398. type:"POST",
  399. url: '<?php echo e(route('cart.addToCart')); ?>',
  400. data: $('#option-choice-form').serializeArray(),
  401. success: function(data){
  402. $('#addToCart-modal-body').html(null);
  403. $('.c-preloader').hide();
  404. $('#modal-size').removeClass('modal-lg');
  405. $('#addToCart-modal-body').html(data.modal_view);
  406. AIZ.extra.plusMinus();
  407. AIZ.plugins.slickCarousel();
  408. updateNavCart(data.nav_cart_view,data.cart_count);
  409. }
  410. });
  411. }
  412. else{
  413. AIZ.plugins.notify('warning', "<?php echo e(translate('Please choose all the options')); ?>");
  414. }
  415. }
  416. function buyNow(){
  417. if(checkAddToCartValidity()) {
  418. $('#addToCart-modal-body').html(null);
  419. $('#addToCart').modal();
  420. $('.c-preloader').show();
  421. $.ajax({
  422. type:"POST",
  423. url: '<?php echo e(route('cart.addToCart')); ?>',
  424. data: $('#option-choice-form').serializeArray(),
  425. success: function(data){
  426. if(data.status == 1){
  427. $('#addToCart-modal-body').html(data.modal_view);
  428. updateNavCart(data.nav_cart_view,data.cart_count);
  429. window.location.replace("<?php echo e(route('cart')); ?>");
  430. }
  431. else{
  432. $('#addToCart-modal-body').html(null);
  433. $('.c-preloader').hide();
  434. $('#modal-size').removeClass('modal-lg');
  435. $('#addToCart-modal-body').html(data.modal_view);
  436. }
  437. }
  438. });
  439. }
  440. else{
  441. AIZ.plugins.notify('warning', "<?php echo e(translate('Please choose all the options')); ?>");
  442. }
  443. }
  444. </script>
  445. <?php echo $__env->yieldContent('script'); ?>
  446. <?php
  447. echo get_setting('footer_script');
  448. ?>
  449. </body>
  450. </html>
  451. <?php /**PATH /Users/shaoguo/Desktop/公司资料/小梦/商城/ebayShop/resources/views/frontend/layouts/app.blade.php ENDPATH**/ ?>