Skip to content

Commit

Permalink
Update code 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lanhktc committed Apr 17, 2021
1 parent a000ea3 commit e8b1674
Show file tree
Hide file tree
Showing 35 changed files with 103 additions and 99 deletions.
2 changes: 1 addition & 1 deletion app/Plugins/Cms/Content/Views/Admin/cms_category.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class="btn btn-primary lfm">
@endif
<div id="preview_image" class="img_holder">
@if (old('image',$category['image']??''))
<img src="{{ asset(old('image',$category['image']??'')) }}">
<img src="{{ sc_file(old('image',$category['image']??'')) }}">
@endif

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/Cms/Content/Views/Admin/cms_content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class="btn btn-primary lfm">
@endif
<div id="preview_image" class="img_holder">
@if (old('image',$content['image']??''))
<img src="{{ asset(old('image',$content['image']??'')) }}">
<img src="{{ sc_file(old('image',$content['image']??'')) }}">
@endif

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/Plugins/Cms/Content/Views/cms_category.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="col-sm-6 col-lg-4">
<!-- Post Classic-->
<article class="post post-classic box-md"><a class="post-classic-figure" href="{{ $entryDetail->getUrl() }}">
<img src="{{ asset($entryDetail->getThumb()) }}" alt="" width="370" height="239"></a>
<img src="{{ sc_file($entryDetail->getThumb()) }}" alt="" width="370" height="239"></a>
<div class="post-classic-content">
<h5 class="post-classic-title"><a href="{{ $entryDetail->getUrl() }}">{{ $entryDetail->title }}</a></h5>
<p class="post-classic-text">
Expand Down
4 changes: 2 additions & 2 deletions app/Plugins/Other/GoogleCaptcha/Views/Admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

@push('styles')
<!-- Ediable -->
<link rel="stylesheet" href="{{ asset('admin/plugin/bootstrap-editable.css')}}">
<link rel="stylesheet" href="{{ sc_file('admin/plugin/bootstrap-editable.css')}}">
<style type="text/css">
#maintain_content img{
max-width: 100%;
Expand All @@ -52,7 +52,7 @@

@push('scripts')
<!-- Ediable -->
<script src="{{ asset('admin/plugin/bootstrap-editable.min.js')}}"></script>
<script src="{{ sc_file('admin/plugin/bootstrap-editable.min.js')}}"></script>

<script type="text/javascript">
// Editable
Expand Down
6 changes: 3 additions & 3 deletions app/Plugins/Payment/BankTransfer/Views/Admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

@push('styles')
<!-- Ediable -->
<link rel="stylesheet" href="{{ asset('admin/plugin/bootstrap-editable.css')}}">
<link rel="stylesheet" href="{{ sc_file('admin/plugin/bootstrap-editable.css')}}">
<style type="text/css">
#maintain_content img{
max-width: 100%;
Expand All @@ -44,7 +44,7 @@
@if (empty($dataNotFound))
@push('scripts')
<!-- Ediable -->
<script src="{{ asset('admin/plugin/bootstrap-editable.min.js')}}"></script>
<script src="{{ sc_file('admin/plugin/bootstrap-editable.min.js')}}"></script>

<script type="text/javascript">
Expand Down Expand Up @@ -83,7 +83,7 @@
</script>

