Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
8ab75bb805
|
|
@ -278,7 +278,7 @@ class SmartButtonController extends Controller
|
|||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
if (! $cart->checkMinimumOrder()) {
|
||||
throw new \Exception(trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]));
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ return [
|
|||
'name' => 'minimum_order_amount',
|
||||
'title' => 'admin::app.admin.system.minimum-order-amount',
|
||||
'type' => 'text',
|
||||
'validation' => 'numeric',
|
||||
'validation' => 'decimal',
|
||||
'channel_based' => true,
|
||||
'locale_based' => true,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -74,6 +74,14 @@ class OnepageController extends Controller
|
|||
return redirect()->route('customer.session.index');
|
||||
}
|
||||
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
if (! $cart->checkMinimumOrder()) {
|
||||
session()->flash('warning', trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]));
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
return view($this->_config['view'], compact('cart'));
|
||||
|
|
@ -228,7 +236,7 @@ class OnepageController extends Controller
|
|||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
|
||||
if (! $cart->checkMinimumOrder()) {
|
||||
throw new \Exception(trans('shop::app.checkout.cart.minimum-order-message', ['amount' => core()->currency($minimumOrderAmount)]));
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
|
||||
@if (! cart()->hasError())
|
||||
@php
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.minicart.view-cart') }}</a>
|
||||
|
||||
@php
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
|
|
|
|||
|
|
@ -108,10 +108,12 @@
|
|||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="subscribed_to_news_letter"@if (isset($customer->subscription)) value="{{ $customer->subscription->is_subscribed }}" {{ $customer->subscription->is_subscribed ? 'checked' : ''}} @endif>
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="subscribed_to_news_letter"@if (isset($customer->subscription)) value="{{ $customer->subscription->is_subscribed }}" {{ $customer->subscription->is_subscribed ? 'checked' : ''}} @endif>
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.after', ['customer' => $customer]) !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,10 +76,12 @@
|
|||
Checkbox Value 1
|
||||
</span> --}}
|
||||
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.after') !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ class ShopController extends Controller
|
|||
{
|
||||
$slug = request()->get('category-slug');
|
||||
|
||||
if (! $slug) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
switch ($slug) {
|
||||
case 'new-products':
|
||||
case 'featured-products':
|
||||
|
|
|
|||
|
|
@ -104,12 +104,14 @@
|
|||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}" class="unset">
|
||||
<i class="icon wishlist text-down-3"></i>
|
||||
<span>{{ __('shop::app.header.wishlist') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@if (core()->getConfigData('general.content.shop.wishlist_option'))
|
||||
<li>
|
||||
<a href="{{ route('customer.wishlist.index') }}" class="unset">
|
||||
<i class="icon wishlist text-down-3"></i>
|
||||
<span>{{ __('shop::app.header.wishlist') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
<li>
|
||||
<a href="{{ route('customer.orders.index') }}" class="unset">
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<div class="row">
|
||||
@php
|
||||
$minimumOrderAmount = (int) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
|
|
|
|||
|
|
@ -191,10 +191,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="subscribed_to_news_letter"@if (isset($customer->subscription)) value="{{ $customer->subscription->is_subscribed }}" {{ $customer->subscription->is_subscribed ? 'checked' : ''}} @endif style="width: auto;">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="subscribed_to_news_letter" @if (isset($customer->subscription)) value="{{ $customer->subscription->is_subscribed }}" {{ $customer->subscription->is_subscribed ? 'checked' : ''}} @endif style="width: auto;">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.after', ['customer' => $customer]) !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,10 +138,12 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="checkbox2" name="is_subscribed">
|
||||
<span>{{ __('shop::app.customer.signup-form.subscribe-to-newsletter') }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.after') !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,41 @@
|
|||
<?php
|
||||
|
||||
/* max execution time limit */
|
||||
ini_set('max_execution_time', 900);
|
||||
|
||||
// array to pass back data
|
||||
$data = array();
|
||||
/* php bin path */
|
||||
$phpbin = PHP_BINDIR . '/php';
|
||||
|
||||
// run command on terminal
|
||||
$key = 'cd ../.. && '. $phpbin .' artisan key:generate 2>&1';
|
||||
$seeder = 'cd ../.. && '. $phpbin .' artisan db:seed 2>&1';
|
||||
$publish = 'cd ../.. && '. $phpbin .' artisan vendor:publish --all --force 2>&1';
|
||||
/* commands sequence */
|
||||
$commands = [
|
||||
'seeder' => [
|
||||
'key' => 'seeder_results',
|
||||
'command' => 'cd ../.. && '. $phpbin .' artisan db:seed 2>&1'
|
||||
],
|
||||
'publish' => [
|
||||
'key' => 'publish_results',
|
||||
'command' => 'cd ../.. && '. $phpbin .' artisan vendor:publish --all --force 2>&1'
|
||||
],
|
||||
'storage_link' => [
|
||||
'key' => 'storage_link_results',
|
||||
'command' => 'cd ../.. && '. $phpbin .' artisan storage:link 2>&1'
|
||||
],
|
||||
'key' => [
|
||||
'key' => 'key_results',
|
||||
'command' => 'cd ../.. && '. $phpbin .' artisan key:generate 2>&1'
|
||||
],
|
||||
'optimize' => [
|
||||
'key' => 'optimize_results',
|
||||
'command' => 'cd ../.. && '. $phpbin .' artisan optimize 2>&1'
|
||||
],
|
||||
];
|
||||
|
||||
$key_output = exec($key, $data['key'], $data['key_results']);
|
||||
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
|
||||
$publish = exec($publish, $data['publish'], $data['publish_results']);
|
||||
// run command on terminal
|
||||
$data = [];
|
||||
foreach ($commands as $key => $value) {
|
||||
exec($value['command'], $data[$key], $data[$value['key']]);
|
||||
}
|
||||
|
||||
// return a response
|
||||
//return all our data to an AJAX call
|
||||
|
||||
// return all our data to an AJAX call
|
||||
echo json_encode($data);
|
||||
|
|
|
|||
|
|
@ -91,13 +91,13 @@
|
|||
<p class="composer" id="composer-seed">Populating the database tables</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="clearfix"> </div>
|
||||
|
||||
|
||||
<form method="POST" id="migration-form">
|
||||
<div style="text-align: center;">
|
||||
<button class="btn btn-primary" id="migrate-seed">Start installation</button>
|
||||
<button class="btn btn-primary" id="continue">Continue</button>
|
||||
<button type="button" class="btn btn-primary" id="continue">Continue</button>
|
||||
</div>
|
||||
|
||||
<div style="cursor: pointer; margin-top:10px">
|
||||
|
|
|
|||
Loading…
Reference in New Issue