This commit is contained in:
rahul shukla 2018-11-01 19:13:55 +05:30
commit d90a07f159
27 changed files with 32933 additions and 116 deletions

View File

@ -101,6 +101,5 @@
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
"minimum-stability": "dev"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/admin.js": "/js/admin.js?id=b26277cdb91d32ef5ad3",
"/css/admin.css": "/css/admin.css?id=cae7debf6e86f063ca6c"
}
"/js/admin.js": "/js/admin.js",
"/css/admin.css": "/css/admin.css"
}

View File

@ -109,9 +109,9 @@ class CustomerGroupDataGrid
//don't use aliasing in case of searchables
'searchable' => [
[
'column' => 'cg.code',
'type' => 'string',
'label' => 'Code'
'column' => 'cg.id',
'type' => 'number',
'label' => 'Id'
],
[
'column' => 'cg.name',

View File

@ -42,9 +42,9 @@ class OrderDataGrid
'actions' => [
[
'type' => 'Edit',
'type' => 'View',
'route' => route('admin.datagrid.delete'),
'confirm_text' => 'Do you really wanis?',
'confirm_text' => 'Do you really want to do this?',
'icon' => 'icon pencil-lg-icon',
],
[
@ -106,9 +106,9 @@ class OrderDataGrid
if($value == 'completed')
return '<span class="badge badge-md badge-success">Completed</span>';
else if($value == "cancelled")
return '<span class="badge badge-md badge-danger">Completed</span>';
return '<span class="badge badge-md badge-danger">Cancelled</span>';
else if($value == "closed")
return '<span class="badge badge-md badge-info">Completed</span>';
return '<span class="badge badge-md badge-info">Closed</span>';
else if($value == "pending")
return '<span class="badge badge-md badge-warning">Pending</span>';
},
@ -163,6 +163,5 @@ class OrderDataGrid
public function render()
{
return $this->createOrderDataGrid()->render();
}
}

View File

@ -272,7 +272,7 @@ body {
}
.page-content {
margin-top: 15px;
margin-top: 15px;
}
.card {
@ -312,7 +312,7 @@ body {
width: 60px;
float: left;
margin-right: 15px;
&.product {
background: #F2F2F2;
}
@ -381,7 +381,7 @@ body {
color: #A2A2A2;
text-transform: uppercase;
}
.data {
padding-top: 3px;
font-size: 32px;
@ -398,7 +398,7 @@ body {
}
}
}
}
}
}
.graph-stats {
@ -431,7 +431,7 @@ body {
}
}
// admin dashboard css ends here
// customer oder css for admin start here
.sale-container {
.sale-section {
@ -503,4 +503,224 @@ body {
}
}
}
// customer oder css for admin end here
// customer oder css for admin end here
// css for rtl start here
.rtl {
direction: rtl;
.navbar-top {
.navbar-top-right {
text-align: left;
.profile-info {
margin: 0 30px 0 25px;
i.icon {
margin-left: 0px;
margin-right: 10px;
}
}
}
}
.navbar-left {
border-left: 1px solid rgba(162, 162, 162, 0.2);
border-right: none;
}
.content-container {
padding-right: 90px;
padding-left: 0px;
.content .page-header {
.page-title {
float: right;
}
.page-action {
float: left;
}
.control-group {
margin-right: 20px;
margin-left: 0px;
}
.control-group.date {
&::after {
margin-top: 6px;
position: absolute;
margin-right: -35px;
}
&:last-child {
margin-left: 0px;
}
}
}
.content-wrapper {
padding: 25px 305px 25px 25px;
}
.aside-nav .active i {
float: left;
transform: rotate(180deg);
}
}
.dashboard {
.dashboard-stats .dashboard-card .data span {
float: left;
}
.card {
padding: 20px 20px 0px 0px;
.card-info ul li {
.image {
float: right;
margin-right: 0px;
margin-left: 15px;
}
.icon.angle-right-icon {
left: 30px;
right: auto;
transform: rotate(180deg);
}
}
}
.graph-stats {
.left-card-container {
float: right;
padding-right: 0px;
}
.right-card-container {
float: right;
padding-left: 0px;
padding-right: 30px;
}
}
}
.sale-container .sale-summary {
float: left;
}
// ui
.grid-container .filter-wrapper {
.filter-row-one .search-filter {
border: 2px solid #C7C7C7;
.control {
border: none;
padding-right: 10px;
}
.ic-wrapper {
border: none;
padding-top: 2px;
padding-right: 5px;
}
}
.filter-row-two .filter-one {
margin-right: 0px;
.filter-name {
margin-right: 0px;
margin-left: 5px;
}
.filter-value {
padding-right: 5px;
padding-left: 0px;
}
}
}
.grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span {
padding-right: 5px;
}
.grid-container .table tbody td.action a:first-child {
margin-left: 10px;
margin-right: 0px;
}
.table table {
text-align: right;
}
.dropdown-list.bottom-right {
left: 0px;
right: auto;
}
.dropdown-list .dropdown-container {
text-align: right;
}
.accordian .accordian-header .icon {
float: left;
}
.tree-container .tree-item {
padding-right: 30px;
.expand-icon ,.folder-icon {
margin-left: 10px;
margin-right: 0px;
}
}
.tree-container >.tree-item {
padding-right: 0px;
}
.radio .radio-view {
margin-left: 5px;
}
.image-wrapper .image-item {
margin-right: 0px;
margin-left: 20px;
.remove-image {
margin-right: 0px;
}
}
.control-group label.required::before {
content: "*";
color: #FC6868;
font-weight: 700;
}
.control-group label.required::after {
content: none;
}
.control-group label .locale {
float: left;
}
.control-group.date {
&::after {
margin-top: 15px;
position: absolute;
margin-right: -35px;
}
}
.pagination .page-item .icon {
transform: rotate(180deg);
}
}
// css for rtl end here

