Merge branch 'elektronika' of https://repo.tpsadvertising.com/TPS/elektronika_bagisto into elektronika

This commit is contained in:
Kakabay 2024-07-19 17:52:34 +05:00
commit d4f5c71d05
18 changed files with 1193 additions and 106 deletions

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('website_reviews', function (Blueprint $table) {
$table->increments('id');
$table->integer('customer_id')->unsigned();
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
$table->text('review_text')->nullable();
$table->integer('rating')->unsigned();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('website_reviews');
}
};

View File

@ -0,0 +1,43 @@
<?php
namespace TPS\Shop\Http\Controllers;
use TPS\Shop\Repositories\WebsiteReviewRepository;
use Webkul\Shop\Http\Controllers\Controller;
use Illuminate\Http\Request;
class WebsiteReviewController extends Controller
{
/**
* Loads the home page for the storefront.
*
* @return \Illuminate\View\View
*/
public function __construct(protected WebsiteReviewRepository $websiteReviewRepository){$this->customer = auth()->guard('customer')->user();}
public function index()
{
$websiteReviews = $this->websiteReviewRepository->paginate(10); // 10 reviews per page
return view('shop::websiteReview.index', compact('websiteReviews'));
}
public function store(Request $request){
$request->validate([
'web_review_text' => 'required',
'web_review_rating' => 'required'
]);
$data = array_merge(request()->all(), [
'customer_id' => auth()->guard('customer')->user()->id,
]);
if($this->websiteReviewRepository->create($data)){
return response()->json(['success' => true,'message'=>trans('shop::app.review.success')]);
}
return response()->json(['success' => false,'message'=>trans('shop::app.review.error')]);
}
}

View File

@ -0,0 +1,23 @@
<?php
namespace TPS\Shop\Models;
use Illuminate\Database\Eloquent\Model;
use Webkul\Customer\Models\CustomerProxy;
class WebsiteReview extends Model
{
protected $table = 'website_reviews';
protected $fillable = [
'customer_id',
'review_text',
'rating'
];
public function customer()
{
return $this->belongsTo(CustomerProxy::modelClass(), 'customer_id');
}
}

View File

@ -0,0 +1,28 @@
<?php
namespace TPS\Shop\Repositories;
use TPS\Shop\Models\WebsiteReview;
class WebsiteReviewRepository
{
public function create($data)
{
$websiteReview = WebsiteReview::create([
'customer_id' => $data['customer_id'],
'review_text' => $data['web_review_text'],
'rating' => $data['web_review_rating']
]);
return $websiteReview ? true : false;
}
public function paginate($perPage)
{
return WebsiteReview::with('customer')
->orderBy('created_at', 'desc')
->paginate($perPage);
}
}

View File

