improved ui/ux by stock quantity

master
A1Gard 3 weeks ago
parent 2a7714845b
commit 62028c6f99

@ -225,6 +225,7 @@ class AreaController extends Controller
public function build(){
$exitCode = \Artisan::call('client');
$exitCode = \Artisan::call('build');
// Get the command output from cache

@ -71,22 +71,32 @@
</p>
</div>
<div class="mt-4">&nbsp;</div>
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@if($product->stock_quantity == 'IN_STOCK')
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@endif
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
{{__("Not available")}}
</a>
@endif
<div class="mt-4">&nbsp;</div>

@ -111,22 +111,32 @@
</a>
<div class="mt-1">&nbsp;</div>
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@if($product->stock_quantity == 'IN_STOCK')
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@endif
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
{{__("Not available")}}
</a>
@endif
</div>

@ -49,25 +49,33 @@
@endif
</div>
<br>
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@else
<div class="text-center">
@if($product->stock_quantity == 'IN_STOCK')
@if($product->quantities()->count()>0)
<quantities-add-to-card
:qz='@json($product->quantities)'
:props='@json(usableProp($product->category->props))'
currency="{{config('app.currency.symbol')}}"
card-link="{{ route('client.product-card-toggle',$product->slug) }}"
:translate='@json(['add-to-card' => __('Add to card')])'
@if($product->hasDiscount())
:discount='@json($product->activeDiscounts()->first())'
@endif
></quantities-add-to-card>
@else
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary add-to-card btn-lg">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
</div>
@endif
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
<h4>
{{__("Description")}}

@ -27,11 +27,19 @@
</span>
</div>
<div class="p-2">
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary w-100 add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@if($product->stock_quantity == 'IN_STOCK')
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
</div>
</a>
</div>

@ -4,11 +4,19 @@
<img src="{{$product->thumbUrl2()}}" class="img-2" alt="{{$product->name}}" loading="lazy">
<div class="">
<div class="btns">
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@if($product->stock_quantity == 'IN_STOCK')
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
<a class="btn btn-outline-dark compare-btn text-dark" data-slug="{{$product->slug}}"
data-bs-custom-class="custom-tooltip"
data-bs-toggle="tooltip" data-bs-placement="top"

@ -27,11 +27,19 @@
</span>
</div>
<div class="p-2">
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-outline-primary w-100 add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@if($product->stock_quantity == 'IN_STOCK')
<a href="{{ route('client.product-card-toggle',$product->slug) }}"
class="btn btn-primary add-to-card">
<i class="ri-shopping-bag-3-line"></i>
{{__("Add to card")}}
</a>
@else
<a
class="btn btn-primary disabled">
<i class="ri-shopping-bag-3-line"></i>
{{__("Not available")}}
</a>
@endif
</div>
</a>
</section>

Loading…
Cancel
Save