View File

@ -17,7 +17,7 @@
</head>
<body>
<body class="rtl">
<div id="app">
<flash-wrapper ref='flashes'></flash-wrapper>
@ -54,7 +54,7 @@
<script type="text/javascript" src="{{ asset('vendor/webkul/admin/assets/js/admin.js') }}"></script>
<script type="text/javascript" src="{{ asset('vendor/webkul/ui/assets/js/ui.js') }}"></script>
@stack('scripts')
<div class="modal-overlay"></div>

View File

@ -1,7 +1,7 @@
@extends('admin::layouts.content')
@section('page_title')
{{ __('admin::app.settings.sliders.title') }}
@stop
@section('content')

View File

@ -1,8 +1,8 @@
const { mix } = require("laravel-mix");
require("laravel-mix-merge-manifest");
var publicPath = 'publishable/assets';
// var publicPath = "../../../public/vendor/webkul/admin/assets";
// var publicPath = 'publishable/assets';
var publicPath = "../../../public/vendor/webkul/admin/assets";
mix.setPublicPath(publicPath).mergeManifest();
mix.disableNotifications();

View File

@ -35,6 +35,11 @@ class SearchByAttributeCriteria extends AbstractProduct implements CriteriaInter
*/
public function apply($model, RepositoryInterface $repository)
{
return $model = $model->leftJoin('product_attribute_values as pav', 'products.id', '=', 'pav.product_id')->where('attribute_id', '=', 75)->where('products.parent_id', '=', null);
$attribute = $this->attribute->findOneByField('code', 'name');
return $model
->leftJoin('product_attribute_values as pav', 'products.id', '=', 'pav.product_id')
->where('attribute_id', '=', $attribute->id)
->where('products.parent_id', '=', null);
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,10 @@
{
<<<<<<< HEAD
"/js/shop.js": "/js/shop.js",
"/css/shop.css": "/css/shop.css"
}
=======
"/js/shop.js": "/js/shop.js?id=55f8798e657b22f380c9",
"/css/shop.css": "/css/shop.css?id=9aad6e8b5717a4ac508c"
}
>>>>>>> b92c299cfd943822554521d62e1e7946f2ff8031

View File

@ -175,7 +175,5 @@ class CartController extends Controller
return redirect()->back();
}
}
}

View File

