variants.blade.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div class="modal-header bord-btm">
  2. <h4 class="modal-title h6">{{ translate('Select variation') }} - {{ $stocks->first()->product->getTranslation('name') }}</h4>
  3. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
  4. </div>
  5. <div class="modal-body">
  6. <div class="row gutters-5">
  7. @foreach ($stocks as $key => $stock)
  8. <div class="col-lg-3 col-sm-6">
  9. <label class="aiz-megabox d-block">
  10. <input type="radio" name="variant" value="{{ $stock->variant }}" @if ($stock->qty <= 0)
  11. disabled
  12. @endif>
  13. <span class="d-flex p-2 pad-all aiz-megabox-elem">
  14. <span class="aiz-rounded-check flex-shrink-0 @if ($stock->qty > 0)
  15. mt-1
  16. @endif"></span>
  17. <span class="flex-grow-1 pad-lft pl-2">
  18. <span class="d-block strong-600">{{ $stock->variant }}</span>
  19. <span class="d-block">Price: {{ single_price($stock->price) }}</span>
  20. <span class="badge badge-inline @if ($stock->qty <= 0)
  21. badge-secondary
  22. @else
  23. badge-success
  24. @endif">Stock: {{ $stock->qty }}</span>
  25. </span>
  26. </span>
  27. </label>
  28. </div>
  29. @endforeach
  30. </div>
  31. </div>
  32. <div class="modal-footer">
  33. <button type="button" class="btn btn-styled btn-base-3" data-dismiss="modal">Close</button>
  34. <button type="button" onclick="addVariantProductToCart({{ $stocks->first()->product->id }})" class="btn btn-primary btn-styled btn-base-1">Add Product</button>
  35. </div>