updates
This commit is contained in:
parent
6ef9ed0822
commit
76829f8f93
|
|
@ -22,7 +22,7 @@ class AdminHelper
|
|||
|
||||
public function saveLocaleImg($locale)
|
||||
{
|
||||
$uploadedImagePath = $this->uploadImage('locale_image.image_0');
|
||||
$uploadedImagePath = $this->uploadImage($locale, 'locale_image.image_0');
|
||||
|
||||
if ($uploadedImagePath) {
|
||||
$locale->locale_image = $uploadedImagePath;
|
||||
|
|
@ -36,7 +36,7 @@ class AdminHelper
|
|||
{
|
||||
$category = $this->categoryRepository->findOrFail($categoryId);
|
||||
|
||||
$uploadedImagePath = $this->uploadImage('category_icon_path.image_0');
|
||||
$uploadedImagePath = $this->uploadImage($category, 'category_icon_path.image_1');
|
||||
|
||||
if ($uploadedImagePath) {
|
||||
$category->category_icon_path = $uploadedImagePath;
|
||||
|
|
@ -46,22 +46,26 @@ class AdminHelper
|
|||
return $category;
|
||||
}
|
||||
|
||||
public function uploadImage($type)
|
||||
public function uploadImage($record, $type)
|
||||
{
|
||||
$request = request();
|
||||
|
||||
$image = '';
|
||||
$file = $type;
|
||||
$dir = "velocity/$type";
|
||||
$dir = 'velocity/' . $type;
|
||||
|
||||
if ($request->hasFile($file)) {
|
||||
Storage::delete($dir . $file);
|
||||
if ($type == 'locale_image.image_0' && $record->locale_image) {
|
||||
Storage::delete($record->locale_image);
|
||||
}
|
||||
if ($type == 'category_icon_path.image_1' && $record->category_icon_path) {
|
||||
Storage::delete($record->category_icon_path);
|
||||
}
|
||||
|
||||
$image = $request->file($file)->store($dir);
|
||||
|
||||
return $image;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
@if ($favicon = core()->getCurrentChannel()->favicon_url)
|
||||
<link rel="icon" sizes="16x16" href="{{ $favicon }}" />
|
||||
@else
|
||||
<link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" />
|
||||
<link rel="icon" sizes="16x16" href="{{ asset('themes/velocity/assets/images/favicon.png') }}" />
|
||||
@endif
|
||||
|
||||
@yield('head')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
@include('shop::UI.product-quick-view')
|
||||
{{-- @include('shop::UI.product-quick-view') --}}
|
||||
|
||||
@php
|
||||
if (isset($checkmode) && $checkmode && $toolbarHelper->getCurrentMode() == "list") {
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
src="{{ $productBaseImage['medium_image_url'] }}"
|
||||
alt="{{ $product->name }}">
|
||||
|
||||
<quick-view-btn details="{{ $product }}"></quick-view-btn>
|
||||
{{-- <quick-view-btn details="{{ $product }}"></quick-view-btn> --}}
|
||||
</a>
|
||||
|
||||
<div class="card-body">
|
||||
|
|
|
|||
Loading…
Reference in New Issue