@ -0,0 +1,358 @@
<template>
<div class="popup-cart-overlay" id="popup-cart-overlay">
<div class="popup-cart-content" id="popup-cart-content">
<img src="../assets/icons/popup-close-btn.svg" alt="close-btn" class="popup-cart-close-btn">
<h2 class="popup-cart-title">Товар добавлен в корзину</h2>
<div class="popup-cart-item-list">
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
</div> <!--Popup-cart-item-list-->
<div class="popup-cart-footer">
<div class="popup-cart-footer-results">
<div class="">В корзине 2 товара</div>
<div class="">Итого: 69 521,61 м.</div>
</div>
<div class="popup-cart-footer-line"></div>
<div class="popup-cart-footer-results">
<div class="">Оформить заказ</div>
<button type="button" class="popup-cart-btn" id="popup-cart-btn">Продолжить покупки 🠆</button>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "mini-card"
}
</script>
<style scoped>
.popup-cart-overlay {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
z-index: 20;
pointer-events: none;
opacity: 0;
transition: all 0.3s ease-out;
}
.popup-cart-overlay.active {
pointer-events: all;
opacity: 1;
}
.popup-cart-content {
position: relative;
width: 100%;
max-width: 635px;
display: flex;
flex-direction: column;
padding: 40px 0 0 40px;
position: fixed;
top: 0;
right: 0;
height: 100%;
transform: translateX(100%);
transition: all 0.3s ease;
box-shadow: 0 4px 16px 8px rgba(0, 0, 0, 0.3);
}
.popup-cart-item-list {
flex: 1 1 auto;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 20px;
padding-right: 40px;
transition: all 0.3s ease-out;
}
.popup-cart-item-list::-webkit-scrollbar {
width: 14px;
border-radius: 0;
background-color: transparent;
border: 1px #e6e6e6 solid;
}
.popup-cart-item-list::-webkit-scrollbar-track-piece {
margin-right: -100px;
}
.popup-cart-close-btn {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
}
.popup-item-trash {
cursor: pointer;
padding: 6px;
}
.popup-cart-item-list::-webkit-scrollbar-track {
margin-left: -100px;
border-radius: 0;
background-color: transparent;
}
.popup-cart-item-list::-webkit-scrollbar-thumb {
position: absolute;
top: 0;
right: 0;
transition: all 0.3s ease-out;
background-color: #e6e6e6;
border-radius: 0;
}
.popup-cart-item-img {
background-color: #f2f2f2;
padding: 10px;
border-radius: 6px;
margin-right: 20px;
}
.popup-cart-item-block {
width: 100%;
display: flex;
flex-direction: column;
gap: 16px;
}
.popup-cart-item {
display: flex;
align-items: center;
transition: all 0.3s ease-out;
}
.delete-cart-item {
opacity: 0;
height: 0;
pointer-events: none;
transition: all 0.3s ease-out;
}
.popup-cart-item-header h4 {
font-size: 18px;
}
.popup-cart-item-header {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.popup-cart-footer {
padding: 20px 0;
}
.popup-cart-item-price {
font-size: 18px;
font-weight: 700;
}
.popup-cart-item-counter {
display: flex;
gap: 10px;
padding: 5px 10px;
font-weight: 600;
border-radius: 6px;
background-color: #f2f2f2;
}
.popup-cart-item-counter div {
padding: 5px 10px;
}
.popup-cart-item-plus {
cursor: pointer;
}
.popup-cart-item-minus {
cursor: pointer;
}
.popup-cart-item-footer {
font-size: 12px;
}
.popup-cart-footer {
padding-right: 40px;
}
.popup-cart-footer-line {
width: 100%;
height: 1px;
background-color: #f2f2f2;
margin: 20px 0;
}
.popup-cart-btn {
background-color: #c3000e;
font-size: 16px;
padding: 20px;
border-radius: 6px;
color: #fff;
border: 0;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease-out;
}
.popup-cart-btn:hover {
background-color: #a5000b;
font-size: 16px;
padding: 20px;
border-radius: 6px;
color: #fff;
border: 0;
font-weight: 600;
cursor: pointer;
}
.popup-cart-overlay.active .popup-cart-content {
background-color: #fff;
transform: translateX(0%);
}
.popup-cart-title {
font-size: 28px;
font-weight: 700;
margin-bottom: 50px;
}
.popup-cart-footer-results {
display: flex;
align-items: center;
justify-content: space-between;
color: #4e4e4e;
font-size: 14px;
}
.popup-cart-footer-results div {
font-size: 14px;
}
</style>

View File

@ -15,8 +15,20 @@ return [
'downloadable-products' => 'Загружаемые продукты', 'downloadable-products' => 'Загружаемые продукты',
], ],
'review' => [
'error' => 'Что-то пошло не так. Пожалуйста, повторите попытку позже.',
'success' => 'Отзыв успешно создан.',
'write-review' => 'Напиши свой отзыв!',
'all-reviews' => 'Все отзывы!',
'reviews' => 'Отзывы',
'reviews-about-us' => 'Отзывы о нас',
'total' => 'Всего',
'pages' => 'страниц'
],
'common' => [ 'common' => [
'error' => 'Что-то пошло не так. Пожалуйста, повторите попытку позже.', 'error' => 'Что-то пошло не так. Пожалуйста, повторите попытку позже.',
'success' => 'Успешно создано.',
'image-upload-limit' => 'Максимальный размер загружаемого изображения 2 МБ', 'image-upload-limit' => 'Максимальный размер загружаемого изображения 2 МБ',
'no-result-found' => 'Нам не удалось найти никаких записей.', 'no-result-found' => 'Нам не удалось найти никаких записей.',
'delete' => 'Удалить' 'delete' => 'Удалить'
@ -798,7 +810,7 @@ return [
], ],
'response' => [ 'response' => [
'create-success' => ':name успешно создано.', 'create-success' => ':name успешно создано.',
'update-success' => ':name успешно обновлено.', 'update-success' => ':name успешно обновлено.',
'delete-success' => ':name успешно удалено.', 'delete-success' => ':name успешно удалено.',
'submit-success' => ':name успешно отправлено.', 'submit-success' => ':name успешно отправлено.',

View File

@ -15,6 +15,17 @@ return [
'downloadable-products' => 'Göçürip alyp bolýan önümler' 'downloadable-products' => 'Göçürip alyp bolýan önümler'
], ],
'review' => [
'error' => 'Teswir döredilip bilinmedi !',
'success' => 'Teswir üstünlikli döredildi !',
'write-review' => 'Teswir ýazyň !',
'all-reviews' => 'Hemme teswirler',
'reviews' => 'Teswirler',
'reviews-about-us' => 'Biz hakda teswirler',
'total' => 'Hemme',
'pages' => 'sahypalar'
],
'pagenames' =>[ 'pagenames' =>[
'homepage' => 'Baş sahypa', 'homepage' => 'Baş sahypa',
'cartpage' => 'Sebet', 'cartpage' => 'Sebet',

View File

@ -64,11 +64,14 @@
@include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->last()]) @include('shop::home.banner',['banner'=>$bannerData->where('type','banner')->last()])
@endif @endif
@include('shop::home.featured-products') @include('shop::home.featured-products')
@include('shop::home.reviews')
@include('shop::websiteReview.review-popup')
@include('shop::products.popup-card')
{{-- @endif--}} {{-- @endif--}}
</main> </main>
@if(core()->getConfigData('customer.settings.newsletter.subscription')) @if(core()->getConfigData('customer.settings.newsletter.subscription'))
<section class="pre-footer"> <!-- <section class="pre-footer">
<div class="container"> <div class="container">
<div class="pre-footer-inner"> <div class="pre-footer-inner">
<h2 class="pre-footer-title">{{__('shop::app.footer.subscribe-newsletter')}}</h2> <h2 class="pre-footer-title">{{__('shop::app.footer.subscribe-newsletter')}}</h2>
@ -78,7 +81,7 @@
</form> </form>
</div> </div>
</div> </div>
</section> </section> -->
@endif @endif
{{ view_render_event('bagisto.shop.home.content.after') }} {{ view_render_event('bagisto.shop.home.content.after') }}
@ -90,6 +93,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
// SLIDER SCRIPTS ======================== // SLIDER SCRIPTS ========================
let swiper = new Swiper('.mySwiper', { let swiper = new Swiper('.mySwiper', {
spaceBetween: 30, spaceBetween: 30,
@ -134,6 +138,272 @@
updateOnWindowResize: true, updateOnWindowResize: true,
}); });
// SLIDER SCRIPTS end ======================== // SLIDER SCRIPTS end ========================
//SEND WEB REVIEW FORM
const $form = $('#review-form');
const $successMessage = $('#success-message');
const $successTitle = $('#success-title');
$form.on('submit', function (event) {
event.preventDefault();
const formData = new FormData(this);
$.ajax({
url: $form.attr('action'),
type: 'POST',
data: formData,
processData: false,
contentType: false,
headers: {
'X-CSRF-TOKEN': $('input[name="_token"]').val()
},
success: function (data) {
if (data.success) {
$successTitle.text(data.message);
$form.addClass('hidden');
$successMessage.removeClass('hidden');
} else {
alert(data.message);
}
},
error: function (error) {
console.error('Error:', error);
}
});
});
//SEND WEB REVIEW FORM
// Review popup start =======================================
const $popup = $('#review-popup');
const $openReviewPopupBtn = $('#openReviewPopupBtn');
const $closeReviewPopupBtn = $('#closeReviewPopupBtn');
const $closeReviewPopupBtn2 = $('#closeReviewPopupBtn2');
const $closeReviewPopupText = $('#closeReviewPopupText');
const $firstPopupContent = $(".review-popup-content").first();
const $secondPopupContent = $(".review-popup-content").last();
const $sendReviewButton = $(".review-popup-button");
const $nameInput = $("#name");
const $reviewInput = $("#web_review");
// Create the loader element ==============================================================
const $loader = $('<div>', { class: 'loader' });
const openPopup = () => {
$popup.css('display', 'flex');
$('body').addClass('no-scroll');
// Reset popup contents
$firstPopupContent.css('display', 'flex');
$secondPopupContent.css('display', 'none');
$loader.remove();
resetStars();
resetInputs();
checkFormCompletion();
};
const closePopup = () => {
$popup.css('display', 'none');
$('body').removeClass('no-scroll');
resetStars();
resetInputs();
};
const resetStars = () => {
$(".review-card-star").removeClass("hovered clicked");
};
const resetInputs = () => {
$("#name, #review").val("");
};
const checkFormCompletion = () => {
// const isNameFilled = $.trim($nameInput.val()) !== "";
const isReviewFilled = $.trim($reviewInput.val()) !== "";
const isStarSelected = $(".review-card-star.clicked").length > 0;
if (isReviewFilled && isStarSelected) {
$sendReviewButton.removeAttr("disabled");
} else {
$sendReviewButton.attr("disabled", true);
}
};
$nameInput.on("input", checkFormCompletion);
$reviewInput.on("input", checkFormCompletion);
// $openReviewPopupBtn.on('click', openPopup);
$signUpSection = $('.sign-up');
$loginFormSection = $('.login-form');
$signupFormSection = $('.signup-form');
$resetPasswordSection = $('.reset-password');
$closeReviewPopupText.on('click', closePopup);
$closeReviewPopupBtn.on('click', closePopup);
$closeReviewPopupBtn2.on('click', closePopup);
if (isAuthenticated) {
$openReviewPopupBtn.on('click', openPopup);
} else {
$openReviewPopupBtn.on('click', function() {
$signUpSection.css('display', 'block');
$loginFormSection.css('display', 'block');
$signupFormSection.css('display', 'none');
$resetPasswordSection.css('display', 'none');
});
}
$(window).on('click', (event) => {
if ($(event.target).is($popup)) {
closePopup();
}
});
// Review rating click effect start ============================================
$(".review-rating--popup").each(function() {
const $container = $(this);
const $stars = $container.find(".review-card-star");
let clickedIndex = 0;
$stars.each(function() {
const $star = $(this);
$star.on("mouseover", function() {
const index = parseInt($star.attr("data-index"));
$stars.each(function(i) {
if (i < index) $(this).addClass("hovered");
});
});
$star.on("mouseout", function() {
$stars.removeClass("hovered");
});
$star.on("click", function() {
const index = parseInt($star.attr("data-index"));
$('input[name="web_review_rating"]').val(index);
if (index === clickedIndex) {
clickedIndex = 0;
$stars.removeClass("clicked hovered");
} else {
clickedIndex = index;
$stars.each(function(i) {
$(this).toggleClass("clicked", i < index);
});
}
checkFormCompletion(); // Check form completion after selecting stars
});
});
});
// Send review ========================================================================
$sendReviewButton.on("click", function() {
// Hide the first popup content
$firstPopupContent.css('display', 'none');
// Show the loader
$firstPopupContent.after($loader);
// Wait for 3 seconds before showing the second popup content
setTimeout(() => {
// Remove the loader
$loader.remove();
// Show the second popup content
$secondPopupContent.css('display', 'block');
}, 3000);
});
// Optionally, add event listeners to close buttons to close the popup
$(".close-review-popup").on("click", function() {
// Hide the entire popup
closePopup();
});
// Add an event listener to the "Закрыть окно" text to close the popup
$("#closeReviewPopupText").on("click", function() {
// Hide the entire popup
closePopup();
});
// Add to cart popup start ====================================================
const $addtoCartBtns = $('.item-gallery-cart');
const $popupOverlay = $('#popup-cart-overlay');
const $cartPopup = $("#popup-cart-content");
const $popupCartBtn = $("#popup-cart-btn");
const $plusButtons = $('.popup-cart-item-plus');
const $minusButtons = $('.popup-cart-item-minus');
const $currentCountElements = $('.popup-cart-item-count');
const $popupCloseIcon = $('.popup-cart-close-btn');
const $deleteItemBtns = $('.popup-item-trash');
const $popupItems = $('.popup-item-wrapper');
// Открыть корзину при нажатии на кнопку добавления в корзину
$addtoCartBtns.on('click', () => {
$popupOverlay.addClass('active');
$('body').addClass('no-scroll');
});
$popupCloseIcon.on('click', () => {
$popupOverlay.removeClass('active');
$('body').removeClass('no-scroll');
});
// Закрыть корзину при нажатии на кнопку закрытия корзины
$popupCartBtn.on("click", () => {
$popupOverlay.removeClass('active');
$('body').removeClass('no-scroll');
});
// Закрыть корзину при нажатии на overlay
$(window).on('click', (event) => {
if ($(event.target).is($popupOverlay)) {
$popupOverlay.removeClass('active');
$('body').removeClass('no-scroll');
}
});
// Увеличить количество при нажатии на плюс
$plusButtons.each(function(index) {
$(this).on('click', () => {
let currentCount = parseInt($currentCountElements.eq(index).text());
$currentCountElements.eq(index).text(currentCount + 1);
});
});
$deleteItemBtns.each(function(index) {
$(this).on('click', () => {
$popupItems.eq(index).remove();
});
});
// Уменьшить количество при нажатии на минус
$minusButtons.each(function(index) {
$(this).on('click', () => {
let currentCount = parseInt($currentCountElements.eq(index).text());
if (currentCount > 0) {
$currentCountElements.eq(index).text(currentCount - 1);
}
});
});
}); });
</script> </script>
@endpush @endpush

