Fixed Duplicate Buttons Issue -> https://github.com/bagisto/bagisto/issues/4609
This commit is contained in:
parent
3e049e0e91
commit
84c9e73a81
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.admin.marketing.templates.create.after') !!}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.admin.marketing.templates.create.after') !!}
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -61,8 +61,10 @@ class Campaign
|
|||
{
|
||||
$campaigns = $this->campaignRepository->getModel()
|
||||
->leftJoin('marketing_events', 'marketing_campaigns.marketing_event_id', 'marketing_events.id')
|
||||
->leftJoin('marketing_templates', 'marketing_campaigns.marketing_template_id', 'marketing_templates.id')
|
||||
->select('marketing_campaigns.*')
|
||||
->where('status', 1)
|
||||
->where('marketing_campaigns.status', 1)
|
||||
->where('marketing_templates.status', 'active')
|
||||
->where(function ($query) {
|
||||
$query->where('marketing_events.date', Carbon::now()->format('Y-m-d'))
|
||||
->orWhereNull('marketing_events.date');
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ class SmartButtonController extends Controller
|
|||
{
|
||||
$cart = Cart::getCart();
|
||||
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = (float) 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)]));
|
||||
|
|
|
|||
|
|
@ -133,6 +133,20 @@ abstract class AbstractType
|
|||
*/
|
||||
protected $productOptions = [];
|
||||
|
||||
/**
|
||||
* Skip attribute for simple product type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $skipAttributes = [];
|
||||
|
||||
/**
|
||||
* These blade files will be included in product edit page.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $additionalViews = [];
|
||||
|
||||
/**
|
||||
* Create a new product type instance.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,13 +4,6 @@ namespace Webkul\Product\Type;
|
|||
|
||||
class Simple extends AbstractType
|
||||
{
|
||||
/**
|
||||
* Skip attribute for simple product type
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $skipAttributes = [];
|
||||
|
||||
/**
|
||||
* These blade files will be included in product edit page
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +1,17 @@
|
|||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.5
|
||||
* Sizzle CSS Selector Engine v2.3.4
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2020-03-14
|
||||
* Date: 2019-04-08
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Vue.js v2.6.12
|
||||
* (c) 2014-2020 Evan You
|
||||
* Vue.js v2.6.11
|
||||
* (c) 2014-2019 Evan You
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.5.1
|
||||
* jQuery JavaScript Library v3.4.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2020-05-04T22:49Z
|
||||
* Date: 2019-05-01T21:04Z
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=83c93b077da401f7b709",
|
||||
"/css/shop.css": "/css/shop.css?id=5010731b9744e6f9a8d2"
|
||||
"/js/shop.js": "/js/shop.js?id=f1380c0210d5af3612b5",
|
||||
"/css/shop.css": "/css/shop.css?id=9eda91883c592e62fe40"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Webkul\Shop\DataGrids;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Ui\DataGrid\DataGrid;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class OrderDataGrid extends DataGrid
|
||||
{
|
||||
|
|
@ -80,12 +80,13 @@ class OrderDataGrid extends DataGrid
|
|||
]);
|
||||
}
|
||||
|
||||
public function prepareActions() {
|
||||
public function prepareActions()
|
||||
{
|
||||
$this->addAction([
|
||||
'type' => 'View',
|
||||
'method' => 'GET',
|
||||
'route' => 'customer.orders.view',
|
||||
'icon' => 'icon eye-icon',
|
||||
]);
|
||||
], true);
|
||||
}
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ class OnepageController extends Controller
|
|||
return redirect()->route('customer.session.index');
|
||||
}
|
||||
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = (float) 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)]));
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default {
|
|||
checkMinimumOrder: function (e) {
|
||||
if (! this.isMinimumOrderCompleted) {
|
||||
e.preventDefault();
|
||||
window.flashMessages = [{'type': 'alert-warning', 'message': this.minimumOrderMessage}];
|
||||
window.flashMessages = [{'type': 'alert-warning', 'message': this.minimumOrderMessage.replace(/\ /g, ' ') }];
|
||||
this.$root.addFlashMessages();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
|
||||
@if (! cart()->hasError())
|
||||
@php
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = (float) 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 = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
|
|
|
|||
|
|
@ -535,7 +535,9 @@
|
|||
|
||||
methods: {
|
||||
methodSelected: function() {
|
||||
this.$emit('onPaymentMethodSelected', this.payment)
|
||||
this.$emit('onPaymentMethodSelected', this.payment);
|
||||
|
||||
$('.paypal-button-container').empty();
|
||||
|
||||
eventBus.$emit('after-payment-method-selected', this.payment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,13 +298,17 @@ abstract class DataGrid
|
|||
}
|
||||
|
||||
/**
|
||||
* Add action.
|
||||
* Add action. Some datagrids are used in shops also. So extra
|
||||
* parameters is their. If needs to give an access just pass true
|
||||
* in second param.
|
||||
*
|
||||
* @param array $action
|
||||
* @param array $action
|
||||
*
|
||||
* @param bool $specialPermission
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addAction($action)
|
||||
public function addAction($action, $specialPermission = false)
|
||||
{
|
||||
$currentRouteACL = $this->fetchCurrentRouteACL($action);
|
||||
|
||||
|
|
@ -316,7 +320,7 @@ abstract class DataGrid
|
|||
$eventName = null;
|
||||
}
|
||||
|
||||
if (bouncer()->hasPermission($currentRouteACL['key'] ?? null)) {
|
||||
if (bouncer()->hasPermission($currentRouteACL['key'] ?? null) || $specialPermission) {
|
||||
$this->fireEvent('action.before.' . $eventName);
|
||||
|
||||
array_push($this->actions, $action);
|
||||
|
|
@ -327,13 +331,17 @@ abstract class DataGrid
|
|||
}
|
||||
|
||||
/**
|
||||
* Add mass action.
|
||||
* Add mass action. Some datagrids are used in shops also. So extra
|
||||
* parameters is their. If needs to give an access just pass true
|
||||
* in second param.
|
||||
*
|
||||
* @param array $massAction
|
||||
*
|
||||
* @param bool $specialPermission
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addMassAction($massAction)
|
||||
public function addMassAction($massAction, $specialPermission = false)
|
||||
{
|
||||
$massAction['route'] = $this->getRouteNameFromUrl($massAction['action'], $massAction['method']);
|
||||
|
||||
|
|
@ -347,7 +355,7 @@ abstract class DataGrid
|
|||
$eventName = null;
|
||||
}
|
||||
|
||||
if (bouncer()->hasPermission($currentRouteACL['key'] ?? null)) {
|
||||
if (bouncer()->hasPermission($currentRouteACL['key'] ?? null) || $specialPermission) {
|
||||
$this->fireEvent('mass.action.before.' . $eventName);
|
||||
|
||||
$this->massActions[] = $massAction;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"/js/velocity.js": "/js/velocity.js?id=a45dba1beb5c6f79193d",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=4322502d80a0e4a0affd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=a0d4320e35797371f8f0"
|
||||
"/css/velocity.css": "/css/velocity.css?id=2ee191136dd475471b01"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,6 +220,8 @@
|
|||
position: absolute;
|
||||
line-height: 13em;
|
||||
background: $border-dark;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&.right {
|
||||
right: 0;
|
||||
|
|
|
|||
|
|
@ -429,7 +429,6 @@
|
|||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -448,7 +447,6 @@
|
|||
max-width: 200px;
|
||||
max-height: 200px;
|
||||
position: relative;
|
||||
background: #f2f2f2;
|
||||
|
||||
.quick-view-btn-container {
|
||||
button {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<div class="row">
|
||||
@php
|
||||
$minimumOrderAmount = core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
$minimumOrderAmount = (float) core()->getConfigData('sales.orderSettings.minimum-order.minimum_order_amount') ?? 0;
|
||||
@endphp
|
||||
|
||||
<proceed-to-checkout
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@
|
|||
.main-content-wrapper {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.buynow {
|
||||
height: 40px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
|
|
|
|||
|
|
@ -47,10 +47,7 @@
|
|||
@endpush
|
||||
|
||||
@section('content-wrapper')
|
||||
<div
|
||||
style="padding-left: 50px !important;"
|
||||
class="container category-page-wrapper"
|
||||
>
|
||||
<div class="container category-page-wrapper">
|
||||
<search-component></search-component>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Reference in New Issue