!155 Add hooks for cart and checkout page submit buttons
* fixed license * add setting license_code * Add hooks for cart and checkout page submit buttons
This commit is contained in:
parent
41ba00a3b3
commit
8750c828f7
|
|
@ -747,3 +747,22 @@ function registry($key, $default = null): mixed
|
|||
{
|
||||
return \Beike\Libraries\Registry::get($key, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check domain ha license.
|
||||
* 删除版权信息, 请先购买授权 https://beikeshop.com/vip/subscription
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function check_license(): bool
|
||||
{
|
||||
$configLicenceCode = system_setting('base.license_code');
|
||||
$appDomain = config('app.url');
|
||||
$domain = new \Utopia\Domains\Domain($appDomain);
|
||||
$registerDomain = $domain->getRegisterable();
|
||||
if (empty($registerDomain)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $configLicenceCode == md5(mb_substr(md5($registerDomain), 2, 8));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
"tymon/jwt-auth": "^2.0",
|
||||
"ultrono/laravel-sitemap": "^9.1",
|
||||
"unisharp/doc-us": "^1.3",
|
||||
"utopia-php/domains": "^1.1",
|
||||
"zanysoft/laravel-zip": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "dc9edf92dba52d6800988b3ed8a5a69c",
|
||||
"content-hash": "ba15ba4e492561a63ba7811801fa71a5",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
|
|
@ -7960,6 +7960,66 @@
|
|||
},
|
||||
"time": "2018-02-22T10:01:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
"version": "v1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/domains.git",
|
||||
"reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/domains/zipball/1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73",
|
||||
"reference": "1665e1d9932afa3be63b5c1e0dcfe01fe77d8e73",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||
"preferred": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Utopia\\Domains\\": "src/Domains"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Eldad Fux",
|
||||
"email": "eldad@appwrite.io"
|
||||
}
|
||||
],
|
||||
"description": "Utopia Domains library is simple and lite library for parsing web domains. This library is aiming to be as simple and easy to learn and use.",
|
||||
"keywords": [
|
||||
"domains",
|
||||
"framework",
|
||||
"icann",
|
||||
"php",
|
||||
"public suffix",
|
||||
"tld",
|
||||
"tld extract",
|
||||
"upf",
|
||||
"utopia"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/domains/issues",
|
||||
"source": "https://github.com/utopia-php/domains/tree/master"
|
||||
},
|
||||
"time": "2020-02-23T07:40:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v5.4.1",
|
||||
|
|
|
|||
|
|
@ -1175,8 +1175,8 @@ class ThemeSeeder extends Seeder
|
|||
],
|
||||
"bottom" => [
|
||||
"copyright" => [
|
||||
"en" => "<div> - Chengdu Guangda Network Technology © 2023</div>",
|
||||
"zh_cn" => "<div class=\"\"> - 成都光大网络科技 © 2023</div>"
|
||||
"en" => "<div>Chengdu Guangda Network Technology © 2023</div>",
|
||||
"zh_cn" => "<div>成都光大网络科技 © 2023</div>"
|
||||
],
|
||||
"image" => "catalog/demo/banner/pay_icons.png"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
<x-admin-form-textarea name="meta_keywords" title="{{ __('admin/setting.meta_keywords') }}" value="{{ old('meta_keywords', system_setting('base.meta_keywords', '')) }}" />
|
||||
<x-admin-form-input name="telephone" title="{{ __('admin/setting.telephone') }}" value="{{ old('telephone', system_setting('base.telephone', '')) }}" />
|
||||
<x-admin-form-input name="email" title="{{ __('admin/setting.email') }}" value="{{ old('email', system_setting('base.email', '')) }}" />
|
||||
<x-admin-form-input name="license_code" title="{{ __('admin/setting.license_code') }}" value="{{ old('license_code', system_setting('base.license_code', '')) }}" />
|
||||
@hook('admin.setting.general.after')
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -75,4 +75,5 @@ return [
|
|||
'please_select' => 'Please select',
|
||||
'multi_filter_helper' => 'Please select the attributes that need to be displayed in the filter area of the product list at the front desk, if left blank, all will be displayed',
|
||||
'filter_attribute' => 'Attribute Filter',
|
||||
'license_code' => 'License Code',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -74,4 +74,5 @@ return [
|
|||
'please_select' => '请添加',
|
||||
'multi_filter_helper' => '请选择需要在前台商品列表筛选区域显示的属性,留空则显示全部',
|
||||
'filter_attribute' => '属性筛选',
|
||||
'license_code' => '授权码',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -89,7 +89,9 @@
|
|||
<li class="list-group-item"><span>{{ __('shop/carts.selected') }}</span><span>@{{ total_quantity }}</span></li>
|
||||
<li class="list-group-item border-bottom-0"><span>{{ __('shop/carts.product_total') }}</span><span class="total-price">@{{ amount_format }}</span></li>
|
||||
<li class="list-group-item d-grid gap-2 mt-3 border-bottom-0">
|
||||
@hookwrapper('cart.confirm')
|
||||
<button type="button" class="btn btn-primary fs-5 fw-bold" @click="checkedBtnToCheckout">{{ __('shop/carts.to_checkout') }}</button>
|
||||
@endhookwrapper
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -117,7 +117,9 @@
|
|||
@endforeach
|
||||
</ul>
|
||||
<div class="d-grid gap-2 mt-3">
|
||||
@hookwrapper('checkout.confirm')
|
||||
<button class="btn btn-primary fw-bold fs-5" type="button" id="submit-checkout">{{ __('shop/checkout.submit_order') }}</button>
|
||||
@endhookwrapper
|
||||
</div>
|
||||
|
||||
@hook('checkout.total.footer')
|
||||
|
|
|
|||
|
|
@ -85,7 +85,10 @@
|
|||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<div class="d-flex">
|
||||
Powered By <a href="https://beikeshop.com/" target="_blank" rel="noopener">BeikeShop</a>
|
||||
<!-- 删除版权信息, 请先购买授权 https://beikeshop.com/vip/subscription -->
|
||||
@if(!check_license())
|
||||
Powered By <a href="https://beikeshop.com/" target="_blank" rel="noopener">BeikeShop</a> -
|
||||
@endif
|
||||
{!! $footer_content['bottom']['copyright'][$locale] ?? '' !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>@yield('title', system_setting('base.meta_title', 'BeikeShop开源好用的跨境电商系统 - BeikeShop官网') . ' Powered By BeikeShop')</title>
|
||||
<title>@yield('title', system_setting('base.meta_title', 'BeikeShop开源好用的跨境电商系统 - BeikeShop官网'))</title>
|
||||
<meta name="keywords" content="@yield('keywords', system_setting('base.meta_keywords'))">
|
||||
<meta name="description" content="@yield('description', system_setting('base.meta_description'))">
|
||||
<meta name="generator" content="BeikeShop v{{ config('beike.version') }}({{ config('beike.build') }})">
|
||||
|
|
|
|||
Loading…
Reference in New Issue