Merge branch 'master' of https://github.com/bagisto/bagisto into development

This commit is contained in:
rahul shukla 2020-02-19 11:53:34 +05:30
commit bfd55c345f
16 changed files with 114 additions and 66 deletions

View File

@ -16,7 +16,12 @@ class CurrencyTableSeeder extends Seeder
DB::table('currencies')->insert([
'id' => 1,
'code' => 'USD',
'name' => 'US Dollar'
'name' => 'US Dollar'
], [
'id' => 2,
'code' => 'EUR',
'name' => 'Euro',
'symbol' => '€'
]);
}
}
}

View File

@ -5,6 +5,7 @@ namespace Webkul\Shop\Http\Controllers;
use Webkul\Customer\Repositories\WishlistRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Checkout\Contracts\Cart as CartModel;
use Illuminate\Support\Facades\Event;
use Cart;
/**
@ -85,8 +86,10 @@ class CartController extends Controller
if ($customer = auth()->guard('customer')->user())
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
if (request()->get('is_buy_now'))
if (request()->get('is_buy_now')) {
Event::dispatch('shop.item.buy-now', $id);
return redirect()->route('shop.checkout.onepage.index');
}
}
} catch(\Exception $e) {
session()->flash('error', trans($e->getMessage()));
@ -214,4 +217,4 @@ class CartController extends Controller
private function onWarningAddingToCart($result): bool {
return is_array($result) && isset($result['warning']);
}
}
}

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,5 +1,5 @@
{
"/js/velocity.js": "/js/velocity.js?id=ae6bf29b4ff9cc13a102",
"/js/velocity.js": "/js/velocity.js?id=4498d2677a567dff96c5",
"/css/velocity-admin.css": "/css/velocity-admin.css?id=612d35e452446366eef7",
"/css/velocity.css": "/css/velocity.css?id=6c0c0ea5abf0bbc0743c"
"/css/velocity.css": "/css/velocity.css?id=5aefe68c7e428dc9597a"
}

View File

@ -7,17 +7,17 @@ return [
'route' => 'velocity.admin.content.index',
'sort' => 5,
'icon-class' => 'velocity-icon',
], [
'key' => 'velocity.header',
'name' => 'velocity::app.admin.layouts.header-content',
'route' => 'velocity.admin.content.index',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'velocity.meta-data',
'name' => 'velocity::app.admin.layouts.meta-data',
'route' => 'velocity.admin.meta-data',
'sort' => 1,
'icon-class' => '',
], [
'key' => 'velocity.header',
'name' => 'velocity::app.admin.layouts.header-content',
'route' => 'velocity.admin.content.index',
'sort' => 2,
'icon-class' => '',
]
],
];

View File

@ -228,6 +228,7 @@ use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRep
'slug' => $product->url_key,
'image' => $productImage,
'description' => $product->description,
'shortDescription' => $product->meta_description,
'galleryImages' => $galleryImages,
'priceHTML' => view('shop::products.price', ['product' => $product])->render(),
'totalReviews' => $totalReviews,

View File

@ -58,9 +58,9 @@
<div class="product-rating col-12 no-padding" v-if="product.totalReviews && product.totalReviews > 0">
<star-ratings :ratings="product.avgRating"></star-ratings>
<span class="align-top">
{{ __('products.reviews', {'totalReviews': product.totalReviews}) }}
</span>
<a class="fs14 align-top unset active-hover" :href="`${$root.baseUrl}/reviews/${product.slug}`">
{{ __('products.reviews-count', {'totalReviews': product.totalReviews}) }}
</a>
</div>
<div class="product-rating col-12 no-padding" v-else>

View File

@ -1,54 +1,83 @@
<template>
<div class="modal-parent scrollable">
<div class="cd-quick-view">
<div class="col-lg-6 product-gallery">
<ul class="cd-slider" type="none">
<carousel-component
slides-per-page="1"
navigation-enabled="hide"
:slides-count="product.galleryImages.length">
<template v-if="showProductDetails || true">
<div class="col-lg-6 product-gallery">
<ul class="cd-slider" type="none">
<carousel-component
slides-per-page="1"
navigation-enabled="hide"
:slides-count="product.galleryImages.length">
<slide
:key="index"
:slot="`slide-${index}`"
v-for="(image, index) in product.galleryImages">
<slide
:key="index"
:slot="`slide-${index}`"
v-for="(image, index) in product.galleryImages">
<li class="selected">
<img :src="image.medium_image_url" :alt="product.name" />
</li>
</slide>
</carousel-component>
</ul>
</div>
<li class="selected" @click="showProductDetails = false">
<img :src="image.medium_image_url" :alt="product.name" />
</li>
</slide>
</carousel-component>
</ul>
</div>
<div class="col-lg-6 fs16">
<h2 class="text-nowrap fw6 quick-view-name">{{ product.name }}</h2>
<div class="col-lg-6 fs16">
<h2 class="fw6 quick-view-name">{{ product.name }}</h2>
<div class="product-price" v-html="product.priceHTML"></div>
<div class="product-price" v-html="product.priceHTML"></div>
<div
class="product-rating"
v-if="product.totalReviews && product.totalReviews > 0">
<star-ratings :ratings="product.avgRating"></star-ratings>
<a class="pl10 unset active-hover" :href="`${$root.baseUrl}/reviews/${product.slug}`">
{{ __('products.reviews-count', {'totalReviews': product.totalReviews}) }}
</a>
</div>
<div class="product-rating" v-else>
<span class="fs14" v-text="product.firstReviewText"></span>
</div>
<p class="pt14 fs14 description-text" v-html="product.shortDescription"></p>
<vnode-injector :nodes="getAddToCartHtml()"></vnode-injector>
</div>
<div
class="product-rating"
v-if="product.totalReviews && product.totalReviews > 0">
@click="closeQuickView"
class="close-btn rango-close fs18 cursor-pointer">
</div>
</template>
<star-ratings :ratings="product.avgRating"></star-ratings>
<span class="pl10">
{{ __('products.reviews', {'totalReviews': product.totalReviews}) }}
</span>
<template v-else>
<div class="product-gallery">
<ul class="cd-slider" type="none">
<carousel-component
slides-per-page="1"
navigation-enabled="hide"
:slides-count="product.galleryImages.length">
<slide
:key="index"
:slot="`slide-${index}`"
v-for="(image, index) in product.galleryImages">
<li class="selected">
<img :src="image.medium_image_url" :alt="product.name" />
</li>
</slide>
</carousel-component>
</ul>
</div>
<div class="product-rating" v-else>
<span class="fs14" v-text="product.firstReviewText"></span>
<div
@click="showProductDetails = true"
class="close-btn rango-close fs18 cursor-pointer">
</div>
<p class="pt14 fs14 description-text" v-html="product.description"></p>
<vnode-injector :nodes="getAddToCartHtml()"></vnode-injector>
</div>
<div
@click="closeQuickView"
class="close-btn rango-close fs18 cursor-pointer">
</div>
</template>
</div>
</div>
</template>
@ -58,6 +87,7 @@
data: function () {
return {
currentlyActiveImage: 0,
showProductDetails: true,
product: this.$root.productDetails,
}
},

View File

@ -667,6 +667,7 @@ body::after {
display: table;
margin: 10px 0;
a,
span {
vertical-align: top;
display: table-cell;

View File

@ -6,13 +6,14 @@
.magnifier {
> img {
height: 450px;
min-height: 450px;
max-height: 530px;
}
}
img {
width: 100%;
height: 100%;
// width: 100%;
// height: 100%;
}
.right {
@ -182,7 +183,6 @@
overflow: hidden;
margin-top: 10px;
position: relative;
pointer-events: none;
.arrow {
left: 0px;
@ -199,6 +199,7 @@
right: 0;
left: unset;
line-height: 13rem;
pointer-events: none;
}
}

View File

@ -675,6 +675,13 @@ a {
&.remove-decoration:focus {
text-decoration: none;
}
&.active-hover {
&:hover {
color: $link-color !important;
text-decoration: underline !important;
}
}
}
.dropdown-icon::after {

View File

@ -77,7 +77,7 @@ return [
'more-infomation' => 'معلومات اكثر',
'short-description' => 'أوصاف قصيرة',
'ratings' => ':totalRatings تصنيفات',
'ratings' => ':totalReviews التعليقات',
'reviews-count' => ':totalReviews التعليقات',
'write-your-review' => 'اكتب مراجعتك',
'be-first-review' => 'كن أول من يكتب نقد',
'view-all-reviews' => 'عرض جميع التقييمات',

View File

@ -220,14 +220,14 @@ return [
'products' => [
'text' => 'Products',
'details' => 'Details',
'reviews' => 'Reviews',
'reviews-title' => 'Reviews',
'reviewed' => 'Reviewed',
'review-by' => 'Review by',
'quick-view' => 'Quick View',
'not-available' => 'Not Available',
'submit-review' => 'Submit Review',
'ratings' => ':totalRatings Ratings',
'reviews' => ':totalReviews Reviews',
'reviews-count' => ':totalReviews Reviews',
'customer-rating' => 'Customer Rating',
'more-infomation' => 'More Information',
'view-all-reviews' => 'View All Reviews',

View File

@ -74,7 +74,7 @@ return [
'submit-review' => 'Enviar revisão',
'not-available' => 'Não disponível',
'ratings' => ':totalRatings Avaliações',
'ratings' => ':totalReviews Avaliações',
'reviews-count' => ':totalReviews Avaliações',
'more-infomation' => 'Mais Informações',
'short-description' => 'Descrições breves',
'customer-rating' => 'Avaliação do cliente',

View File

@ -120,7 +120,7 @@
{{-- customer reviews --}}
<div slot="header" class="col-lg-12 no-padding">
<h3 class="display-inbl">
{{ __('velocity::app.products.reviews') }}
{{ __('velocity::app.products.reviews-title') }}
</h3>
<i class="rango-arrow"></i>
@ -161,7 +161,7 @@
</accordian>
@else
<h3 class="display-inbl mb20 col-lg-12 no-padding">
{{ __('velocity::app.products.reviews') }}
{{ __('velocity::app.products.reviews-title') }}
</h3>
<div class="customer-reviews">