View File

@ -0,0 +1,58 @@
@inject ('websiteReviewRepository', 'TPS\Shop\Repositories\WebsiteReviewRepository')
@php
$websiteReview = $websiteReviewRepository->paginate(4)
@endphp
<section class="reviews-section">
<div class="container">
<div class="reviews-inner">
<div class="reviews-top">
<h2 class="reviews-title">{{__('shop::app.review.reviews')}}</h2>
<a href="{{ route('shop.website_reviews.index') }}" class="reviews-top-link"><span>{{__('shop::app.review.all-reviews')}}</span>
<img src="../assets/icons/chevron-right.svg" alt="">
</a>
</div>
<div class="reviews-content">
@if ($websiteReview->count() > 0)
@foreach($websiteReview as $vol)
<div class="review-card">
<div class="review-rating">
@for ($i = 1; $i <= 5; $i++)
<svg class="review-card-star{{ $i <= $vol->rating ? '--active' : '' }}" data-index="{{ $i }}" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"></path>
</svg>
@endfor
</div>
<div class="review-details">
<p class="review-text">{{ $vol->review_text }}</p>
<div class="review-data">
<h3 class="reviewer-name">{{ $vol->customer->first_name }}</h3>
<div class="review-date">{{ $vol->created_at->format('d.m.Y') }}</div>
</div>
</div>
</div>
@endforeach
@endif
</div>
@auth('customer')
<script>
var isAuthenticated = true;
</script>
@else
<script>
var isAuthenticated = false;
</script>
@endauth
<button id="openReviewPopupBtn" class="add-review-button">{{__('shop::app.review.write-review')}}</button>
</div>
</div>
</section>