@ -207,7 +207,7 @@ input {
.add-to-wishlist {
.wishlist-icon {
&:hover {
background-image: url('../images/wishadd.svg');
background-image: url('../images/wishlist-added.svg');
}
}
}
@ -406,6 +406,10 @@ input {
.add-to-wishlist {
margin-top: 5px;
background: transparent;
border: 0;
cursor: pointer;
padding: 0;
}
}
@ -1547,7 +1551,7 @@ section.product-detail {
margin-top: 20px;
margin-bottom: 20px;
form {
.form-container {
display: flex;
flex-direction: row;
// justify-content: space-between;
@ -1635,11 +1639,23 @@ section.product-detail {
}
.add-to-wishlist {
background-image: url('../images/wishlist.svg');
position: absolute;
top: 10px;
right: 12px;
background-color: transparent;
border: 0;
cursor: pointer;
padding: 0;
width: 32px;
height: 32px;
&:hover {
background-image: url('../images/wishlist-added.svg');
}
}
.share {
position: absolute;
top: 10px;

View File

@ -1,7 +1,7 @@
@component('shop::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
<img src="{{ bagisto_asset('images/logo.svg') }}">
</a>
</div>

View File

@ -1,7 +1,7 @@
@component('shop::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
<img src="{{ bagisto_asset('images/logo.svg') }}">
</a>
</div>

View File

@ -1,7 +1,7 @@
@component('shop::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
<img src="{{ bagisto_asset('images/logo.svg') }}">
</a>
</div>

View File

@ -1,7 +1,7 @@
@component('shop::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
<img src="{{ bagisto_asset('images/logo.svg') }}">
</a>
</div>

View File

@ -1,7 +1,7 @@
@component('shop::emails.layouts.master')
<div style="text-align: center;">
<a href="{{ config('app.url') }}">
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
<img src="{{ bagisto_asset('images/logo.svg') }}">
</a>
</div>

View File

@ -1,3 +1,3 @@
<button class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
<button type="submit" class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
{{ __('shop::app.products.add-to-cart') }}
</button>

View File

@ -1,3 +1,3 @@
<a href="{{ route('shop.product.buynow', $product->id)}}" class="btn btn-lg btn-primary buynow" style="text-align: center;" id="buynow-changer" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
<button type="submit" data-href="{{ route('shop.product.buynow', $product->id)}}" class="btn btn-lg btn-primary buynow" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
{{ __('shop::app.products.buy-now') }}
</a>
</button>

View File

@ -11,76 +11,111 @@
@section('content-wrapper')
<section class="product-detail">
<!--<div class="category-breadcrumbs">
<span class="breadcrumb">Home</span> > <span class="breadcrumb">Men</span> > <span class="breadcrumb">Slit Open Jeans</span>
</div>-->
<div class="layouter">
<form method="POST" action="{{ route('cart.add', $product->id) }}" @submit.prevent="onSubmit">
@csrf()
<product-view>
<div class="form-container">
@csrf()
<input type="hidden" name="product" value="{{ $product->id }}">
<input type="hidden" name="product" value="{{ $product->id }}">
@include ('shop::products.view.gallery')
@include ('shop::products.view.gallery')
<div class="details">
<div class="details">
<div class="product-heading">
<span>{{ $product->name }}</span>
</div>
@include ('shop::products.review', ['product' => $product])
@include ('shop::products.price', ['product' => $product])
@include ('shop::products.view.stock', ['product' => $product])
<div class="description">
{!! $product->short_description !!}
</div>
<div class="quantity control-group" :class="[errors.has('quantity') ? 'has-error' : '']">
<label class="reqiured">{{ __('shop::app.products.quantity') }}</label>
<input name="quantity" class="control" value="1" v-validate="'required|numeric|min_value:1'" style="width: 60px;">
<span class="control-error" v-if="errors.has('quantity')">@{{ errors.first('quantity') }}</span>
</div>
@if ($product->type == 'configurable')
<input type="hidden" value="true" name="is_configurable">
@else
<input type="hidden" value="false" name="is_configurable">
@endif
@include ('shop::products.view.configurable-options')
<accordian :title="'{{ __('shop::app.products.description') }}'" :active="true">
<div slot="header">
{{ __('shop::app.products.description') }}
<i class="icon expand-icon right"></i>
<div class="product-heading">
<span>{{ $product->name }}</span>
</div>
<div slot="body">
<div class="full-description">
{!! $product->description !!}
@include ('shop::products.review', ['product' => $product])
@include ('shop::products.price', ['product' => $product])
@include ('shop::products.view.stock', ['product' => $product])
<div class="description">
{!! $product->short_description !!}
</div>
<div class="quantity control-group" :class="[errors.has('quantity') ? 'has-error' : '']">
<label class="reqiured">{{ __('shop::app.products.quantity') }}</label>
<input name="quantity" class="control" value="1" v-validate="'required|numeric|min_value:1'" style="width: 60px;">
<span class="control-error" v-if="errors.has('quantity')">@{{ errors.first('quantity') }}</span>
</div>
@if ($product->type == 'configurable')
<input type="hidden" value="true" name="is_configurable">
@else
<input type="hidden" value="false" name="is_configurable">
@endif
@include ('shop::products.view.configurable-options')
<accordian :title="'{{ __('shop::app.products.description') }}'" :active="true">
<div slot="header">
{{ __('shop::app.products.description') }}
<i class="icon expand-icon right"></i>
</div>
</div>
</accordian>
@include ('shop::products.view.attributes')
<div slot="body">
<div class="full-description">
{!! $product->description !!}
</div>
</div>
</accordian>
@include ('shop::products.view.reviews')
@include ('shop::products.view.attributes')
@include ('shop::products.view.reviews')
</div>
</div>
</form>
</product-view>
</div>
@include ('shop::products.view.up-sells')
</section>
@endsection
@push('scripts')
<script type="text/x-template" id="product-view-template">
<form method="POST" action="{{ route('cart.add', $product->id) }}" @click.prevent="onSubmit($event)">
<slot></slot>
</form>
</script>
<script>
Vue.component('product-view', {
template: '#product-view-template',
inject: ['$validator'],
methods: {
onSubmit (e) {
if(e.target.getAttribute('type') != 'submit')
return;
this.$validator.validateAll().then(result => {
if (result) {
if(e.target.getAttribute('data-href')) {
window.location.href = e.target.getAttribute('data-href');
} else {
e.target.submit();
}
}
});
}
}
});
document.onreadystatechange = function () {
var state = document.readyState
var galleryTemplate = document.getElementById('product-gallery-template');

View File

@ -2,20 +2,7 @@
@inject ('configurableOptionHelper', 'Webkul\Product\Helpers\ConfigurableOption')
<product-options>
<!--<div class="attribute control-group has-error">
<label class="reqiured">Color</label>
<select name="super_attribute[104]" id="attribute_104" class="control" data-vv-id="1" aria-required="true" aria-invalid="true">
<option value="">Choose an option</option>
</select>
</div>
<div class="attribute control-group">
<label class="reqiured">Size</label>
<select name="super_attribute[105]" disabled="disabled" id="attribute_105" class="control" data-vv-id="2" aria-required="true" aria-invalid="false">
</select>
</div>-->
</product-options>
<product-options></product-options>
@push('scripts')
@ -41,7 +28,7 @@
</div>
</script>
{{-- <?php $config = $configurableOptionHelper->getConfigurationConfig($product) ?> --}}
<?php $config = $configurableOptionHelper->getConfigurationConfig($product) ?>
<script>
@ -112,7 +99,7 @@
//wishlist anchor href changer with options
@auth('customer')
var wishlistLink = $('#wishlist-changer').attr('href');
var wishlistLink = $('#wishlist-changer').attr('data-href');
if(this.selectedProductId != '') {
var splitted = wishlistLink.split("/");
@ -123,14 +110,14 @@
var joined = splitted.join('/');
var newWishlistUrl = joined+'/'+lastItem;
var newWishlistUrl = joined + '/' + lastItem;
$('#wishlist-changer').attr('href', newWishlistUrl);
$('#wishlist-changer').attr('data-href', newWishlistUrl);
}
@endauth
//buy now anchor href changer with options
var buyNowLink = $('#buynow-changer').attr('href');
var buyNowLink = $('.btn.buynow').attr('data-href');
if(this.selectedProductId != '') {
var splitted = buyNowLink.split("/");
@ -141,9 +128,9 @@
var joined = splitted.join('/');
var newBuyNowUrl = joined+'/'+lastItem;
var newBuyNowUrl = joined + '/' + lastItem;
$('#buynow-changer').attr('href', newBuyNowUrl);
$('.btn.buynow').attr('data-href', newBuyNowUrl);
}
} else {
attribute.selectedIndex = 0;

View File

@ -8,12 +8,10 @@
<product-gallery></product-gallery>
@include ('shop::products.product-add')
@include ('shop::products.view.product-add')
</div>
@push('scripts')
<script type="text/x-template" id="product-gallery-template">
@ -42,7 +40,11 @@
{{-- Uncomment the line below for activating share links --}}
{{-- @include('shop::products.sharelinks') --}}
@include('shop::products.wishlist')
@auth('customer')
<button type="submit" class="add-to-wishlist" data-href="{{ route('customer.wishlist.add', $product->id) }}" id="wishlist-changer">
</button>
@endauth
</div>
</div>

View File

@ -21,7 +21,7 @@
@if(count($actions))
<td class="action">
@foreach($actions as $action)
<a @if($action['type'] == "Edit") href="{{ url()->current().'/edit/'.$result->id }}" @elseif($action['type']=="Delete") href="{{ url()->current().'/delete/'.$result->id }}" @endif class="Action-{{ $action['type'] }}" id="{{ $result->id }}" onclick="return confirm_click('{{ $action['confirm_text'] }}');">
<a @if($action['type'] == "Edit") href="{{ url()->current().'/edit/'.$result->id }}" @elseif($action['type'] == "View") href="{{ url()->current().'/view/'.$result->id }}" @elseif($action['type']=="Delete") href="{{ url()->current().'/delete/'.$result->id }}" @endif class="Action-{{ $action['type'] }}" id="{{ $result->id }}" onclick="return confirm_click('{{ $action['confirm_text'] }}');">
<i class="{{ $action['icon'] }}"></i>
</a>
@endforeach