Merge remote-tracking branch 'upstream/master' into multipe-message-issue-coupon-remove
This commit is contained in:
commit
801d97b2fa
|
|
@ -16,9 +16,7 @@ jobs:
|
|||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: bagisto_testing
|
||||
MYSQL_USER: bagisto
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_DATABASE: bagisto
|
||||
ports:
|
||||
- 3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5
|
||||
|
|
@ -42,11 +40,12 @@ jobs:
|
|||
run: |
|
||||
cp .env.example .env.testing
|
||||
set -e
|
||||
sed -i "s|^\(APP_ENV=\s*\).*$|\1testing|" .env.testing
|
||||
sed -i "s|^\(DB_HOST=\s*\).*$|\1127.0.0.1|" .env.testing
|
||||
sed -i "s|^\(DB_PORT=\s*\).*$|\1${{ job.services.mysql.ports['3306'] }}|" .env.testing
|
||||
sed -i "s|^\(DB_DATABASE=\s*\).*$|\1bagisto_testing|" .env.testing
|
||||
sed -i "s|^\(DB_USERNAME=\s*\).*$|\1bagisto|" .env.testing
|
||||
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1secret|" .env.testing
|
||||
sed -i "s|^\(DB_DATABASE=\s*\).*$|\1bagisto|" .env.testing
|
||||
sed -i "s|^\(DB_USERNAME=\s*\).*$|\1root|" .env.testing
|
||||
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1root|" .env.testing
|
||||
|
||||
- name: Key Generate
|
||||
run: set -e && php artisan key:generate --env=testing
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ class Kernel extends HttpKernel
|
|||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
\App\Http\Middleware\TrustProxies::class,
|
||||
\Illuminate\Http\Middleware\HandleCors::class,
|
||||
\Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||
\App\Http\Middleware\TrimStrings::class,
|
||||
\Webkul\Core\Http\Middleware\SecureHeaders::class,
|
||||
];
|
||||
|
||||
|
|
@ -29,7 +29,9 @@ class Kernel extends HttpKernel
|
|||
*/
|
||||
protected $middlewareGroups = [
|
||||
'web' => [
|
||||
\Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
\App\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
|
|
@ -52,6 +54,7 @@ class Kernel extends HttpKernel
|
|||
protected $routeMiddleware = [
|
||||
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||
|
|
|
|||
|
|
@ -139,14 +139,16 @@
|
|||
"@php artisan migrate:fresh --env=testing",
|
||||
"vendor/bin/codecept run unit",
|
||||
"vendor/bin/codecept run functional",
|
||||
"vendor/bin/codecept run trigger"
|
||||
"vendor/bin/codecept run trigger",
|
||||
"vendor/bin/codecept run api"
|
||||
],
|
||||
"test-win": [
|
||||
"@set -e",
|
||||
"@php artisan migrate:fresh --env=testing",
|
||||
"vendor\\bin\\codecept.bat run unit",
|
||||
"vendor\\bin\\codecept.bat run functional",
|
||||
"vendor\\bin\\codecept.bat run trigger"
|
||||
"vendor\\bin\\codecept.bat run trigger",
|
||||
"vendor\\bin\\codecept.bat run api"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -5,7 +5,7 @@
|
|||
<i class="icon notification-icon active" style="margin-left:0px"></i>
|
||||
</div>
|
||||
|
||||
<div class="dropdown-list bottom-right notification">
|
||||
<div class="dropdown-list bottom-right notification" ref="dropdownList">
|
||||
<div class="dropdown-container">
|
||||
<ul class="notif">
|
||||
<div id="notif-title">{{ title }}</div>
|
||||
|
|
@ -132,34 +132,38 @@ export default {
|
|||
read: 0
|
||||
};
|
||||
|
||||
let this_this = this;
|
||||
let self = this;
|
||||
|
||||
this.$http.get(this.getNotificationUrl, {
|
||||
params: params
|
||||
})
|
||||
.then(function (response) {
|
||||
this_this.notifications = response.data.search_results.data;
|
||||
this_this.totalUnRead = response.data.total_unread;
|
||||
self.notifications = response.data.search_results.data;
|
||||
self.totalUnRead = response.data.total_unread;
|
||||
})
|
||||
.catch(function (error) {})
|
||||
},
|
||||
|
||||
readAll: function () {
|
||||
let this_this = this;
|
||||
let self = this;
|
||||
let dropdownList = this.$refs.dropdownList;
|
||||
|
||||
this.$http.post(this.getReadAllUrl)
|
||||
.then(function (response) {
|
||||
this_this.notifications = response.data.search_results.data;
|
||||
self.notifications = response.data.search_results.data;
|
||||
|
||||
this_this.totalUnRead = response.data.total_unread;
|
||||
self.totalUnRead = response.data.total_unread;
|
||||
|
||||
window.flashMessages.push({
|
||||
'type': 'alert-success',
|
||||
'message': response.data.success_message
|
||||
});
|
||||
|
||||
this_this.$root.addFlashMessages();
|
||||
self.$root.addFlashMessages();
|
||||
})
|
||||
.catch(function (error) {})
|
||||
|
||||
dropdownList.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ $toggleColor: #3c41ff;
|
|||
min-width: 300px;
|
||||
max-width: 25vw;
|
||||
width: 100vw;
|
||||
height: 100%;
|
||||
height: 90vh;
|
||||
z-index: 1;
|
||||
padding-bottom: 10px;
|
||||
transition: transform 0.3s ease;
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -624,6 +624,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -627,6 +627,7 @@ return [
|
|||
'quantity-integer' => 'Quantity should be integer.',
|
||||
'quantity-min-zero' => 'Quantity should be greater then zero.',
|
||||
],
|
||||
'video-size' => 'Maximum video size should be like :size',
|
||||
],
|
||||
|
||||
'attributes' => [
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
class="control-error"
|
||||
v-text="'{{ $errors->first('videos.files.*') }}'">
|
||||
</span>
|
||||
|
||||
<span class="control-info mt-10">{{ __('admin::app.catalog.products.video-size', ['size' => core()->getMaxUploadSize()]) }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.videos.controls.after', ['product' => $product]) !!}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
@elseif ($field['type'] == 'number')
|
||||
|
||||
<input type="number" min="0" v-validate="'{{ $validations }}'" class="control" id="{{ $name }}" name="{{ $name }}" value="{{ old($nameKey) ?: core()->getConfigData($nameKey, $channel, $locale) }}" data-vv-as=""{{ trans($field['title']) }}"">
|
||||
<input type="number" min="{{ $field['name'] == 'minimum_order_amount' ? 1 : 0 }}" v-validate="'{{ $validations }}'" class="control" id="{{ $name }}" name="{{ $name }}" value="{{ old($nameKey) ?: core()->getConfigData($nameKey, $channel, $locale) }}" data-vv-as=""{{ trans($field['title']) }}"">
|
||||
|
||||
@elseif ($field['type'] == 'color')
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@
|
|||
|
||||
{!! view_render_event('bagisto.admin.promotions.cart-rules.create.after') !!}
|
||||
|
||||
<accordian title="{{ __('admin::app.promotions.cart-rules.coupon-codes') }}" :active="false" v-if="coupon_type && use_auto_generation">
|
||||
<accordian title="{{ __('admin::app.promotions.cart-rules.coupon-codes') }}" :active="false" v-if="parseInt(use_auto_generation) && parseInt(coupon_type)">
|
||||
<div slot="body">
|
||||
<create-coupon-form></create-coupon-form>
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -239,4 +239,23 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
&.rtl {
|
||||
.booking-information {
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.bp-location-icon {
|
||||
right: 60px;
|
||||
}
|
||||
|
||||
.bp-slot-icon {
|
||||
right: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
padding-left: 32px;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
|
@ -278,6 +278,19 @@ body {
|
|||
left: 80px !important;
|
||||
right: inherit !important;
|
||||
}
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
}
|
||||
|
||||
.bp-location-icon {
|
||||
right: 60px;
|
||||
}
|
||||
|
||||
.bp-slot-icon {
|
||||
right: 140px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ class CartRuleRepository extends Repository
|
|||
$this->cartRuleCouponRepository->create([
|
||||
'cart_rule_id' => $cartRule->id,
|
||||
'code' => $data['coupon_code'],
|
||||
'usage_limit' => $data['usage_per_customer'] ?? 0,
|
||||
'usage_limit' => $data['uses_per_coupon'] ?? 0,
|
||||
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
|
||||
'is_primary' => 1,
|
||||
'expired_at' => $data['ends_till'] ?: null,
|
||||
|
|
|
|||
|
|
@ -1316,4 +1316,14 @@ class Core
|
|||
|
||||
return Config::get($field, $configFieldInfo['default'] ?? null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get max upload size from the php.ini file.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMaxUploadSize()
|
||||
{
|
||||
return ini_get('upload_max_filesize');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ class AddressController extends Controller
|
|||
public function __construct(protected CustomerAddressRepository $customerAddressRepository)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->customer = auth()->guard('customer')->user();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -41,7 +39,9 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view'])->with('addresses', $this->customer->addresses);
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
return view($this->_config['view'])->with('addresses', $customer->addresses);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -63,12 +63,14 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function store(CustomerAddressRequest $request)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$data = $request->all();
|
||||
|
||||
$data['customer_id'] = $this->customer->id;
|
||||
$data['customer_id'] = $customer->id;
|
||||
$data['address1'] = implode(PHP_EOL, array_filter(request()->input('address1')));
|
||||
|
||||
if ($this->customer->addresses->count() == 0) {
|
||||
if ($customer->addresses->count() == 0) {
|
||||
$data['default_address'] = 1;
|
||||
}
|
||||
|
||||
|
|
@ -90,9 +92,11 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$address = $this->customerAddressRepository->findOneWhere([
|
||||
'id' => $id,
|
||||
'customer_id' => $this->customer->id,
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
|
||||
if (! $address) {
|
||||
|
|
@ -112,11 +116,13 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function update($id, CustomerAddressRequest $request)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$data = $request->all();
|
||||
|
||||
$data['address1'] = implode(PHP_EOL, array_filter(request()->input('address1')));
|
||||
|
||||
$addresses = $this->customer->addresses;
|
||||
$addresses = $customer->addresses;
|
||||
|
||||
foreach ($addresses as $address) {
|
||||
if ($id == $address->id) {
|
||||
|
|
@ -141,7 +147,9 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function makeDefault($id)
|
||||
{
|
||||
if ($default = $this->customer->default_address) {
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
if ($default = $customer->default_address) {
|
||||
$this->customerAddressRepository->find($default->id)->update(['default_address' => 0]);
|
||||
}
|
||||
|
||||
|
|
@ -162,9 +170,11 @@ class AddressController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$address = $this->customerAddressRepository->findOneWhere([
|
||||
'id' => $id,
|
||||
'customer_id' => $this->customer->id,
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
|
||||
if (! $address) {
|
||||
|
|
|
|||
|
|
@ -79,6 +79,13 @@ class CustomerController extends Controller
|
|||
unset($data['date_of_birth']);
|
||||
}
|
||||
|
||||
if (
|
||||
core()->getCurrentChannel()->theme === 'default'
|
||||
&& ! isset($data['image'])
|
||||
) {
|
||||
$data['image']['image_0'] = '';
|
||||
}
|
||||
|
||||
$data['subscribed_to_news_letter'] = isset($data['subscribed_to_news_letter']) ? 1 : 0;
|
||||
|
||||
if (isset($data['oldpassword'])) {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class SessionController extends Controller
|
|||
*/
|
||||
Event::dispatch('customer.after.login', $request->get('email'));
|
||||
|
||||
return redirect()->intended(route($this->_config['redirect']));
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ class WishlistController extends Controller
|
|||
)
|
||||
{
|
||||
$this->_config = request('_config');
|
||||
|
||||
$this->currentCustomer = auth()->guard('customer')->user();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -47,6 +45,8 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
if (! core()->getConfigData('general.content.shop.wishlist_option')) {
|
||||
abort(404);
|
||||
}
|
||||
|
|
@ -54,8 +54,8 @@ class WishlistController extends Controller
|
|||
return view($this->_config['view'], [
|
||||
'items' => $this->wishlistRepository->getCustomerWishlist(),
|
||||
'isSharingEnabled' => $this->isSharingEnabled(),
|
||||
'isWishlistShared' => $this->currentCustomer->isWishlistShared(),
|
||||
'wishlistSharedLink' => $this->currentCustomer->getWishlistSharedLink()
|
||||
'isWishlistShared' => $customer->isWishlistShared(),
|
||||
'wishlistSharedLink' => $customer->getWishlistSharedLink()
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -67,6 +67,8 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function add($itemId)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$product = $this->productRepository->find($itemId);
|
||||
|
||||
if ( $product == null ) {
|
||||
|
|
@ -79,13 +81,13 @@ class WishlistController extends Controller
|
|||
$data = [
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'product_id' => $itemId,
|
||||
'customer_id' => $this->currentCustomer->id,
|
||||
'customer_id' => $customer->id,
|
||||
];
|
||||
|
||||
$checked = $this->wishlistRepository->findWhere([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'product_id' => $itemId,
|
||||
'customer_id' => $this->currentCustomer->id,
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
|
||||
if (
|
||||
|
|
@ -124,20 +126,22 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function share()
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
if ($this->isSharingEnabled()) {
|
||||
$data = $this->validate(request(), [
|
||||
'shared' => 'required|boolean'
|
||||
]);
|
||||
|
||||
$updateCounts = $this->currentCustomer->wishlist_items()->update(['shared' => $data['shared']]);
|
||||
$updateCounts = $customer->wishlist_items()->update(['shared' => $data['shared']]);
|
||||
|
||||
if (
|
||||
$updateCounts
|
||||
&& $updateCounts > 0
|
||||
) {
|
||||
return response()->json([
|
||||
'isWishlistShared' => $this->currentCustomer->isWishlistShared(),
|
||||
'wishlistSharedLink' => $this->currentCustomer->getWishlistSharedLink()
|
||||
'isWishlistShared' => $customer->isWishlistShared(),
|
||||
'wishlistSharedLink' => $customer->getWishlistSharedLink()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +189,9 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function remove($itemId)
|
||||
{
|
||||
$customerWishlistItems = $this->currentCustomer->wishlist_items;
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$customerWishlistItems = $customer->wishlist_items;
|
||||
|
||||
foreach ($customerWishlistItems as $customerWishlistItem) {
|
||||
if ($itemId == $customerWishlistItem->id) {
|
||||
|
|
@ -193,7 +199,7 @@ class WishlistController extends Controller
|
|||
|
||||
session()->flash('success', trans('customer::app.wishlist.removed'));
|
||||
|
||||
return redirect()->back();
|
||||
return redirect()->route('customer.wishlist.index');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -210,9 +216,11 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function move($itemId)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$wishlistItem = $this->wishlistRepository->findOneWhere([
|
||||
'id' => $itemId,
|
||||
'customer_id' => $this->currentCustomer->id,
|
||||
'customer_id' => $customer->id,
|
||||
]);
|
||||
|
||||
if (! $wishlistItem) {
|
||||
|
|
@ -247,7 +255,9 @@ class WishlistController extends Controller
|
|||
*/
|
||||
public function removeAll()
|
||||
{
|
||||
$wishlistItems = $this->currentCustomer->wishlist_items;
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$wishlistItems = $customer->wishlist_items;
|
||||
|
||||
if ($wishlistItems->count() > 0) {
|
||||
foreach ($wishlistItems as $wishlistItem) {
|
||||
|
|
|
|||
|
|
@ -844,7 +844,7 @@ abstract class AbstractType
|
|||
*/
|
||||
public function prepareForCart($data)
|
||||
{
|
||||
$data['quantity'] = (int) $data['quantity'] ?? 1;
|
||||
$data['quantity'] = $this->handleQuantity((int) $data['quantity']);
|
||||
|
||||
$data = $this->getQtyRequest($data);
|
||||
|
||||
|
|
@ -875,6 +875,19 @@ abstract class AbstractType
|
|||
return $products;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle quantity.
|
||||
*
|
||||
* @param int $quantity
|
||||
* @return int
|
||||
*/
|
||||
public function handleQuantity(int $quantity): int
|
||||
{
|
||||
return ! empty($quantity)
|
||||
? $quantity
|
||||
: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get request quantity.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ class Bundle extends AbstractType
|
|||
*/
|
||||
public function prepareForCart($data)
|
||||
{
|
||||
$bundleQuantity = $data['quantity'];
|
||||
$bundleQuantity = parent::handleQuantity((int) $data['quantity']);
|
||||
|
||||
if (isset($data['bundle_options'])) {
|
||||
$data['bundle_options'] = array_filter($this->validateBundleOptionForCart($data['bundle_options']));
|
||||
|
|
|
|||
|
|
@ -655,6 +655,8 @@ class Configurable extends AbstractType
|
|||
*/
|
||||
public function prepareForCart($data)
|
||||
{
|
||||
$data['quantity'] = parent::handleQuantity((int) $data['quantity']);
|
||||
|
||||
if (
|
||||
! isset($data['selected_configurable_option'])
|
||||
|| ! $data['selected_configurable_option']
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ return [
|
|||
[
|
||||
'name' => 'minimum_order_amount',
|
||||
'title' => 'admin::app.admin.system.minimum-order-amount',
|
||||
'type' => 'text',
|
||||
'type' => 'number',
|
||||
'validation' => 'decimal',
|
||||
'channel_based' => true,
|
||||
'locale_based' => true,
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Log;
|
|||
use Webkul\Checkout\Contracts\Cart as CartModel;
|
||||
use Webkul\Customer\Repositories\WishlistRepository;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
use Webkul\CartRule\Repositories\CartRuleCouponRepository;
|
||||
|
||||
class CartController extends Controller
|
||||
{
|
||||
|
|
@ -16,11 +17,13 @@ class CartController extends Controller
|
|||
*
|
||||
* @param \Webkul\Customer\Repositories\CartItemRepository $wishlistRepository
|
||||
* @param \Webkul\Product\Repositories\ProductRepository $productRepository
|
||||
* @param \Webkul\CartRule\Repositories\CartRuleCouponRepository $cartRuleCouponRepository
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(
|
||||
protected WishlistRepository $wishlistRepository,
|
||||
protected ProductRepository $productRepository
|
||||
protected ProductRepository $productRepository,
|
||||
protected CartRuleCouponRepository $cartRuleCouponRepository
|
||||
)
|
||||
{
|
||||
$this->middleware('throttle:5,1')->only('applyCoupon');
|
||||
|
|
@ -177,16 +180,27 @@ class CartController extends Controller
|
|||
|
||||
try {
|
||||
if (strlen($couponCode)) {
|
||||
Cart::setCouponCode($couponCode)->collectTotals();
|
||||
$coupon = $this->cartRuleCouponRepository->findOneByField('code', $couponCode);
|
||||
|
||||
if (Cart::getCart()->coupon_code == $couponCode) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => trans('shop::app.checkout.total.success-coupon'),
|
||||
]);
|
||||
if ($coupon->cart_rule->status) {
|
||||
if (Cart::getCart()->coupon_code == $couponCode) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => trans('shop::app.checkout.total.coupon-already-applied'),
|
||||
]);
|
||||
}
|
||||
|
||||
Cart::setCouponCode($couponCode)->collectTotals();
|
||||
|
||||
if (Cart::getCart()->coupon_code == $couponCode) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => trans('shop::app.checkout.total.success-coupon'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => trans('shop::app.checkout.total.invalid-coupon'),
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ class OrderController extends Controller
|
|||
protected InvoiceRepository $invoiceRepository
|
||||
)
|
||||
{
|
||||
$this->currentCustomer = auth()->guard('customer')->user();
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
|
@ -50,8 +48,10 @@ class OrderController extends Controller
|
|||
*/
|
||||
public function view($id)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$order = $this->orderRepository->findOneWhere([
|
||||
'customer_id' => $this->currentCustomer->id,
|
||||
'customer_id' => $customer->id,
|
||||
'id' => $id,
|
||||
]);
|
||||
|
||||
|
|
@ -70,9 +70,11 @@ class OrderController extends Controller
|
|||
*/
|
||||
public function printInvoice($id)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
$invoice = $this->invoiceRepository->findOrFail($id);
|
||||
|
||||
if ($invoice->order->customer_id !== $this->currentCustomer->id) {
|
||||
if ($invoice->order->customer_id !== $customer->id) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
|
|
@ -90,8 +92,10 @@ class OrderController extends Controller
|
|||
*/
|
||||
public function cancel($id)
|
||||
{
|
||||
$customer = auth()->guard('customer')->user();
|
||||
|
||||
/* find by order id in customer's order */
|
||||
$order = $this->currentCustomer->all_orders()->find($id);
|
||||
$order = $customer->all_orders()->find($id);
|
||||
|
||||
/* if order id not found then process should be aborted with 404 page */
|
||||
if (! $order) {
|
||||
|
|
|
|||
|
|
@ -625,6 +625,7 @@ return [
|
|||
'invalid-coupon' => 'رمز القسيمة غير صالح.',
|
||||
'success-coupon' => 'تم تطبيق رمز القسيمة بنجاح.',
|
||||
'coupon-apply-issue' => 'لا يمكن تطبيق رمز القسيمة.',
|
||||
'coupon-already-applied' => 'تم تطبيق رمز القسيمة بالفعل.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -611,6 +611,7 @@ return [
|
|||
'invalid-coupon' => 'কুপন কোড অবৈধ।',
|
||||
'success-coupon' => 'কুপন কোড সফলভাবে প্রয়োগ করা হয়েছে।',
|
||||
'coupon-apply-issue' => 'কুপন কোড প্রয়োগ করা যাবে না।',
|
||||
'coupon-already-applied' => 'কুপন কোড ইতিমধ্যেই প্রয়োগ করা হয়েছে।',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ return [
|
|||
'invalid-coupon' => 'Gutscheincode ist ungültig.',
|
||||
'success-coupon' => 'Gutscheincode erfolgreich angewendet.',
|
||||
'coupon-apply-issue' => 'Gutscheincode kann nicht angewendet werden.',
|
||||
'coupon-already-applied' => 'Gutscheincode bereits angewendet.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -623,6 +623,7 @@ return [
|
|||
'invalid-coupon' => 'Coupon code is invalid.',
|
||||
'success-coupon' => 'Coupon code applied successfully.',
|
||||
'coupon-apply-issue' => 'Coupon code can\'t be applied.',
|
||||
'coupon-already-applied' => 'Coupon code already applied.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -614,6 +614,7 @@ return [
|
|||
'invalid-coupon' => 'El código del cupón no es válido.',
|
||||
'success-coupon' => 'Código del cupón aplicado correctamente.',
|
||||
'coupon-apply-issue' => 'No se puede aplicar el código de cupón.',
|
||||
'coupon-already-applied' => 'Código de cupón ya aplicado.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -610,6 +610,7 @@ return [
|
|||
'invalid-coupon' => 'کد کوپن نامعتبر است',
|
||||
'success-coupon' => 'کد کوپن با موفقیت اعمال شد',
|
||||
'coupon-apply-issue' => 'کد کوپن نمی تواند اعمال شود',
|
||||
'coupon-already-applied' => 'کد کوپن قبلاً اعمال شده است.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -613,6 +613,7 @@ return [
|
|||
'invalid-coupon' => 'Le code promo n\'est pas valide.',
|
||||
'success-coupon' => 'Code promo appliqué avec succès.',
|
||||
'coupon-apply-issue' => 'Le code promo ne peut pas être appliqué.',
|
||||
'coupon-already-applied' => 'Code promo déjà appliqué.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -610,6 +610,7 @@ return [
|
|||
'invalid-coupon' => 'קוד הקופון אינו חוקי.',
|
||||
'success-coupon' => 'קוד הקופון הוחל בהצלחה.',
|
||||
'coupon-apply-issue' => 'לא ניתן להחיל קוד קופון.',
|
||||
'coupon-already-applied' => 'קוד קופון כבר הוחל.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -622,6 +622,7 @@ return [
|
|||
'invalid-coupon' => 'कूपन कोड अमान्य है।',
|
||||
'success-coupon' => 'कूपन कोड सफलतापूर्वक लागू किया गया।',
|
||||
'coupon-apply-issue' => 'कूपन कोड लागू नहीं किया जा सकता',
|
||||
'coupon-already-applied' => 'कूपन कोड पहले से ही लागू है।',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ return [
|
|||
'invalid-coupon' => 'Il Codice Promo non è valido.',
|
||||
'success-coupon' => 'Codice Promo applicato con successo.',
|
||||
'coupon-apply-issue' => 'Il Codice Promo non può essere applicato.',
|
||||
'coupon-already-applied' => 'Codice coupon già applicato.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -619,6 +619,7 @@ return [
|
|||
'invalid-coupon' => 'Couponcode is ongeldig.',
|
||||
'success-coupon' => 'Couponcode succesvol toegepast.',
|
||||
'coupon-apply-issue' => 'Coupon code can\'t be applied.',
|
||||
'coupon-already-applied' => 'Couponcode reeds toegepast.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ return [
|
|||
'invalid-coupon' => 'Kod kuponu jest nieprawidłowy.',
|
||||
'success-coupon' => 'Kod kuponu został pomyślnie zastosowany.',
|
||||
'coupon-apply-issue' => 'Nie można zastosować kodu kuponu.',
|
||||
'coupon-already-applied' => 'Kod kuponu został już zastosowany.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -599,6 +599,7 @@ return [
|
|||
'invalid-coupon' => 'Código do Cupom é inválido.',
|
||||
'success-coupon' => 'Cupom aplicado com sucesso.',
|
||||
'coupon-apply-issue' => 'Não foi possível aplicar esse Cupom',
|
||||
'coupon-already-applied' => 'Coupon code already applied.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -611,6 +611,7 @@ return [
|
|||
'invalid-coupon' => 'Код купона недействителен.',
|
||||
'success-coupon' => 'Код купона успешно применен.',
|
||||
'coupon-apply-issue' => 'Код купона не может быть применен.',
|
||||
'coupon-already-applied' => 'Coupon code already applied.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -610,6 +610,7 @@ return [
|
|||
'invalid-coupon' => 'කූපන් කේතය වලංගු නැත.',
|
||||
'success-coupon' => 'කූපන් කේතය සාර්ථකව යොදන ලදී.',
|
||||
'coupon-apply-issue' => 'කූපන් කේතය යෙදිය නොහැක.',
|
||||
'coupon-already-applied' => 'Coupon code already applied.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -611,6 +611,7 @@ return [
|
|||
'invalid-coupon' => 'Kupon kodu geçersiz.',
|
||||
'success-coupon' => 'Kupon kodu başarıyla uygulandı.',
|
||||
'coupon-apply-issue' => 'Kupon kodu uygulanamaz.',
|
||||
'coupon-already-applied' => 'Kupon kodu zaten uygulandı.',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -612,7 +612,8 @@ return [
|
|||
'cannot-apply-coupon' => '不能应用优惠券',
|
||||
'invalid-coupon' => '优惠券代码无效.',
|
||||
'success-coupon' => '优惠券代码已应用成功.',
|
||||
'coupon-apply-issue' => '优惠券代码不能被应用.'
|
||||
'coupon-apply-issue' => '优惠券代码不能被应用.',
|
||||
'coupon-already-applied' => '優惠券代碼已應用',
|
||||
],
|
||||
|
||||
'success' => [
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
<li>
|
||||
<span class="dropdown-toggle">
|
||||
<i class="icon account-icon"></i>
|
||||
|
||||
|
||||
<span class="name">{{ __('shop::app.header.account') }}</span>
|
||||
|
||||
<i class="icon arrow-down-icon"></i>
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@
|
|||
<script type="text/x-template" id="quantity-changer-template">
|
||||
<div class="quantity control-group" :class="[errors.has(controlName) ? 'has-error' : '']">
|
||||
<label class="required">{{ __('shop::app.products.quantity') }}</label>
|
||||
|
||||
<span class="quantity-container">
|
||||
<button type="button" class="decrease" @click="decreaseQty()">-</button>
|
||||
|
||||
|
|
@ -171,9 +172,9 @@
|
|||
@keyup="setQty($event)">
|
||||
|
||||
<button type="button" class="increase" @click="increaseQty()">+</button>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName)">@{{ errors.first(controlName) }}</span>
|
||||
</span>
|
||||
|
||||
<span class="control-error" v-if="errors.has(controlName)">@{{ errors.first(controlName) }}</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=994a0d7537c0f196b1e0",
|
||||
"/css/ui.css": "/css/ui.css?id=d5a5781ad0a890301ed3"
|
||||
"/js/ui.js": "/js/ui.js?id=934e73015300b1ae35f5",
|
||||
"/css/ui.css": "/css/ui.css?id=933372010d246f94f931"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,8 +200,6 @@ abstract class DataGrid
|
|||
public function __construct()
|
||||
{
|
||||
$this->invoker = $this;
|
||||
|
||||
$this->currentUser = auth()->guard('admin')->user();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -119,9 +119,9 @@ trait ProvideDataGridPlus
|
|||
public function getTranslations()
|
||||
{
|
||||
return [
|
||||
'allChannels' => __('admin::app.admin.system.all-channels'),
|
||||
'allLocales' => __('admin::app.admin.system.all-locales'),
|
||||
'allCustomerGroups' => __('admin::app.admin.system.all-customer-groups'),
|
||||
'allChannels' => __('ui::app.datagrid.all-channels'),
|
||||
'allLocales' => __('ui::app.datagrid.all-locales'),
|
||||
'allCustomerGroups' => __('ui::app.datagrid.all-customer-groups'),
|
||||
'search' => __('ui::app.datagrid.search'),
|
||||
'searchTitle' => __('ui::app.datagrid.search-title'),
|
||||
'channel' => __('ui::app.datagrid.channel'),
|
||||
|
|
@ -152,11 +152,14 @@ trait ProvideDataGridPlus
|
|||
'filterExists' => __('ui::app.datagrid.filter-exists'),
|
||||
'zeroIndex' => __('ui::app.datagrid.zero-index'),
|
||||
'clickOnAction' => __('ui::app.datagrid.click_on_action'),
|
||||
'recordsFound' => __('admin::app.admin.system.records-found'),
|
||||
'recordsFound' => __('ui::app.datagrid.records-found'),
|
||||
'norecords' => __('ui::app.datagrid.no-records'),
|
||||
'massActionDelete' => __('ui::app.datagrid.massaction.delete'),
|
||||
'emptyField' => __('ui::app.datagrid.empty-field'),
|
||||
'emptyValue' => __('ui::app.datagrid.empty-value'),
|
||||
'active' => __('ui::app.datagrid.active'),
|
||||
'inactive' => __('ui::app.datagrid.inactive'),
|
||||
'clearAll' => __('ui::app.datagrid.clear-all'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@
|
|||
<div class="filter-advance">
|
||||
<datagrid-filter-tags
|
||||
:filters="filters"
|
||||
:translations="translations"
|
||||
@onRemoveFilter="removeFilter($event)"
|
||||
@onRemoveAllFilter="clearAllFilters()"
|
||||
></datagrid-filter-tags>
|
||||
|
||||
<div class="records-count-container">
|
||||
|
|
@ -101,12 +103,12 @@ export default {
|
|||
DatagridPagination,
|
||||
DatagridTable,
|
||||
DatagridExtraFilters,
|
||||
DatagridFilterTags
|
||||
DatagridFilterTags,
|
||||
},
|
||||
|
||||
mixins: [PersistDatagridAttributes],
|
||||
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {
|
||||
dataGridIndex: 0,
|
||||
currentSort: null,
|
||||
|
|
@ -114,11 +116,11 @@ export default {
|
|||
id: btoa(this.src),
|
||||
isDataLoaded: false,
|
||||
massActionTargets: [],
|
||||
url: this.src
|
||||
url: this.src,
|
||||
};
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
this.makeURL();
|
||||
},
|
||||
|
||||
|
|
@ -161,10 +163,21 @@ export default {
|
|||
|
||||
axios
|
||||
.get(this.url)
|
||||
.then(function(response) {
|
||||
.then(function (response) {
|
||||
if (response.status === 200) {
|
||||
let results = response.data;
|
||||
|
||||
if (
|
||||
! results.records.data.length &&
|
||||
results.records.prev_page_url
|
||||
) {
|
||||
self.url = results.records.prev_page_url;
|
||||
|
||||
self.refresh();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
self.initResponseProps(results);
|
||||
|
||||
self.initDatagrid();
|
||||
|
|
@ -172,7 +185,7 @@ export default {
|
|||
self.dataGridIndex += 1;
|
||||
}
|
||||
})
|
||||
.catch(function(error) {
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
|
@ -195,7 +208,7 @@ export default {
|
|||
id: parseInt(id),
|
||||
type: this.massActions[id].type,
|
||||
action: this.massActions[id].action,
|
||||
confirm_text: this.massActions[id].confirm_text
|
||||
confirm_text: this.massActions[id].confirm_text,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
@ -213,7 +226,7 @@ export default {
|
|||
this.perPage = this.itemsPerPage;
|
||||
},
|
||||
|
||||
formURL(column, condition, response, label) {
|
||||
formURL(column, condition, response, label, type) {
|
||||
let obj = {};
|
||||
|
||||
if (
|
||||
|
|
@ -260,6 +273,7 @@ export default {
|
|||
}
|
||||
|
||||
if (filterRepeated === false) {
|
||||
obj.type = type;
|
||||
obj.column = column;
|
||||
obj.cond = condition;
|
||||
obj.val = response;
|
||||
|
|
@ -359,6 +373,7 @@ export default {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
obj.type = type;
|
||||
obj.column = column;
|
||||
obj.cond = condition;
|
||||
obj.val = encodeURIComponent(response);
|
||||
|
|
@ -397,7 +412,8 @@ export default {
|
|||
'search',
|
||||
'all',
|
||||
searchValue,
|
||||
this.translations.searchTitle
|
||||
this.translations.searchTitle,
|
||||
'search'
|
||||
);
|
||||
},
|
||||
|
||||
|
|
@ -413,16 +429,16 @@ export default {
|
|||
this.filters.push({
|
||||
column: 'perPage',
|
||||
cond: 'eq',
|
||||
val: currentPerPageSelection
|
||||
val: currentPerPageSelection,
|
||||
});
|
||||
|
||||
this.makeURL();
|
||||
},
|
||||
|
||||
filterData($event) {
|
||||
const { column, condition, response, label } = $event.data;
|
||||
const { type, column, condition, response, label } = $event.data;
|
||||
|
||||
this.formURL(column, condition, response, label);
|
||||
this.formURL(column, condition, response, label, type);
|
||||
},
|
||||
|
||||
removeFilter($event) {
|
||||
|
|
@ -440,6 +456,12 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
|
||||
clearAllFilters() {
|
||||
this.filters = [];
|
||||
|
||||
this.makeURL();
|
||||
},
|
||||
|
||||
changePage($event) {
|
||||
const { pageLink } = $event.data;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<span class="filter-tag" style="text-transform: capitalize">
|
||||
<span class="filter-tag">
|
||||
<span v-if="filter.column == 'perPage'">perPage</span>
|
||||
|
||||
<span v-else>{{ filter.label }}</span>
|
||||
<span v-else>{{ filter.label }} | {{ filter.cond }}</span>
|
||||
|
||||
<span class="wrapper" v-if="filter.prettyValue">
|
||||
{{ filter.prettyValue }}
|
||||
{{ filter.prettyValue }}
|
||||
<span
|
||||
class="icon cross-icon"
|
||||
v-on:click="removeFilter(filter)"
|
||||
|
|
@ -13,7 +13,18 @@
|
|||
</span>
|
||||
|
||||
<span class="wrapper" v-else>
|
||||
{{ decodeURIComponent(filter.val) }}
|
||||
<span v-if="filter.type == 'boolean'">
|
||||
{{
|
||||
filter.val == 1
|
||||
? translations.active
|
||||
: translations.inactive
|
||||
}}
|
||||
</span>
|
||||
|
||||
<span v-else>
|
||||
{{ decodeURIComponent(filter.val) }}
|
||||
</span>
|
||||
|
||||
<span
|
||||
class="icon cross-icon"
|
||||
v-on:click="removeFilter(filter)"
|
||||
|
|
@ -24,7 +35,7 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
props: ['filter'],
|
||||
props: ['filter', 'translations'],
|
||||
|
||||
data() {
|
||||
return {};
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@
|
|||
<datagrid-filter-tag
|
||||
:key="filterKey"
|
||||
:filter="filter"
|
||||
:translations="translations"
|
||||
v-for="(filter, filterKey) in filters"
|
||||
@onRemoveFilter="removeFilter(filter)"
|
||||
></datagrid-filter-tag>
|
||||
|
||||
<p @click="removeAllFilters" v-if="filters.length > 0">{{ translations.clearAll }}</p>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -15,7 +18,7 @@
|
|||
import DatagridFilterTag from './datagrid-filter-tag.vue';
|
||||
|
||||
export default {
|
||||
props: ['filters'],
|
||||
props: ['filters', 'translations'],
|
||||
|
||||
components: {
|
||||
DatagridFilterTag
|
||||
|
|
@ -28,6 +31,10 @@ export default {
|
|||
methods: {
|
||||
removeFilter(filter) {
|
||||
this.$emit('onRemoveFilter', { data: { filter } });
|
||||
},
|
||||
|
||||
removeAllFilters() {
|
||||
this.$emit('onRemoveAllFilter');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -744,6 +744,12 @@ h5 {
|
|||
}
|
||||
}
|
||||
|
||||
.boolean {
|
||||
label {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.control-group {
|
||||
display: block;
|
||||
margin-bottom: 25px;
|
||||
|
|
@ -756,8 +762,7 @@ h5 {
|
|||
label {
|
||||
display: block;
|
||||
color: $font-color;
|
||||
pointer-events: none;
|
||||
|
||||
|
||||
&.required::after {
|
||||
content: '*';
|
||||
color: $danger-color;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,10 @@
|
|||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 10px;
|
||||
|
||||
p {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.search-filter {
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'تعديل',
|
||||
'delete' => 'حذف',
|
||||
'view' => 'رأي',
|
||||
'active' => 'نشيط',
|
||||
'inactive' => 'غير نشط',
|
||||
'all-channels' => 'جميع القنوات',
|
||||
'all-locales' => 'كل اللغات',
|
||||
'all-customer-groups' => 'جميع مجموعات العملاء',
|
||||
'records-found' => 'جميع مجموعات العملاء',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'view' => 'View',
|
||||
'edit' => 'Bearbeiten',
|
||||
'delete' => 'Löschen',
|
||||
'active' => 'Aktiv',
|
||||
'inactive' => 'Inaktiv',
|
||||
'all-channels' => 'Alle Kanäle',
|
||||
'all-locales' => 'Alle Lokalitäten',
|
||||
'all-customer-groups' => 'Alle Kundengruppen',
|
||||
'records-found' => 'Datensätze gefunden',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -53,5 +53,12 @@ return [
|
|||
'view' => 'View',
|
||||
'empty-field' => 'Please select the filter',
|
||||
'empty-value' => 'Please enter the value',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Editar',
|
||||
'delete' => 'Borrar',
|
||||
'view' => 'Ver',
|
||||
'active' => 'Activo',
|
||||
'inactive' => 'Inactivo',
|
||||
'all-channels' => 'Todos los canales',
|
||||
'all-locales' => 'Todas las localidades',
|
||||
'all-customer-groups' => 'Todos los grupos de clientes',
|
||||
'records-found' => 'Registro(s) encontrado(s)',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'ویرایش کنید',
|
||||
'delete' => 'حذف',
|
||||
'view' => 'چشم انداز',
|
||||
'active' => 'روشن کن',
|
||||
'inactive' => 'غیر فعال',
|
||||
'all-channels' => 'همه کانال ها',
|
||||
'all-locales' => 'همه افراد محلی',
|
||||
'all-customer-groups' => 'همه گروه های مشتری',
|
||||
'records-found' => 'رکورد(های) یافت شده',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Modifica',
|
||||
'delete' => 'Elimina',
|
||||
'view' => 'Vedi',
|
||||
'active' => 'accendere',
|
||||
'inactive' => 'non attivo',
|
||||
'all-channels' => 'Tutti i canali',
|
||||
'all-locales' => 'Tutti i locali',
|
||||
'all-customer-groups' => 'Tutti i gruppi di clienti',
|
||||
'records-found' => 'Record trovati',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Actief',
|
||||
'inactive' => 'Inactief',
|
||||
'all-channels' => 'Alle kanalen',
|
||||
'all-locales' => 'Alle locaties',
|
||||
'all-customer-groups' => 'Alle klantgroepen',
|
||||
'records-found' => 'Record(s) gevonden',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Usuń',
|
||||
'view' => 'Widok',
|
||||
'active' => 'Aktywny',
|
||||
'inactive' => 'Nieaktywny',
|
||||
'all-channels' => 'Wszystkie kanały',
|
||||
'all-locales' => 'Wszystkie lokalizacje',
|
||||
'all-customer-groups' => 'Wszystkie grupy klientów',
|
||||
'records-found' => 'Znaleziono rekord(y)',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Editar',
|
||||
'delete' => 'Excluir',
|
||||
'view' => 'Visão',
|
||||
'active' => 'Ativo',
|
||||
'inactive' => 'Inativo',
|
||||
'all-channels' => 'Todos os canais',
|
||||
'all-locales' => 'Todos os locais',
|
||||
'all-customer-groups' => 'Todos os grupos de clientes',
|
||||
'records-found' => 'Registro(s) encontrado(s)',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'view' => 'View',
|
||||
'active' => 'Active',
|
||||
'inactive' => 'Inactive',
|
||||
'all-channels' => 'All Channels',
|
||||
'all-locales' => 'All Locales',
|
||||
'all-customer-groups' => 'All Customer groups',
|
||||
'records-found' => 'Record(s) found',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => 'Düzenle',
|
||||
'delete' => 'Sil',
|
||||
'view' => 'Görüntüle',
|
||||
'active' => 'Aktif',
|
||||
'inactive' => 'etkin değil',
|
||||
'all-channels' => 'Tüm kanallar',
|
||||
'all-locales' => 'Tüm Yerel Ayarlar',
|
||||
'all-customer-groups' => 'Tüm Müşteri grupları',
|
||||
'records-found' => 'Kayıt(lar) bulundu',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -51,5 +51,12 @@ return [
|
|||
'edit' => '编辑',
|
||||
'delete' => '删除',
|
||||
'view' => '查看',
|
||||
'active' => '積極的',
|
||||
'inactive' => '不活躍',
|
||||
'all-channels' => '所有頻道',
|
||||
'all-locales' => '所有語言環境',
|
||||
'all-customer-groups' => '所有客戶組',
|
||||
'records-found' => '找到記錄',
|
||||
'clear-all' => 'Clear All'
|
||||
],
|
||||
];
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"/js/jquery-ez-plus.js": "/js/jquery-ez-plus.js?id=ba3c7cada62de152fd8fce211d0b1b70",
|
||||
"/js/velocity-core.js": "/js/velocity-core.js?id=73cc7c3501570ebe9151c72d954bd97d",
|
||||
"/js/velocity.js": "/js/velocity.js?id=f655ac65cbd1aa549cba57f77b9a4344",
|
||||
"/js/velocity.js": "/js/velocity.js?id=ddd0cb9f4f4d91fa429dc35e46e69aed",
|
||||
"/js/manifest.js": "/js/manifest.js?id=e069a8f952a02ea0f290bcca8fab930e",
|
||||
"/js/components.js": "/js/components.js?id=13ebf112e40292178d2386143e9d75cd",
|
||||
"/css/velocity.css": "/css/velocity.css?id=1dae4e9e1e8fd5ef9c66fe1a5aebb8ca",
|
||||
"/js/components.js": "/js/components.js?id=7dac540b23faac6e0b952390c4bdabe1",
|
||||
"/css/velocity.css": "/css/velocity.css?id=b2059676ca2d28429fa69d30ded53e80",
|
||||
"/css/velocity-admin.css": "/css/velocity-admin.css?id=b67a82956e53163b5e3ff45a44f9778f",
|
||||
"/images/icon-calendar.svg": "/images/icon-calendar.svg?id=870d0f733a58377422766f3152e15486",
|
||||
"/images/icon-camera.svg": "/images/icon-camera.svg?id=b2fd2f9e17e1ccee96e29f6c6cec91e8",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="outer-assets-container">
|
||||
<div class="video-container" v-if="currentType == 'video'">
|
||||
<div class="video-container" v-if="currentType == 'video' || currentType == 'videos'">
|
||||
<video :key="activeImageVideoURL" width="100%" controls>
|
||||
<source :src="activeImageVideoURL" type="video/mp4" />
|
||||
</video>
|
||||
|
|
|
|||
|
|
@ -217,6 +217,14 @@ label {
|
|||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.profile-small-icon {
|
||||
width: 20px;
|
||||
margin-right: 5px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.welcome-content {
|
||||
@extend .unselectable;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<div id="account">
|
||||
<div class="d-inline-block welcome-content dropdown-toggle">
|
||||
<i class="material-icons align-vertical-top">perm_identity</i>
|
||||
@if (auth()->guard('customer')->user() && auth()->guard('customer')->user()->image)
|
||||
<i class="align-vertical-top"><img class= "profile-small-icon" src="{{ auth('customer')->user()->image_url }}" alt="{{ auth('customer')->user()->first_name }}"/></i>
|
||||
@else
|
||||
<i class="material-icons align-vertical-top">perm_identity</i>
|
||||
@endif
|
||||
|
||||
<span class="text-center">
|
||||
{{ __('velocity::app.header.welcome-message', [
|
||||
|
|
|
|||
|
|
@ -219,8 +219,9 @@
|
|||
method="POST"
|
||||
id="product-form"
|
||||
@click="onSubmit($event)"
|
||||
action="{{ route('cart.add', $product->product_id) }}">
|
||||
|
||||
@submit.enter.prevent="onSubmit($event)"
|
||||
action="{{ route('cart.add', $product->product_id) }}"
|
||||
>
|
||||
<input type="hidden" name="is_buy_now" v-model="is_buy_now">
|
||||
|
||||
<slot v-if="slot"></slot>
|
||||
|
|
@ -228,7 +229,6 @@
|
|||
<div v-else>
|
||||
<div class="spritespin"></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
:class="`thumb-frame ${index + 1 == 4 ? '' : 'mr5'} ${thumb.large_image_url == currentLargeImageUrl ? 'active' : ''}`"
|
||||
>
|
||||
|
||||
<video v-if="thumb.type == 'video'" width="110" height="110" controls>
|
||||
<video v-if="thumb.type == 'video' || thumb.type == 'videos'" width="110" height="110" controls>
|
||||
<source :src="thumb.small_image_url" type="video/mp4">
|
||||
{{ __('admin::app.catalog.products.not-support-video') }}
|
||||
</video>
|
||||
|
|
|
|||
|
|
@ -40,23 +40,21 @@
|
|||
@endauth
|
||||
|
||||
@guest('customer')
|
||||
<form
|
||||
class="d-none"
|
||||
<form
|
||||
id="wishlist-{{ $product->product_id }}"
|
||||
action="{{ route('customer.wishlist.add', $product->product_id) }}"
|
||||
method="POST">
|
||||
@csrf
|
||||
|
||||
<a
|
||||
class="unset wishlist-icon {{ $addWishlistClass ?? '' }} text-right"
|
||||
href="javascript:void(0);"
|
||||
title="{{ __('velocity::app.shop.wishlist.add-wishlist-text') }}"
|
||||
onclick="document.getElementById('wishlist-{{ $product->product_id }}').submit();">
|
||||
|
||||
<wishlist-component active="false"></wishlist-component>
|
||||
</a>
|
||||
</form>
|
||||
|
||||
<a
|
||||
class="unset wishlist-icon {{ $addWishlistClass ?? '' }} text-right"
|
||||
href="javascript:void(0);"
|
||||
title="{{ __('velocity::app.shop.wishlist.add-wishlist-text') }}"
|
||||
onclick="document.getElementById('wishlist-{{ $product->product_id }}').submit();">
|
||||
|
||||
<wishlist-component active="false"></wishlist-component>
|
||||
|
||||
</a>
|
||||
@endauth
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.wishlist.after') !!}
|
||||
{!! view_render_event('bagisto.shop.products.wishlist.after') !!}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class AuthCest extends CustomerCest
|
|||
|
||||
$I->haveAllNecessaryHeaders();
|
||||
|
||||
$I->sendPost($this->getVersionRoute('customer/login'), [
|
||||
$I->sendPost($this->getVersionRoute('customer/login?accept_token=true'), [
|
||||
'email' => $customer->email,
|
||||
'password' => json_decode($customer->notes)->plain_password,
|
||||
'device_name' => $I->fake()->company,
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ class CheckoutCest extends CustomerCest
|
|||
|
||||
private function saveShippingMethod(ApiTester $I)
|
||||
{
|
||||
$I->haveHttpHeader('X-CSRF-TOKEN', csrf_token());
|
||||
|
||||
$I->sendPost($this->getVersionRoute('customer/checkout/save-shipping'), [
|
||||
'shipping_method' => 'flatrate_flatrate',
|
||||
]);
|
||||
|
|
@ -76,8 +74,6 @@ class CheckoutCest extends CustomerCest
|
|||
|
||||
private function savePaymentMethod(ApiTester $I)
|
||||
{
|
||||
$I->haveHttpHeader('X-CSRF-TOKEN', csrf_token());
|
||||
|
||||
$I->sendPost($this->getVersionRoute('customer/checkout/save-payment'), [
|
||||
'payment' => [
|
||||
'method' => 'cashondelivery',
|
||||
|
|
@ -89,8 +85,6 @@ class CheckoutCest extends CustomerCest
|
|||
|
||||
private function saveOrder(ApiTester $I)
|
||||
{
|
||||
$I->haveHttpHeader('X-CSRF-TOKEN', csrf_token());
|
||||
|
||||
$I->sendPost($this->getVersionRoute('customer/checkout/save-order'));
|
||||
|
||||
$I->seeAllNecessarySuccessResponse();
|
||||
|
|
|
|||
Loading…
Reference in New Issue