Merge branch 'master' of https://github.com/bagisto/bagisto into sarga-v1
This commit is contained in:
commit
5e77b0a005
12
README.md
12
README.md
|
|
@ -61,6 +61,18 @@ to the ever-demanding online world. Your business -- whether small or huge -- ca
|
||||||
|
|
||||||
**We also have a forum for any concerns, feature requests, or discussions. Please visit: [Bagisto Forums](https://forums.bagisto.com/)**
|
**We also have a forum for any concerns, feature requests, or discussions. Please visit: [Bagisto Forums](https://forums.bagisto.com/)**
|
||||||
|
|
||||||
|
# Headless Commerce
|
||||||
|
|
||||||
|
The power of headless commerce now comes to Bagisto enabling you to experience seamless and easily scalable storefront performance. Backed by some of the hottest tech stack Vue and React, Bagisto commerce can now be used to build powerful headless commerce solution offering blazing fast speed and easy customisation powered by Vue Storefront and Next.js
|
||||||
|
|
||||||
|
## Vue Storefront
|
||||||
|
|
||||||
|
Vue Storefront 2 integration for Bagisto: [https://github.com/bagisto/vuestorefront](https://github.com/bagisto/vuestorefront)
|
||||||
|
|
||||||
|
## Next.js Commerce
|
||||||
|
|
||||||
|
Develop and deploy your next headless commerce storefronts with Next JS and Bagisto: [https://github.com/bagisto/nextjs-commerce](https://github.com/bagisto/nextjs-commerce)
|
||||||
|
|
||||||
# Visit our live [Demo](https://demo.bagisto.com)
|
# Visit our live [Demo](https://demo.bagisto.com)
|
||||||
|
|
||||||
It packs in lots of features that will allow your E-Commerce business to scale in no time:
|
It packs in lots of features that will allow your E-Commerce business to scale in no time:
|
||||||
|
|
|
||||||
|
|
@ -310,19 +310,9 @@ class Cart
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($cart->items as $item) {
|
foreach ($cart->items as $item) {
|
||||||
$this->cartItemRepository->delete($item->id);
|
$this->removeItem($item->id);
|
||||||
|
|
||||||
if ($cart->items->count() == 0) {
|
|
||||||
$this->cartRepository->delete($cart->id);
|
|
||||||
|
|
||||||
if (session()->has('cart')) {
|
|
||||||
session()->forget('cart');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$cart->save();
|
|
||||||
|
|
||||||
Event::dispatch('checkout.cart.delete.all.after', $cart);
|
Event::dispatch('checkout.cart.delete.all.after', $cart);
|
||||||
|
|
||||||
return $cart;
|
return $cart;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ class AlphaNumericSpace implements Rule
|
||||||
*/
|
*/
|
||||||
public function passes($attribute, $value)
|
public function passes($attribute, $value)
|
||||||
{
|
{
|
||||||
return preg_match('/^[a-zA-Z0-9\s]+$/', $value);
|
return preg_match('/[a-zA-Z0-9\s]+/', $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
|
|
||||||
onError: function (error) {
|
onError: function (error) {
|
||||||
if (! options.authorizationFailed) {
|
if (! options.authorizationFailed) {
|
||||||
options.alertBox(error);
|
options.alertBox(messages.universalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -85,13 +85,13 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
<a href="javascript:void(0);" onclick="deleteAddress('{{ __('shop::app.customer.account.address.index.confirm-delete') }}')">
|
<a href="javascript:void(0);" onclick="deleteAddress('{{ __('shop::app.customer.account.address.index.confirm-delete') }}', '{{ $address->id }}')">
|
||||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form id="deleteAddressForm" action="{{ route('address.delete', $address->id) }}" method="post">
|
<form id="deleteAddressForm{{ $address->id }}" action="{{ route('address.delete', $address->id) }}" method="post">
|
||||||
@method('delete')
|
@method('delete')
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
</form>
|
</form>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -109,12 +109,12 @@
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function deleteAddress(message) {
|
function deleteAddress(message, addressId) {
|
||||||
if (! confirm(message)) {
|
if (! confirm(message)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#deleteAddressForm').submit();
|
$(`#deleteAddressForm${addressId}`).submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
$showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
|
|
@ -128,14 +128,28 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
@if ($showWishlist)
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('customer.wishlist.index') }}">
|
||||||
|
{{ __('shop::app.header.wishlist') }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if ($showCompare)
|
||||||
|
<li>
|
||||||
|
<a href="{{ route('velocity.product.compare') }}">
|
||||||
|
{{ __('shop::app.customer.compare.text') }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
@endguest
|
@endguest
|
||||||
|
|
||||||
@auth('customer')
|
@auth('customer')
|
||||||
@php
|
|
||||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
|
||||||
@endphp
|
|
||||||
|
|
||||||
<ul class="dropdown-list account customer">
|
<ul class="dropdown-list account customer">
|
||||||
<li>
|
<li>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -151,24 +165,18 @@
|
||||||
|
|
||||||
@if ($showWishlist)
|
@if ($showWishlist)
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ route('customer.wishlist.index') }}">{{ __('shop::app.header.wishlist') }}</a>
|
<a href="{{ route('customer.wishlist.index') }}">
|
||||||
|
{{ __('shop::app.header.wishlist') }}
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($showCompare)
|
@if ($showCompare)
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a href="{{ route('velocity.customer.product.compare') }}">
|
||||||
@auth('customer')
|
{{ __('shop::app.customer.compare.text') }}
|
||||||
href="{{ route('velocity.customer.product.compare') }}"
|
</a>
|
||||||
@endauth
|
</li>
|
||||||
|
|
||||||
@guest('customer')
|
|
||||||
href="{{ route('velocity.product.compare') }}"
|
|
||||||
@endguest
|
|
||||||
|
|
||||||
> {{ __('shop::app.customer.compare.text') }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,11 @@
|
||||||
{{ __('shop::app.customer.account.address.index.edit') }}
|
{{ __('shop::app.customer.account.address.index.edit') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="card-link" href="javascript:void(0);" onclick="deleteAddress('{{ __('shop::app.customer.account.address.index.confirm-delete') }}')">
|
<a class="card-link" href="javascript:void(0);" onclick="deleteAddress('{{ __('shop::app.customer.account.address.index.confirm-delete') }}', '{{ $address->id }}')">
|
||||||
{{ __('shop::app.customer.account.address.index.delete') }}
|
{{ __('shop::app.customer.account.address.index.delete') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form id="deleteAddressForm" action="{{ route('address.delete', $address->id) }}" method="post">
|
<form id="deleteAddressForm{{ $address->id }}" action="{{ route('address.delete', $address->id) }}" method="post">
|
||||||
@method('delete')
|
@method('delete')
|
||||||
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
@ -74,12 +74,12 @@
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function deleteAddress(message) {
|
function deleteAddress(message, addressId) {
|
||||||
if (! confirm(message)) {
|
if (! confirm(message)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#deleteAddressForm').submit();
|
$(`#deleteAddressForm${addressId}`).submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue