minor updates

This commit is contained in:
shubhammehrotra.symfony@webkul.com 2020-01-02 10:50:01 +05:30
parent d6df36be8e
commit e08ca8f366
7 changed files with 266 additions and 554 deletions

View File

@ -1785,11 +1785,224 @@
position: relative;
}
.grouped-product-container .grouped-product-list {
padding: 15px 0;
border-top: solid 1px rgba(162, 162, 162, 0.2);
}
.grouped-product-container .grouped-product-list ul li {
margin-bottom: 15px;
width: 100%;
display: inline-block;
}
.grouped-product-container .grouped-product-list ul li:last-child {
margin-bottom: 0;
}
.grouped-product-container .grouped-product-list ul li:first-child span {
font-weight: 600;
}
.grouped-product-container .grouped-product-list ul li:first-child span:last-child {
float: right;
width: 50px;
text-align: left;
}
.grouped-product-container .grouped-product-list ul li .name {
vertical-align: middle;
display: inline-block;
}
.grouped-product-container .grouped-product-list ul li .name .product-price {
margin-top: 5px;
margin-bottom: 0;
font-size: 14px;
}
.grouped-product-container .grouped-product-list ul li .name .product-price .special-price {
font-size: 16px;
}
.grouped-product-container .grouped-product-list ul li .qty {
float: right;
}
.grouped-product-container .grouped-product-list ul li .qty .control-group {
max-width: initial;
width: auto;
text-align: center;
margin-bottom: 0;
border-top: 0;
padding-top: 0;
}
.grouped-product-container .grouped-product-list ul li .qty .control-group label {
display: none;
}
.grouped-product-container .grouped-product-list ul li .qty .control-group .control {
height: 38px;
width: 60px;
text-align: center;
line-height: 38px;
}
.bundle-options-wrapper .bundle-option-list {
padding: 15px 0;
border-top: solid 1px rgba(162, 162, 162, 0.2);
}
.bundle-options-wrapper .bundle-option-list h3 {
font-size: 16px;
margin: 0;
color: #242424;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item {
border-bottom: solid 1px rgba(162, 162, 162, 0.2);
padding: 15px 0;
width: 100%;
display: inline-block;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item:last-child {
border-bottom: 0;
padding-bottom: 0;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group {
margin-bottom: 0;
color: #5E5E5E;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group label {
color: #242424;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-group .control {
color: #5E5E5E;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity {
border-top: 0;
padding-bottom: 0;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .quantity.has-error button {
border-color: #FC6868;
color: #FC6868;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item .control-error {
float: left;
width: 100%;
}
.bundle-options-wrapper .bundle-option-list .bundle-option-item.has-error button {
border-color: #FC6868;
color: #FC6868;
}
.bundle-options-wrapper .bundle-summary {
padding: 15px 0;
border-top: solid 1px rgba(162, 162, 162, 0.2);
}
.bundle-options-wrapper .bundle-summary h3 {
font-size: 16px;
margin: 0;
color: #242424;
}
.bundle-options-wrapper .bundle-summary .quantity {
border-top: 0;
}
.bundle-options-wrapper .bundle-summary .bundle-price {
font-weight: 600;
font-size: 24px;
color: #FF6472;
margin-top: 10px;
}
.bundle-options-wrapper .bundle-summary ul.bundle-items li {
margin-bottom: 20px;
}
.bundle-options-wrapper .bundle-summary ul.bundle-items li:last-child {
margin-bottom: 0;
}
.bundle-options-wrapper .bundle-summary ul.bundle-items li .selected-products {
color: #5E5E5E;
}
.category-container .grid-card,
.search-container .grid-card {
width: 22rem;
}
.downloadable-container .sample-list {
padding: 15px 0;
border-top: solid 1px rgba(162, 162, 162, 0.2);
}
.downloadable-container .sample-list h3 {
font-size: 16px;
margin-top: 0;
}
.downloadable-container .sample-list ul li {
margin-bottom: 5px;
}
.downloadable-container .sample-list ul li:last-child {
margin-bottom: 0;
}
.downloadable-container .link-list {
padding: 15px 0;
border-top: solid 1px rgba(162, 162, 162, 0.2);
}
.downloadable-container .link-list h3 {
font-size: 16px;
margin-top: 0;
}
.downloadable-container .link-list ul li {
margin-bottom: 15px;
}
.downloadable-container .link-list ul li:last-child {
margin-bottom: 0;
}
.downloadable-container .link-list ul li .checkbox input[type=checkbox] {
width: 15px !important;
height: 15px !important;
margin-left: -24px;
}
.downloadable-container .link-list ul li a {
float: right;
margin-top: 3px;
}
.category-container .hero-image {
height: 100%;
max-width: 500px;
max-height: 400px;
display: inline-block;
}
.category-container .hero-image img {
width: 100%;
height: 100%;
}
/* @author Shubham Mehrotra */
body {
overflow-x: hidden;
@ -2780,6 +2993,10 @@ body::after {
margin-left: 0px;
}
.ml10 {
margin-left: 10px !important;
}
.ml15, .advertisement-two-container .ad-2-rt {
margin-left: 15px !important;
}

View File

@ -76,10 +76,6 @@ class VelocityServiceProvider extends ServiceProvider
$this->mergeConfigFrom(
dirname(__DIR__) . '/Config/admin-menu.php', 'menu.admin'
);
// $this->mergeConfigFrom(
// dirname(__DIR__) . '/Config/acl.php', 'acl'
// );
}
/**

View File

@ -1314,4 +1314,18 @@
}
}
}
}
.category-container {
.hero-image {
height: 100%;
max-width: 500px;
max-height: 400px;
display: inline-block;
img {
width: 100%;
height: 100%;
}
}
}

View File

@ -1,282 +0,0 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.channels.edit-title') }}
@stop
@section('content')
<div class="content">
<form
method="POST"
action="{{ route('admin.channels.update', $channel->id) }}"
@submit.prevent="onSubmit"
enctype="multipart/form-data">
<div class="page-header">
<div class="page-title">
<h1>
<i
class="icon angle-left-icon back-link"
onclick="history.length > 1
? history.go(-1)
: window.location = '{{ url('/admin/dashboard') }}';
">
</i>
{{ __('admin::app.settings.channels.edit-title') }}
</h1>
</div>
<div class="page-action">
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.channels.save-btn-title') }}
</button>
</div>
</div>
<div class="page-content">
<div class="form-container">
@csrf()
<input name="_method" type="hidden" value="PUT">
{!! view_render_event('bagisto.admin.settings.channel.edit.before') !!}
<accordian
:title="'{{ __('admin::app.settings.channels.general') }}'"
:active="true">
<div slot="body">
<div
class="control-group"
:class="[errors.has('code') ? 'has-error' : '']">
<label for="code" class="required">
{{ __('admin::app.settings.channels.code') }}
</label>
<input
id="code"
name="code"
type="text"
class="control"
disabled="disabled"
v-validate="'required'"
value="{{ $channel->code }}"
data-vv-as="&quot;{{ __('admin::app.settings.channels.code') }}&quot;" />
<input
name="code"
type="hidden"
value="{{ $channel->code }}" />
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
</div>
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
<label for="name" class="required">{{ __('admin::app.settings.channels.name') }}</label>
<input v-validate="'required'" class="control" id="name" name="name" data-vv-as="&quot;{{ __('admin::app.settings.channels.name') }}&quot;" value="{{ old('name') ?: $channel->name }}"/>
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
</div>
<div class="control-group">
<label for="description">{{ __('admin::app.settings.channels.description') }}</label>
<textarea class="control" id="description" name="description">{{ old('description') ?: $channel->description }}</textarea>
</div>
<div class="control-group" :class="[errors.has('inventory_sources[]') ? 'has-error' : '']">
<label for="inventory_sources" class="required">{{ __('admin::app.settings.channels.inventory_sources') }}</label>
<?php $selectedOptionIds = old('inventory_sources') ?: $channel->inventory_sources->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="inventory_sources" name="inventory_sources[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.inventory_sources') }}&quot;" multiple>
@foreach (app('Webkul\Inventory\Repositories\InventorySourceRepository')->all() as $inventorySource)
<option value="{{ $inventorySource->id }}" {{ in_array($inventorySource->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $inventorySource->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('inventory_sources[]')">@{{ errors.first('inventory_sources[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('root_category_id') ? 'has-error' : '']">
<label for="root_category_id" class="required">{{ __('admin::app.settings.channels.root-category') }}</label>
<?php $selectedOption = old('root_category_id') ?: $channel->root_category_id ?>
<select v-validate="'required'" class="control" id="root_category_id" name="root_category_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.root-category') }}&quot;">
@foreach (app('Webkul\Category\Repositories\CategoryRepository')->getRootCategories() as $category)
<option value="{{ $category->id }}" {{ $selectedOption == $category->id ? 'selected' : '' }}>
{{ $category->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('root_category_id')">@{{ errors.first('root_category_id') }}</span>
</div>
<div class="control-group">
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
<input type="text" class="control" id="hostname" name="hostname" value="{{ $channel->hostname }}" placeholder="https://www.example.com"/>
</div>
</div>
</accordian>
<accordian :title="'{{ __('admin::app.settings.channels.currencies-and-locales') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('locales[]') ? 'has-error' : '']">
<label for="locales" class="required">{{ __('admin::app.settings.channels.locales') }}</label>
<?php $selectedOptionIds = old('locales') ?: $channel->locales->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="locales" name="locales[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.locales') }}&quot;" multiple>
@foreach (core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ in_array($locale->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $locale->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('locales[]')">@{{ errors.first('locales[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('default_locale_id') ? 'has-error' : '']">
<label for="default_locale_id" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<?php $selectedOption = old('default_locale_id') ?: $channel->default_locale_id ?>
<select v-validate="'required'" class="control" id="default_locale_id" name="default_locale_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.default-locale') }}&quot;">
@foreach (core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ $selectedOption == $locale->id ? 'selected' : '' }}>
{{ $locale->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('default_locale_id')">@{{ errors.first('default_locale_id') }}</span>
</div>
<div class="control-group" :class="[errors.has('currencies[]') ? 'has-error' : '']">
<label for="currencies" class="required">{{ __('admin::app.settings.channels.currencies') }}</label>
<?php $selectedOptionIds = old('currencies') ?: $channel->currencies->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="currencies" name="currencies[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.currencies') }}&quot;" multiple>
@foreach (core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ in_array($currency->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('currencies[]')">@{{ errors.first('currencies[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('base_currency_id') ? 'has-error' : '']">
<label for="base_currency_id" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<?php $selectedOption = old('base_currency_id') ?: $channel->base_currency_id ?>
<select v-validate="'required'" class="control" id="base_currency_id" name="base_currency_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.base-currency') }}&quot;">
@foreach (core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ $selectedOption == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('base_currency_id')">@{{ errors.first('base_currency_id') }}</span>
</div>
</div>
</accordian>
<accordian :title="'{{ __('admin::app.settings.channels.design') }}'" :active="true">
<div slot="body">
<div class="control-group">
<label for="theme">{{ __('admin::app.settings.channels.theme') }}</label>
<?php $selectedOption = old('theme') ?: $channel->theme ?>
<select class="control" id="theme" name="theme">
@foreach (themes()->all() as $theme)
<option value="{{ $theme->code }}" {{ $selectedOption == $theme->code ? 'selected' : '' }}>
{{ $theme->name }}
</option>
@endforeach
</select>
</div>
@if ($selectedOption == "velocity")
<div class="control-group">
<label for="subscription_bar">{{ __('velocity::app.admin.system.settings.channels.subscription_bar') }}</label>
<textarea class="control" id="subscription_bar" name="subscription_bar_content">
{{ old('subscription_bar_content') ?: $channel->subscription_bar_content }}</textarea>
</div>
@endif
<div class="control-group">
<label for="home_page_content">{{ __('admin::app.settings.channels.home_page_content') }}</label>
<textarea class="control" id="home_page_content" name="home_page_content">{{ old('home_page_content') ?: $channel->home_page_content }}</textarea>
</div>
<div class="control-group">
<label for="footer_content">{{ __('admin::app.settings.channels.footer_content') }}</label>
<textarea class="control" id="footer_content" name="footer_content">{{ old('footer_content') ?: $channel->footer_content }}</textarea>
</div>
<div class="control-group">
<label>{{ __('admin::app.settings.channels.logo') }}
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="logo" :multiple="false" :images='"{{ $channel->logo_url }}"'></image-wrapper>
</div>
<div class="control-group">
<label>{{ __('admin::app.settings.channels.favicon') }}
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="favicon" :multiple="false" :images='"{{ $channel->favicon_url }}"'></image-wrapper>
</div>
</div>
</accordian>
@php
$seo = json_decode($channel->home_seo);
@endphp
<accordian :title="'{{ __('admin::app.settings.channels.seo') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('seo_title') ? 'has-error' : '']">
<label for="seo_title" class="required">{{ __('admin::app.settings.channels.seo-title') }}</label>
<input v-validate="'required'" class="control" id="seo_title" name="seo_title" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-title') }}&quot;" value="{{ $seo->meta_title ?? old('seo_title') }}"/>
<span class="control-error" v-if="errors.has('seo_title')">@{{ errors.first('seo_title') }}</span>
</div>
<div class="control-group" :class="[errors.has('seo_description') ? 'has-error' : '']">
<label for="seo_description" class="required">{{ __('admin::app.settings.channels.seo-description') }}</label>
<textarea v-validate="'required'" class="control" id="seo_description" name="seo_description" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-description') }}&quot;">{{ $seo->meta_description ?? old('seo_description') }}</textarea>
<span class="control-error" v-if="errors.has('seo_description')">@{{ errors.first('seo_description') }}</span>
</div>
<div class="control-group" :class="[errors.has('seo_keywords') ? 'has-error' : '']">
<label for="seo_keywords" class="required">{{ __('admin::app.settings.channels.seo-keywords') }}</label>
<textarea v-validate="'required'" class="control" id="seo_keywords" name="seo_keywords" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-keywords') }}&quot;">{{ $seo->meta_keywords ?? old('seo_keywords') }}</textarea>
<span class="control-error" v-if="errors.has('seo_keywords')">@{{ errors.first('seo_keywords') }}</span>
</div>
</div>
</accordian>
{!! view_render_event('bagisto.admin.settings.channel.edit.after') !!}
</div>
</div>
</form>
</div>
@stop
@push('scripts')
<script src="{{ asset('vendor/webkul/admin/assets/js/tinyMCE/tinymce.min.js') }}"></script>
<script>
$(document).ready(function () {
tinymce.init({
selector: 'textarea#home_page_content,textarea#subscription_bar,textarea#footer_content',
height: 200,
width: "100%",
plugins: 'image imagetools media wordcount save fullscreen code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
image_advtab: true,
valid_elements : '*[*]'
});
});
</script>
@endpush

View File

@ -7,17 +7,20 @@
@stop
@section('seo')
<meta name="description" content="{{ $category->meta_description }}"/>
<meta name="keywords" content="{{ $category->meta_keywords }}"/>
<meta name="description" content="{{ $category->meta_description }}" />
<meta name="keywords" content="{{ $category->meta_keywords }}" />
@stop
@section('content-wrapper')
<section class="cart-details row offset-1">
{!! view_render_event('bagisto.shop.productOrCategory.index.before', ['category' => $category]) !!}
<div class="category-container col-12">
@if (in_array($category->display_mode, [null, 'products_only', 'products_and_description']))
@include ('shop::products.list.layered-navigation')
@endif
@php
$isDisplayMode = in_array(
$category->display_mode, [
@ -30,15 +33,28 @@
$products = $productRepository->getAll($category->id);
@endphp
<h1 class="fw6 mb10">{{ $category->name }}</h1>
<div class="row">
<div class="col-6">
<h1 class="fw6 mb10">{{ $category->name }}</h1>
@if ($isDisplayMode && $products->count())
@if ($category->description)
<div class="category-description">
{!! $category->description !!}
</div>
@endif
@endif
</div>
<div class="col-6">
{{-- <div class="hero-image mb-35">
@if (!is_null($category->image))
<img class="logo" src="{{ $category->image_url }}" />
@endif
</div> --}}
</div>
</div>
@if ($isDisplayMode && $products->count())
@if ($category->description)
<div class="category-description">
{!! $category->description !!}
</div>
@endif
@endif
@if ($products->count())
<div class="filters-container">

View File

@ -1,10 +1,8 @@
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
@inject ('attributeRepository', 'Webkul\Attribute\Repositories\AttributeRepository')
@inject ('productFlatRepository', 'Webkul\Product\Repositories\ProductFlatRepository')
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
<?php
@php
$filterAttributes = [];
if (isset($category)) {
@ -30,13 +28,13 @@
} else {
$filterAttributes = $attributeRepository->getFilterAttributes();
}
?>
@endphp
<div class="layered-filter-wrapper">
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
{{-- <layered-navigation></layered-navigation> --}}
<layered-navigation></layered-navigation>
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
@ -46,7 +44,9 @@
<script type="text/x-template" id="layered-navigation-template">
<div>
<label>{{ __('shop::app.products.layered-nav-title') }}</label>
<div class="filter-title">
{{ __('shop::app.products.layered-nav-title') }}
</div>
<div class="filter-content">
@ -171,7 +171,7 @@
0,
0
],
max: '{{ core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)) }}',
max: {{ core()->convertPrice($productFlatRepository->getCategoryProductMaximumPrice($category)) }},
processStyle: {
"backgroundColor": "#FF6472"
},

View File

@ -1,249 +0,0 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.channels.edit-title') }}
@stop
@section('content')
<div class="content">
<form method="POST" action="{{ route('admin.channels.update', $channel->id) }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
<div class="page-header">
<div class="page-title">
<h1>
<i class="icon angle-left-icon back-link" onclick="history.length > 1 ? history.go(-1) : window.location = '{{ url('/admin/dashboard') }}';"></i>
{{ __('admin::app.settings.channels.edit-title') }}
</h1>
</div>
<div class="page-action">
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.settings.channels.save-btn-title') }}
</button>
</div>
</div>
<div class="page-content">
<div class="form-container">
@csrf()
<input name="_method" type="hidden" value="PUT">
{!! view_render_event('bagisto.admin.settings.channel.edit.before') !!}
<accordian :title="'{{ __('admin::app.settings.channels.general') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
<label for="code" class="required">{{ __('admin::app.settings.channels.code') }}</label>
<input type="text" v-validate="'required'" class="control" id="code" name="code" data-vv-as="&quot;{{ __('admin::app.settings.channels.code') }}&quot;" value="{{ $channel->code }}" disabled="disabled"/>
<input type="hidden" name="code" value="{{ $channel->code }}"/>
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
</div>
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
<label for="name" class="required">{{ __('admin::app.settings.channels.name') }}</label>
<input v-validate="'required'" class="control" id="name" name="name" data-vv-as="&quot;{{ __('admin::app.settings.channels.name') }}&quot;" value="{{ old('name') ?: $channel->name }}"/>
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
</div>
<div class="control-group">
<label for="description">{{ __('admin::app.settings.channels.description') }}</label>
<textarea class="control" id="description" name="description">{{ old('description') ?: $channel->description }}</textarea>
</div>
<div class="control-group" :class="[errors.has('inventory_sources[]') ? 'has-error' : '']">
<label for="inventory_sources" class="required">{{ __('admin::app.settings.channels.inventory_sources') }}</label>
<?php $selectedOptionIds = old('inventory_sources') ?: $channel->inventory_sources->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="inventory_sources" name="inventory_sources[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.inventory_sources') }}&quot;" multiple>
@foreach (app('Webkul\Inventory\Repositories\InventorySourceRepository')->all() as $inventorySource)
<option value="{{ $inventorySource->id }}" {{ in_array($inventorySource->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $inventorySource->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('inventory_sources[]')">@{{ errors.first('inventory_sources[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('root_category_id') ? 'has-error' : '']">
<label for="root_category_id" class="required">{{ __('admin::app.settings.channels.root-category') }}</label>
<?php $selectedOption = old('root_category_id') ?: $channel->root_category_id ?>
<select v-validate="'required'" class="control" id="root_category_id" name="root_category_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.root-category') }}&quot;">
@foreach (app('Webkul\Category\Repositories\CategoryRepository')->getRootCategories() as $category)
<option value="{{ $category->id }}" {{ $selectedOption == $category->id ? 'selected' : '' }}>
{{ $category->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('root_category_id')">@{{ errors.first('root_category_id') }}</span>
</div>
<div class="control-group">
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
<input type="text" class="control" id="hostname" name="hostname" value="{{ $channel->hostname }}" placeholder="https://www.example.com"/>
</div>
</div>
</accordian>
<accordian :title="'{{ __('admin::app.settings.channels.currencies-and-locales') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('locales[]') ? 'has-error' : '']">
<label for="locales" class="required">{{ __('admin::app.settings.channels.locales') }}</label>
<?php $selectedOptionIds = old('locales') ?: $channel->locales->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="locales" name="locales[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.locales') }}&quot;" multiple>
@foreach (core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ in_array($locale->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $locale->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('locales[]')">@{{ errors.first('locales[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('default_locale_id') ? 'has-error' : '']">
<label for="default_locale_id" class="required">{{ __('admin::app.settings.channels.default-locale') }}</label>
<?php $selectedOption = old('default_locale_id') ?: $channel->default_locale_id ?>
<select v-validate="'required'" class="control" id="default_locale_id" name="default_locale_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.default-locale') }}&quot;">
@foreach (core()->getAllLocales() as $locale)
<option value="{{ $locale->id }}" {{ $selectedOption == $locale->id ? 'selected' : '' }}>
{{ $locale->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('default_locale_id')">@{{ errors.first('default_locale_id') }}</span>
</div>
<div class="control-group" :class="[errors.has('currencies[]') ? 'has-error' : '']">
<label for="currencies" class="required">{{ __('admin::app.settings.channels.currencies') }}</label>
<?php $selectedOptionIds = old('currencies') ?: $channel->currencies->pluck('id')->toArray() ?>
<select v-validate="'required'" class="control" id="currencies" name="currencies[]" data-vv-as="&quot;{{ __('admin::app.settings.channels.currencies') }}&quot;" multiple>
@foreach (core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ in_array($currency->id, $selectedOptionIds) ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('currencies[]')">@{{ errors.first('currencies[]') }}</span>
</div>
<div class="control-group" :class="[errors.has('base_currency_id') ? 'has-error' : '']">
<label for="base_currency_id" class="required">{{ __('admin::app.settings.channels.base-currency') }}</label>
<?php $selectedOption = old('base_currency_id') ?: $channel->base_currency_id ?>
<select v-validate="'required'" class="control" id="base_currency_id" name="base_currency_id" data-vv-as="&quot;{{ __('admin::app.settings.channels.base-currency') }}&quot;">
@foreach (core()->getAllCurrencies() as $currency)
<option value="{{ $currency->id }}" {{ $selectedOption == $currency->id ? 'selected' : '' }}>
{{ $currency->name }}
</option>
@endforeach
</select>
<span class="control-error" v-if="errors.has('base_currency_id')">@{{ errors.first('base_currency_id') }}</span>
</div>
</div>
</accordian>
<accordian :title="'{{ __('admin::app.settings.channels.design') }}'" :active="true">
<div slot="body">
<div class="control-group">
<label for="theme">{{ __('admin::app.settings.channels.theme') }}</label>
<?php $selectedOption = old('theme') ?: $channel->theme ?>
<select class="control" id="theme" name="theme">
@foreach (themes()->all() as $theme)
<option value="{{ $theme->code }}" {{ $selectedOption == $theme->code ? 'selected' : '' }}>
{{ $theme->name }}
</option>
@endforeach
</select>
</div>
@if ($selectedOption == "velocity")
<div class="control-group">
<label for="subscription_bar">{{ __('velocity::app.admin.system.settings.channels.subscription_bar') }}</label>
<textarea class="control" id="subscription_bar" name="subscription_bar_content">
{{ old('subscription_bar_content') ?: $channel->subscription_bar_content }}</textarea>
</div>
@endif
<div class="control-group">
<label for="home_page_content">{{ __('admin::app.settings.channels.home_page_content') }}</label>
<textarea class="control" id="home_page_content" name="home_page_content">{{ old('home_page_content') ?: $channel->home_page_content }}</textarea>
</div>
<div class="control-group">
<label for="footer_content">{{ __('admin::app.settings.channels.footer_content') }}</label>
<textarea class="control" id="footer_content" name="footer_content">{{ old('footer_content') ?: $channel->footer_content }}</textarea>
</div>
<div class="control-group">
<label>{{ __('admin::app.settings.channels.logo') }}
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="logo" :multiple="false" :images='"{{ $channel->logo_url }}"'></image-wrapper>
</div>
<div class="control-group">
<label>{{ __('admin::app.settings.channels.favicon') }}
<image-wrapper :button-label="'{{ __('admin::app.catalog.products.add-image-btn-title') }}'" input-name="favicon" :multiple="false" :images='"{{ $channel->favicon_url }}"'></image-wrapper>
</div>
</div>
</accordian>
@php
$seo = json_decode($channel->home_seo);
@endphp
<accordian :title="'{{ __('admin::app.settings.channels.seo') }}'" :active="true">
<div slot="body">
<div class="control-group" :class="[errors.has('seo_title') ? 'has-error' : '']">
<label for="seo_title" class="required">{{ __('admin::app.settings.channels.seo-title') }}</label>
<input v-validate="'required'" class="control" id="seo_title" name="seo_title" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-title') }}&quot;" value="{{ $seo->meta_title ?? old('seo_title') }}"/>
<span class="control-error" v-if="errors.has('seo_title')">@{{ errors.first('seo_title') }}</span>
</div>
<div class="control-group" :class="[errors.has('seo_description') ? 'has-error' : '']">
<label for="seo_description" class="required">{{ __('admin::app.settings.channels.seo-description') }}</label>
<textarea v-validate="'required'" class="control" id="seo_description" name="seo_description" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-description') }}&quot;">{{ $seo->meta_description ?? old('seo_description') }}</textarea>
<span class="control-error" v-if="errors.has('seo_description')">@{{ errors.first('seo_description') }}</span>
</div>
<div class="control-group" :class="[errors.has('seo_keywords') ? 'has-error' : '']">
<label for="seo_keywords" class="required">{{ __('admin::app.settings.channels.seo-keywords') }}</label>
<textarea v-validate="'required'" class="control" id="seo_keywords" name="seo_keywords" data-vv-as="&quot;{{ __('admin::app.settings.channels.seo-keywords') }}&quot;">{{ $seo->meta_keywords ?? old('seo_keywords') }}</textarea>
<span class="control-error" v-if="errors.has('seo_keywords')">@{{ errors.first('seo_keywords') }}</span>
</div>
</div>
</accordian>
{!! view_render_event('bagisto.admin.settings.channel.edit.after') !!}
</div>
</div>
</form>
</div>
@stop
@push('scripts')
<script src="{{ asset('vendor/webkul/admin/assets/js/tinyMCE/tinymce.min.js') }}"></script>
<script>
$(document).ready(function () {
tinymce.init({
selector: 'textarea#home_page_content,textarea#subscription_bar,textarea#footer_content',
height: 200,
width: "100%",
plugins: 'image imagetools media wordcount save fullscreen code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
image_advtab: true,
valid_elements : '*[*]'
});
});
</script>
@endpush