add cookie consent, change search for product_type empty
This commit is contained in:
@@ -11,13 +11,17 @@ class SearchController extends Controller
|
|||||||
{
|
{
|
||||||
public function search(Request $request)
|
public function search(Request $request)
|
||||||
{
|
{
|
||||||
|
$data = $request->input();
|
||||||
|
$data['product_type'] = 'botanic';
|
||||||
$articles = Searches::getResults($request->input());
|
$articles = Searches::getResults($request->input());
|
||||||
$data = [
|
$data = [
|
||||||
'articles' => $articles,
|
'articles' => $articles,
|
||||||
'articles_count' => $articles ? count($articles) : 0,
|
'articles_count' => $articles ? count($articles) : 0,
|
||||||
'search' => $request->input(),
|
'search' => $data,
|
||||||
'product_type' => $request->input('product_type'),
|
'product_type' => $data['product_type'],
|
||||||
];
|
];
|
||||||
|
// dump($data);
|
||||||
|
// exit;
|
||||||
return view('Shop.Search.results', $data);
|
return view('Shop.Search.results', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,22 +89,22 @@ class Article extends Model implements HasMedia
|
|||||||
|
|
||||||
public function scopeByAutocomplete($query, $str)
|
public function scopeByAutocomplete($query, $str)
|
||||||
{
|
{
|
||||||
return $query->where($this->table . '.name', 'LIKE', "%${str}%");
|
return $query->where($this->table . '.name', 'LIKE', '%' . $str .'%');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeSearch($query, $str)
|
public function scopeSearch($query, $str)
|
||||||
{
|
{
|
||||||
return $query->where($this->table . '.name', 'LIKE', "%${str}%");
|
return $query->where($this->table . '.name', 'LIKE', '%' . $str .'%');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeByArticleNature($query, $id)
|
public function scopeByArticleNature($query, $id)
|
||||||
{
|
{
|
||||||
return $query->where($this->table . '.article_nature_id', $id);
|
return $id ? $query->where($this->table . '.article_nature_id', $id) : $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeByArticleNatures($query, $ids)
|
public function scopeByArticleNatures($query, $ids)
|
||||||
{
|
{
|
||||||
return $query->whereIn($this->table . '.article_nature_id', $ids);
|
return $ids ? $query->whereIn($this->table . '.article_nature_id', $ids) : $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeByCategories($query, $categories_id)
|
public function scopeByCategories($query, $categories_id)
|
||||||
|
|||||||
89
config/apexcharts.php
Normal file
89
config/apexcharts.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Font Options
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify font family and font color.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'options' => [
|
||||||
|
'chart' => [
|
||||||
|
'type' => 'line',
|
||||||
|
'height' => 500,
|
||||||
|
'width' => null,
|
||||||
|
'toolbar' => [
|
||||||
|
'show' => false,
|
||||||
|
],
|
||||||
|
'stacked' => false,
|
||||||
|
'zoom' => [
|
||||||
|
'enabled' => true,
|
||||||
|
],
|
||||||
|
'fontFamily' => 'Nunito',
|
||||||
|
'foreColor' => '#373d3f',
|
||||||
|
],
|
||||||
|
|
||||||
|
'plotOptions' => [
|
||||||
|
'bar' => [
|
||||||
|
'horizontal' => false,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'colors' => [
|
||||||
|
'#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe',
|
||||||
|
'#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4'
|
||||||
|
],
|
||||||
|
|
||||||
|
'series' => [],
|
||||||
|
|
||||||
|
'dataLabels' => [
|
||||||
|
'enabled' => false
|
||||||
|
],
|
||||||
|
|
||||||
|
'labels' => [],
|
||||||
|
|
||||||
|
'title' => [
|
||||||
|
'text' => []
|
||||||
|
],
|
||||||
|
|
||||||
|
'subtitle' => [
|
||||||
|
'text' => 'undefined',
|
||||||
|
'align' => 'left',
|
||||||
|
],
|
||||||
|
|
||||||
|
'xaxis' => [
|
||||||
|
'categories' => [],
|
||||||
|
],
|
||||||
|
|
||||||
|
'grid' => [
|
||||||
|
'show' => true
|
||||||
|
],
|
||||||
|
|
||||||
|
'markers' => [
|
||||||
|
'size' => 4,
|
||||||
|
'colors' => [
|
||||||
|
'#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe',
|
||||||
|
'#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4'
|
||||||
|
],
|
||||||
|
'strokeColors' => "#fff",
|
||||||
|
'strokeWidth' => 2,
|
||||||
|
'hover' => [
|
||||||
|
'size' => 7,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
'stroke' => [
|
||||||
|
'show' => true,
|
||||||
|
'width' => 4,
|
||||||
|
'colors' => [
|
||||||
|
'#008FFB', '#00E396', '#feb019', '#ff455f', '#775dd0', '#80effe',
|
||||||
|
'#0077B5', '#ff6384', '#c9cbcf', '#0057ff', '#00a9f4', '#2ccdc9', '#5e72e4'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
@include('Shop.Tags.partials.filter')
|
@include('Shop.Tags.partials.filter')
|
||||||
|
|
||||||
{{ $articles_count ?? 0 }} Résultats
|
{{ $articles_count ?? 0 }} Résultats
|
||||||
|
|
||||||
@if ($display_by_rows ?? false)
|
@if ($display_by_rows ?? false)
|
||||||
@include('Shop.Shelves.partials.category_articles_rows')
|
@include('Shop.Shelves.partials.category_articles_rows')
|
||||||
@else
|
@else
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@include("Shop.layout.partials.footer")
|
@include("Shop.layout.partials.footer")
|
||||||
|
@include('cookie-consent::index')
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user