Merge branch 'master' of https://github.com/bagisto/bagisto into development
This commit is contained in:
commit
0b0f425bf4
|
|
@ -10,10 +10,6 @@ Route::group(['middleware' => ['web']], function () {
|
|||
'view' => 'admin::users.sessions.create'
|
||||
])->name('admin.session.create');
|
||||
|
||||
Route::get('/testgrid', 'Webkul\Admin\Http\Controllers\DataGridController@testGrid')->defaults('_config', [
|
||||
'view' => 'admin::catalog.categories.test'
|
||||
]);
|
||||
|
||||
//login post route to admin auth controller
|
||||
Route::post('/login', 'Webkul\User\Http\Controllers\SessionController@store')->defaults('_config', [
|
||||
'redirect' => 'admin.dashboard.index'
|
||||
|
|
@ -38,8 +34,6 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
// Admin Routes
|
||||
Route::group(['middleware' => ['admin']], function () {
|
||||
Route::get('testev', 'Webkul\Product\Http\Controllers\ProductController@testProductFlat');
|
||||
|
||||
Route::get('/logout', 'Webkul\User\Http\Controllers\SessionController@destroy')->defaults('_config', [
|
||||
'redirect' => 'admin.session.create'
|
||||
])->name('admin.session.destroy');
|
||||
|
|
|
|||
|
|
@ -718,12 +718,6 @@ class Cart {
|
|||
$cart->shipping_method = $shippingMethodCode;
|
||||
$cart->save();
|
||||
|
||||
// foreach ($cart->shipping_rates as $rate) {
|
||||
// if ($rate->method != $shippingMethodCode) {
|
||||
// $rate->delete();
|
||||
// }
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -266,160 +266,4 @@ class ProductController extends Controller
|
|||
|
||||
return redirect()->route('admin.catalog.products.index');
|
||||
}
|
||||
|
||||
// public function testProductFlat() {
|
||||
// $product = $this->product->find(2);
|
||||
// $productAttributes = $product->attribute_family->custom_attributes;
|
||||
// $allLocales = core()->getAllLocales();
|
||||
// $productsFlat = array();
|
||||
// $channelLocaleMap = array();
|
||||
// $nonDependentAttributes = array();
|
||||
// $localeDependentAttributes = array();
|
||||
// $channelDependentAttributes = array();
|
||||
// $channelLocaleDependentAttributes = array();
|
||||
|
||||
// foreach($productAttributes as $key => $productAttribute) {
|
||||
// if($productAttribute->value_per_channel) {
|
||||
// if($productAttribute->value_per_locale) {
|
||||
// array_push($channelLocaleDependentAttributes, ['id' => $productAttribute->id, 'code' => $productAttribute->code]);
|
||||
// } else {
|
||||
// array_push($channelDependentAttributes, ['id' => $productAttribute->id, 'code' => $productAttribute->code]);
|
||||
// }
|
||||
// } else if($productAttribute->value_per_locale && !$productAttribute->value_per_channel) {
|
||||
// array_push($localeDependentAttributes, ['id' => $productAttribute->id, 'code' => $productAttribute->code]);
|
||||
// } else {
|
||||
// array_push($nonDependentAttributes, ['id' => $productAttribute->id, 'code' => $productAttribute->code]);
|
||||
// }
|
||||
// }
|
||||
|
||||
// foreach(core()->getAllChannels() as $channel) {
|
||||
// $dummy = [
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => $channel->code,
|
||||
// 'locale' => null,
|
||||
// 'data' => $channelDependentAttributes
|
||||
// ];
|
||||
|
||||
// array_push($channelLocaleMap, $dummy);
|
||||
|
||||
// $dummy = [];
|
||||
|
||||
// foreach($channel->locales as $locale) {
|
||||
// $dummy = [
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => $channel->code,
|
||||
// 'locale' => $locale->code,
|
||||
// 'data' => $channelLocaleDependentAttributes
|
||||
// ];
|
||||
|
||||
// array_push($channelLocaleMap, $dummy);
|
||||
|
||||
// $dummy = [];
|
||||
// }
|
||||
// }
|
||||
|
||||
// $dummy = [
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => null,
|
||||
// 'locale' => null,
|
||||
// 'data' => $nonDependentAttributes
|
||||
// ];
|
||||
|
||||
// array_push($channelLocaleMap, $dummy);
|
||||
|
||||
// $dummy = [];
|
||||
|
||||
// foreach($allLocales as $key => $allLocale) {
|
||||
// $dummy = [
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => null,
|
||||
// 'locale' => $allLocale->code,
|
||||
// 'data' => $localeDependentAttributes
|
||||
// ];
|
||||
|
||||
// array_push($channelLocaleMap, $dummy);
|
||||
|
||||
// $dummy = [];
|
||||
// }
|
||||
|
||||
// $productFlatObjects = $channelLocaleMap;
|
||||
// $keyOfNonDependentAttributes = null;
|
||||
|
||||
// foreach($productAttributes as $productAttribute) {
|
||||
// foreach($productFlatObjects as $flatKey => $productFlatObject) {
|
||||
// if($productFlatObject['channel'] == null && $productFlatObject['locale'] == null) {
|
||||
// $keyOfNonDependentAttributes = $flatKey;
|
||||
// }
|
||||
|
||||
// foreach($productFlatObject['data'] as $key => $value) {
|
||||
// if($productAttribute->code == $value['code']) {
|
||||
// $valueOf = $this->productAttributeValue->findOneWhere([
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => $productFlatObject['channel'],
|
||||
// 'locale' => $productFlatObject['locale'],
|
||||
// 'attribute_id' => $productAttribute->id
|
||||
// ]);
|
||||
|
||||
// if($valueOf != null) {
|
||||
// $productAttributeColumn = $this->productAttributeValue->model()::$attributeTypeFields[$productAttribute->type];
|
||||
|
||||
// $valueOf = $valueOf->{$productAttributeColumn};
|
||||
|
||||
// $productFlatObjects[$flatKey][$productAttribute->code] = $valueOf;
|
||||
// } else {
|
||||
// $productFlatObjects[$flatKey][$productAttribute->code] = 'null';
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// $nonDependentAttributes = $productFlatObjects[$keyOfNonDependentAttributes];
|
||||
|
||||
// array_forget($nonDependentAttributes, ['product_id', 'channel', 'locale', 'data', 'visible_individually', 'width', 'height', 'depth']);
|
||||
|
||||
// unset($productFlatObjects[$keyOfNonDependentAttributes]);
|
||||
|
||||
// $productFlatEntryObject = array();
|
||||
|
||||
// $tempFlatObject = array();
|
||||
|
||||
// foreach($productFlatObjects as $flatKey => $productFlatObject) {
|
||||
// unset($productFlatObject['data']);
|
||||
|
||||
// if(isset($productFlatObject['short_description'])) {
|
||||
// $productFlatObject['description'] = $productFlatObject['short_description'];
|
||||
|
||||
// unset($productFlatObject['short_description']);
|
||||
// }
|
||||
|
||||
// if(isset($productFlatObject['meta_title'])) {
|
||||
// unset($productFlatObject['meta_title']);
|
||||
// unset($productFlatObject['meta_description']);
|
||||
// unset($productFlatObject['meta_keywords']);
|
||||
// }
|
||||
|
||||
// $tempFlatObject = array_merge($productFlatObject, $nonDependentAttributes);
|
||||
|
||||
// $tempFlatObject = core()->convertEmptyStringsToNull($tempFlatObject);
|
||||
|
||||
// $exists = $this->productFlat->findWhere([
|
||||
// 'product_id' => $product->id,
|
||||
// 'channel' => $tempFlatObject['channel'],
|
||||
// 'locale' => $tempFlatObject['locale']
|
||||
// ]);
|
||||
|
||||
// if($exists->count() == 0) {
|
||||
// $result = $this->productFlat->create($tempFlatObject);
|
||||
// } else {
|
||||
// $result = $exists->first();
|
||||
|
||||
// $result->update($tempFlatObject);
|
||||
// }
|
||||
|
||||
// unset($tempFlatObject);
|
||||
// }
|
||||
|
||||
// return 'true';
|
||||
// }
|
||||
}
|
||||
|
|
@ -53,7 +53,8 @@ class CartController extends Controller
|
|||
ProductRepository $product,
|
||||
ProductImage $productImage,
|
||||
ProductView $productView
|
||||
) {
|
||||
)
|
||||
{
|
||||
|
||||
$this->middleware('customer')->only(['moveToWishlist']);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,11 +25,16 @@ use Webkul\Core\Repositories\SliderRepository as Sliders;
|
|||
$this->sliders = $s;
|
||||
|
||||
}
|
||||
public function index() {
|
||||
|
||||
/**
|
||||
* loads the home page for the storefront
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$current_channel = core()->getCurrentChannel();
|
||||
|
||||
$all_sliders = $this->sliders->findWhere(['channel_id'=>$current_channel['id']]);
|
||||
$all_sliders = $this->sliders->findWhere(['channel_id' => $current_channel['id']]);
|
||||
|
||||
return view($this->_config['view'])->with('sliderData',$all_sliders->toArray());
|
||||
return view($this->_config['view'])->with('sliderData', $all_sliders->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class OnepageController extends Controller
|
|||
*/
|
||||
public function saveAddress(CustomerAddressForm $request)
|
||||
{
|
||||
if (Cart::hasError() || !Cart::saveCustomerAddress(request()->all()) || !$rates = Shipping::collectRates())
|
||||
if (Cart::hasError() || !Cart::saveCustomerAddress(request()->all()) || ! $rates = Shipping::collectRates())
|
||||
return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ class TaxRateController extends Controller
|
|||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function create() {
|
||||
public function create()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'identifier' => 'required|string|unique:tax_rates,identifier',
|
||||
'is_zip' => 'sometimes',
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
.dropdown-list.dropdown-container {
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
top: 43px;
|
||||
|
||||
ul {
|
||||
li {
|
||||
|
|
@ -85,6 +86,7 @@
|
|||
padding: 10px;
|
||||
width: 80%;
|
||||
margin-left: 10%;
|
||||
margin-bottom: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,23 @@ return [
|
|||
|
||||
'no-records' => 'No Records Found',
|
||||
'filter-fields-missing' => 'Some of the required field is null, please check column, condition and value properly',
|
||||
'click_on_action' => 'Do you really want to perform this action?'
|
||||
'click_on_action' => 'Do you really want to perform this action?',
|
||||
'search' => 'Search Here...',
|
||||
'filter' => 'Filter',
|
||||
'column' => 'Select Column',
|
||||
'condition' => 'Select Condition',
|
||||
'contains' => 'Contains',
|
||||
'ncontains' => 'Does not contains',
|
||||
'equals' => 'Is Equals to',
|
||||
'nequals' => 'Is Not equals to',
|
||||
'greater' => 'Greater than',
|
||||
'less' => 'Less than',
|
||||
'greatere' => 'Greater than equals to',
|
||||
'lesse' => 'Less than equals to',
|
||||
'value' => 'Select Value',
|
||||
'true' => 'True / Active',
|
||||
'false' => 'False / Inactive',
|
||||
'between' => 'Is between',
|
||||
'apply' => 'Apply'
|
||||
]
|
||||
];
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<div class="grid-container">
|
||||
<div class="filter-row-one" id="datagrid-filters">
|
||||
<div class="search-filter">
|
||||
<input type="search" id="search-field" class="control" placeholder="Search Here..." v-model="searchValue" />
|
||||
<input type="search" id="search-field" class="control" placeholder="{{ __('ui::app.datagrid.search') }}" v-model="searchValue" />
|
||||
|
||||
<div class="icon-wrapper">
|
||||
<span class="icon search-icon search-btn" v-on:click="searchCollection(searchValue)"></span>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<div class="dropdown-filters">
|
||||
<div class="dropdown-toggle">
|
||||
<div class="dropdown-header">
|
||||
<span class="name">Filter</span>
|
||||
<span class="name">{{ __('ui::app.datagrid.filter') }}</span>
|
||||
<i class="icon arrow-down-icon active"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
<li>
|
||||
<div class="control-group">
|
||||
<select class="filter-column-select control" v-model="filterColumn" v-on:click="getColumnOrAlias(filterColumn)">
|
||||
<option selected disabled>Select Column</option>
|
||||
<option selected disabled>{{ __('ui::app.datagrid.column') }}</option>
|
||||
@foreach($results['columns'] as $column)
|
||||
<option value="{{ $column['index'] }}">
|
||||
{{ $column['label'] }}
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
<li v-if='stringConditionSelect'>
|
||||
<div class="control-group">
|
||||
<select class="control" v-model="stringCondition">
|
||||
<option selected disabled>Select Condition</option>
|
||||
<option value="like">Contains</option>
|
||||
<option value="nlike">Does not contains</option>
|
||||
<option value="eq">Is equal to</option>
|
||||
<option value="neqs">Is not equal to</option>
|
||||
<option selected disabled>{{ __('ui::app.datagrid.condition') }}</option>
|
||||
<option value="like">{{ __('ui::app.datagrid.contains') }}</option>
|
||||
<option value="nlike">{{ __('ui::app.datagrid.ncontains') }}</option>
|
||||
<option value="eq">{{ __('ui::app.datagrid.equals') }}</option>
|
||||
<option value="neqs">{{ __('ui::app.datagrid.nequals') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -64,13 +64,13 @@
|
|||
<li v-if='numberConditionSelect'>
|
||||
<div class="control-group">
|
||||
<select class="control" v-model="numberCondition">
|
||||
<option selected disabled>Select Condition</option>
|
||||
<option value="eq">Is equal to</option>
|
||||
<option value="neqs">Is not equal to</option>
|
||||
<option value="gt">Greater than</option>
|
||||
<option value="lt">Less than</option>
|
||||
<option value="gte">Greater than equals to</option>
|
||||
<option value="lte">Less than equals to</option>
|
||||
<option selected disabled>{{ __('ui::app.datagrid.condition') }}</option>
|
||||
<option value="eq">{{ __('ui::app.datagrid.equals') }}</option>
|
||||
<option value="neqs">{{ __('ui::app.datagrid.nequals') }}</option>
|
||||
<option value="gt">{{ __('ui::app.datagrid.greater') }}</option>
|
||||
<option value="lt">{{ __('ui::app.datagrid.less') }}</option>
|
||||
<option value="gte">{{ __('ui::app.datagrid.greatere') }}</option>
|
||||
<option value="lte">{{ __('ui::app.datagrid.lesse') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -85,9 +85,9 @@
|
|||
<li v-if='booleanConditionSelect'>
|
||||
<div class="control-group">
|
||||
<select class="control" v-model="booleanCondition">
|
||||
<option selected disabled>Select Condition</option>
|
||||
<option value="eq">Is equal to</option>
|
||||
<option value="neqs">Is no equal to</option>
|
||||
<option selected disabled>{{ __('ui::app.datagrid.condition') }}</option>
|
||||
<option value="eq">{{ __('ui::app.datagrid.equals') }}</option>
|
||||
<option value="neqs">{{ __('ui::app.datagrid.nequals') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -95,9 +95,9 @@
|
|||
<li v-if='booleanCondition != null'>
|
||||
<div class="control-group">
|
||||
<select class="control" v-model="booleanValue">
|
||||
<option selected disabled>Select Value</option>
|
||||
<option value="1">True / Active</option>
|
||||
<option value="0">False / Inactive</option>
|
||||
<option selected disabled>{{ __('ui::app.datagrid.value') }}</option>
|
||||
<option value="1">{{ __('ui::app.datagrid.true') }}</option>
|
||||
<option value="0">{{ __('ui::app.datagrid.false') }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -106,14 +106,14 @@
|
|||
<li v-if='datetimeConditionSelect'>
|
||||
<div class="control-group">
|
||||
<select class="control" v-model="datetimeCondition">
|
||||
<option selected disabled>Select Condition</option>
|
||||
<option value="eq">Is equal to</option>
|
||||
<option value="neqs">Is not equal to</option>
|
||||
<option value="gt">Greater than</option>
|
||||
<option value="lt">Less than</option>
|
||||
<option value="gte">Greater than equals to</option>
|
||||
<option value="lte">Less than equals to</option>
|
||||
{{-- <option value="btw">Is Between</option> --}}
|
||||
<option selected disabled>{{ __('ui::app.datagrid.condition') }}</option>
|
||||
<option value="eq">{{ __('ui::app.datagrid.equals') }}</option>
|
||||
<option value="neqs">{{ __('ui::app.datagrid.nequals') }}</option>
|
||||
<option value="gt">{{ __('ui::app.datagrid.greater') }}</option>
|
||||
<option value="lt">{{ __('ui::app.datagrid.less') }}</option>
|
||||
<option value="gte">{{ __('ui::app.datagrid.greatere') }}</option>
|
||||
<option value="lte">{{ __('ui::app.datagrid.equalse') }}</option>
|
||||
{{-- <option value="btw">{{ __('ui::app.datagrid.between') }}</option> --}}
|
||||
</select>
|
||||
</div>
|
||||
</li>
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
</div>
|
||||
</li>
|
||||
|
||||
<button class="btn btn-sm btn-primary apply-filter" v-on:click="getResponse">Apply</button>
|
||||
<button class="btn btn-sm btn-primary apply-filter" v-on:click="getResponse">{{ __('ui::app.datagrid.apply') }}</button>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
<span class="icon checkbox-dash-icon"></span>
|
||||
</span>
|
||||
|
||||
<form method="POST" id="mass-action-form" style="display: inline-flex;" action="">
|
||||
<form method="POST" id="mass-action-form" style="display: inline-flex;" action="" onsubmit="return confirm('{{ __('ui::app.datagrid.click_on_action') }}')">
|
||||
@csrf()
|
||||
|
||||
<input type="hidden" id="indexes" name="indexes" v-model="dataIds">
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const { mix } = require("laravel-mix");
|
||||
require("laravel-mix-merge-manifest");
|
||||
|
||||
var publicPath = 'publishable/assets';
|
||||
// var publicPath = "../../../public/vendor/webkul/ui/assets";
|
||||
// var publicPath = 'publishable/assets';
|
||||
var publicPath = "../../../public/vendor/webkul/ui/assets";
|
||||
|
||||
mix.setPublicPath(publicPath).mergeManifest();
|
||||
mix.disableNotifications();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class SessionController extends Controller
|
|||
if (! auth()->guard('admin')->attempt(request(['email', 'password']), $remember)) {
|
||||
session()->flash('error', trans('admin::app.users.users.login-error'));
|
||||
|
||||
return redirect()->route('admin.session.create');
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
if (auth()->guard('admin')->user()->status == 0) {
|
||||
|
|
@ -100,4 +100,4 @@ class SessionController extends Controller
|
|||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue