product creation on channel based and admin logo
This commit is contained in:
parent
b39f412842
commit
1b95d3d877
|
|
@ -395,7 +395,8 @@ return [
|
|||
'related-products' => 'Related Products',
|
||||
'product-search-hint' => 'Start typing product name',
|
||||
'no-result-found' => 'Products not found with same name.',
|
||||
'searching' => 'Searching ...'
|
||||
'searching' => 'Searching ...',
|
||||
'channel' => 'Channel'
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<accordian :title="'{{ __('admin::app.catalog.products.channel') }}'" :active="true">
|
||||
<div slot="body">
|
||||
<div class="control-group">
|
||||
<label for="sku">{{ __('admin::app.catalog.products.channel') }}</label>
|
||||
<select class="control" name="channels[]" multiple>
|
||||
@foreach (app('Webkul\Core\Repositories\ChannelRepository')->all() as $channel)
|
||||
<option value="{{ $channel->id }}">
|
||||
{{ $channel->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</accordian>
|
||||
|
|
@ -150,6 +150,7 @@
|
|||
|
||||
@endforeach
|
||||
|
||||
@include ('admin::catalog.products.accordians.channels')
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.inventories.before', ['product' => $product]) !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
<div class="navbar-top-left">
|
||||
<div class="brand-logo">
|
||||
<a href="{{ route('admin.dashboard.index') }}">
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="Bagisto"/>
|
||||
@if (core()->getConfigData('general.design.admin_logo.logo_image'))
|
||||
<img src="{{ \Illuminate\Support\Facades\Storage::url(core()->getConfigData('general.design.admin_logo.logo_image')) }}" alt="Bagisto" style="height: 40px; width: 110px;"/>
|
||||
@else
|
||||
<img src="{{ asset('vendor/webkul/ui/assets/images/logo.png') }}" alt="Bagisto"/>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -169,7 +169,19 @@ class ProductFlat
|
|||
if ($parentProduct && ! array_key_exists($parentProduct->id, $superAttributes))
|
||||
$superAttributes[$parentProduct->id] = $parentProduct->super_attributes()->pluck('code')->toArray();
|
||||
|
||||
foreach (core()->getAllChannels() as $channel) {
|
||||
if (isset($product['channels'])) {
|
||||
foreach ($product['channels'] as $channel) {
|
||||
$channels[] = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
|
||||
}
|
||||
} else if (isset($parentProduct['channels'])){
|
||||
foreach ($parentProduct['channels'] as $channel) {
|
||||
$channels[] = app('Webkul\Core\Repositories\ChannelRepository')->findOrFail($channel);
|
||||
}
|
||||
} else {
|
||||
$channels[] = core()->getDefaultChannel();
|
||||
}
|
||||
|
||||
foreach ($channels as $channel) {
|
||||
foreach ($channel->locales as $locale) {
|
||||
$productFlat = $this->productFlatRepository->findOneWhere([
|
||||
'product_id' => $product->id,
|
||||
|
|
|
|||
|
|
@ -260,6 +260,10 @@ class ProductRepository extends Repository
|
|||
$this->productImage->uploadImages($data, $product);
|
||||
}
|
||||
|
||||
if (isset($data['channels'])) {
|
||||
$product['channels'] = $data['channels'];
|
||||
}
|
||||
|
||||
Event::fire('catalog.product.update.after', $product);
|
||||
|
||||
return $product;
|
||||
|
|
|
|||
Loading…
Reference in New Issue