View File

@ -7,10 +7,9 @@
} }
$cart = cart()->getCart(); $cart = cart()->getCart();
?> ?>
<my-mobile-nav></my-mobile-nav> <my-mobile-nav></my-mobile-nav>
@push('scripts') @push('scripts')
@auth('customer')
<script type="text/x-template" id="profile-btn-template"> <script type="text/x-template" id="profile-btn-template">
<div class="login logged-true logged" @click.prevent="toggleProfileDropdown"> <div class="login logged-true logged" @click.prevent="toggleProfileDropdown">
<button type="button" class="nav-link"> <button type="button" class="nav-link">
@ -21,7 +20,18 @@
</button> </button>
</div> </div>
</script> </script>
<script>
Vue.component('profile-btn', {
template: '#profile-btn-template',
methods: {
toggleProfileDropdown() {
let obj = document.querySelector('.profile-dropdown')
obj.classList.toggle('shown')
}
}
})
</script>
@endauth
<script type="text/x-template" id="my-mobile-nav-template"> <script type="text/x-template" id="my-mobile-nav-template">
<nav class="nav-block container"> <nav class="nav-block container">
<div class="burger-mobile" @click.capture="closeMobileMenu($event)"> <div class="burger-mobile" @click.capture="closeMobileMenu($event)">
@ -127,7 +137,7 @@
</li> </li>
@endauth @endauth
</ul> </ul>
</div> </div>
@ -229,7 +239,7 @@
<img src="{{ bagisto_asset('icons/burger-arrow-white.svg') }}" alt="burger arrow white"> <img src="{{ bagisto_asset('icons/burger-arrow-white.svg') }}" alt="burger arrow white">
</div> </div>
</div> </div>
{{-- <div class="burger-dropdown active" id="language-dropdown-content"> {{-- <div class="burger-dropdown active" id="language-dropdown-content">
<ul class="burger-list-inner-inner lang-list" onchange="window.location.href = this.value"> <ul class="burger-list-inner-inner lang-list" onchange="window.location.href = this.value">
@foreach (core()->getCurrentChannel()->locales as $locale) @foreach (core()->getCurrentChannel()->locales as $locale)
@ -249,15 +259,15 @@
@endforeach @endforeach
</ul> </ul>
</div> --}} </div> --}}
<div class="language-dropdown" id="language-dropdown-content" onchange="window.location.href = this.value"> <div class="language-dropdown" id="language-dropdown-content" onchange="window.location.href = this.value">
@foreach (core()->getCurrentChannel()->locales as $locale) @foreach (core()->getCurrentChannel()->locales as $locale)
<a <a
class="@if(core()->getCurrentLocale()->code == $locale->code) active-lang @endif burger-item-name lang lang-second" class="@if(core()->getCurrentLocale()->code == $locale->code) active-lang @endif burger-item-name lang lang-second"
@if (isset($serachQuery)) @if (isset($serachQuery))
href="?{{ $serachQuery }}&locale={{ $locale->code }}" href="?{{ $serachQuery }}&locale={{ $locale->code }}"
@else @else
href="?locale={{ $locale->code }}" href="?locale={{ $locale->code }}"
@endif @endif
> >
<div class="burger-lang"> <div class="burger-lang">
@ -268,8 +278,8 @@
</div> </div>
</div> </div>
{{-- Language dropdown end --}} {{-- Language dropdown end --}}
<a href="{{ route('shop.checkout.cart.index') }}" class="nav-link"> <a href="{{ route('shop.checkout.cart.index') }}" class="nav-link">
<div class="icon-wrapper"> <div class="icon-wrapper">
<img src="{{ bagisto_asset('icons/cart.svg') }}" alt="cart" /> <img src="{{ bagisto_asset('icons/cart.svg') }}" alt="cart" />
@ -313,21 +323,8 @@
</div> </div>
</nav> </nav>
</script> </script>
<script>
</script>
<script>
Vue.component('profile-btn', {
template: '#profile-btn-template',
methods: {
toggleProfileDropdown() {
let obj = document.querySelector('.profile-dropdown')
obj.classList.toggle('shown')
}
}
})
</script>
<script> <script>
Vue.component('my-mobile-nav', { Vue.component('my-mobile-nav', {

View File

@ -19,22 +19,19 @@
<div class="flag-wrapper"> <div class="flag-wrapper">
<img src="{{ core()->getCurrentLocale()->image_url }}" alt="" width="30" height="20" /> <img src="{{ core()->getCurrentLocale()->image_url }}" alt="" width="30" height="20" />
</div> </div>
<div class="language-wrapper"> <div class="language-wrapper">
<span class="language">{{ core()->getCurrentLocale()->name }}</span> <span class="language">{{ core()->getCurrentLocale()->name }}</span>
<ul class="language-list hidden" id="locale-switcher" onchange="window.location.href = this.value" <ul class="language-list hidden" id="locale-switcher" onchange="window.location.href = this.value">
@if (count(core()->getCurrentChannel()->locales) == 1) disabled="disabled" @endif> @foreach (core()->getCurrentChannel()->locales as $locale)
@if (isset($serachQuery))
@foreach (core()->getCurrentChannel()->locales as $locale) <li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?{{ $serachQuery }}&locale={{ $locale->code }}">{{ $locale->name }}</a></li>
@if (isset($serachQuery)) @else
<li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?{{ $serachQuery }}&locale={{ $locale->code }}">{{ $locale->name }}</a></li> <li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?locale={{ $locale->code }}">{{ $locale->name }}</a></li>
@else @endif
<li class="language-el" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}><a href="?locale={{ $locale->code }}">{{ $locale->name }}</a></li> @endforeach
@endif
@endforeach
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</nav> </nav>

View File

@ -1,8 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ app()->getLocale() }}"> <html lang="{{ app()->getLocale() }}">
<head> <head>
<title>@yield('page_title')</title> <title>@yield('page_title')</title>
<meta name="base-url" content="{{ url()->to('/') }}"> <meta name="base-url" content="{{ url()->to('/') }}">
<meta charset="UTF-8"> <meta charset="UTF-8">
@ -11,71 +9,40 @@
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="content-language" content="{{ app()->getLocale() }}"> <meta http-equiv="content-language" content="{{ app()->getLocale() }}">
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no">
{{-- <link rel="stylesheet" href="{{ asset('vendor/webkul/ui/assets/css/ui.css') }}">--}} @if ($favicon = core()->getCurrentChannel()->favicon_url)
<link rel="icon" sizes="16x16" href="{{ $favicon }}" />
@if ($favicon = core()->getCurrentChannel()->favicon_url) @else
<link rel="icon" sizes="16x16" href="{{ $favicon }}" /> <link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" />
@else @endif
<link rel="icon" sizes="16x16" href="{{ bagisto_asset('images/favicon.ico') }}" /> @yield('head')
@section('seo')
@if (! request()->is('/'))
<meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
@endif @endif
@show
@yield('head') @stack('css_before')
@section('seo')
@if (! request()->is('/'))
<meta name="description" content="{{ core()->getCurrentChannel()->description }}"/>
@endif
@show
@stack('css_before')
<link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}" /> <link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}" />
@stack('css') @stack('css')
<style> <style>
{!! core()->getConfigData('general.content.custom_scripts.custom_css') !!} {!! core()->getConfigData('general.content.custom_scripts.custom_css') !!}
</style> </style>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PETK150JLY"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-PETK150JLY');
</script>
</head> </head>
<body style="scroll-behavior: smooth;"> <body style="scroll-behavior: smooth;">
@include('shop::layouts.header.top-nav') @include('shop::layouts.header.top-nav')
<div id="app"> <div id="app">
<flash-wrapper ref='flashes' cancel-btn-img="{{ bagisto_asset('icons/cancel.svg') }}"></flash-wrapper> <flash-wrapper ref='flashes' cancel-btn-img="{{ bagisto_asset('icons/cancel.svg') }}"></flash-wrapper>
@include('shop::layouts.header.search-nav') @include('shop::layouts.header.search-nav')
@include('shop::layouts.header.category-nav') @include('shop::layouts.header.category-nav')
@yield('content-wrapper') @yield('content-wrapper')
@include('shop::layouts.footer.index') @include('shop::layouts.footer.index')
<overlay-loader :is-open="show_loader"></overlay-loader> <overlay-loader :is-open="show_loader"></overlay-loader>
<go-top bg-color="#c5000e"></go-top> <go-top bg-color="#c5000e"></go-top>
@guest('customer') @guest('customer')
@include('shop::layouts.auth') @include('shop::layouts.auth')
@endguest @endguest
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
window.flashMessages = []; window.flashMessages = [];
@if ($success = session('success')) @if ($success = session('success'))
window.flashMessages = [{'type': 'alert-success', 'message': "{{ $success }}" }]; window.flashMessages = [{'type': 'alert-success', 'message': "{{ $success }}" }];
@elseif ($warning = session('warning')) @elseif ($warning = session('warning'))
@ -85,9 +52,7 @@
@elseif ($info = session('info')) @elseif ($info = session('info'))
window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }]; window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }];
@endif @endif
window.serverErrors = []; window.serverErrors = [];
@if (isset($errors)) @if (isset($errors))
@if (count($errors)) @if (count($errors))
window.serverErrors = @json($errors->getMessages()); window.serverErrors = @json($errors->getMessages());
@ -95,10 +60,10 @@
@endif @endif
</script> </script>
<script type="text/javascript" src="{{ bagisto_asset('scripts/shop.js') }}" ></script> <script type="text/javascript" src="{{ bagisto_asset('scripts/shop.js') }}" ></script>
@stack('scripts') @stack('scripts')
<div class="modal-overlay"></div> <div class="modal-overlay"></div>
{!! core()->getConfigData('general.content.custom_scripts.custom_javascript') !!} {!! core()->getConfigData('general.content.custom_scripts.custom_javascript') !!}
</body> </body>
</html> </html>