{{-- //Pjax --}}
<script src="{{ asset('admin/plugin/jquery.pjax.js')}}"></script>
<script src="{{ sc_file('admin/plugin/jquery.pjax.js')}}"></script>

@endpush
@endif
4 changes: 2 additions & 2 deletions app/Plugins/Shipping/ShippingStandard/Views/Admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@

@push('styles')
<!-- Ediable -->
<link rel="stylesheet" href="{{ asset('admin/plugin/bootstrap-editable.css')}}">
<link rel="stylesheet" href="{{ sc_file('admin/plugin/bootstrap-editable.css')}}">
@endpush

@push('scripts')
<!-- Ediable -->
<script src="{{ asset('admin/plugin/bootstrap-editable.min.js')}}"></script>
<script src="{{ sc_file('admin/plugin/bootstrap-editable.min.js')}}"></script>
<script type="text/javascript">
$(document).ready(function() {
Expand Down
10 changes: 5 additions & 5 deletions app/Plugins/Total/Discount/Views/Admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-clipboard-list"></i></span>
</div>
<input type="text" id="code" name="code" value="{{ old()?old('code'):$discount['code']??'' }}" class="form-control" placeholder="" />
<input type="text" id="code" name="code" value="{{ old('code', ($discount['code']??'')) }}" class="form-control" placeholder="" />
</div>
@if ($errors->has('code'))
<span class="help-block">
Expand All @@ -53,7 +53,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="far fa-file-alt"></i></span>
</div>
<input type="text" id="reward" name="reward" value="{{ old()?old('reward'):$discount['reward']??'' }}" class="form-control" placeholder="" />
<input type="text" id="reward" name="reward" value="{{ old('reward', ($discount['reward']??'')) }}" class="form-control" placeholder="" />
</div>
@if ($errors->has('reward'))
<span class="help-block">
Expand Down Expand Up @@ -88,7 +88,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-pencil-alt"></i></span>
</div>
<input type="text" id="data" name="data" value="{{ old()?old('data'):$discount['data']??'' }}" class="form-control" placeholder="" />
<input type="text" id="data" name="data" value="{{ old('data', ($discount['data']??'')) }}" class="form-control" placeholder="" />
</div>
@if ($errors->has('data'))
<span class="help-block">
Expand All @@ -107,7 +107,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-pencil-alt"></i></span>
</div>
<input type="number" id="limit" name="limit" value="{{ old()?old('limit'):$discount['limit']??'1' }}" class="form-control" placeholder="" />
<input type="number" id="limit" name="limit" value="{{ old('limit', ($discount['limit']??'1')) }}" class="form-control" placeholder="" />
</div>
@if ($errors->has('limit'))
<span class="help-block">
Expand Down Expand Up @@ -137,7 +137,7 @@
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-calendar fa-fw"></i></span>
</div>
<input type="date" id="expires_at" name="expires_at" value="{{ old()?old('expires_at'):$discount['expires_at']??'' }}" class="form-control date_time" placeholder="" />
<input type="text" id="expires_at" name="expires_at" value="{{ old('expires_at', ($discount['expires_at']??'')) }}" class="form-control date_time" placeholder="yyyy-mm-dd" />
</div>
@if ($errors->has('expires_at'))
<span class="help-block">
Expand Down
4 changes: 2 additions & 2 deletions config/s-cart.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return [
'version' => '6.0',
'sub-version' => '6.0.5',
'version' => '6.1',
'sub-version' => '6.1.0',
'type' => 'basic',
'homepage' => 'https://s-cart.org',
'title' => 'Free Open Source eCommerce for Business',
Expand Down
2 changes: 2 additions & 0 deletions database/migrations/2020_00_00_step1_create_tables_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function up()
$table->string('code', 50)->index();
$table->string('key', 50);
$table->string('value', 200)->nullable();
$table->integer('security')->default(0)->nullable();
$table->integer('store_id')->default(0);
$table->integer('sort')->default(0);
$table->string('detail', 300)->nullable();
Expand All @@ -115,6 +116,7 @@ public function up()
Schema::create(SC_DB_PREFIX . 'admin_store', function (Blueprint $table) {
$table->increments('id');
$table->string('logo', 255)->nullable();
$table->string('icon', 255)->nullable();
$table->string('phone', 20)->nullable();
$table->string('long_phone', 100)->nullable();
$table->string('email', 150)->nullable();
Expand Down
2 changes: 1 addition & 1 deletion database/seeders/DataStoreSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function run()

['group' => '', 'code' => 'admin_config', 'key' => 'ADMIN_NAME', 'value' => 'S-Cart System', 'sort' => '0', 'detail' => 'lang::env.ADMIN_NAME', 'store_id' => $storeId],
['group' => '', 'code' => 'admin_config', 'key' => 'ADMIN_TITLE', 'value' => 'S-Cart Admin', 'sort' => '0', 'detail' => 'lang::env.ADMIN_TITLE', 'store_id' => $storeId],
['group' => '', 'code' => 'admin_config', 'key' => 'ADMIN_LOGO', 'value' => 'S-Cart Admin', 'sort' => '0', 'detail' => 'lang::env.ADMIN_LOGO', 'store_id' => $storeId],
['group' => '', 'code' => 'admin_config', 'key' => 'ADMIN_LOGO', 'value' => 'S-Cart <span class="brand-text font-weight-light">Admin</span>', 'sort' => '0', 'detail' => 'lang::env.ADMIN_LOGO', 'store_id' => $storeId],


['group' => '', 'code' => 'display_config', 'key' => 'product_top', 'value' => '8', 'sort' => '0', 'detail' => 'lang::admin.product_top', 'store_id' => $storeId],
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'value' => 'Value',
'config_mode' => 'Store mode',
'config_display' => 'Store display',
'config_customize' => 'Config customize',
'status' => 'Status',
'action' => 'Action',
'edit' => 'Edit',
Expand Down
1 change: 1 addition & 0 deletions resources/lang/vi/store.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'value' => 'Giá trị',
'config_mode' => 'Cấu hình mode',
'config_display' => 'Cấu hình hiển thị',
'config_customize' => 'Cấu hình tùy chỉnh',
'status' => 'Status',
'action' => 'Hành động',
'delete' => 'Xóa',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<section class="section swiper-container swiper-slider swiper-slider-1" data-loop="true">
<div class="swiper-wrapper text-center text-lg-left">
@foreach ($banners as $key => $banner)
<div class="swiper-slide swiper-slide-caption context-dark" data-slide-bg="{{ asset($banner->image) }}">
<div class="swiper-slide swiper-slide-caption context-dark" data-slide-bg="{{ sc_file($banner->image) }}">
<div class="swiper-slide-caption section-md text-center">
<div class="container">
<a href="{{ sc_route('banner.click',['id' => $banner->id]) }}" target="{{ $banner->target }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<article class="post post-minimal">
<div class="unit unit-spacing-sm flex-column flex-lg-row align-items-lg-center">
<div class="unit-left"><a class="post-minimal-figure" href="{{ $productLastView->getUrl() }}">
<img src="{{ asset($productLastView->getThumb()) }}" alt="" width="106" height="104"></a></div>
<img src="{{ sc_file($productLastView->getThumb()) }}" alt="" width="106" height="104"></a></div>
<div class="unit-body">
<p class="post-minimal-title"><a href="{{ $productLastView->getUrl() }}">{{ $productLastView->name}}</a></p>
<div class="post-minimal-time">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="unit unit-spacing-sm flex-column flex-md-row align-items-center">
<div class="unit-left">
<a class="post-minimal-figure" href="{{ $product->getUrl() }}">
<img src="{{ asset($product->getThumb()) }}" alt="" width="106" height="104">
<img src="{{ sc_file($product->getThumb()) }}" alt="" width="106" height="104">
</a>
</div>
<div class="unit-body">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="row row-40 row-md-50 justify-content-xl-between">
<div class="col-sm-6 col-lg-4 col-xl-3 wow fadeInRight">
<a href="{{ sc_route('home') }}">
<img class="logo-footer" src="{{ asset(sc_store('logo')) }}" alt="{{ sc_store('title') }}">
<img class="logo-footer" src="{{ sc_file(sc_store('logo')) }}" alt="{{ sc_store('title') }}">
</a>
<p>{{ sc_store('title') }}</p>
<p> {!! sc_store('time_active') !!}</p>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/templates/s-cart-light/block_header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<button class="rd-navbar-toggle" data-rd-navbar-toggle=".rd-navbar-nav-wrap"><span></span></button>
<!-- RD Navbar Brand-->
<div class="rd-navbar-brand">
<!--Brand--><a class="brand" href="{{ sc_route('home') }}"><img class="brand-logo-dark" src="{{ asset(sc_store('logo')) }}" alt="" width="105" height="44"/>
<img class="brand-logo-light" src="{{ asset(sc_store('logo')) }}" alt="" width="106" height="44"/></a>
<!--Brand--><a class="brand" href="{{ sc_route('home') }}"><img class="brand-logo-dark" src="{{ sc_file(sc_store('logo')) }}" alt="" width="105" height="44"/>
<img class="brand-logo-light" src="{{ sc_file(sc_store('logo')) }}" alt="" width="106" height="44"/></a>
</div>
</div>
<div class="rd-navbar-nav-wrap">
Expand Down Expand Up @@ -97,13 +97,13 @@
@if (count($sc_languages)>1)
<li class="rd-nav-item">
<a class="rd-nav-link" href="#">
<img src="{{ asset($sc_languages[app()->getLocale()]['icon']) }}" style="height: 25px;"> <i class="fas fa-caret-down"></i>
<img src="{{ sc_file($sc_languages[app()->getLocale()]['icon']) }}" style="height: 25px;"> <i class="fas fa-caret-down"></i>
</a>
<ul class="rd-menu rd-navbar-dropdown">
@foreach ($sc_languages as $key => $language)
<li class="rd-dropdown-item">
<a class="rd-dropdown-link" href="{{ sc_route('locale', ['code' => $key]) }}">
<img src="{{ asset($language['icon']) }}" style="height: 25px;"> {{ $language['name'] }}
<img src="{{ sc_file($language['icon']) }}" style="height: 25px;"> {{ $language['name'] }}
</a>
</li>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion resources/views/templates/s-cart-light/common/js.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function formatNumber (num) {
});
</script>

<script src="{{ asset('js/sweetalert2.all.min.js') }}"></script>
<script src="{{ sc_file('js/sweetalert2.all.min.js') }}"></script>
<script>
function alertJs(type = 'error', msg = '') {
const Toast = Swal.mixin({
Expand Down
16 changes: 8 additions & 8 deletions resources/views/templates/s-cart-light/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<meta name="description" content="{{ $description??sc_store('description') }}">
<meta name="keyword" content="{{ $keyword??sc_store('keyword') }}">
<title>{{$title??sc_store('title')}}</title>
<link rel="icon" href="{{ asset('images/icon.png') }}" type="image/png" sizes="16x16">
<meta property="og:image" content="{{ !empty($og_image)?asset($og_image):asset('images/org.jpg') }}" />
<link rel="icon" href="{{ sc_file(sc_store('icon', null, 'images/icon.png')) }}" type="image/png" sizes="16x16">
<meta property="og:image" content="{{ !empty($og_image)?sc_file($og_image):sc_file('images/org.jpg') }}" />
<meta property="og:url" content="{{ \Request::fullUrl() }}" />
<meta property="og:type" content="Website" />
<meta property="og:title" content="{{ $title??sc_store('title') }}" />
Expand Down Expand Up @@ -42,9 +42,9 @@
<!-- css default for item s-cart -->
<!--//end css defaut -->

<link rel="stylesheet" href="{{ asset($sc_templateFile.'/css/bootstrap.css')}}">
<link rel="stylesheet" href="{{ asset($sc_templateFile.'/css/fonts.css')}}">
<link rel="stylesheet" href="{{ asset($sc_templateFile.'/css/style.css')}}">
<link rel="stylesheet" href="{{ sc_file($sc_templateFile.'/css/bootstrap.css')}}">
<link rel="stylesheet" href="{{ sc_file($sc_templateFile.'/css/fonts.css')}}">
<link rel="stylesheet" href="{{ sc_file($sc_templateFile.'/css/style.css')}}">
<style>
{!! sc_store_css() !!}
</style>
Expand All @@ -54,7 +54,7 @@
<body>
<div class="ie-panel">
<a href="http://windows.microsoft.com/en-US/internet-explorer/">
<img src="{{ asset($sc_templateFile.'/images/ie8-panel/warning_bar_0000_us.jpg')}}" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.">
<img src="{{ sc_file($sc_templateFile.'/images/ie8-panel/warning_bar_0000_us.jpg')}}" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.">
</a>
</div>

Expand Down Expand Up @@ -107,8 +107,8 @@
<div class="sc-overlay"><i class="fa fa-spinner fa-pulse fa-5x fa-fw "></i></div>
</div>

<script src="{{ asset($sc_templateFile.'/js/core.min.js')}}"></script>
<script src="{{ asset($sc_templateFile.'/js/script.js')}}"></script>
<script src="{{ sc_file($sc_templateFile.'/js/core.min.js')}}"></script>
<script src="{{ sc_file($sc_templateFile.'/js/script.js')}}"></script>
<!-- js default for item s-cart -->
@include($sc_templatePath.'.common.js')
<!--//end js defaut -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="description" content="{{ $description??sc_store('description') }}">
<meta name="keyword" content="{{ $keyword??sc_store('keyword') }}">
<title>{{ trans('front.maintenance') }}</title>
<meta property="og:image" content="{{ !empty($og_image)?asset($og_image):asset('images/org.jpg') }}" />
<meta property="og:image" content="{{ !empty($og_image)?sc_file($og_image):sc_file('images/org.jpg') }}" />
<meta property="og:url" content="{{ \Request::fullUrl() }}" />
<meta property="og:type" content="Website" />
<meta property="og:title" content="{{ $title??sc_store('title') }}" />
Expand Down
Loading

0 comments on commit e8b1674

Please sign in to comment.