This commit is contained in:
shubhammehrotra.symfony@webkul.com 2019-12-31 12:34:28 +05:30
parent 11bdccbd88
commit 3f6ce24738
25 changed files with 183 additions and 172 deletions

View File

@ -41,8 +41,8 @@ use Webkul\Product\Repositories\SearchRepository;
/**
* Index to handle the view loaded with the search results
*
* @return \Illuminate\View\View
*
* @return \Illuminate\View\View
*/
public function index()
{

View File

@ -1,30 +1,23 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.18",
"cross-env": "^5.1.4",
"laravel-mix": "^2.1",
"laravel-mix-merge-manifest": "^0.1.1",
"jquery": "^3.2",
"vue": "^2.1.10"
"vue": "^2.1.10",
"vue-carousel": "^0.18.0"
},
"dependencies": {
"bootstrap-sass": "^3.4.1",
"font-awesome": "^4.7.0",

View File

@ -1496,13 +1496,18 @@
right: 15px !important;
top: 50px !important;
z-index: 100 !important;
font-size: 14px !important;
font-size: 16px !important;
position: fixed !important;
max-width: 400px !important;
min-height: 40px !important;
min-height: 45px !important;
max-height: 100px !important;
}
.alert.alert-dismissible .close {
font-size: 23px;
padding: .3rem 1.25rem;
}
#home-right-bar-container.col-12 .category-container {
padding: 30px 0;
}
@ -1720,8 +1725,11 @@
margin-left: 0px !important;
}
.product-price .price-label {
margin-right: 6px;
}
.product-price .sticker {
display: none;
top: 0;
left: 0;
border: none;
@ -1746,6 +1754,12 @@
text-decoration: line-through;
}
.method-sticker {
background-color: grey;
display: block;
color: white;
}
/* @author Shubham Mehrotra */
body {
overflow-x: hidden;
@ -1930,8 +1944,8 @@ header #search-form > *:focus {
font-size: 14px;
}
.container-fluid > .row:first-child {
margin-bottom: 20px;
.container > .container-fluid {
margin-bottom: 60px;
}
/* advertisement-one */
@ -2617,7 +2631,7 @@ body::after {
padding-left: 40px !important;
}
.pr0 {
.pr0, .container > .container-fluid > .row {
padding-right: 0px !important;
}
@ -3360,6 +3374,10 @@ button[disabled] {
font-size: 16px;
}
.product-detail .right .product-price .sticker {
display: none;
}
.product-detail .thumb-list {
left: 15px;
z-index: 1000;

View File

@ -36724,24 +36724,28 @@ var render = function() {
"div",
{ class: "row " + (_vm.isEnabled == "0" ? "disabled" : "") },
[
_c("div", { staticClass: "main-category fs20 pt10 col-2 pl30" }, [
_c("i", {
class:
"rango-view-list " +
(_vm.isEnabled == "0" ? "" : "cursor-pointer") +
" align-vertical-top",
on: {
click: function($event) {
_vm.isEnabled == "0" ? "" : _vm.toggleSidebar()
_c(
"div",
{ staticClass: "main-category fs20 pt10 col-2 pl30 unselectable" },
[
_c("i", {
class:
"rango-view-list " +
(_vm.isEnabled == "0" ? "" : "cursor-pointer") +
" align-vertical-top",
on: {
click: function($event) {
_vm.isEnabled == "0" ? "" : _vm.toggleSidebar()
}
}
}
}),
_vm._v(" "),
_c("span", {
staticClass: "text-up",
domProps: { textContent: _vm._s(_vm.heading) }
})
]),
}),
_vm._v(" "),
_c("span", {
staticClass: "text-up",
domProps: { textContent: _vm._s(_vm.heading) }
})
]
),
_vm._v(" "),
_c("div", { staticClass: "content-list row no-margin col-10" }, [
_c(

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddFooterContentInChannels extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('channels', function($table) {
$table->text('subscription_bar_content')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('channels', function($table) {
$table->dropColumn('subscription_bar_content');
});
}
}

View File

@ -20,6 +20,7 @@ class CreateVelocityMetaData extends Migration
$table->text('footer_left_content');
$table->text('footer_middle_content');
$table->boolean('slider')->default(0);
$table->text('subscription_bar_content')->nullable();
$table->timestamps();
});

View File

@ -21,6 +21,9 @@ class VelocityMetaDataSeeder extends Seeder
'footer_middle_content' => '<div class="col-4 footer-ct-content"><div class="row"><div class="col-6"><ul type="none"><li><a href="">About Us</a></li><li><a href="">Customer Service</a></li><li><a href="">Whats New</a></li><li><a href="">Contact Us </a></li></div><div class="col-6"><ul type="none"><li><a href="">Order and Returns</a></li><li><a href="">Payment Policy</a></li><li><a href="">Shipping Policy</a></li><li><a href="">Privacy and Cookies Policy</a></li></div></div></div>',
'slider' => 1,
'subscription_bar_content' => '<div class="social-icons wk-icon xyz"><i class="within-circle rango-facebook" title="facebook"></i><i class="within-circle rango-twitter" title="twitter"></i><i class="within-circle rango-linked-in" title="linkedin"></i>
<i class="within-circle rango-pintrest" title="Pinterest"></i><i class="within-circle rango-youtube" title="Youtube"></i><i class="within-circle rango-instagram" title="instagram"></i></div>'
]);
}
}

View File

@ -48,14 +48,18 @@ class ConfigurationController extends Controller
public function storeMetaData($id)
{
if (! request()->get('slider')) {
if (request()->get('slides') == "on") {
$params = request()->all() + [
'slider' => 1
];
} else {
$params = request()->all() + [
'slider' => 0
];
} else {
$params = request()->all();
}
unset($params['slides']);
$product = $this->velocityMetaDataRepository->update($params, $id);
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Velocity Theme']));

View File

@ -39,8 +39,6 @@ class VelocityServiceProvider extends ServiceProvider
$this->publishes([
__DIR__ . '/../Resources/views/' => resource_path('themes/velocity/views'),
dirname(__DIR__) . '/Resources/views/admin/settings/channels/edit.blade.php' => base_path('resources/views/vendor/admin/settings/channels/edit.blade.php')
]);
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'velocity');

View File

@ -2,46 +2,11 @@
namespace Webkul\Velocity\Repositories\Product;
use DB;
use Illuminate\Container\Container as App;
use Illuminate\Support\Facades\Event;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Webkul\Attribute\Repositories\AttributeRepository;
use Webkul\Core\Eloquent\Repository;
use Webkul\Product\Repositories\ProductFlatRepository;
use Webkul\Product\Models\ProductAttributeValue;
/**
* Product Repository
*
* @author Jitendra Singh <jitendra@webkul.com>
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
*/
class ProductRepository extends Repository
{
/**
* AttributeRepository object
*
* @var array
*/
protected $attributeRepository;
/**
* Create a new controller instance.
*
* @param Webkul\Attribute\Repositories\AttributeRepository $attributeRepository
* @return void
*/
public function __construct(
AttributeRepository $attributeRepository,
App $app
)
{
$this->attributeRepository = $attributeRepository;
parent::__construct($app);
}
/**
* Specify Model class name
*

View File

@ -1,7 +1,7 @@
<template>
<div :class="`row ${isEnabled == '0' ? 'disabled' : ''}`">
<div
class="main-category fs20 pt10 col-2 pl30">
class="main-category fs20 pt10 col-2 pl30 unselectable">
<i
:class="`rango-view-list ${isEnabled == '0' ? '' : 'cursor-pointer'} align-vertical-top`"
@click="(isEnabled == '0') ? '' : toggleSidebar()">

View File

@ -783,11 +783,18 @@
right: 15px !important;
top: 50px !important;
z-index: 100 !important;
font-size: 14px !important;
font-size: 16px !important;
position: fixed !important;
max-width: 400px !important;
min-height: 40px !important;
min-height: 45px !important;
max-height: 100px !important;
&.alert-dismissible {
.close {
font-size: 23px;
padding: .3rem 1.25rem;
}
}
}
#home-right-bar-container {
@ -1015,8 +1022,11 @@
}
.product-price {
.price-label {
margin-right: 6px;
}
.sticker {
display: none;
top: 0;
left: 0;
border: none;
@ -1040,4 +1050,10 @@
.special-price {
text-decoration: line-through;
}
}
.method-sticker {
background-color: grey;
display: block;
color: white;
}

View File

@ -187,8 +187,14 @@ header #search-form > *:focus {
font-size: 14px;
}
.container-fluid > .row:first-child() {
margin-bottom: 20px;
.container {
> .container-fluid {
margin-bottom: 60px;
> .row {
@extend .pr0;
}
}
}
/* advertisement-one */

View File

@ -294,6 +294,12 @@
}
}
}
.product-price {
.sticker {
display: none;
}
}
}
.thumb-list {

View File

@ -21,7 +21,6 @@ return [
'status' => 'Status',
'active' => 'Active',
'inactive' => 'Inactive',
'featured-product' => 'Featured Product'
],
'category' => [
'icon-status' => 'Category Icon Status',
@ -93,6 +92,7 @@ return [
'title' => 'Velocity meta data',
'home-page-content' => 'Home Page Content',
'footer-left-content' => 'Footer Left Content',
'subscription-content' => 'Subscription bar Content',
'activate-slider' => 'Activate Slider',
'footer-left-raw-content' => 'We love to craft softwares and solve the real world problems with the binaries. We are highly committed to our goals. We invest our resources to create world class easy to use softwares and applications for the enterprise business with the top notch, on the edge technology expertise.',
'footer-middle-content' => 'Footer Middle Content',

View File

@ -13,9 +13,9 @@
</div>
<form
action="{{ route('velocity.admin.store.meta-data', ['id' => $metaData->id]) }}"
method="POST"
@submit.prevent="onSubmit">
@submit.prevent="onSubmit"
action="{{ route('velocity.admin.store.meta-data', ['id' => $metaData->id]) }}">
@csrf
@ -28,15 +28,28 @@
<input
type="checkbox"
class="control"
id="slider"
name="slider"
id="slides"
name="slides"
data-vv-as="&quot;slides&quot;"
{{ $metaData->slider ? 'checked' : ''}}
value="{{ $metaData->slider }}" />
{{ $metaData->slider ? 'checked' : ''}} />
<span class="slider round"></span>
</label>
</div>
<div class="control-group">
<label for="footer_content">
{{ __('velocity::app.admin.meta-data.subscription-content') }}
</label>
<textarea
class="control"
id="subscription-content"
name="subscription-content">
{{ $metaData->subscription_bar_content}}
</textarea>
</div>
<div class="control-group">
<label for="footer_content">
{{ __('velocity::app.admin.meta-data.home-page-content') }}
@ -94,7 +107,7 @@
width: "100%",
image_advtab: true,
valid_elements : '*[*]',
selector: 'textarea#home_page_content,textarea#footer_left_content,textarea#footer_middle_content',
selector: 'textarea#home_page_content,textarea#footer_left_content,textarea#subscription-content,textarea#footer_middle_content',
plugins: 'image imagetools media wordcount save fullscreen code',
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
});

View File

@ -1,6 +1,6 @@
<div class="container-fluid advertisement-one no-padding">
<div class="row">
<div class="row col-12">
<div class="col offers-lt-panel bg-image"></div>
<div class="col offers-ct-panel">

View File

@ -1,10 +1,9 @@
@php
$count = 4;
$config = core()->getConfigData('velocity.configuration.general.featured_product');
if ($config > 4)
$count = $config;
else
$count = 4;
$featuredProducts = app('Webkul\Velocity\Repositories\Product\ProductRepository')->getFeaturedProducts($count);

View File

@ -1,3 +1,25 @@
@php
$activeShippings = [];
$activePayments = [];
$shippings = core()->getConfigData('sales.carriers');
$payments = core()->getConfigData('sales.paymentmethods');
foreach($shippings as $ship)
{
if ($ship['active'] == "true") {
array_push($activeShippings, $ship['title']);
}
}
foreach($payments as $payment)
{
if ($payment['active'] == "true") {
array_push($activePayments, $payment['title']);
}
}
@endphp
<div class="col-4 footer-rt-content">
<div class="row">
@ -6,12 +28,11 @@
</div>
<div class="payment-methods">
<div class="cash bg-image"></div>
<div class="cheque bg-image"></div>
<div class="visa bg-image"></div>
<div class="master-card bg-image"></div>
<div class="paypal bg-image"></div>
<div class="discover bg-image"></div>
@foreach($activePayments as $paymentMethod)
<div class="method-sticker">
{{ $paymentMethod}}
</div>
@endforeach
</div>
</div>
@ -21,7 +42,11 @@
</div>
<div class="shipping-methods">
<div class="master-card bg-image"></div>
@foreach($activeShippings as $shippingMethod)
<div class="method-sticker">
{{ $shippingMethod}}
</div>
@endforeach
</div>
</div>

View File

@ -1,7 +1,7 @@
@if (core()->getConfigData('customer.settings.newsletter.subscription'))
<div class="newsletter-subscription">
<div class="newsletter-wrapper">
{!! DbView::make(core()->getCurrentChannel())->field('subscription_bar_content')->render() !!}
{!! $velocityMetaData->subscription_bar_content !!}
<div class="subscribe-newsletter">

View File

@ -34,7 +34,7 @@
</div>
</div>
<ul class="bundle-items">
<ul type="none" class="bundle-items">
<li v-for="(option, index) in options">
@{{ option.label }}
@ -71,7 +71,7 @@
{{ __('shop::app.products.none') }}
</span>
<span class="radio" v-for="(product, index2) in option.products">
<span class="radio col-12 ml5" v-for="(product, index2) in option.products">
<input type="radio" :name="'bundle_options[' + option.id + '][]'" v-model="selected_product" v-validate="option.is_required ? 'required' : ''" :data-vv-as="'&quot;' + option.label + '&quot;'" :value="product.id" :id="'bundle_options[' + option.id + '][]'">
<label class="radio-view" :for="'bundle_options[' + option.id + '][]'"></label>
@ -181,7 +181,7 @@
data: function() {
return {
selected_product: (this.option.type == 'checkbox' || this.option.type == 'multiselect') ? [] : null,
qty_validations: ''
}
},

View File

@ -4,8 +4,6 @@
{!! view_render_event('bagisto.shop.products.view.configurable-options.before', ['product' => $product]) !!}
<h1>xcvxcf</h1>
<product-options></product-options>
{!! view_render_event('bagisto.shop.products.view.configurable-options.after', ['product' => $product]) !!}
@ -20,7 +18,7 @@
<div v-for='(attribute, index) in childAttributes' class="attribute control-group" :class="[errors.has('super_attribute[' + attribute.id + ']') ? 'has-error' : '']">
<label class="required">@{{ attribute.label }}</label>
<span v-if="! attribute.swatch_type || attribute.swatch_type == '' || attribute.swatch_type == 'dropdown'">
<span class="custom-form" v-if="! attribute.swatch_type || attribute.swatch_type == '' || attribute.swatch_type == 'dropdown'">
<select
class="control"
v-validate="'required'"
@ -96,7 +94,7 @@
},
created: function() {
this.galleryImages = galleryImages.slice(0)
// this.galleryImages = galleryImages.slice(0)
var config = @json($config);

View File

@ -20,13 +20,13 @@
@endif
@if ($product->downloadable_links->count())
<div class="link-list control-group" :class="[errors.has('links[]') ? 'has-error' : '']">
<div class=" link-list control-group" :class="[errors.has('links[]') ? 'has-error' : '']">
<h3>{{ __('shop::app.products.links') }}</h3>
<ul>
<ul type="none">
@foreach ($product->downloadable_links as $link)
<li>
<span class="checkbox">
<span class="checkbox col-12 ml5">
<input type="checkbox" name="links[]" v-validate="'required'" value="{{ $link->id }}" id="{{ $link->id }}" data-vv-as="&quot;{{ __('shop::app.products.links') }}&quot;"/>
<label class="checkbox-view" for="{{ $link->id }}"></label>
{{ $link->title . ' + ' . core()->currency($link->price) }}

View File

@ -4,7 +4,7 @@
<div class="grouped-product-container">
@if ($product->grouped_products->count())
<div class="grouped-product-list">
<ul>
<ul type="none">
<li>
<span>{{ __('shop::app.products.name') }}</span>
<span>{{ __('shop::app.products.qty') }}</span>

View File

@ -5,38 +5,32 @@
@endsection
@section('content-wrapper')
@if (! $results)
{{ __('shop::app.search.no-results') }}
@endif
@if ($results)
<div class="main mb-30" style="min-height: 27vh;">
<section class="cart-details row offset-1">
@if (! $results)
<h1 class="fw6 row col-12">{{ __('shop::app.search.no-results') }}</h1>
@else
@if ($results->isEmpty())
<div class="search-result-status">
<h2>{{ __('shop::app.products.whoops') }}</h2>
<span>{{ __('shop::app.search.no-results') }}</span>
</div>
<h1 class="fw6 row col-12">{{ __('shop::app.products.whoops') }}</h1>
<span>{{ __('shop::app.search.no-results') }}</span>
@else
@if ($results->total() == 1)
<div class="search-result-status mb-20">
<span><b>{{ $results->total() }} </b>{{ __('shop::app.search.found-result') }}</span>
</div>
<h2 class="fw6 row col-12 mb20">
{{ $results->total() }} {{ __('shop::app.search.found-result') }}
</h2>
@else
<div class="search-result-status mb-20">
<span><b>{{ $results->total() }} </b>{{ __('shop::app.search.found-results') }}</span>
</div>
<h2 class="fw6 row col-12 mb20">
{{ $results->total() }} {{ __('shop::app.search.found-results') }}
</h2>
@endif
<div class="product-grid-4">
@foreach ($results as $productFlat)
@foreach ($results as $productFlat)
@include('shop::products.list.card', ['product' => $productFlat->product])
@include('shop::products.list.card', ['product' => $productFlat->product])
@endforeach
</div>
@endforeach
@include('ui::datagrid.pagination')
@endif
</div>
@endif
@endif
</section>
@endsection