mirror of https://github.com/4xmen/xshop.git
added compare product theme part
fixed bugs & improved ui/ux in product fullMeta added compare route improved select filter category clientpull/49/head
parent
5956918dad
commit
7051a0e40b
@ -0,0 +1,47 @@
|
||||
<section class='CompareProducts content'>
|
||||
<div class="{{gfx()['container']}}">
|
||||
<h1>
|
||||
{{$title}}
|
||||
</h1>
|
||||
<div class="row">
|
||||
@foreach($products as $product)
|
||||
<div class="col-md">
|
||||
<div class="compare">
|
||||
<div class="top">
|
||||
<img src="{{$product->originalImageUrl()}}" alt="">
|
||||
<h2>
|
||||
{{$product->name}}
|
||||
</h2>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<span>
|
||||
{{__("Price")}}
|
||||
</span>
|
||||
<b>
|
||||
{{$product->getPrice()}}
|
||||
</b>
|
||||
</li>
|
||||
@foreach($product->fullMeta() as $meta)
|
||||
<li>
|
||||
<span>
|
||||
{{$meta['data']->label}}
|
||||
</span>
|
||||
<b class="float-end">
|
||||
{!! $meta['human_value'] !!}
|
||||
</b>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "CompareProducts",
|
||||
"version": "1.0",
|
||||
"author": "xStack",
|
||||
"email": "xshop@xstack.ir",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"url": "https:\/\/xstack.ir",
|
||||
"author_url": "https:\/\/4xmen.ir",
|
||||
"packages": []
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Resources\Views\Segments;
|
||||
|
||||
use App\Models\Part;
|
||||
|
||||
class CompareProducts
|
||||
{
|
||||
public static function onAdd(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onRemove(Part $part = null)
|
||||
{
|
||||
|
||||
}
|
||||
public static function onMount(Part $part = null)
|
||||
{
|
||||
return $part;
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
.CompareProducts {
|
||||
padding: 1rem 0;
|
||||
h1{
|
||||
font-size: 25px;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.compare{
|
||||
background: #ffffff;
|
||||
border-radius: var(--xshop-border-radius);
|
||||
h2{
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
background: var(--xshop-primary);
|
||||
color: var(--xshop-diff);
|
||||
padding: .5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
img{
|
||||
height: 30vh;
|
||||
width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.top{
|
||||
border-radius: var(--xshop-border-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
ul{
|
||||
padding-top: 1rem;
|
||||
}
|
||||
li{
|
||||
list-style: none;
|
||||
padding: 7px;
|
||||
|
||||
.meta-tag{
|
||||
background: #00000011 ;
|
||||
padding: 3px;
|
||||
border-radius: var(--xshop-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 271 KiB |
Loading…
Reference in New Issue