View File

@ -2,27 +2,31 @@
@php @php
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false; $showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
//dd($product->getTypeInstance()->totalQuantity());
@endphp @endphp
@if ($product->haveSufficientQuantity(1) > 0)
<div class="item-gallery-cart">
<div class="item-gallery-cart"> <form action="{{ route('cart.add', $product->product_id) }}" method="POST">
@csrf
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
<input type="hidden" name="quantity" value="1">
<button class="btn btn-lg btn-primary addtocart" {{ $product->isSaleable() ? '' : 'disabled' }}>
<div class="item-gallery-cart-img">
<img src="{{ bagisto_asset('icons/icon (cart) 2.svg') }}" alt="cart" />
</div>
<span class="item-gallery-cart-text">
{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
</span>
</button>
</form>
<form action="{{ route('cart.add', $product->product_id) }}" method="POST"> @if ($showWishlist)
@csrf @include('shop::products.wishlist')
<input type="hidden" name="product_id" value="{{ $product->product_id }}"> @endif
<input type="hidden" name="quantity" value="1">
<button class="btn btn-lg btn-primary addtocart" {{ $product->isSaleable() ? '' : 'disabled' }}>
<div class="item-gallery-cart-img">
<img src="{{ bagisto_asset('icons/icon (cart) 2.svg') }}" alt="cart" />
</div>
<span class="item-gallery-cart-text">
{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
</span>
</button>
</form>
@if ($showWishlist) </div>
@include('shop::products.wishlist') @else
@endif <button class="empty-button">{{__('shop::app.products.out-of-stock')}}</button>
@endif
</div>

View File

@ -0,0 +1,138 @@
<!-- Popup-cart -->
<div class="popup-cart-overlay" id="popup-cart-overlay">
<div class="popup-cart-content" id="popup-cart-content">
<img src="../assets/icons/popup-close-btn.svg" alt="close-btn" class="popup-cart-close-btn">
<h2 class="popup-cart-title">Товар добавлен в корзину</h2>
<div class="popup-cart-item-list">
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
<!-- ITEM -->
<div class="popup-item-wrapper">
<div class="popup-cart-item">
<div class="popup-cart-item-img">
<img src="../assets/images/popup-cart-item-img.png" alt="">
</div>
<div class="popup-cart-item-block">
<div class="popup-cart-item-header">
<h4>Телевизор LG OLED 77C2RLA, 77"</h4>
<img src="../assets/icons/red-trash.svg" alt="delete-icon" class="popup-item-trash">
</div>
<div class="popup-cart-item-header">
<div class="popup-cart-item-counter">
<div class="popup-cart-item-minus">-</div>
<div class="popup-cart-item-count">1</div>
<div class="popup-cart-item-plus">+</div>
</div>
<div class="popup-cart-item-price">58 410,50 m.</div>
</div>
<div class="popup-cart-item-footer">58 410,50 м. / шт.</div>
</div>
</div>
<div class="popup-cart-footer-line"></div>
</div> <!-- ITEM -->
</div> <!--Popup-cart-item-list-->
<div class="popup-cart-footer">
<div class="popup-cart-footer-results">
<div class="">В корзине 2 товара</div>
<div class="">Итого: 69 521,61 м.</div>
</div>
<div class="popup-cart-footer-line"></div>
<div class="popup-cart-footer-results">
<div class="">Оформить заказ</div>
<button type="button" class="popup-cart-btn" id="popup-cart-btn">Продолжить покупки 🠆</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,103 @@
@extends('shop::layouts.master')
@section('page_title')
{{ __('shop::app.search.page-title') }}
@endsection
@push('css')
<link rel="stylesheet" href="{{bagisto_asset('styles/reviews.css')}}">
<link rel="stylesheet" href="{{bagisto_asset('styles/categories-tv.css')}}">
@endpush
@section('content-wrapper')
<!-- BREADCRUMB ======================================================================== -->
<section class="breadcrumb">
<div class="container">
<div class="breadcrumb-container">
<ul class="breadcrumb">
<li><a href="/">{{__('shop::app.home.page-title')}}</a></li>
<li><a href="#" class="current">{{__('shop::app.review.reviews')}}</a></li>
</ul>
</div>
</div>
</section>
<!-- BREADCRUMB end ==================================================================== -->
<section class="navigation-section">
<div class="container">
<div class="navigation-inner">
<h2 class="navigation-title">{{__('shop::app.review.reviews-about-us')}}</h2>
</div>
</div>
</section>
<section class="reviews-section">
<div class="container">
<div class="reviews-inner">
@foreach($websiteReviews as $vol)
<div class="review-block">
<h3 class="review-block-title">{{ $vol->customer->first_name }}</h3>
<div class="review-block-details">
<div class="review-block-rating">
@for ($i = 1; $i <= 5; $i++)
<svg class="review-block-star {{ $i <= $vol->rating ? 'star-active' : '' }}" data-index="{{ $i }}" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"></path>
</svg>
@endfor
</div>
<span class="review-block-date">{{ $vol->created_at->format('d.m.Y') }} г.</span>
</div>
<p class="review-block-text">
{{ $vol->review_text }}
</p>
</div>
@endforeach
</div>
</div>
</section>
@php
$currentPage = $websiteReviews->currentPage();
$totalPages = $websiteReviews->lastPage();
@endphp
<section>
<div class="container">
<div class="product-section-pagination-wrapper">
<div class="product-section-pagination">
<div class="pagination-buttons">
@if ($currentPage > 1)
<a href="{{ $websiteReviews->url($currentPage - 1) }}">
<button class="pagination-button pagination-button-left">
<div>
<img src="../assets/icons/arrow-down-sign-to-navigate.svg" alt="">
</div>
</button>
</a>
@endif
<span class="mid-button-text">{{ $currentPage }}</span>
@if ($currentPage < $totalPages)
<a href="{{ $websiteReviews->url($currentPage + 1) }}">
<button class="pagination-button pagination-button-right">
<div>
<img src="../assets/icons/arrow-down-sign-to-navigate.svg" alt="">
</div>
</button>
</a>
@endif
</div>
<span class="page-count">{{__('shop::app.review.total')}} {{ $totalPages }} {{__('shop::app.review.pages')}}</span>
</div>
</div>
</div>
</section>
@endsection
@push('scripts')
@endpush

View File

@ -0,0 +1,41 @@
<div id="review-popup" class="review-popup">
<form id="review-form" method="POST" action="{{ route('shop.website_reviews.store') }}" class="review-popup-content">
@csrf
<span id="closeReviewPopupBtn" class="close-review-popup">&times;</span>
<h2 class="review-popup-title">Написать отзыв</h2>
<div class="review-popup-input-block">
<label for="review">Ваш отзыв</label>
<textarea name="web_review_text" id="web_review" rows="10" placeholder="Оставьте свой отзыв здесь"></textarea>
</div>
<div class="review-popup-start-block">
<h3>Оцените нас</h3>
<div class="review-rating--popup">
<svg class="review-card-star" data-index="1" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"/>
</svg>
<svg class="review-card-star" data-index="2" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"/>
</svg>
<svg class="review-card-star" data-index="3" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"/>
</svg>
<svg class="review-card-star" data-index="4" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"/>
</svg>
<svg class="review-card-star" data-index="5" width="32" height="29" viewBox="0 0 32 29" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0L19.5922 11.0557H31.2169L21.8123 17.8885L25.4046 28.9443L16 22.1115L6.59544 28.9443L10.1877 17.8885L0.783095 11.0557H12.4078L16 0Z" fill="currentColor"/>
</svg>
</div>
</div>
<input type="hidden" name="web_review_rating">
<button type="submit" class="review-popup-button" disabled>Отправить отзыв</button>
</form>
<div id="success-message" class="review-popup-content hidden">
<span id="closeReviewPopupBtn2" class="close-review-popup">&times;</span>
<h2 class="review-popup-title review-popup-title--green" id="success-title">Отзыв добавлен успешно</h2>
<h3 class="close-review-popup-button" id="closeReviewPopupText">Закрыть окно</h3>
</div>
</div>

View File

@ -4,6 +4,7 @@ use Illuminate\Support\Facades\Route;
use TPS\Shop\Http\Controllers\Home; use TPS\Shop\Http\Controllers\Home;
use TPS\Shop\Http\Controllers\ReviewController; use TPS\Shop\Http\Controllers\ReviewController;
use TPS\Shop\Http\Controllers\ShopController; use TPS\Shop\Http\Controllers\ShopController;
use TPS\Shop\Http\Controllers\WebsiteReviewController;
Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () { Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {
@ -19,4 +20,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
Route::get('/product_reviews/{product_id}',[ReviewController::class,'index'])->name('shop.product.reviews.index'); Route::get('/product_reviews/{product_id}',[ReviewController::class,'index'])->name('shop.product.reviews.index');
Route::post('/product_reviews/{product_id}',[ReviewController::class,'store'])->name('shop.product.reviews.store'); Route::post('/product_reviews/{product_id}',[ReviewController::class,'store'])->name('shop.product.reviews.store');
Route::get('/website_reviews',[WebsiteReviewController::class,'index'])->name('shop.website_reviews.index');
Route::post('/website_reviews',[WebsiteReviewController::class,'store'])->name('shop.website_reviews.store');
}); });

View File

@ -12,5 +12,5 @@
@endif @endif
</label> </label>
</div> </div>
{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!} {!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}