Merge branch 'master' of https://github.com/bagisto/bagisto into rahul
This commit is contained in:
commit
b5be4cf320
|
|
@ -31,7 +31,7 @@ Route::group(['middleware' => ['web']], function () {
|
|||
|
||||
|
||||
// Admin Routes
|
||||
Route::group(['middleware' => ['admin', 'locale']], function () {
|
||||
Route::group(['middleware' => ['admin']], function () {
|
||||
Route::get('/logout', 'Webkul\User\Http\Controllers\SessionController@destroy')->defaults('_config', [
|
||||
'redirect' => 'admin.session.create'
|
||||
])->name('admin.session.destroy');
|
||||
|
|
|
|||
|
|
@ -383,6 +383,7 @@ return [
|
|||
'code' => 'Code',
|
||||
'name' => 'Name',
|
||||
'description' => 'Description',
|
||||
'hostname' => 'Hostname',
|
||||
'currencies-and-locales' => 'Currencies and Locales',
|
||||
'locales' => 'Locales',
|
||||
'default-locale' => 'Default Locale',
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@
|
|||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
|
||||
<input class="control" id="hostname" name="hostname" value="{{ old('hostname') }}" placeholder="https://www.example.com"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@
|
|||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label for="hostname">{{ __('admin::app.settings.channels.hostname') }}</label>
|
||||
<input type="text" class="control" id="hostname" name="hostname" value="{{ $channel->hostname }}" placeholder="https://www.example.com"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,8 @@ class Core
|
|||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllChannels() {
|
||||
public function getAllChannels()
|
||||
{
|
||||
static $channels;
|
||||
|
||||
if($channels)
|
||||
|
|
@ -107,13 +108,23 @@ class Core
|
|||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCurrentChannel() {
|
||||
public function getCurrentChannel()
|
||||
{
|
||||
static $channel;
|
||||
|
||||
if($channel)
|
||||
return $channel;
|
||||
|
||||
return $channel = $this->channelRepository->first();
|
||||
$channel = $this->channelRepository->findWhereIn('hostname', [
|
||||
request()->getHttpHost(),
|
||||
'http://' . request()->getHttpHost(),
|
||||
'https://' . request()->getHttpHost()
|
||||
])->first();
|
||||
|
||||
if(!$channel)
|
||||
$channel = $this->channelRepository->first();
|
||||
|
||||
return $channel;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -121,7 +132,8 @@ class Core
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCurrentChannelCode() {
|
||||
public function getCurrentChannelCode()
|
||||
{
|
||||
static $channelCode;
|
||||
|
||||
if($channelCode)
|
||||
|
|
@ -135,7 +147,8 @@ class Core
|
|||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDefaultChannel() {
|
||||
public function getDefaultChannel()
|
||||
{
|
||||
static $channel;
|
||||
|
||||
if($channel)
|
||||
|
|
@ -149,7 +162,8 @@ class Core
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultChannelCode() {
|
||||
public function getDefaultChannelCode()
|
||||
{
|
||||
static $channelCode;
|
||||
|
||||
if($channelCode)
|
||||
|
|
@ -163,7 +177,8 @@ class Core
|
|||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAllLocales() {
|
||||
public function getAllLocales()
|
||||
{
|
||||
static $locales;
|
||||
|
||||
if($locales)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Storage;
|
|||
|
||||
class Channel extends Model
|
||||
{
|
||||
protected $fillable = ['code', 'name', 'description', 'default_locale_id', 'base_currency_id', 'theme'];
|
||||
protected $fillable = ['code', 'name', 'description', 'theme', 'hostname', 'default_locale_id', 'base_currency_id'];
|
||||
|
||||
/**
|
||||
* Get the channel locales.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Foundation\AliasLoader;
|
||||
use Webkul\Core\Http\Middleware\Locale;
|
||||
use Webkul\Core\Core;
|
||||
use Webkul\Core\Facades\Core as CoreFacade;
|
||||
|
||||
|
|
@ -23,8 +24,6 @@ class CoreServiceProvider extends ServiceProvider
|
|||
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
|
||||
|
||||
$router->aliasMiddleware('locale', Locale::class);
|
||||
|
||||
Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes');
|
||||
|
||||
Validator::extend('code', 'Webkul\Core\Contracts\Validations\Code@passes');
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Http\Middleware;
|
||||
namespace Webkul\Shop\Http\Middleware;
|
||||
|
||||
use Webkul\Core\Models\Locale as LocaleModel;
|
||||
use Webkul\Core\Repositories\LocaleRepository;
|
||||
use Closure;
|
||||
|
||||
class Locale
|
||||
{
|
||||
/**
|
||||
* @var \Webkul\Core\Repositories\LocaleRepository
|
||||
* @var LocaleRepository
|
||||
*/
|
||||
protected $locale;
|
||||
|
||||
|
|
@ -32,7 +31,13 @@ class Locale
|
|||
{
|
||||
if($locale = $request->get('locale')) {
|
||||
if($this->locale->findOneByField('code', $locale)) {
|
||||
// app()->setLocale($locale);
|
||||
app()->setLocale($locale);
|
||||
|
||||
session()->put('locale', $locale);
|
||||
}
|
||||
} else {
|
||||
if($locale = session()->get('locale')) {
|
||||
app()->setLocale($locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Shop\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class Theme
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$theme = app('themes');
|
||||
$channel = core()->getCurrentChannel();
|
||||
|
||||
if($channel && $channelThemeCode = $channel->theme) {
|
||||
if($theme->exists($channelThemeCode)) {
|
||||
$theme->set($channelThemeCode);
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
Route::group(['middleware' => ['web']], function () {
|
||||
Route::group(['middleware' => ['web', 'theme', 'locale']], function () {
|
||||
|
||||
Route::get('/', 'Webkul\Shop\Http\Controllers\HomeController@index')->defaults('_config', [
|
||||
'view' => 'shop::home.index'
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ use Illuminate\Support\ServiceProvider;
|
|||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Webkul\Shop\Http\Middleware\Locale;
|
||||
use Webkul\Shop\Http\Middleware\Theme;
|
||||
use Webkul\Shop\Providers\ComposerServiceProvider;
|
||||
use Webkul\Ui\Menu;
|
||||
|
||||
|
|
@ -16,7 +18,7 @@ class ShopServiceProvider extends ServiceProvider
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
public function boot(Router $router)
|
||||
{
|
||||
include __DIR__ . '/../Http/routes.php';
|
||||
|
||||
|
|
@ -28,6 +30,10 @@ class ShopServiceProvider extends ServiceProvider
|
|||
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
|
||||
|
||||
$router->aliasMiddleware('locale', Locale::class);
|
||||
|
||||
$router->aliasMiddleware('theme', Theme::class);
|
||||
|
||||
$this->app->register(ComposerServiceProvider::class);
|
||||
|
||||
$this->composeView();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,113 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
// product card, requires no changes for responsiveness.
|
||||
.product-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-auto-rows: auto;
|
||||
grid-column-gap: 48px;
|
||||
grid-row-gap: 15px;
|
||||
}
|
||||
|
||||
.product-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-gap: 27px;
|
||||
grid-auto-rows: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 854px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 29.5% 29.5% 29.5%;
|
||||
grid-column-gap: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 653px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 48.5% 48.5%;
|
||||
grid-column-gap: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-card {
|
||||
position: relative;
|
||||
|
||||
.product-image {
|
||||
max-height: 350px;
|
||||
max-width: 280px;
|
||||
margin-bottom: 10px;
|
||||
background: #F2F2F2;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.product-name {
|
||||
margin-bottom: 14px;
|
||||
width: 100%;
|
||||
color: $font-color;
|
||||
|
||||
a {
|
||||
color: $font-color;
|
||||
}
|
||||
}
|
||||
|
||||
.product-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.product-ratings {
|
||||
width: 100%;
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-wish-wrap {
|
||||
display: inline-flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
|
||||
.addtocart {
|
||||
margin-right: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.add-to-wishlist {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.sticker {
|
||||
border-radius: 100px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
text-transform: uppercase;
|
||||
padding: 4px 13px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
|
||||
&.sale {
|
||||
background: #FF6472;
|
||||
}
|
||||
|
||||
&.new {
|
||||
background: #2ED04C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product-list {
|
||||
min-height: 200px;
|
||||
|
||||
.product-card {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
|
|
@ -43,6 +149,12 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.empty {
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section.featured-products {
|
||||
|
|
@ -182,11 +294,8 @@ section.slider-block {
|
|||
|
||||
//responsive css for slider
|
||||
@media only screen and (max-width: 770px) {
|
||||
|
||||
section.slider-block {
|
||||
|
||||
div.slider-content {
|
||||
|
||||
div.slider-control {
|
||||
display: flex;
|
||||
justify-content:space-between;
|
||||
|
|
@ -737,21 +846,19 @@ section.slider-block {
|
|||
}
|
||||
|
||||
.form-container {
|
||||
padding-top: 10px;
|
||||
padding-top: 5px;
|
||||
|
||||
.control-group {
|
||||
margin: 0;
|
||||
|
||||
.subscribe-field {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.subscribe-field::-webkit-input-placeholder {
|
||||
font-family: "montserrat", sans-serif;
|
||||
}
|
||||
&::-webkit-input-placeholder {
|
||||
font-family: "montserrat", sans-serif;
|
||||
}
|
||||
|
||||
.subscribe-field::-moz-placeholder {
|
||||
font-family: "montserrat", sans-serif;
|
||||
&::-moz-placeholder {
|
||||
font-family: "montserrat", sans-serif;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
|
|
@ -760,6 +867,10 @@ section.slider-block {
|
|||
border-radius: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.locale-switcher {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -995,6 +1106,7 @@ section.product-detail {
|
|||
width: 49%;
|
||||
background: black;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.buynow {
|
||||
|
|
@ -1002,6 +1114,7 @@ section.product-detail {
|
|||
width: 49%;
|
||||
float:right;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,86 +1,4 @@
|
|||
.product-card {
|
||||
|
||||
.product-image {
|
||||
max-height: 350px;
|
||||
max-width: 280px;
|
||||
margin-bottom: 10px;
|
||||
background: #F2F2F2;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.product-name {
|
||||
margin-bottom: 14px;
|
||||
width: 100%;
|
||||
color: $font-color;
|
||||
|
||||
a {
|
||||
color: $font-color;
|
||||
}
|
||||
}
|
||||
|
||||
.product-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.product-ratings {
|
||||
width: 100%;
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.cart-wish-wrap {
|
||||
display: inline-flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
|
||||
.addtocart {
|
||||
margin-right: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.add-to-wishlist {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// product card, requires no changes for responsiveness.
|
||||
.product-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-auto-rows: auto;
|
||||
grid-column-gap: 48px;
|
||||
grid-row-gap: 15px;
|
||||
}
|
||||
|
||||
.product-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-gap: 27px;
|
||||
grid-auto-rows: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 854px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 29.5% 29.5% 29.5%;
|
||||
grid-column-gap: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 653px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 48.5% 48.5%;
|
||||
grid-column-gap: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 425px) {
|
||||
.product-card {
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@ return [
|
|||
'home' => [
|
||||
'page-title' => 'Bagisto - Home',
|
||||
'featured-products' => 'Featured Products',
|
||||
'new-products' => 'New Products',
|
||||
'new-products' => 'New Products'
|
||||
],
|
||||
|
||||
'product-card' => [
|
||||
'add-to-cart' => 'ADD TO CART'
|
||||
]
|
||||
'footer' => [
|
||||
'subscribe-newsletter' => 'Subscribe Newsletter',
|
||||
'subscribe' => 'Subscribe',
|
||||
'locale' => 'Locale',
|
||||
],
|
||||
|
||||
'reviews' => [
|
||||
|
|
@ -192,7 +194,13 @@ return [
|
|||
'up-sell-title' => 'We found other products you might like!',
|
||||
'reviews-title' => 'Ratings & Reviews',
|
||||
'write-review-btn' => 'Write Review',
|
||||
'choose-option' => 'Choose an option'
|
||||
'choose-option' => 'Choose an option',
|
||||
'sale' => 'Sale',
|
||||
'new' => 'New',
|
||||
'empty' => 'No products available in this category.',
|
||||
'add-to-cart' => 'Add To Cart',
|
||||
'buy-now' => 'Buy Now',
|
||||
'whoops' => 'Whoops!'
|
||||
],
|
||||
|
||||
'wishlist' => [
|
||||
|
|
@ -213,7 +221,8 @@ return [
|
|||
],
|
||||
|
||||
'title' => 'Shopping Cart',
|
||||
'empty' => 'Shopping Cart Is Empty',
|
||||
'empty' => 'Your shopping cart is empty.',
|
||||
'update-cart' => 'Update Cart',
|
||||
'continue-shopping' => 'Continue Shopping',
|
||||
'proceed-to-checkout' => 'Proceed To Checkout',
|
||||
'remove' => 'Remove',
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@
|
|||
<form action="{{ route('shop.checkout.cart.update') }}" method="POST" @submit.prevent="onSubmit">
|
||||
|
||||
<div class="cart-item-list" style="margin-top: 0">
|
||||
|
||||
@csrf
|
||||
|
||||
@foreach($cart->items as $item)
|
||||
|
||||
<?php
|
||||
|
|
@ -76,11 +78,14 @@
|
|||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<div class="misc-controls">
|
||||
<a href="{{ route('shop.home.index') }}" class="link">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>
|
||||
|
||||
<div>
|
||||
<input type="submit" class="btn btn-lg btn-primary" value="Update Cart" />
|
||||
<button type="submit" class="btn btn-lg btn-primary">
|
||||
{{ __('shop::app.checkout.cart.update-cart') }}
|
||||
</button>
|
||||
|
||||
@if (!cart()->hasError())
|
||||
<a href="{{ route('shop.checkout.onepage.index') }}" class="btn btn-lg btn-primary">
|
||||
|
|
@ -96,9 +101,21 @@
|
|||
@include('shop::checkout.total.summary', ['cart' => $cart])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="title">
|
||||
{{ __('shop::app.checkout.cart.empty') }}
|
||||
{{ __('shop::app.checkout.cart.title') }}
|
||||
</div>
|
||||
|
||||
<div class="cart-content">
|
||||
<p>
|
||||
{{ __('shop::app.checkout.cart.empty') }}
|
||||
</p>
|
||||
|
||||
<p style="display: inline-block;">
|
||||
<a style="display: inline-block;" href="{{ route('shop.home.index') }}" class="btn btn-lg btn-primary">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -3,14 +3,17 @@
|
|||
<div class="footer-list-container">
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Categories</span>
|
||||
|
||||
<ul class="list-group">
|
||||
@foreach($categories as $key => $category)
|
||||
<li>{{ $category['name'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Quick Links</span>
|
||||
|
||||
<ul class="list-group">
|
||||
<li>About Us</li>
|
||||
<li>Return Policy</li>
|
||||
|
|
@ -20,8 +23,10 @@
|
|||
<li>Contact Us</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Connect With Us</span>
|
||||
|
||||
<ul class="list-group">
|
||||
<li><span class="icon-wrapper"><span class="icon icon-dashboard"></span></span>Facebook</li>
|
||||
<li><span class="icon-wrapper"><span class="icon icon-dashboard"></span></span>Twitter</li>
|
||||
|
|
@ -31,12 +36,26 @@
|
|||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="list-container">
|
||||
<span class="list-heading">Subscribe Newsletter</span>
|
||||
<span class="list-heading">{{ __('shop::app.footer.subscribe-newsletter') }}</span>
|
||||
<div class="form-container">
|
||||
<div class="control-group">
|
||||
<input type="text" class="control subscribe-field" placeholder="Email Address"><br/>
|
||||
<button class="btn btn-md btn-primary">Subscribe</button>
|
||||
<button class="btn btn-md btn-primary">{{ __('shop::app.footer.subscribe') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="list-heading">{{ __('shop::app.footer.locale') }}</span>
|
||||
<div class="form-container">
|
||||
<div class="control-group">
|
||||
<select class="control locale-switcher" onchange="window.location.href = this.value">
|
||||
|
||||
@foreach (core()->getCurrentChannel()->locales as $locale)
|
||||
<option value="?locale={{ $locale->code }}" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}>{{ $locale->name }}</option>
|
||||
@endforeach
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ config('app.locale') }}">
|
||||
<html lang="{{ app()->getLocale() }}">
|
||||
|
||||
<head>
|
||||
|
||||
|
|
@ -13,12 +13,15 @@
|
|||
|
||||
@yield('head')
|
||||
|
||||
@section('seo')
|
||||
<meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
|
||||
@show
|
||||
|
||||
@yield('css')
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="app">
|
||||
<flash-wrapper ref='flashes'></flash-wrapper>
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
<button class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</button>
|
||||
<button class="btn btn-lg btn-primary addtocart">
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</button>
|
||||
|
|
@ -1 +1,3 @@
|
|||
<button class="btn btn-lg btn-primary buynow">BUY NOW!</button>
|
||||
<button class="btn btn-lg btn-primary buynow">
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
|
|
@ -1,40 +1,64 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('content-wrapper')
|
||||
@section('page_title')
|
||||
{{ $category->meta_title ?? $category->name }}
|
||||
@stop
|
||||
|
||||
@section('seo')
|
||||
<meta name="description" content="{{ $category->meta_description }}"/>
|
||||
<meta name="description" content="{{ $category->meta_keywords }}"/>
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
|
||||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
<div class="main">
|
||||
<div class="category-container">
|
||||
|
||||
@include ('shop::products.list.layered-navigation')
|
||||
|
||||
<div class="category-block">
|
||||
<div class="hero-image mb-35">
|
||||
<img src="https://images.pexels.com/photos/428338/pexels-photo-428338.jpeg?cs=srgb&dl=adolescent-casual-cute-428338.jpg&fm=jpg" />
|
||||
<img src="https://images.pexels.com/photos/428338/pexels-photo-428338.jpeg?cs=srgb&dl=adolescent-casual-cute-428338.jpg&fm=jpg" />
|
||||
</div>
|
||||
|
||||
<?php $products = $productRepository->findAllByCategory($category->id); ?>
|
||||
|
||||
@if ($products->count())
|
||||
|
||||
@include ('shop::products.list.toolbar')
|
||||
@include ('shop::products.list.toolbar')
|
||||
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||
<div class="product-grid-3">
|
||||
@foreach ($products as $product)
|
||||
@include ('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
@if ($toolbarHelper->getCurrentMode() == 'grid')
|
||||
<div class="product-grid-3">
|
||||
@foreach ($products as $product)
|
||||
@include ('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="product-list">
|
||||
@foreach ($products as $product)
|
||||
@include ('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="product-list">
|
||||
@foreach ($products as $product)
|
||||
@include ('shop::products.list.card', ['product' => $product])
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
<div class="product-list empty">
|
||||
<h2>{{ __('shop::app.products.whoops') }}</h2>
|
||||
|
||||
<p>
|
||||
{{ __('shop::app.products.empty') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -48,42 +72,42 @@
|
|||
var sortLimit = document.getElementsByClassName('reponsive-sorter-limiter')[0];
|
||||
var layerFilter = document.getElementsByClassName('responsive-layred-filter')[0];
|
||||
|
||||
if(sort && filter){
|
||||
if(sort && filter) {
|
||||
sort.addEventListener("click", sortFilter);
|
||||
filter.addEventListener("click", sortFilter);
|
||||
}
|
||||
|
||||
function sortFilter(){
|
||||
function sortFilter() {
|
||||
var className = document.getElementById(this.id).className;
|
||||
|
||||
if(className === 'icon sort-icon'){
|
||||
if(className === 'icon sort-icon') {
|
||||
sort.classList.remove("sort-icon");
|
||||
sort.classList.add("icon-menu-close-adj");
|
||||
|
||||
filter.classList.remove("icon-menu-close-adj");
|
||||
filter.classList.add("filter-icon");
|
||||
|
||||
sortLimit.style.display ="flex";
|
||||
sortLimit.style.justifyContent="space-between";
|
||||
sortLimit.style.display = "flex";
|
||||
sortLimit.style.justifyContent = "space-between";
|
||||
layerFilter.style.display ="none";
|
||||
}else if(className === 'icon filter-icon'){
|
||||
} else if(className === 'icon filter-icon') {
|
||||
filter.classList.remove("filter-icon");
|
||||
filter.classList.add("icon-menu-close-adj");
|
||||
|
||||
sort.classList.remove("icon-menu-close-adj");
|
||||
sort.classList.add("sort-icon");
|
||||
|
||||
layerFilter.style.display ="block";
|
||||
sortLimit.style.display ="none";
|
||||
}else{
|
||||
layerFilter.style.display = "block";
|
||||
sortLimit.style.display = "none";
|
||||
} else {
|
||||
sort.classList.remove("icon-menu-close-adj");
|
||||
sort.classList.add("sort-icon");
|
||||
|
||||
filter.classList.remove("icon-menu-close-adj");
|
||||
filter.classList.add("filter-icon");
|
||||
|
||||
sortLimit.style.display ="none";
|
||||
layerFilter.style.display ="none";
|
||||
sortLimit.style.display = "none";
|
||||
layerFilter.style.display = "none";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
<?php $productBaseImage = $productImageHelper->getProductBaseImage($product); ?>
|
||||
|
||||
@if($product->new)
|
||||
<div class="sticker new">
|
||||
{{ __('shop::app.products.new') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="product-image">
|
||||
<a href="{{ route('shop.products.index', $product->url_key) }}" title="{{ $product->name }}">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}" />
|
||||
|
|
@ -32,7 +38,7 @@
|
|||
@include ('shop::products.add-to', ['product' => $product])
|
||||
@else
|
||||
@if($product->type == "configurable")
|
||||
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</a>
|
||||
<a href="{{ route('cart.add.configurable', $product->url_key) }}" class="btn btn-lg btn-primary addtocart">{{ __('shop::app.products.add-to-cart') }}</a>
|
||||
@include('shop::products.wishlist')
|
||||
@else
|
||||
<div class="cart-wish-wrap">
|
||||
|
|
@ -41,7 +47,7 @@
|
|||
<input type="hidden" name="product" value="{{ $product->id }}">
|
||||
<input type="hidden" name="quantity" value="1">
|
||||
<input type="hidden" value="false" name="is_configurable">
|
||||
<button class="btn btn-lg btn-primary addtocart">{{ __('shop::app.home.product-card.add-to-cart') }}</button>
|
||||
<button class="btn btn-lg btn-primary addtocart">{{ __('shop::app.products.add-to-cart') }}</button>
|
||||
</form>
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@
|
|||
|
||||
@if ($priceHelper->haveSpecialPrice($product))
|
||||
|
||||
<div class="sticker sale">
|
||||
{{ __('shop::app.products.sale') }}
|
||||
</div>
|
||||
|
||||
<span class="regular-price">{{ core()->currency($product->price) }}</span>
|
||||
|
||||
<span class="special-price">{{ core()->currency($priceHelper->getSpecialPrice($product)) }}</span>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,20 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ $product->name }}
|
||||
{{ $product->meta_title ?? $product->name }}
|
||||
@stop
|
||||
|
||||
@section('seo')
|
||||
<meta name="description" content="{{ $product->meta_description }}"/>
|
||||
<meta name="description" content="{{ $product->meta_keywords }}"/>
|
||||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
<section class="product-detail">
|
||||
<div class="category-breadcrumbs">
|
||||
<!--<div class="category-breadcrumbs">
|
||||
<span class="breadcrumb">Home</span> > <span class="breadcrumb">Men</span> > <span class="breadcrumb">Slit Open Jeans</span>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="layouter">
|
||||
<form method="POST" action="{{ route('cart.add', $product->id) }}" @submit.prevent="onSubmit">
|
||||
@csrf()
|
||||
|
|
@ -23,13 +29,12 @@
|
|||
<span>{{ $product->name }}</span>
|
||||
</div>
|
||||
|
||||
{{-- @include ('shop::products.review', ['product' => $product]) --}}
|
||||
@include ('shop::products.review', ['product' => $product])
|
||||
|
||||
@include ('shop::products.price', ['product' => $product])
|
||||
|
||||
@include ('shop::products.view.stock')
|
||||
|
||||
|
||||
<div class="description">
|
||||
{{ $product->short_description }}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -120,92 +120,6 @@
|
|||
height: 18px;
|
||||
}
|
||||
|
||||
.product-card .product-image {
|
||||
max-height: 350px;
|
||||
max-width: 280px;
|
||||
margin-bottom: 10px;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
|
||||
.product-card .product-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.product-card .product-name {
|
||||
margin-bottom: 14px;
|
||||
width: 100%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.product-card .product-name a {
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.product-card .product-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.product-card .product-ratings {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.product-card .product-ratings .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.product-card .cart-wish-wrap {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.product-card .cart-wish-wrap .addtocart {
|
||||
margin-right: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.product-card .cart-wish-wrap .add-to-wishlist {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.product-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-auto-rows: auto;
|
||||
grid-column-gap: 48px;
|
||||
grid-row-gap: 15px;
|
||||
}
|
||||
|
||||
.product-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-gap: 27px;
|
||||
grid-auto-rows: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 854px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 29.5% 29.5% 29.5%;
|
||||
grid-column-gap: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 653px) {
|
||||
.product-grid-4 {
|
||||
grid-template-columns: 48.5% 48.5%;
|
||||
grid-column-gap: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 425px) {
|
||||
.product-card {
|
||||
font-size: 90%;
|
||||
|
|
@ -616,6 +530,119 @@ body {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-grid-4 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-auto-rows: auto;
|
||||
grid-column-gap: 48px;
|
||||
grid-row-gap: 15px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-grid-3 {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
|
||||
grid-gap: 27px;
|
||||
grid-auto-rows: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 854px) {
|
||||
.main-container-wrapper .product-grid-4 {
|
||||
grid-template-columns: 29.5% 29.5% 29.5%;
|
||||
grid-column-gap: 35px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 653px) {
|
||||
.main-container-wrapper .product-grid-4 {
|
||||
grid-template-columns: 48.5% 48.5%;
|
||||
grid-column-gap: 17px;
|
||||
}
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-image {
|
||||
max-height: 350px;
|
||||
max-width: 280px;
|
||||
margin-bottom: 10px;
|
||||
background: #F2F2F2;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-image img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-name {
|
||||
margin-bottom: 14px;
|
||||
width: 100%;
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-name a {
|
||||
color: #242424;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-description {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-ratings {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .product-ratings .icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .cart-wish-wrap {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-pack: start;
|
||||
justify-content: flex-start;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .cart-wish-wrap .addtocart {
|
||||
margin-right: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .sticker {
|
||||
border-radius: 100px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
text-transform: uppercase;
|
||||
padding: 4px 13px;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .sticker.sale {
|
||||
background: #FF6472;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-card .sticker.new {
|
||||
background: #2ED04C;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-list {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-list .product-card {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
|
|
@ -642,6 +669,10 @@ body {
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.main-container-wrapper .product-list.empty h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.main-container-wrapper section.featured-products {
|
||||
display: block;
|
||||
margin-bottom: 5%;
|
||||
|
|
@ -1402,11 +1433,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
|
|||
}
|
||||
|
||||
.footer .footer-content .footer-list-container .list-container .form-container {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.footer .footer-content .footer-list-container .list-container .form-container .control-group {
|
||||
margin: 0;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field {
|
||||
|
|
@ -1428,6 +1455,10 @@ section.slider-block div.slider-content div.slider-control .light-right-icon {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.main .category-container {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
|
|
@ -1685,6 +1716,7 @@ section.product-detail div.layouter form div.product-image-group .add-to-buttons
|
|||
width: 49%;
|
||||
background: black;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
section.product-detail div.layouter form div.product-image-group .add-to-buttons .buynow {
|
||||
|
|
@ -1692,6 +1724,7 @@ section.product-detail div.layouter form div.product-image-group .add-to-buttons
|
|||
width: 49%;
|
||||
float: right;
|
||||
white-space: nowrap;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
section.product-detail div.layouter form .details {
|
||||
|
|
|
|||
Loading…
Reference in New Issue