Merge branch 'elektronika' of http://git.digital-tps.tk/TPS/elektronika_bagisto into elektronika
This commit is contained in:
commit
8d18f6a35d
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.4099 11.9999L17.7099 7.70994C17.8982 7.52164 18.004 7.26624 18.004 6.99994C18.004 6.73364 17.8982 6.47825 17.7099 6.28994C17.5216 6.10164 17.2662 5.99585 16.9999 5.99585C16.7336 5.99585 16.4782 6.10164 16.2899 6.28994L11.9999 10.5899L7.70994 6.28994C7.52164 6.10164 7.26624 5.99585 6.99994 5.99585C6.73364 5.99585 6.47824 6.10164 6.28994 6.28994C6.10164 6.47825 5.99585 6.73364 5.99585 6.99994C5.99585 7.26624 6.10164 7.52164 6.28994 7.70994L10.5899 11.9999L6.28994 16.2899C6.19621 16.3829 6.12182 16.4935 6.07105 16.6154C6.02028 16.7372 5.99414 16.8679 5.99414 16.9999C5.99414 17.132 6.02028 17.2627 6.07105 17.3845C6.12182 17.5064 6.19621 17.617 6.28994 17.7099C6.3829 17.8037 6.4935 17.8781 6.61536 17.9288C6.73722 17.9796 6.86793 18.0057 6.99994 18.0057C7.13195 18.0057 7.26266 17.9796 7.38452 17.9288C7.50638 17.8781 7.61698 17.8037 7.70994 17.7099L11.9999 13.4099L16.2899 17.7099C16.3829 17.8037 16.4935 17.8781 16.6154 17.9288C16.7372 17.9796 16.8679 18.0057 16.9999 18.0057C17.132 18.0057 17.2627 17.9796 17.3845 17.9288C17.5064 17.8781 17.617 17.8037 17.7099 17.7099C17.8037 17.617 17.8781 17.5064 17.9288 17.3845C17.9796 17.2627 18.0057 17.132 18.0057 16.9999C18.0057 16.8679 17.9796 16.7372 17.9288 16.6154C17.8781 16.4935 17.8037 16.3829 17.7099 16.2899L13.4099 11.9999Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M19.4001 7.3401L16.6601 4.6001C16.3024 4.2642 15.8338 4.07146 15.3434 4.05855C14.8529 4.04565 14.3748 4.21347 14.0001 4.5301L5.00005 13.5301C4.67682 13.8561 4.47556 14.2833 4.43005 14.7401L4.00005 18.9101C3.98658 19.0566 4.00559 19.2042 4.05571 19.3425C4.10584 19.4808 4.18585 19.6063 4.29005 19.7101C4.38349 19.8028 4.49431 19.8761 4.61615 19.9259C4.73798 19.9756 4.86845 20.0009 5.00005 20.0001H5.09005L9.26005 19.6201C9.71685 19.5746 10.1441 19.3733 10.4701 19.0501L19.4701 10.0501C19.8194 9.68107 20.0082 9.18861 19.995 8.68064C19.9819 8.17266 19.768 7.69061 19.4001 7.3401ZM9.08005 17.6201L6.08005 17.9001L6.35005 14.9001L12.0001 9.3201L14.7001 12.0201L9.08005 17.6201ZM16.0001 10.6801L13.3201 8.0001L15.2701 6.0001L18.0001 8.7301L16.0001 10.6801Z" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 881 B |
Binary file not shown.
|
After Width: | Height: | Size: 761 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
|
|
@ -0,0 +1,222 @@
|
|||
// DESKTOP LANGUAGE SELECT ===================
|
||||
let langList = document.querySelector('.language-list');
|
||||
let langBlock = document.querySelector('.language-select');
|
||||
|
||||
langBlock.addEventListener('mouseover', function () {
|
||||
langList.classList.remove('hidden');
|
||||
});
|
||||
langBlock.addEventListener('mouseout', function () {
|
||||
langList.classList.add('hidden');
|
||||
});
|
||||
// DESKTOP LANGUAGE SELECT end ===================
|
||||
|
||||
// ACCORDION SCRIPT ========================== //
|
||||
let accordionTrigger = document.querySelectorAll('.footer-title-wrapper');
|
||||
let accordionElement = document.querySelectorAll('.footer-content');
|
||||
|
||||
for (let i = 0; i < accordionTrigger.length; i++) {
|
||||
accordionTrigger[i].addEventListener('click', function () {
|
||||
accordionTrigger.forEach(function (item) {
|
||||
if (item !== accordionTrigger[i]) {
|
||||
item.classList.remove('active');
|
||||
}
|
||||
});
|
||||
accordionElement.forEach(function (el) {
|
||||
if (el !== accordionElement[i]) {
|
||||
el.classList.remove('visible');
|
||||
}
|
||||
});
|
||||
accordionTrigger[i].classList.toggle('active');
|
||||
accordionElement[i].classList.toggle('visible');
|
||||
});
|
||||
}
|
||||
|
||||
// ACCORDION SCRIPT end ==========================
|
||||
|
||||
// BURGER SCRIPT ===============================
|
||||
let burgerTrigger = document.querySelector('.burger');
|
||||
let burgerElement = document.querySelector('.nav-inner-burger-container');
|
||||
let body = document.querySelector('body');
|
||||
let brokenTitle = document.querySelector('.burger-title-wrapper');
|
||||
let hrBurger = document.querySelector('.hr-line-burger');
|
||||
|
||||
burgerTrigger.addEventListener('click', function () {
|
||||
burgerElement.classList.remove('hidden-burger');
|
||||
body.style.overflow = 'hidden';
|
||||
brokenTitle.style.opacity = '100';
|
||||
hrBurger.style.opacity = '100';
|
||||
});
|
||||
|
||||
let burgerTriggerClose = document.querySelector('.burger-close');
|
||||
|
||||
burgerTriggerClose.addEventListener('click', function () {
|
||||
burgerElement.classList.add('hidden-burger');
|
||||
body.style.overflow = 'auto';
|
||||
brokenTitle.style.opacity = '0';
|
||||
hrBurger.style.opacity = '0';
|
||||
});
|
||||
|
||||
// BURGER LANGUAGE ================================
|
||||
let langTrig = document.querySelector('.language-trig');
|
||||
langTrig.addEventListener('click', () => {
|
||||
langTrig.classList.toggle('triggered');
|
||||
currencyTrig.classList.remove('triggered');
|
||||
});
|
||||
let currencyTrig = document.querySelector('.price-view');
|
||||
currencyTrig.addEventListener('click', () => {
|
||||
langTrig.classList.remove('triggered');
|
||||
currencyTrig.classList.toggle('triggered');
|
||||
});
|
||||
// BURGER LANGUAGE end ===========================
|
||||
// BURGER SCRIPT end ===============================
|
||||
|
||||
// CAT DROPDOWN
|
||||
|
||||
const catParent = document.querySelector('.service-li.active');
|
||||
const cat = document.querySelector('.cat-dropdown');
|
||||
|
||||
const lis = document.querySelectorAll('.cat-li');
|
||||
const catBlock = document.querySelectorAll('.cat-data-block');
|
||||
|
||||
const numerator = (className) => {
|
||||
const items = document.querySelectorAll(`.${className}`);
|
||||
items.forEach((el, i) => {
|
||||
el.classList.add(`${className}-${i + 1}`);
|
||||
el.setAttribute('data-index', i + 1);
|
||||
});
|
||||
};
|
||||
|
||||
numerator('cat-li');
|
||||
numerator('cat-bg');
|
||||
numerator('cat-data-block');
|
||||
|
||||
let checker = true;
|
||||
let last;
|
||||
|
||||
catBlock.forEach((el) => {
|
||||
const imgPath = el.getAttribute('data-img');
|
||||
el.style.background = `linear-gradient(
|
||||
to right,
|
||||
rgba(255, 255, 255, 1),
|
||||
rgba(255, 255, 255, 0.4)
|
||||
),
|
||||
url(${imgPath}), center, no-repeat`;
|
||||
el.style.backgroundSize = 'cover';
|
||||
});
|
||||
|
||||
catParent.addEventListener('click', () => {
|
||||
cat.classList.toggle('active');
|
||||
if (checker) {
|
||||
catBlock[0].classList.toggle('active');
|
||||
lis[0].classList.toggle('active');
|
||||
checker = false;
|
||||
} else {
|
||||
if (last) {
|
||||
catBlock[last].classList.toggle('active');
|
||||
lis[last].classList.toggle('active');
|
||||
} else {
|
||||
catBlock[0].classList.toggle('active');
|
||||
lis[0].classList.toggle('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
lis.forEach((el) => {
|
||||
el.addEventListener('click', () => {
|
||||
last = el.getAttribute('data-index') - 1;
|
||||
catBlock.forEach((el) => {
|
||||
el.classList.remove('active');
|
||||
});
|
||||
catBlock[last].classList.add('active');
|
||||
lis.forEach((el) => {
|
||||
el.classList.remove('active');
|
||||
});
|
||||
el.classList.add('active');
|
||||
});
|
||||
});
|
||||
|
||||
// LOGIN/SIGNUP ======================================
|
||||
let loginBtn = document.querySelector('.logged-false');
|
||||
let loginFormSection = document.querySelector('.sign-up');
|
||||
let loginForm = document.querySelector('.login-form');
|
||||
let regBtn = document.querySelector('.sign-up-btn');
|
||||
let regForm = document.querySelector('.registration-form');
|
||||
let loginCloseBtn = document.querySelectorAll('.sign-up-exit-img');
|
||||
let loginBtnReturnLink = document.querySelector('.sign-up-btn-return');
|
||||
let forgottenPass = document.querySelector('.forgot-pass');
|
||||
let passRecNr = document.querySelector('.password-recovery-nr');
|
||||
let passRecSMS = document.querySelector('.password-recovery-sms');
|
||||
let smsTrig = document.querySelector('.sms-trigger');
|
||||
let signUpWrapper = document.querySelector('.sign-up-wrapper');
|
||||
let signUpContainer = document.querySelector('.sign-up-container');
|
||||
let burgerSignIn = document.querySelector('.burger-sign-in');
|
||||
let burgerSignUp = document.querySelector('.burger-sign-up');
|
||||
|
||||
burgerSignIn.addEventListener('click', () => {
|
||||
burgerElement.classList.add('hidden-burger');
|
||||
regForm.style.display = 'none';
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'none';
|
||||
loginFormSection.style.display = 'block';
|
||||
body.style.overflowY = 'hidden';
|
||||
});
|
||||
|
||||
burgerSignUp.addEventListener('click', () => {
|
||||
burgerElement.classList.add('hidden-burger');
|
||||
regForm.style.display = 'block';
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'none';
|
||||
loginFormSection.style.display = 'block';
|
||||
loginForm.style.display = 'none';
|
||||
body.style.overflowY = 'hidden';
|
||||
});
|
||||
|
||||
signUpContainer.addEventListener('click', (event) => {
|
||||
let isClickInsideElement = signUpWrapper.contains(event.target);
|
||||
if (!isClickInsideElement) {
|
||||
loginFormSection.style.display = 'none';
|
||||
regForm.style.display = 'none';
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'none';
|
||||
loginForm.style.display = 'block';
|
||||
body.style.overflowY = 'auto';
|
||||
}
|
||||
});
|
||||
|
||||
loginBtn.addEventListener('click', () => {
|
||||
regForm.style.display = 'none';
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'none';
|
||||
loginFormSection.style.display = 'block';
|
||||
body.style.overflowY = 'hidden';
|
||||
});
|
||||
|
||||
loginCloseBtn.forEach((el) => {
|
||||
el.addEventListener('click', () => {
|
||||
loginFormSection.style.display = 'none';
|
||||
regForm.style.display = 'none';
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'none';
|
||||
loginForm.style.display = 'block';
|
||||
body.style.overflowY = 'auto';
|
||||
});
|
||||
});
|
||||
|
||||
regBtn.addEventListener('click', (event) => {
|
||||
regForm.style.display = 'block';
|
||||
loginForm.style.display = 'none';
|
||||
});
|
||||
loginBtnReturnLink.addEventListener('click', () => {
|
||||
regForm.style.display = 'none';
|
||||
loginForm.style.display = 'block';
|
||||
});
|
||||
|
||||
forgottenPass.addEventListener('click', () => {
|
||||
passRecNr.style.display = 'block';
|
||||
loginForm.style.display = 'none';
|
||||
});
|
||||
smsTrig.addEventListener('click', () => {
|
||||
passRecNr.style.display = 'none';
|
||||
passRecSMS.style.display = 'block';
|
||||
});
|
||||
// LOGIN/SIGNUP end ==================================
|
||||
|
|
@ -0,0 +1,279 @@
|
|||
.comment-section-top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3.4rem;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.comment-action-mobile .comment-section .horizontal {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comment .horizontal {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comment-section {
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.comment-section-top .comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.comments {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3rem;
|
||||
}
|
||||
|
||||
.comment {
|
||||
border: 0.1rem solid rgba(0, 0, 0, 0.4);
|
||||
border-radius: 0.5rem;
|
||||
padding: 3rem;
|
||||
}
|
||||
|
||||
.comment form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.comment-top {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 3rem;
|
||||
}
|
||||
|
||||
.comment-desc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
justify-self: left;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.comment-desc-img {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.comment-desc-img img {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
.comment-product {
|
||||
font-size: 1.8rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.comment-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
justify-self: right;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.comment-action button {
|
||||
padding: 1.2rem 2.35rem;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
color: #fff;
|
||||
background-color: #c3000e;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.comment-action button:hover {
|
||||
background-color: #a60712;
|
||||
|
||||
transition: 0.3s all ease;
|
||||
}
|
||||
|
||||
.user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2.2rem;
|
||||
}
|
||||
|
||||
.user_img {
|
||||
width: 3.6rem;
|
||||
height: 3.6rem;
|
||||
border-radius: 1.8rem;
|
||||
}
|
||||
|
||||
.user_img img {
|
||||
width: 3.6rem;
|
||||
height: 3.6rem;
|
||||
border-radius: 1.8rem;
|
||||
border: 0.1rem solid #c3000e;
|
||||
}
|
||||
|
||||
.user_name {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.user- .comment-middle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2.2rem;
|
||||
}
|
||||
|
||||
.comment-middle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2.2rem;
|
||||
}
|
||||
|
||||
.rating {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
}
|
||||
|
||||
.rating-star {
|
||||
width: 2rem;
|
||||
height: 3.6rem;
|
||||
padding: 1rem 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.rating-star .star {
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
fill: #cecece;
|
||||
}
|
||||
|
||||
.rating-star .star.red {
|
||||
fill: #c3000e;
|
||||
}
|
||||
|
||||
.rating-stars {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.rating-num {
|
||||
font-size: 1.4rem;
|
||||
color: #c3000e;
|
||||
}
|
||||
|
||||
.date {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.date-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.date-date {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.comment-title {
|
||||
font-size: 1.4rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.comment-comment {
|
||||
font-size: 1.4rem;
|
||||
line-height: 1.96rem;
|
||||
}
|
||||
|
||||
.comment-action-mobile {
|
||||
display: none;
|
||||
align-self: center;
|
||||
justify-self: right;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dots img {
|
||||
width: 2.5rem;
|
||||
height: 0.5rem;
|
||||
}
|
||||
|
||||
.dots {
|
||||
padding: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment-action-drop {
|
||||
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
|
||||
border-radius: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
width: 15.2rem;
|
||||
max-height: 0rem;
|
||||
position: absolute;
|
||||
top: 4rem;
|
||||
left: -5rem;
|
||||
transition: 0.3s all ease;
|
||||
}
|
||||
|
||||
.comment-action-drop button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
border: none;
|
||||
background-color: #fff;
|
||||
padding: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment-action-edit {
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
}
|
||||
|
||||
.comment-action-edit img {
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
}
|
||||
|
||||
.comment-action-mobile:hover .comment-action-drop {
|
||||
max-height: 9rem;
|
||||
box-shadow: 0.1rem 0.1rem 0.5rem rgba(0, 0, 0, 0.2),
|
||||
-0.1rem -0.1rem 0.5rem rgba(0, 0, 0, 0.2);
|
||||
transition: 0.3s all ease;
|
||||
}
|
||||
|
||||
.comment-action-drop button:hover {
|
||||
background: lightgray;
|
||||
transition: 0.3s all ease;
|
||||
}
|
||||
|
||||
/* MEDIA */
|
||||
|
||||
@media screen and (max-width: 770px) {
|
||||
.comment-top {
|
||||
grid-template-columns: 4fr 1fr;
|
||||
}
|
||||
|
||||
.comment-action {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comment-action-mobile {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 400px) {
|
||||
.comment-comment {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -87,7 +87,6 @@
|
|||
display: grid;
|
||||
grid-template-columns: 1fr 39rem;
|
||||
column-gap: 2rem;
|
||||
padding-bottom: 5rem;
|
||||
}
|
||||
|
||||
.delivery-content-mid-left-blocks {
|
||||
|
|
|
|||
|
|
@ -1518,7 +1518,6 @@ button.nav-link {
|
|||
.item-gallery-cart form {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.item-gallery-cart button {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace TPS\Shop\Http\Controllers;
|
||||
|
||||
use TPS\Shop\Http\Requests\CustomerAddressForm;
|
||||
use Webkul\Checkout\Facades\Cart;
|
||||
use Webkul\Payment\Facades\Payment;
|
||||
use Webkul\Shipping\Facades\Shipping;
|
||||
use Webkul\Shop\Http\Controllers\OnepageController;
|
||||
|
||||
class Checkout extends OnepageController
|
||||
{
|
||||
/**
|
||||
* Saves customer address.
|
||||
*
|
||||
* @param \Webkul\Checkout\Http\Requests\CustomerAddressForm $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function save_address(CustomerAddressForm $request)
|
||||
{
|
||||
$data = $request->all();
|
||||
|
||||
if (! auth()->guard('customer')->check() && ! Cart::getCart()->hasGuestCheckoutItems()) {
|
||||
return response()->json(['redirect_url' => route('customer.session.index')], 403);
|
||||
}
|
||||
|
||||
$data['billing']['address1'] = implode(PHP_EOL, array_filter($data['billing']['address1']));
|
||||
$data['shipping']['address1'] = implode(PHP_EOL, array_filter($data['shipping']['address1']));
|
||||
|
||||
if (Cart::hasError() || ! Cart::saveCustomerAddress($data)) {
|
||||
return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403);
|
||||
}
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
if ($cart->haveStockableItems()) {
|
||||
if (! $rates = Shipping::collectRates()) {
|
||||
return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403);
|
||||
}
|
||||
|
||||
return response()->json($rates);
|
||||
}
|
||||
|
||||
return response()->json(Payment::getSupportedPaymentMethods());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
namespace TPS\Shop\Http\Controllers;
|
||||
|
||||
|
||||
use TPS\Shop\Repositories\WishlistRepository;
|
||||
use Webkul\Customer\Http\Controllers\WishlistController as WController;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
|
||||
class WishlistController extends WController
|
||||
{
|
||||
public function __construct(
|
||||
WishlistRepository $wishlistRepository,
|
||||
protected ProductRepository $productRepository
|
||||
)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->currentCustomer = auth()->guard('customer')->user();
|
||||
|
||||
$this->wishlistRepository = $wishlistRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the listing resources if the customer having items in wishlist.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
if (! core()->getConfigData('general.content.shop.wishlist_option')) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return view($this->_config['view'], [
|
||||
'items' => $this->wishlistRepository->getCustomerWishlist(),
|
||||
'isSharingEnabled' => $this->isSharingEnabled(),
|
||||
'isWishlistShared' => $this->currentCustomer->isWishlistShared(),
|
||||
'wishlistSharedLink' => $this->currentCustomer->getWishlistSharedLink()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
namespace TPS\Shop\Http\Requests;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Webkul\Core\Contracts\Validations\AlphaNumericSpace;
|
||||
use Webkul\Core\Contracts\Validations\PhoneNumber;
|
||||
|
||||
class CustomerAddressForm extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Rules.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rules = [];
|
||||
|
||||
/**
|
||||
* Determine if the product is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
if (isset($this->get('billing')['address_id'])) {
|
||||
$this->mergeExistingAddressRules('billing');
|
||||
} else {
|
||||
$this->mergeNewAddressRules('billing');
|
||||
}
|
||||
|
||||
if (isset($this->get('billing')['use_for_shipping']) && ! $this->get('billing')['use_for_shipping']) {
|
||||
if (isset($this->get('shipping')['address_id'])) {
|
||||
$this->mergeExistingAddressRules('shipping');
|
||||
} else {
|
||||
$this->mergeNewAddressRules('shipping');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge existing address rules.
|
||||
*
|
||||
* @param string $addressType
|
||||
* @return void
|
||||
*/
|
||||
private function mergeExistingAddressRules(string $addressType)
|
||||
{
|
||||
$customerAddressIds = $this->getCustomerAddressIds();
|
||||
|
||||
$addressRules = [
|
||||
"{$addressType}.address_id" => ['required'],
|
||||
];
|
||||
|
||||
if (! empty($customerAddressIds)) {
|
||||
$addressRules["{$addressType}.address_id"][] = "in:{$customerAddressIds}";
|
||||
}
|
||||
|
||||
$this->mergeWithRules($addressRules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge new address rules.
|
||||
*
|
||||
* @param string $addressType
|
||||
* @return void
|
||||
*/
|
||||
private function mergeNewAddressRules(string $addressType)
|
||||
{
|
||||
$this->mergeWithRules([
|
||||
"{$addressType}.first_name" => ['required', new AlphaNumericSpace],
|
||||
"{$addressType}.last_name" => ['required', new AlphaNumericSpace],
|
||||
// "{$addressType}.email" => ['required'],
|
||||
"{$addressType}.address1" => ['required'],
|
||||
"{$addressType}.city" => ['required'],
|
||||
"{$addressType}.country" => [new AlphaNumericSpace],
|
||||
"{$addressType}.state" => [new AlphaNumericSpace],
|
||||
"{$addressType}.postcode" => ['numeric'],
|
||||
"{$addressType}.phone" => ['required', new PhoneNumber],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge additional rules.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function mergeWithRules($additionalRules): void
|
||||
{
|
||||
$this->rules = array_merge($this->rules, $additionalRules);
|
||||
}
|
||||
|
||||
/**
|
||||
* If customer is placing order then fetching all address ids to check with the request ids.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getCustomerAddressIds(): string
|
||||
{
|
||||
if ($customer = auth()->guard()->user()) {
|
||||
return $customer->addresses->pluck('id')->join(',');
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace TPS\Shop\Repositories;
|
||||
use Webkul\Customer\Repositories\WishlistRepository as WishlistRepo;
|
||||
class WishlistRepository extends WishlistRepo
|
||||
{
|
||||
/**
|
||||
* Get customer wishlist items.
|
||||
*
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function getCustomerWishlist()
|
||||
{
|
||||
/* due to ambigious ids only selecting from wishlist table */
|
||||
$query = $this->model->select('wishlist.*');
|
||||
|
||||
/* don't add product repository method as that one will need a product flat table */
|
||||
if (! core()->getConfigData('catalog.products.homepage.out_of_stock_items')) {
|
||||
$query = $query
|
||||
->leftJoin('products as ps', 'wishlist.product_id', '=', 'ps.id')
|
||||
->leftJoin('product_inventories as pv', 'ps.id', '=', 'pv.product_id')
|
||||
->where(function ($qb) {
|
||||
$qb
|
||||
->WhereIn('ps.type', ['configurable', 'grouped', 'downloadable', 'bundle', 'booking'])
|
||||
->orwhereIn('ps.type', ['simple', 'virtual'])->where('pv.qty', '>', 0);
|
||||
});
|
||||
}
|
||||
|
||||
/* main check to determine the wishlist */
|
||||
return $query->where([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id,
|
||||
])->paginate(8);
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ return [
|
|||
'layouts' => [
|
||||
'my-account' => 'Meniň hasabym',
|
||||
'profile' => 'Profil',
|
||||
'address' => 'Salgy',
|
||||
'address' => 'Adres',
|
||||
'reviews' => 'Synlar',
|
||||
'wishlist' => 'Halanlarym',
|
||||
'orders' => 'Sargytlar',
|
||||
|
|
@ -28,7 +28,7 @@ return [
|
|||
'password' => 'Açar sözi',
|
||||
'name' => 'Ady',
|
||||
'surname' => 'Familýasy',
|
||||
'address' => 'Salgysy',
|
||||
'address' => 'Adresi',
|
||||
'do-register' => 'Registrasiýa etmek',
|
||||
'terms' => 'Şertler we kadalar',
|
||||
'forgot-password' => 'Açar sözini unutdym?'
|
||||
|
|
@ -89,13 +89,13 @@ return [
|
|||
'payment' => 'Töleg',
|
||||
'complete' => 'Gutarmak',
|
||||
'review' => 'Syn',
|
||||
'billing-address' => 'Töleg salgysy',
|
||||
'billing-address' => 'Töleg adresi',
|
||||
'sign-in' => 'Ulgama girmek',
|
||||
'company-name' => 'Kompaniýanyň ady',
|
||||
'first-name' => 'Ady',
|
||||
'last-name' => 'Familýasy',
|
||||
'email' => 'Email',
|
||||
'address1' => 'Köçesiniň salgysy',
|
||||
'address1' => 'Adres',
|
||||
'city' => 'Şäher',
|
||||
'state' => 'Döwlet',
|
||||
'select-state' => 'Welaýaty ýa-da etraby saýlaň!',
|
||||
|
|
@ -103,7 +103,7 @@ return [
|
|||
'phone' => 'Telefon',
|
||||
'country' => 'Döwlet',
|
||||
'order-summary' => 'Sargyt barada gysgaça maglumat',
|
||||
'shipping-address' => 'Eltip berme salgysy',
|
||||
'shipping-address' => 'Eltip berme adresi',
|
||||
'use_for_shipping' => 'Şu salga ugrat',
|
||||
'continue' => 'Dowam etmek',
|
||||
'shipping-method' => 'Eltip bermegiň görnüşini saýlaň',
|
||||
|
|
@ -114,8 +114,8 @@ return [
|
|||
'quantity' => 'Möçberi',
|
||||
'contact' => 'Telefon',
|
||||
'place-order' => 'Sargydy ugrat',
|
||||
'new-address' => 'Täze salgy goş',
|
||||
'save_as_address' => 'Salgyny ýatda sakla',
|
||||
'new-address' => 'Adres goş',
|
||||
'save_as_address' => 'Ýatda sakla',
|
||||
'apply-coupon' => 'Kupon ulanmak',
|
||||
'amt-payable' => 'Tölenmeli mukdar',
|
||||
'got' => 'Alyndy',
|
||||
|
|
@ -171,7 +171,7 @@ return [
|
|||
'featured-products' => 'Iň köp satylan',
|
||||
'top-sells' => 'Iň köp satylan',
|
||||
'new-products' => 'Täze harytlar',
|
||||
'verify-email' => 'Öz elektron salgyňyzy tassyklaň',
|
||||
'verify-email' => 'Emailiňizi tassyklaň',
|
||||
'resend-verify-email' => 'tasssyklaýjy poçtany gaýtadan ugrat',
|
||||
'brands' => 'Brendlar'
|
||||
],
|
||||
|
|
@ -364,62 +364,62 @@ return [
|
|||
|
||||
'address' => [
|
||||
'index' => [
|
||||
'page-title' => 'salgy',
|
||||
'title' => 'salgysy',
|
||||
'add' => 'salgyny goşmak',
|
||||
'page-title' => 'Adres',
|
||||
'title' => 'Adresi',
|
||||
'add' => 'Adres goş',
|
||||
'edit' => 'Redaktirlemek',
|
||||
'empty' => 'siziň ýatda saklanan salgyňyz ýok, haýyş edýaris, goş düwmesine basyp täze salgyny dörediň',
|
||||
'empty' => 'Siziň adresiňiz ýok, haýyş edýaris, goş düwmesine basyp adres dörediň',
|
||||
'create' => 'sargyt döretmek',
|
||||
'delete' => 'Aýyrmak',
|
||||
'make-default' => 'hemişelik ulanylýan etmek',
|
||||
'default' => 'hemişelik',
|
||||
'contact' => 'Kontakt',
|
||||
'confirm-delete' => 'Siz dogrudanam bu salgyny aýyrmak isleýärsiňizmi?',
|
||||
'confirm-delete' => 'Siz dogrudanam bu adresi aýyrmak isleýärsiňizmi?',
|
||||
'default-delete' => 'Hemişelik adresi çalşyp bolmaýar',
|
||||
'enter-password' => 'Açar sözüni giriziň',
|
||||
],
|
||||
|
||||
'create' => [
|
||||
'page-title' => 'salgy goşmak',
|
||||
'company_name' => 'Kompaniýanyň ady',
|
||||
'first_name' => 'ady',
|
||||
'last_name' => 'Familýasy',
|
||||
'vat_id' => 'salgyt töleg belgisi',
|
||||
'vat_help_note' => '[Bellik: Salgyt töleg belgisini ýurduň kody bilen ulanyň. Mes. INV01234567891]',
|
||||
'title' => 'Salgy goşmak',
|
||||
'street-address' => 'Köçe',
|
||||
'country' => 'Döwlet',
|
||||
'state' => 'Ýurt',
|
||||
'select-state' => 'welaýaty ýa-da etraby saýlaň',
|
||||
'city' => 'Şäher',
|
||||
'postcode' => 'zip belgisi',
|
||||
'phone' => 'Telefon',
|
||||
'submit' => 'salgyny ýatda saklamak',
|
||||
'success' => 'salgy üstünlikli ýatda goşuldy.',
|
||||
'error' => 'Salgy goşulyp bilmedi'
|
||||
],
|
||||
|
||||
'edit' => [
|
||||
'page-title' => 'salgyny Redaktirlemek',
|
||||
'page-title' => 'Adres goş',
|
||||
'company_name' => 'Kompaniýanyň ady',
|
||||
'first_name' => 'Ady',
|
||||
'last_name' => 'Familýasy',
|
||||
'vat_id' => 'salgyt töleg belgisi',
|
||||
'title' => 'salgyny Redaktirlemek',
|
||||
'street-address' => 'köçäniň salgysy',
|
||||
'submit' => 'salgyny ýatda saklamak',
|
||||
'success' => 'salgy üstünlikli ýatda saklandy',
|
||||
'vat_id' => 'Salgyt töleg belgisi',
|
||||
'vat_help_note' => '[Bellik: Salgyt töleg belgisini ýurduň kody bilen ulanyň. Mes. INV01234567891]',
|
||||
'title' => 'Adres goşmak',
|
||||
'street-address' => 'Köçe',
|
||||
'country' => 'Döwlet',
|
||||
'state' => 'Ýurt',
|
||||
'select-state' => 'Welaýaty ýa-da etraby saýlaň',
|
||||
'city' => 'Şäher',
|
||||
'postcode' => 'zip belgisi',
|
||||
'phone' => 'Telefon',
|
||||
'submit' => 'Adresi ýada sal',
|
||||
'success' => 'Adres ýada goşuldy.',
|
||||
'error' => 'Adres goşulyp bilmedi'
|
||||
],
|
||||
|
||||
'edit' => [
|
||||
'page-title' => 'Adresi redaktirlemek',
|
||||
'company_name' => 'Kompaniýanyň ady',
|
||||
'first_name' => 'Ady',
|
||||
'last_name' => 'Familýasy',
|
||||
'vat_id' => 'Salgyt töleg belgisi',
|
||||
'title' => 'Adresi Redaktirlemek',
|
||||
'street-address' => 'Köçe',
|
||||
'submit' => 'Adresi ýada sal',
|
||||
'success' => 'Adres ýatda saklandy',
|
||||
],
|
||||
'delete' => [
|
||||
'success' => 'salgy üstünlikli aýryldy',
|
||||
'failure' => 'salgyny aýyryp bolmaýar!',
|
||||
'wrong-password' => 'nädogry açar sözi !'
|
||||
'success' => 'Adres aýryldy',
|
||||
'failure' => 'Adresi aýyryp bolmaýar!',
|
||||
'wrong-password' => 'Nädogry açar !'
|
||||
]
|
||||
],
|
||||
|
||||
'order' => [
|
||||
'index' => [
|
||||
'page-title' => 'sargytlar',
|
||||
'page-title' => 'Sargytlar',
|
||||
'title' => 'Sargytlar',
|
||||
'order_id' => 'sargyt ID-i',
|
||||
'date' => 'senesi',
|
||||
|
|
@ -464,8 +464,8 @@ return [
|
|||
'total-paid' => 'jemi tölenen',
|
||||
'total-refunded' => 'Jemi yzyna gaýtarylan',
|
||||
'total-due' => 'Jemi berilmeli',
|
||||
'shipping-address' => 'iberiş salgysy',
|
||||
'billing-address' => 'Hasaplaşyk salgysy',
|
||||
'shipping-address' => 'iberiş adresi',
|
||||
'billing-address' => 'Hasaplaşyk adresi',
|
||||
'shipping-method' => 'Eltip bermek usuly',
|
||||
'payment-method' => 'töleg usuly',
|
||||
'individual-invoice' => 'Hasap-faktura: #:invoice_id',
|
||||
|
|
@ -613,8 +613,8 @@ return [
|
|||
'greeting' => ':created_at -da ýerleşdirilen :order_id belgili sargydyňyz üçin sag boluň! ',
|
||||
'greeting-admin' => ':order_id Sargyt ID-i bilen :created_at-da ýerleňdirilen ',
|
||||
'summary' => 'Sargytlaryň jemi',
|
||||
'shipping-address' => 'iberiş salgysy',
|
||||
'billing-address' => 'töleg salgysy',
|
||||
'shipping-address' => 'iberiş adresi',
|
||||
'billing-address' => 'töleg adresi',
|
||||
'contact' => 'Kontakt',
|
||||
'shipping' => 'iberiş usuly',
|
||||
'payment' => 'töleg usuly',
|
||||
|
|
@ -643,8 +643,8 @@ return [
|
|||
'dear' => 'Hormatly :customer_name',
|
||||
'greeting' => ' :created_at -da ýerleşdirilen :order_id belgili sargyt ýatyryldy',
|
||||
'summary' => 'sargyt barada gysgaça maglumat',
|
||||
'shipping-address' => 'iberiş salgysy',
|
||||
'billing-address' => 'töleg salgysy',
|
||||
'shipping-address' => 'iberiş adresi',
|
||||
'billing-address' => 'töleg adresi',
|
||||
'contact' => 'Kontakt',
|
||||
'shipping' => 'Iberiş usuly',
|
||||
'payment' => 'töleg usuly',
|
||||
|
|
@ -723,8 +723,7 @@ return [
|
|||
'heading' => config('app.name') . ' - poçta tassyklamasy',
|
||||
'subject' => 'tassyklama poçtasy',
|
||||
'verify' => 'Hasabyňyzy tassyklaň',
|
||||
'summary' => 'Bu, girizen e-poçta salgyňyzyň size degişlidigini tassyklamak üçin poçta.
|
||||
Hasabyňyzy barlamak üçin aşakdaky Hasabyňyzy barlamak düwmesine basyň.'
|
||||
'summary' => 'Bu, girizen e-poçtaňyzyň size degişlidigini tassyklamak üçin poçta. Hasabyňyzy barlamak üçin aşakdaky Hasabyňyzy barlamak düwmesine basyň.'
|
||||
],
|
||||
|
||||
'subscription' => [
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@
|
|||
|
||||
@endforeach
|
||||
@if ($cart->hasProductsWithQuantityBox())
|
||||
<button type="submit" class="btn btn-lg btn-primary" id="update_cart_button">
|
||||
<button type="submit" class="checkout-button" id="update_cart_button">
|
||||
{{ __('shop::app.checkout.cart.update-cart') }}
|
||||
</button>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
{{ __('shop::app.checkout.onepage.title') }}
|
||||
@stop
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{{bagisto_asset('styles/cart.css')}}" />
|
||||
<link rel="stylesheet" href="{{bagisto_asset('styles/delivery.css')}}" />
|
||||
<link rel="stylesheet" href="{{bagisto_asset('styles/profile.css')}}" />
|
||||
<link rel="stylesheet" href="{{bagisto_asset('styles/categories-tv.css')}}" />
|
||||
@endpush
|
||||
@section('content-wrapper')
|
||||
<section class="breadcrumb">
|
||||
|
|
@ -38,57 +40,44 @@
|
|||
</div>
|
||||
<div class="delivery-content-mid">
|
||||
@include('shop::checkout.onepage.customer-info')
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('address-form')" :disabled="disable_button" id="checkout-address-continue-button">
|
||||
<div class="delivery-content-mid-right" >
|
||||
<summary-section :key="summeryComponentKey" ></summary-section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delivery-content-bottom">
|
||||
<shipping-section class="delivery-content-bottom-first"
|
||||
v-if="current_step == 2"
|
||||
v-show="current_step == 2"
|
||||
id="shipping-section"
|
||||
@onShippingMethodSelected="shippingMethodSelected($event)">
|
||||
|
||||
</shipping-section>
|
||||
<button type="button" v-show="current_step == 2" class="save-button checkout-button saveable"
|
||||
@click="validateForm('shipping-form')" id="checkout-shipping-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-main">
|
||||
<div class="step-content shipping" v-show="current_step == 2" id="shipping-section">
|
||||
<shipping-section v-if="current_step == 2" @onShippingMethodSelected="shippingMethodSelected($event)"></shipping-section>
|
||||
<payment-section class="delivery-content-bottom-second"
|
||||
v-show="current_step == 3"
|
||||
id="payment-section"
|
||||
v-if="current_step == 3"
|
||||
@onPaymentMethodSelected="paymentMethodSelected($event)">
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('shipping-form')" :disabled="disable_button" id="checkout-shipping-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</payment-section>
|
||||
<button type="button" v-show="current_step == 3" class="save-button checkout-button saveable"
|
||||
@click="validateForm('payment-form')" id="checkout-payment-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
<review-section v-if="current_step == 4" :key="reviewComponentKey" id="summary-section">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-content payment" v-show="current_step == 3" id="payment-section">
|
||||
<payment-section v-if="current_step == 3" @onPaymentMethodSelected="paymentMethodSelected($event)"></payment-section>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="validateForm('payment-form')" :disabled="disable_button" id="checkout-payment-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-content review" v-show="current_step == 4" id="summary-section">
|
||||
<review-section v-if="current_step == 4" :key="reviewComponentKey">
|
||||
<div slot="summary-section">
|
||||
<summary-section :key="summeryComponentKey"></summary-section>
|
||||
|
||||
<coupon-component
|
||||
@onApplyCoupon="getOrderSummary"
|
||||
@onRemoveCoupon="getOrderSummary">
|
||||
</coupon-component>
|
||||
</div>
|
||||
</review-section>
|
||||
|
||||
<div class="button-group">
|
||||
<button type="button" class="btn btn-lg btn-primary" @click="placeOrder()" :disabled="disable_button" id="checkout-place-order-button" v-if="selected_payment_method.method != 'paypal_smart_button'">
|
||||
{{ __('shop::app.checkout.onepage.place-order') }}
|
||||
</button>
|
||||
|
||||
<div class="paypal-button-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
</review-section>
|
||||
<button v-if="current_step == 4" type="button" class="checkout-button"
|
||||
@click="placeOrder()" :disabled="disable_button"
|
||||
id="checkout-place-order-button">
|
||||
{{ __('shop::app.checkout.onepage.place-order') }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-right" v-show="current_step != 4">
|
||||
<summary-section :key="summeryComponentKey"></summary-section>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<div class="delivery-content-mid-left profile-content-inner-bottom-second">
|
||||
<div class="delivery-content-mid-left profile-content-inner-bottom-second" >
|
||||
<div class="delivery-content-title">
|
||||
<h3 class="delivery-content-title-text">Адрес покупателя</h3>
|
||||
</div>
|
||||
<form class="delivery-content-mid-left-blocks" data-vv-scope="address-form">
|
||||
<form class="delivery-content-mid-left-blocks" data-vv-scope="address-form" v-if="! this.new_billing_address">
|
||||
<label class="content-block option option-checked" v-for='(addresses, index) in this.allAddress'>
|
||||
<div class="content-block-title-wrapper">
|
||||
<span class="content-block-wrapper-text">Адрес №<span class="address-nr"></span></span>
|
||||
|
|
@ -29,33 +29,40 @@
|
|||
<span class="content-link-wrapper">{{ __('shop::app.checkout.onepage.new-address') }}</span>
|
||||
</div>
|
||||
</button>
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[address_id]') ? 'has-error' : '']">
|
||||
|
||||
|
||||
</form>
|
||||
<div class="control-group" :class="[errors.has('address-form.billing[address_id]') ? 'has-error' : '']">
|
||||
<span class="control-error" v-if="errors.has('address-form.billing[address_id]')">
|
||||
@{{ errors.first('address-form.billing[address_id]') }}
|
||||
</span>
|
||||
</div>
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="control-group mt-5">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="billing[use_for_shipping]" name="billing[use_for_shipping]" v-model="address.billing.use_for_shipping"/>
|
||||
<label class="checkbox-view" for="billing[use_for_shipping]"></label>
|
||||
{{ __('shop::app.checkout.onepage.use_for_shipping') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
<div v-if="this.new_billing_address"
|
||||
class="profile-content-inner-mid-block-wrapper profile-content-inner-mid-block-wrapper-hidden">
|
||||
@auth('customer')
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<a class="btn btn-lg btn-primary" @click = backToSavedBillingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</a>
|
||||
@endif
|
||||
@endauth
|
||||
@if (! auth()->guard('customer')->check())
|
||||
@include('shop::checkout.onepage.customer-checkout')
|
||||
@endif
|
||||
class="profile-content-inner-mid-block-wrapper profile-content-inner-mid-block-wrapper-hidden shown">
|
||||
<div class="profile-content-block" :class="[errors.has('address-form.billing[first_name]') ? 'has-error' : '']">
|
||||
<label for="billing[first_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.first-name') }}
|
||||
</label>
|
||||
|
||||
<input type="text" v-validate="'required'" class="control" id="billing[first_name]" name="billing[first_name]"
|
||||
v-model="address.billing.first_name" data-vv-as=""{{ __('shop::app.checkout.onepage.first-name') }}""/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('address-form.billing[first_name]')">
|
||||
@{{ errors.first('address-form.billing[first_name]') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="profile-content-block" :class="[errors.has('address-form.billing[last_name]') ? 'has-error' : '']">
|
||||
<label for="billing[last_name]" class="required">
|
||||
{{ __('shop::app.checkout.onepage.last-name') }}
|
||||
</label>
|
||||
|
||||
<input type="text" v-validate="'required'" class="control" id="billing[last_name]" name="billing[last_name]"
|
||||
v-model="address.billing.last_name" data-vv-as=""{{ __('shop::app.checkout.onepage.last-name') }}""/>
|
||||
|
||||
<span class="control-error" v-if="errors.has('address-form.billing[last_name]')">
|
||||
@{{ errors.first('address-form.billing[last_name]') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="profile-content-block" :class="[errors.has('address-form.billing[address1][]') ? 'has-error' : '']">
|
||||
<label for="billing_address_0" class="required">
|
||||
{{ __('shop::app.checkout.onepage.address1') }}
|
||||
|
|
@ -98,26 +105,21 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
@if ($cart->haveStockableItems())
|
||||
<div class="control-group">
|
||||
<span class="checkbox">
|
||||
<input type="checkbox" id="billing[use_for_shipping]" name="billing[use_for_shipping]" v-model="address.billing.use_for_shipping"/>
|
||||
<label class="checkbox-view" for="billing[use_for_shipping]"></label>
|
||||
{{ __('shop::app.checkout.onepage.use_for_shipping') }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@auth('customer')
|
||||
<div class="profile-content-block">
|
||||
<span class="checkbox">
|
||||
<div class="control-group">
|
||||
<input type="checkbox" id="billing[save_as_address]" name="billing[save_as_address]" v-model="address.billing.save_as_address"/>
|
||||
<label class="checkbox-view" for="billing[save_as_address]"></label>
|
||||
{{ __('shop::app.checkout.onepage.save_as_address') }}
|
||||
</span>
|
||||
<label class="checkbox-view" for="billing[save_as_address]">{{ __('shop::app.checkout.onepage.save_as_address') }}</label>
|
||||
</div>
|
||||
@endauth
|
||||
@auth('customer')
|
||||
@if(count(auth('customer')->user()->addresses))
|
||||
<button type="button" class="btn btn-lg btn-primary" @click = backToSavedBillingAddress()>
|
||||
{{ __('shop::app.checkout.onepage.back') }}
|
||||
</button>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
<div class="profile-content-inner-bottom-second"></div>
|
||||
|
||||
<button type="button" class="save-button checkout-button saveable" @click="validateForm('address-form')" :disabled="disable_button" id="checkout-address-continue-button">
|
||||
{{ __('shop::app.checkout.onepage.continue') }}
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,51 +1,33 @@
|
|||
<form data-vv-scope="payment-form">
|
||||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.payment-methods') }}</span>
|
||||
</div>
|
||||
<form data-vv-scope="payment-form" class="delivery-content-bottom-second">
|
||||
<div class="delivery-content-bottom-title">
|
||||
<span class="delivery-content-bottom-title">{{ __('shop::app.checkout.onepage.payment-methods') }}</span>
|
||||
</div>
|
||||
<div class="delivery-content-bottom-inners">
|
||||
@foreach ($paymentMethods as $payment)
|
||||
<div class="item-section-filter-element2" :class="{'reveal':payment.method=='{{ $payment['method'] }}'}">
|
||||
<input v-validate="'required'" type="radio" id="{{ $payment['method'] }}" name="payment[method]"
|
||||
value="{{ $payment['method'] }}" v-model="payment.method" @change="methodSelected()"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.payment-method') }}""
|
||||
class="checkbox checkbox_2">
|
||||
<label for="{{ $payment['method'] }}" class="item-section-brand ">{{ $payment['method_title'] }}</label>
|
||||
|
||||
<div class="payment-methods">
|
||||
<?php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($payment['method']); ?>
|
||||
|
||||
<div class="control-group" :class="[errors.has('payment-form.payment[method]') ? 'has-error' : '']">
|
||||
|
||||
@foreach ($paymentMethods as $payment)
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.payment-method.before', ['payment' => $payment]) !!}
|
||||
|
||||
<div class="checkout-method-group mb-20">
|
||||
<div class="line-one">
|
||||
<label class="radio-container">
|
||||
<input v-validate="'required'" type="radio" id="{{ $payment['method'] }}" name="payment[method]" value="{{ $payment['method'] }}" v-model="payment.method" @change="methodSelected()" data-vv-as=""{{ __('shop::app.checkout.onepage.payment-method') }}"">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<span class="payment-method method-label">
|
||||
<b>{{ $payment['method_title'] }}</b>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="line-two mt-5">
|
||||
<span class="method-summary">{{ __($payment['description']) }}</span>
|
||||
</div>
|
||||
|
||||
<?php $additionalDetails = \Webkul\Payment\Payment::getAdditionalDetails($payment['method']); ?>
|
||||
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions" v-show="payment.method == '{{$payment['method']}}'">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
@endif
|
||||
@if (! empty($additionalDetails))
|
||||
<div class="instructions" v-show="payment.method == '{{$payment['method']}}'">
|
||||
<label>{{ $additionalDetails['title'] }}</label>
|
||||
<p>{{ $additionalDetails['value'] }}</p>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.payment-method.after', ['payment' => $payment]) !!}
|
||||
|
||||
@endforeach
|
||||
|
||||
<span class="control-error" v-if="errors.has('payment-form.payment[method]')">
|
||||
@{{ errors.first('payment-form.payment[method]') }}
|
||||
</span>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
<div class="control-group" :class="[errors.has('payment-form.payment[method]') ? 'has-error' : '']">
|
||||
<span class="control-error" v-if="errors.has('payment-form.payment[method]')">
|
||||
@{{ errors.first('payment-form.payment[method]') }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
@ -1,89 +1,6 @@
|
|||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.summary') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="address-summary">
|
||||
@if ($billingAddress = $cart->billing_address)
|
||||
<div class="billing-address">
|
||||
<div class="card-title mb-20">
|
||||
<b>{{ __('shop::app.checkout.onepage.billing-address') }}</b>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<ul>
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->company_name ?? '' }}
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
<b>{{ $billingAddress->first_name }} {{ $billingAddress->last_name }}</b>
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->address1 }},<br/>
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->postcode . " " . $billingAddress->city }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $billingAddress->state }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ core()->country_name($billingAddress->country) }} {{ $billingAddress->postcode }}
|
||||
</li>
|
||||
|
||||
<span class="horizontal-rule mb-15 mt-15"></span>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ __('shop::app.checkout.onepage.contact') }} : {{ $billingAddress->phone }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($cart->haveStockableItems() && $shippingAddress = $cart->shipping_address)
|
||||
<div class="shipping-address">
|
||||
<div class="card-title mb-20">
|
||||
<b>{{ __('shop::app.checkout.onepage.shipping-address') }}</b>
|
||||
</div>
|
||||
|
||||
<div class="card-content">
|
||||
<ul>
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->company_name ?? '' }}
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
<b>{{ $shippingAddress->first_name }} {{ $shippingAddress->last_name }}</b>
|
||||
</li>
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->address1 }},<br/>
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->postcode . " " . $shippingAddress->city }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ $shippingAddress->state }}
|
||||
</li>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ core()->country_name($shippingAddress->country) }}
|
||||
</li>
|
||||
|
||||
<span class="horizontal-rule mb-15 mt-15"></span>
|
||||
|
||||
<li class="mb-10">
|
||||
{{ __('shop::app.checkout.onepage.contact') }} : {{ $shippingAddress->phone }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="delivery-content-bottom-first">
|
||||
<div class="delivery-content-bottom-title">
|
||||
<span class="delivery-content-title-text">{{ __('shop::app.checkout.onepage.summary') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="cart-item-list mt-20">
|
||||
|
|
@ -99,15 +16,9 @@
|
|||
|
||||
<div class="item-details">
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="item-title">
|
||||
{{ $item->product->name }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.name.after', ['item' => $item]) !!}
|
||||
{!! view_render_event('bagisto.shop.checkout.price.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.price') }}
|
||||
|
|
@ -117,9 +28,6 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.price.after', ['item' => $item]) !!}
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.before', ['item' => $item]) !!}
|
||||
|
||||
<div class="row">
|
||||
<span class="title">
|
||||
{{ __('shop::app.checkout.onepage.quantity') }}
|
||||
|
|
@ -129,10 +37,6 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.quantity.after', ['item' => $item]) !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.before', ['item' => $item]) !!}
|
||||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="item-options">
|
||||
|
||||
|
|
@ -143,7 +47,6 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
|
@ -178,9 +81,5 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="pull-right" style="width: 40%; float: left;">
|
||||
<slot name="summary-section"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,48 +1,31 @@
|
|||
<form data-vv-scope="shipping-form">
|
||||
<div class="form-container">
|
||||
<div class="form-header mb-30">
|
||||
<span class="checkout-step-heading">{{ __('shop::app.checkout.onepage.shipping-method') }}</span>
|
||||
</div>
|
||||
<form data-vv-scope="shipping-form" class="delivery-content-bottom-first">
|
||||
<div class="delivery-content-bottom-title">
|
||||
<span class="delivery-content-bottom-title">{{ __('shop::app.checkout.onepage.shipping-method') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="shipping-methods">
|
||||
<div class="delivery-content-bottom-inner">
|
||||
|
||||
<div class="control-group" :class="[errors.has('shipping-form.shipping_method') ? 'has-error' : '']">
|
||||
@foreach ($shippingRateGroups as $rateGroup)
|
||||
|
||||
@foreach ($shippingRateGroups as $rateGroup)
|
||||
{!! view_render_event('bagisto.shop.checkout.shipping-method.before', ['rateGroup' => $rateGroup]) !!}
|
||||
@foreach ($rateGroup['rates'] as $rate)
|
||||
<div class="item-section-filter-element" :class="{'showed':selected_shipping_method=='{{ $rate->method }}'}">
|
||||
<input v-validate="'required'" type="radio" class="checkbox checkbox_1" id="{{ $rate->method }}"
|
||||
name="shipping_method"
|
||||
data-vv-as=""{{ __('shop::app.checkout.onepage.shipping-method') }}""
|
||||
value="{{ $rate->method }}"
|
||||
v-model="selected_shipping_method"
|
||||
@change="methodSelected()">
|
||||
<label for="{{ $rate->method }}" class="item-section-brand">{{ $rate->method_title }}</label>
|
||||
</div>
|
||||
|
||||
<span class="carrier-title" id="carrier-title" style="font-size:18px; font-weight: bold;">
|
||||
{{ $rateGroup['carrier_title'] }}
|
||||
</span>
|
||||
@endforeach
|
||||
|
||||
@foreach ($rateGroup['rates'] as $rate)
|
||||
<div class="checkout-method-group mb-20">
|
||||
<div class="line-one">
|
||||
<label class="radio-container">
|
||||
<input v-validate="'required'" type="radio" id="{{ $rate->method }}" name="shipping_method" data-vv-as=""{{ __('shop::app.checkout.onepage.shipping-method') }}"" value="{{ $rate->method }}" v-model="selected_shipping_method" @change="methodSelected()">
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
{{-- <label class="radio-view" for="{{ $rate->method }}"></label> --}}
|
||||
<b class="ship-rate method-label">{{ core()->currency($rate->base_price) }}</b>
|
||||
</div>
|
||||
|
||||
<div class="line-two mt-5">
|
||||
<div class="method-summary">
|
||||
<b>{{ $rate->method_title }}</b> - {{ __($rate->method_description) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.shipping-method.after', ['rateGroup' => $rateGroup]) !!}
|
||||
|
||||
@endforeach
|
||||
|
||||
<span class="control-error" v-if="errors.has('shipping-form.shipping_method')">
|
||||
@endforeach
|
||||
<div class="control-group" :class="[errors.has('shipping-form.shipping_method') ? 'has-error' : '']">
|
||||
<span class="control-error" v-if="errors.has('shipping-form.shipping_method')">
|
||||
@{{ errors.first('shipping-form.shipping_method') }}
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
@section('page_title')
|
||||
{{ __('shop::app.checkout.success.title') }}
|
||||
@stop
|
||||
@push('styles')
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="{{bagisto_asset('styles/order-accepted.css')}}">
|
||||
@endpush
|
||||
@section('content-wrapper')
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<!-- New menu - Account dropdown menu -->
|
||||
<div class="profile-dropdown">
|
||||
<a href="{{ route('customer.profile.index') }}" class="profile-block profile">
|
||||
<a href="{{ route('customer.profile.edit') }}" class="profile-block profile">
|
||||
<div class="user-img">
|
||||
<img src="{{ bagisto_asset('icons/user_profile_black.svg') }}" alt="user">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -152,6 +152,38 @@
|
|||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="product-section-pagination-wrapper">
|
||||
|
||||
@if($items->hasPages())
|
||||
<div class="product-section-pagination">
|
||||
<div class="pagination-buttons">
|
||||
@php
|
||||
//array
|
||||
$requestInputs = request()->input();
|
||||
|
||||
if(!isset($requestInputs['mode'])) {
|
||||
$requestInputs['mode'] = $toolbarHelper->isModeActive('list') ? 'list' : 'grid';
|
||||
}
|
||||
|
||||
//examples
|
||||
//http://.../wishlist?mode=grid
|
||||
//http://.../wishlist?mode=list&page=2
|
||||
//http://.../wishlist?mode=grid&page=1
|
||||
@endphp
|
||||
<form method="get">
|
||||
<a class="pagination-button pagination-button-left" href="{{ $items->appends($requestInputs)->previousPageUrl() }}">
|
||||
<img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="left">
|
||||
</a>
|
||||
<span class="mid-button-text">{{ $items->appends($requestInputs)->currentPage() }}</span>
|
||||
<a class="pagination-button pagination-button-right" href="{{ $items->appends($requestInputs)->nextPageUrl() }}">
|
||||
<div><img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="right"></div>
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
<span class="page-count">Всего {{ $items->lastPage() }} страниц</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
<div class="footer-bottom container footer-bottom-inner">
|
||||
<span class="footer-bottom-text">
|
||||
@if (core()->getConfigData('general.content.footer.footer_content'))
|
||||
{{ core()->getConfigData('general.content.footer.footer_content') }}
|
||||
{!! core()->getConfigData('general.content.footer.footer_content') !!}
|
||||
@else
|
||||
{!! trans('admin::app.footer.copy-right') !!}
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
@inject ('categoryRepository', 'TPS\Shop\Repositories\CategoryRepository')
|
||||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
@inject ('wishListHelper', 'Webkul\Customer\Helpers\Wishlist')
|
||||
<svg display="none">
|
||||
<symbol id="rows" viewBox="0 0 23 20">
|
||||
<g id="View_2_" data-name="View (2)" transform="translate(0 -61)">
|
||||
|
|
@ -230,6 +231,25 @@
|
|||
@php $productBaseImage = productimage()->getProductBaseImage($product); @endphp
|
||||
|
||||
<div class="product-block @if ($toolbarHelper->isModeActive('grid')) cube-view @endif">
|
||||
|
||||
<!-- Favourites -->
|
||||
<form class="wishlist-{{ $product->product_id }}" action="{{ route('customer.wishlist.add', $product->product_id) }}" method="POST"
|
||||
style="visibility: hidden; height: 0; width: 0;">
|
||||
@csrf
|
||||
</form>
|
||||
<button type="button" class="item-gallery-fav" style="opacity: 1; pointer-events: unset; position: static;"
|
||||
@guest('customer')
|
||||
onclick="document.querySelector('.logged-false').click(); return false;"
|
||||
@else
|
||||
onclick="document.querySelector('.wishlist-{{ $product->product_id }}').submit();"
|
||||
@endguest
|
||||
>
|
||||
<div>
|
||||
<img src="{{bagisto_asset($wishListHelper->getWishlistProduct($product) ? 'icons/heart.svg' : 'icons/love.svg')}}" alt="fav">
|
||||
</div>
|
||||
</button>
|
||||
<!-- Favourites End -->
|
||||
|
||||
<div class="product-block-img">
|
||||
<img src="{{ $productBaseImage['medium_image_url'] }}"
|
||||
onerror="this.src='{{ asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png') }}'"
|
||||
|
|
|
|||
|
|
@ -24,13 +24,7 @@
|
|||
@endguest
|
||||
>
|
||||
<div>
|
||||
@if ($wishListHelper->getWishlistProduct($product))
|
||||
<!-- If already in wishlist -->
|
||||
<img src="{{bagisto_asset('icons/heart.svg')}}" alt="fav">
|
||||
@else
|
||||
<!-- If not in wishlist -->
|
||||
<img src="{{bagisto_asset('icons/heart.svg')}}" alt="fav">
|
||||
@endif
|
||||
<img src="{{bagisto_asset($wishListHelper->getWishlistProduct($product) ? 'icons/heart.svg' : 'icons/love.svg')}}" alt="fav">
|
||||
</div>
|
||||
</button>
|
||||
@if($discount)
|
||||
|
|
|
|||
|
|
@ -99,9 +99,20 @@
|
|||
|
||||
@if(core()->getConfigData('general.content.shop.wishlist_option'))
|
||||
@inject ('wishListHelper', 'Webkul\Customer\Helpers\Wishlist')
|
||||
<button type="submit" class="upper-section-right-bottom-footer favorite">
|
||||
<form class="wishlist-{{ $product->product_id }}" action="{{ route('customer.wishlist.add', $product->product_id) }}" method="POST"
|
||||
style="visibility: hidden; height: 0; width: 0;">
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<button type="button" class="upper-section-right-bottom-footer favorite"
|
||||
@guest('customer')
|
||||
onclick="document.querySelector('.logged-false').click(); return false;"
|
||||
@else
|
||||
onclick="document.querySelector('.wishlist-{{ $product->product_id }}').submit();"
|
||||
@endguest
|
||||
>
|
||||
<div class="upper-section-right-bottom-footer-img">
|
||||
<img src="{{bagisto_asset($wishListHelper->getWishlistProduct($product)?'icons/heart.svg':'icons/love.svg')}}" alt="favorite">
|
||||
<img src="{{bagisto_asset($wishListHelper->getWishlistProduct($product)?'icons/heart.svg':'icons/love.svg')}}" alt="favorite" width="24" height="22">
|
||||
</div>
|
||||
<span class="upper-section-right-bottom-footer-text">В избранное</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use TPS\Shop\Http\Controllers\Checkout;
|
||||
|
||||
Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {
|
||||
/**
|
||||
* Checkout routes.
|
||||
*/
|
||||
Route::post('/checkout/save-address', [Checkout::class, 'save_address'])
|
||||
->name('shop.checkout.save-address');
|
||||
});
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
use Illuminate\Support\Facades\Route;
|
||||
use TPS\Shop\Http\Controllers\Registration;
|
||||
use TPS\Shop\Http\Controllers\Session;
|
||||
use TPS\Shop\Http\Controllers\WishlistController;
|
||||
|
||||
Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {
|
||||
/**
|
||||
|
|
@ -22,7 +23,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
*/
|
||||
|
||||
Route::post('login', [Session::class, 'create'])->defaults('_config', [
|
||||
'redirect' => 'customer.profile.index',
|
||||
'redirect' => 'shop.home.index',
|
||||
])->name('customer.session.create');
|
||||
|
||||
/**
|
||||
|
|
@ -40,6 +41,25 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
'redirect' => 'shop.home.index',
|
||||
])->name('customer.session.destroy');
|
||||
|
||||
/**
|
||||
* Customer authenticated routes. All the below routes only be accessible
|
||||
* if customer is authenticated.
|
||||
*/
|
||||
Route::group(['middleware' => ['customer']], function () {
|
||||
/**
|
||||
* Customer account. All the below routes are related to
|
||||
* customer account details.
|
||||
*/
|
||||
Route::prefix('account')->group(function () {
|
||||
/**
|
||||
* Wishlist.
|
||||
*/
|
||||
Route::get('wishlist', [WishlistController::class, 'index'])->defaults('_config', [
|
||||
'view' => 'shop::customers.account.wishlist.wishlist',
|
||||
])->name('customer.wishlist.index');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ require 'customer-routes.php';
|
|||
* Checkout routes. All routes related to checkout like
|
||||
* cart, coupons, etc will be placed here.
|
||||
*/
|
||||
//require 'checkout-routes.php';
|
||||
require 'checkout-routes.php';
|
||||
|
|
@ -70,8 +70,6 @@ class ChannelRepository extends Repository
|
|||
{
|
||||
Event::dispatch('core.channel.update.before', $id);
|
||||
|
||||
$channel = $this->find($id);
|
||||
|
||||
$channel = parent::update($data, $id, $attribute);
|
||||
|
||||
$channel->locales()->sync($data['locales']);
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<form id="deleteReviewForm" action="{{ route('customer.review.delete', $review->id) }}" method="post">
|
||||
<form id="deleteReviewForm{{ $review->id }}" action="{{ route('customer.review.delete', $review->id) }}" method="post">
|
||||
@method('delete')
|
||||
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
<a class="unset" href="javascript:void(0);" onclick="confirm('{{ __('shop::app.customer.account.review.delete.confirmation-message') }}') ? document.getElementById('deleteReviewForm').submit() : null;">
|
||||
<a class="unset" href="javascript:void(0);" onclick="deleteReview('{{ $review->id }}')">
|
||||
<span class="rango-delete fs24"></span>
|
||||
|
||||
<span class="align-vertical-top">{{ __('shop::app.checkout.cart.remove') }}</span>
|
||||
|
|
@ -119,5 +119,13 @@
|
|||
}
|
||||
});
|
||||
})();
|
||||
|
||||
function deleteReview(reviewId) {
|
||||
if (! confirm('{{ __("shop::app.customer.account.review.delete.confirmation-message") }}')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(`#deleteReviewForm${reviewId}`).submit();
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ return [
|
|||
'first-name' => 'Ady',
|
||||
'last-name' => 'Familýasy',
|
||||
'email' => 'Email',
|
||||
'address1' => 'Köçesiniň salgysy',
|
||||
'address1' => 'Adres',
|
||||
'city' => 'Şäher',
|
||||
'state' => 'Döwlet',
|
||||
'select-state' => 'Welaýaty ýa-da etraby saýlaň!',
|
||||
|
|
|
|||
Loading…
Reference in New Issue