a1feabb4f0d02f0c1a4101cdad97ce8dadf60c4a.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <div class="modal-body p-4 c-scrollbar-light">
  2. <div class="row">
  3. <div class="col-lg-6">
  4. <div class="row gutters-10 flex-row-reverse">
  5. <?php
  6. $photos = explode(',',$product->photos);
  7. ?>
  8. <div class="col">
  9. <div class="aiz-carousel product-gallery" data-nav-for='.product-gallery-thumb' data-fade='true' data-auto-height='true'>
  10. <?php $__currentLoopData = $photos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  11. <div class="carousel-box img-zoom rounded">
  12. <img
  13. class="img-fluid lazyload"
  14. src="<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>"
  15. data-src="<?php echo e(uploaded_asset($photo)); ?>"
  16. onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>';"
  17. >
  18. </div>
  19. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  20. <?php $__currentLoopData = $product->stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  21. <?php if($stock->image != null): ?>
  22. <div class="carousel-box img-zoom rounded">
  23. <img
  24. class="img-fluid lazyload"
  25. src="<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>"
  26. data-src="<?php echo e(uploaded_asset($stock->image)); ?>"
  27. onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>';"
  28. >
  29. </div>
  30. <?php endif; ?>
  31. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  32. </div>
  33. </div>
  34. <div class="col-auto w-90px">
  35. <div class="aiz-carousel carousel-thumb product-gallery-thumb" data-items='5' data-nav-for='.product-gallery' data-vertical='true' data-focus-select='true'>
  36. <?php $__currentLoopData = $photos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  37. <div class="carousel-box c-pointer border p-1 rounded">
  38. <img
  39. class="lazyload mw-100 size-60px mx-auto"
  40. src="<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>"
  41. data-src="<?php echo e(uploaded_asset($photo)); ?>"
  42. onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>';"
  43. >
  44. </div>
  45. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  46. <?php $__currentLoopData = $product->stocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  47. <?php if($stock->image != null): ?>
  48. <div class="carousel-box c-pointer border p-1 rounded" data-variation="<?php echo e($stock->variant); ?>">
  49. <img
  50. class="lazyload mw-100 size-50px mx-auto"
  51. src="<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>"
  52. data-src="<?php echo e(uploaded_asset($stock->image)); ?>"
  53. onerror="this.onerror=null;this.src='<?php echo e(static_asset('assets/img/placeholder.jpg')); ?>';"
  54. >
  55. </div>
  56. <?php endif; ?>
  57. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="col-lg-6">
  63. <div class="text-left">
  64. <h2 class="mb-2 fs-20 fw-600">
  65. <?php echo e($product->getTranslation('name')); ?>
  66. </h2>
  67. <?php if(home_price($product) != home_discounted_price($product)): ?>
  68. <div class="row no-gutters mt-3">
  69. <div class="col-2">
  70. <div class="opacity-50 mt-2"><?php echo e(translate('Price')); ?>:</div>
  71. </div>
  72. <div class="col-10">
  73. <div class="fs-20 opacity-60">
  74. <del>
  75. <?php echo e(home_price($product)); ?>
  76. <?php if($product->unit != null): ?>
  77. <span>/<?php echo e($product->getTranslation('unit')); ?></span>
  78. <?php endif; ?>
  79. </del>
  80. </div>
  81. </div>
  82. </div>
  83. <div class="row no-gutters mt-2">
  84. <div class="col-2">
  85. <div class="opacity-50"><?php echo e(translate('Discount Price')); ?>:</div>
  86. </div>
  87. <div class="col-10">
  88. <div class="">
  89. <strong class="h2 fw-600 text-primary">
  90. <?php echo e(home_discounted_price($product)); ?>
  91. </strong>
  92. <?php if($product->unit != null): ?>
  93. <span class="opacity-70">/<?php echo e($product->getTranslation('unit')); ?></span>
  94. <?php endif; ?>
  95. </div>
  96. </div>
  97. </div>
  98. <?php else: ?>
  99. <div class="row no-gutters mt-3">
  100. <div class="col-2">
  101. <div class="opacity-50"><?php echo e(translate('Price')); ?>:</div>
  102. </div>
  103. <div class="col-10">
  104. <div class="">
  105. <strong class="h2 fw-600 text-primary">
  106. <?php echo e(home_discounted_price($product)); ?>
  107. </strong>
  108. <span class="opacity-70">/<?php echo e($product->unit); ?></span>
  109. </div>
  110. </div>
  111. </div>
  112. <?php endif; ?>
  113. <?php if(addon_is_activated('club_point') && $product->earn_point > 0): ?>
  114. <div class="row no-gutters mt-4">
  115. <div class="col-2">
  116. <div class="opacity-50"><?php echo e(translate('Club Point')); ?>:</div>
  117. </div>
  118. <div class="col-10">
  119. <div class="d-inline-block club-point bg-soft-primary px-3 py-1 border">
  120. <span class="strong-700"><?php echo e($product->earn_point); ?></span>
  121. </div>
  122. </div>
  123. </div>
  124. <?php endif; ?>
  125. <hr>
  126. <?php
  127. $qty = 0;
  128. foreach ($product->stocks as $key => $stock) {
  129. $qty += $stock->qty;
  130. }
  131. ?>
  132. <form id="option-choice-form">
  133. <?php echo csrf_field(); ?>
  134. <input type="hidden" name="id" value="<?php echo e($product->id); ?>">
  135. <!-- Quantity + Add to cart -->
  136. <?php if($product->digital !=1): ?>
  137. <?php if($product->choice_options != null): ?>
  138. <?php $__currentLoopData = json_decode($product->choice_options); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $choice): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  139. <div class="row no-gutters">
  140. <div class="col-2">
  141. <div class="opacity-50 mt-2 "><?php echo e(\App\Models\Attribute::find($choice->attribute_id)->getTranslation('name')); ?>:</div>
  142. </div>
  143. <div class="col-10">
  144. <div class="aiz-radio-inline">
  145. <?php $__currentLoopData = $choice->values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  146. <label class="aiz-megabox pl-0 mr-2">
  147. <input
  148. type="radio"
  149. name="attribute_id_<?php echo e($choice->attribute_id); ?>"
  150. value="<?php echo e($value); ?>"
  151. <?php if($key == 0): ?> checked <?php endif; ?>
  152. >
  153. <span class="aiz-megabox-elem rounded d-flex align-items-center justify-content-center py-2 px-3 mb-2">
  154. <?php echo e($value); ?>
  155. </span>
  156. </label>
  157. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  158. </div>
  159. </div>
  160. </div>
  161. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  162. <?php endif; ?>
  163. <?php if(count(json_decode($product->colors)) > 0): ?>
  164. <div class="row no-gutters">
  165. <div class="col-2">
  166. <div class="opacity-50 mt-2"><?php echo e(translate('Color')); ?>:</div>
  167. </div>
  168. <div class="col-10">
  169. <div class="aiz-radio-inline">
  170. <?php $__currentLoopData = json_decode($product->colors); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $color): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
  171. <label class="aiz-megabox pl-0 mr-2" data-toggle="tooltip" data-title="<?php echo e(\App\Models\Color::where('code', $color)->first()->name); ?>">
  172. <input
  173. type="radio"
  174. name="color"
  175. value="<?php echo e(\App\Models\Color::where('code', $color)->first()->name); ?>"
  176. <?php if($key == 0): ?> checked <?php endif; ?>
  177. >
  178. <span class="aiz-megabox-elem rounded d-flex align-items-center justify-content-center p-1 mb-2">
  179. <span class="size-30px d-inline-block rounded" style="background: <?php echo e($color); ?>;"></span>
  180. </span>
  181. </label>
  182. <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  183. </div>
  184. </div>
  185. </div>
  186. <hr>
  187. <?php endif; ?>
  188. <div class="row no-gutters">
  189. <div class="col-2">
  190. <div class="opacity-50 mt-2"><?php echo e(translate('Quantity')); ?>:</div>
  191. </div>
  192. <div class="col-10">
  193. <div class="product-quantity d-flex align-items-center">
  194. <div class="row no-gutters align-items-center aiz-plus-minus mr-3" style="width: 130px;">
  195. <button class="btn col-auto btn-icon btn-sm btn-circle btn-light" type="button" data-type="minus" data-field="quantity" disabled="">
  196. <i class="las la-minus"></i>
  197. </button>
  198. <input type="number" name="quantity" class="col border-0 text-center flex-grow-1 fs-16 input-number" placeholder="1" value="<?php echo e($product->min_qty); ?>" min="<?php echo e($product->min_qty); ?>" max="10" lang="en">
  199. <button class="btn col-auto btn-icon btn-sm btn-circle btn-light" type="button" data-type="plus" data-field="quantity">
  200. <i class="las la-plus"></i>
  201. </button>
  202. </div>
  203. <div class="avialable-amount opacity-60">
  204. <?php if($product->stock_visibility_state == 'quantity'): ?>
  205. (<span id="available-quantity"><?php echo e($qty); ?></span> <?php echo e(translate('available')); ?>)
  206. <?php elseif($product->stock_visibility_state == 'text' && $qty >= 1): ?>
  207. (<span id="available-quantity"><?php echo e(translate('In Stock')); ?></span>)
  208. <?php endif; ?>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. <hr>
  214. <?php endif; ?>
  215. <div class="row no-gutters pb-3 d-none" id="chosen_price_div">
  216. <div class="col-2">
  217. <div class="opacity-50"><?php echo e(translate('Total Price')); ?>:</div>
  218. </div>
  219. <div class="col-10">
  220. <div class="product-price">
  221. <strong id="chosen_price" class="h4 fw-600 text-primary">
  222. </strong>
  223. </div>
  224. </div>
  225. </div>
  226. </form>
  227. <div class="mt-3">
  228. <?php if($product->digital == 1): ?>
  229. <button type="button" class="btn btn-primary buy-now fw-600 add-to-cart" onclick="addToCart()">
  230. <i class="la la-shopping-cart"></i>
  231. <span class="d-none d-md-inline-block"><?php echo e(translate('Add to cart')); ?></span>
  232. </button>
  233. <?php elseif($qty > 0): ?>
  234. <?php if($product->external_link != null): ?>
  235. <a type="button" class="btn btn-soft-primary mr-2 add-to-cart fw-600" href="<?php echo e($product->external_link); ?>">
  236. <i class="las la-share"></i>
  237. <span class="d-none d-md-inline-block"><?php echo e(translate($product->external_link_btn)); ?></span>
  238. </a>
  239. <?php else: ?>
  240. <button type="button" class="btn btn-primary buy-now fw-600 add-to-cart" onclick="addToCart()">
  241. <i class="la la-shopping-cart"></i>
  242. <span class="d-none d-md-inline-block"><?php echo e(translate('Add to cart')); ?></span>
  243. </button>
  244. <?php endif; ?>
  245. <?php endif; ?>
  246. <button type="button" class="btn btn-secondary out-of-stock fw-600 d-none" disabled>
  247. <i class="la la-cart-arrow-down"></i><?php echo e(translate('Out of Stock')); ?>
  248. </button>
  249. </div>
  250. </div>
  251. </div>
  252. </div>
  253. </div>
  254. <script type="text/javascript">
  255. $('#option-choice-form input').on('change', function () {
  256. getVariantPrice();
  257. });
  258. </script>
  259. <?php /**PATH /www/wwwroot/www.easybuyjp.shop/resources/views/frontend/partials/addToCart.blade.php ENDPATH**/ ?>