Sindbad~EG File Manager

Current Path : /var/www/html/aventurasolar.sumar.com.py/resources/views/livewire/
Upload File :
Current File : /var/www/html/aventurasolar.sumar.com.py/resources/views/livewire/catalogofront.blade.php

<div>
    <style>
		.portfolio-hover2{
	        height: 300px;
	        background: #FFF;
	        overflow: hidden;
	    }
	    .portfolio-hover2 img{
	        width: 100%;
	        height: auto;
	    }
	    @supports(object-fit: cover){
	        .portfolio-hover2 img{
	            height: 100%;
	            object-fit: cover;
	            object-position: center center;
	            transition: transform .4s;
	        }
	    }
	    .zoom:hover {
		  	transform: scale(1.2); 
		}
    </style>
    <div class="col-lg-12" align="center">
  		<h1 style="font-size: 5vw; color:#790f13 !important;">CATALOGO DE RECOMPENSAS</h1>
	</div>
    <div class="col-12">
  		<div class="form-group">
			<input wire:model="buscar" type="search" class="form-control" placeholder="Buscar" /><hr>
  		</div>
  	</div>
    <div class="col-12">
        <div class="row" style="background-color: white;border-radius: 10px;padding: 20px">
        	<div class="col-md-9">
        		<div class="row">
		        	@foreach ($catalogos as $element)
		        		<div class="col-sm-4">
		        			<div style="background-color: white;border-radius: 20px;" align="center">
			                	<a href="{{ asset('images/catalogo/'.$element->foto) }}" data-toggle="lightbox" data-title="{{ $element->nombre }}" data-gallery="gallery">
			                		<div class="portfolio-hover2">
			                  			<img src="{{ asset('images/catalogo/'.$element->foto) }}" class="img-fluid mb-2 zoom" />
			                  		</div>
			                	</a>
			                	<h1 style="padding-top: 10px;color: black !important">{{ $element->nombre }}</h1>
								<small>Stock ({{ $element->stock }})</small>
			                	<h4><span class="badge badge-pill badge-secondary"><img src="/imgsystem/moneda.png" width="30px;">{{number_format($element->moneda, 0, '', '.')}}</span></h4>
			                	@if (in_array($element->id, Cart::getContent()->pluck('id')->toArray()))
									<button type="button" class="btn btn-outline-success" wire:click="deletecarrito({{ $element->id }})"><i class="fa fa-check-circle-o"></i> Eliminar del carrito</button>
								@else
									<button class="btn btn-warning" wire:click="addcarrito({{ $element->id }})"><i class="fa fa-shopping-cart"></i> Agregar al carrito</button>
								@endif
								<br><br>
			                </div>
		              	</div>
		        	@endforeach
		        </div>
	        </div>
	        @php
	        	$totalmonedas=0;
	        	$totalmonedasusadas=0;
	        @endphp
	        @foreach($monedas as $element)
	        	@php
		        	$totalmonedas+=$element->monedas;
		        @endphp
	        @endforeach
	        @foreach($monedasusadas as $value)
	        	@php
		        	$totalmonedasusadas+=$value->monedas;
		        @endphp
	        @endforeach
	        <div class="col-md-3"  align="center">
	        	<form action="{{ route('enviarpedido') }}" method="POST" enctype="multipart/form-data">
	        		@csrf
		        	<h1 style="color: black !important;">Disponible</h1>
		        	<h2><span class="badge badge-pill badge-secondary">{{number_format($totalmonedas-$totalmonedasusadas, 0, '', '.')}}</span></h2><hr>
		        	<h1 style="color: black !important;">Carrito</h1>
		        	@php
		        		$monedasdisponibles=$totalmonedas-$totalmonedasusadas;
						$total=0;
					@endphp
					@foreach (Cart::getContent() as $value) 
						@php
							$total+=$value->price*$value->quantity;
						@endphp 
						<input type="hidden" name="producto_id[]" value="{{ $value->id }}" required>
						<input type="hidden" name="monedass[]" value="{{ $value->price }}" required>
					@endforeach
					@if($total > $monedasdisponibles)
						<script type="text/javascript">alert('No tienes monedas suficientes para solicitar todos los productos, porfavor elimina algunos artículos');</script>
					@endif
		        	<h2><span class="badge badge-pill badge-secondary">{{ $total }}</span><input type="number" style="width: 1px !important;height: 1px !important;background-color: white;color: white;border: 0px solid white;" name="total[]" min="1" max="{{ $monedasdisponibles }}" value="{{ $total}}" required></h2><hr>
		        	{{ $producto_id }}
		        	<button type="button" class="btn btn-success" data-toggle="modal" data-target=".carrito-modal">
						<i class="fa fa-shopping-cart"></i> Ver Carrito
					</button><hr>
					<div class="modal fade carrito-modal" wire:ignore.self tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
						<div class="modal-dialog modal-lg">
							<div class="modal-content">
								<div class="modal-header">
									<h5 class="modal-title" id="exampleModalLabel">Carrito de pedidos</h5>
									<button type="button" class="close" data-dismiss="modal" aria-label="Close">
										<span aria-hidden="true">&times;</span>
									</button>
								</div>
								<div class="modal-body">
									<table class="table">
										<thead>
											<tr>
												<th scope="col">Producto</th>
												<th scope="col"><center>Cantidad</center></th>
												<th scope="col"><center>Acciones</center></th>
											</tr>
										</thead>
										<tbody>
											@foreach(Cart::getContent() as $prod)
												<tr>
													<td>{{$prod->name}}</td>
													<td align="center">
														<button type="button" class="btn btn-sm btn-success" wire:click="menoscarrito({{$prod->id}})">
															&#8249;
														</button>
														{{$prod->quantity}}
														<button type="button" class="btn btn-sm btn-success" wire:click="mascarrito({{$prod->id}})">
															&#8250;
														</button>
													</td>
													<td align="center">
														<button type="button" class="btn btn-sm btn-danger" wire:click="deletecarrito({{$prod->id}})">
															x
														</button>
													</td>
												</tr>
											@endforeach
										</tbody>
									</table>
								</div>
								<div class="modal-footer">
									<button type="submit" class="btn btn-success">Realizar pedido</button>
								</div>
							</div>
						</div>
					</div>
		        </form>
	        </div>
        </div>
    </div>
    <div class="col-md-12">
    	{{ $catalogos->links() }}
    </div>	
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists