Merge remote-tracking branch 'upstream/master'

This commit is contained in:
devansh bawari 2021-02-22 20:26:58 +05:30
commit 231c1a95a0
15 changed files with 242 additions and 132 deletions

View File

@ -1,6 +1,24 @@
# CHANGELOG for v1.x.x
#### This changelog consists the bug & security fixes and new features being included in the releases listed below.
This changelog consists of the bug & security fixes and new features being included in the releases listed below.
## **v1.3.1 (22nd of February 2021)** - *Release*
* #4659 [fixed] - Only show defaults option in Shipping.
* #4654 [fixed] - Composer error with `khaled.alshamaa/ar-php` version.
* #4647 [fixed] - APP_VERSION returns the wrong version number.
* #4645 [fixed] - `/api/products` returns trying to get property 'product' of non-object.
* #4643 [fixed] - Getting exception when admin change the status of subscribed user to false.
* #4641 [fixed] - Getting data in client id "sb" by default.
* #4633 [fixed] - Incorrect validation message at admin end.
* #4344 [fixed] - Attribute option positioning not working (Front-end).
## **v1.3.0 (16th of February 2021)** - *Release*
@ -50,75 +68,63 @@
* [enhancement] - Add product number.
* #3886 [fixed] - Cart item not bound to the account when login with social login.
* #4620 [fixed] - value is not saved in fallback locale in configuration section.
* #3785 [fixed] - Product filter is not working according to channel filter.
* #4597 [fixed] - Add a product to Wishlist twice issue.
* #3879 [fixed] - Getting exception on uploading high size image in Invoice Slip Design logo.
* #4596 [fixed] - Unable to view order at customer end.
* #3954 [fixed] - Featured New Product Adding Special Price the 2 columns in mobile version is broke.
* #4590 [fixed] - getting exception on cart when remove minimum amount from backend.
* #3964 [fixed] - pay with paypal smart button is missing in checkout.
* #4583 [fixed] - inactive template are sending in newsletter mail to subscribed users.
* #3940 [fixed] - bagisto:install defines APP_URL to localhost by default.
* #4577 [fixed] - error on minicart while adding configurable item.
* #3957 [fixed] - Configurable product parent image is visible in cart instead of variant image.
* #4573 [fixed] - out of stock items are visible on category & search page when configuration is disabled.
* #3981 [fixed] - No validation message on creating addresses without required params.
* #3572 [fixed] - No info about other discounts in case there is multiple group pricing exist in same product.
* #4030 [fixed] - featured or new label should not visible if product is not exist in default theme.
* #4571 [fixed] - video is not showing for variant product in product page.
* #4061 [fixed] - variant image is not visible when item added in wishlist.
* #4567 [fixed] - configurable product variant attribute options are not visible in layered navigation.
* #4024 [fixed] - customer group price discount is not applied when product price and discount amount is same.
* #4566 [fixed] - wrong attribute are visible on layered navigation.
* #4062 [fixed] - search icon in velocity theme is not clickable.
* #4506 [fixed] - customer group pricing fixed discount should accept decimal values.
* #4085 [fixed] - Not able to fetch invoice by API.
* #4498 [fixed] - able to delete root category which is selected in channel.
* #4094 [fixed] - filter is not working properly in case product name contains any special character.
* #4495 [fixed] - Only load the locales that are enabled on the channel.
* #4130 [fixed] - event ticket price field accepts negative values.
* #4486 [fixed] - getting exception when copy cart rule.
* #4117 [fixed] - error in booking product while booking a slot.
* #4481 [fixed] - Shipping costs are not calculated with grand total.
* #4124 [fixed] - Client Side validation issue in Special Price for ticket booking Product.
* #4459 [fixed] - disabled option should not accessible from routes in frontend.
* #4191 [fixed] - back date should be disabled in booking products.
* #4456 [fixed] - getting exception when filter category, attribute, customer datagrid based on status.
* #4105 [fixed] - Issue with total due in cash on delivery.
* #4457 [fixed] - cart rule status always set as draft.
* #3975 [fixed] - Filter is not working properly for status column in case product has not been name and other required details.
* #4452 [fixed] - products are not visible on homepage if filter based on ar locale.
* #4212 [fixed] - Error uninstall developer dependencies going into production mode.
* #4447 [fixed] - Product URl key not accepting value for Chinese, Japnese, Arabic locale.
* #4234 [fixed] - default values are not working in system configuration.
* #4440 [fixed] - getting exception when allow user role with marketing permission.
* #4228 [fixed] - add a validation if user trying to upload greater size image in image search.
* #4435 [fixed] - customer group condition doesn't match while sending newsletter email.
* #3807 [fixed] - Can't locate path for migrations in bagisto/packages.
* #4434 [fixed] - missing date picker option in event filter #4434.
* #4248 [fixed] - PayPay scripts are being loaded even if inactive.
* #4433 [fixed] - getting exception when filter campaigns/email templates based on status.
* #4277 [fixed] - subtotal is not updating when remove product from the minicart.
* #4432 [fixed] - subscribed checkbox should be mark if customer is already subscribed.
* #4287 [fixed] - Product locale not correctly selected since admin language select.
* #4428 [fixed] - user roles permission option always save when trying to uncheck selected option.
* #4119 [fixed] - Admin should not be able to create multiple cart rule using same coupon code.
* #4425 [fixed] - saved billing address details are not showing on onepage checkout.
* #4299 [fixed] - sort by newest first or oldest first doesn't work in category.
* #3932 [fixed] - When copying a product, replicating the image causes it to be volatile.
* #4335 [fixed] - Image search disable functionality is not working.
* #4325 [fixed] - address is not saving on onepage checkout.
* #4394 [fixed] - maintenance mode status is not working in channel section.
* #4372 [fixed] - The brand attribute should be deletable.
* #4393 [fixed] - composer test in windows.
* #4420 [fixed] - Invoice PDF breaking.
* #4413 [fixed] - getting error when setup fresh bagisto from master.
@ -126,79 +132,89 @@
* #4401 [fixed] - composer install --no-dev , gives error.
* #4192 [fixed] - db connection failed at first time when setup using bagisto:install.
* #4425 [fixed] - saved billing address details are not showing on onepage checkout.
* #4434 [fixed] - missing date picker option in event filter #4434.
* #3374 [fixed] - Social Login Error.
* #4440 [fixed] - getting exception when allow user role with marketing permission.
* #3002 [fixed] - Buggggggg iOS Safari images are stretched.
* #4456 [fixed] - getting exception when filter category, attribute, customer datagrid based on status.
* #4433 [fixed] - getting exception when filter campaigns/email templates based on status.
* #4452 [fixed] - products are not visible on homepage if filter based on ar locale.
* #4457 [fixed] - cart rule status always set as draft.
* #4428 [fixed] - user roles permission option always save when trying to uncheck selected option.
* #4399 [fixed] - Role-based security issue - User with no permission has acces to some admin pages/controls.
* #4392 [fixed] - Multiple cart rule is getting applied in case condition matches on applying only one coupon.
* #4459 [fixed] - disabled option should not accessible from routes in frontend.
* #4386 [fixed] - Slow Category Query.
* #4447 [fixed] - Product URl key not accepting value for Chinese, Japnese, Arabic locale.
* #4481 [fixed] - Shipping costs are not calculated with grand total.
* #4399 [fixed] - Role-based security issue - User with no permission has acces to some admin pages/controls.
* #4372 [fixed] - The brand attribute should be deletable.
* #4369 [fixed] - Product filter [Shop By].
* #4486 [fixed] - getting exception when copy cart rule.
* #4335 [fixed] - Image search disable functionality is not working.
* #4386 [fixed] - Slow Category Query.
* #4325 [fixed] - address is not saving on onepage checkout.
* #4432 [fixed] - subscribed checkbox should be mark if customer is already subscribed.
* #4299 [fixed] - sort by newest first or oldest first doesn't work in category.
* #4435 [fixed] - customer group condition doesn't match while sending newsletter email.
* #4287 [fixed] - Product locale not correctly selected since admin language select.
* #4506 [fixed] - customer group pricing fixed discount should accept decimal values.
* #4277 [fixed] - subtotal is not updating when remove product from the minicart.
* #4498 [fixed] - able to delete root category which is selected in channel.
* #4248 [fixed] - PayPay scripts are being loaded even if inactive.
* #4420 [fixed] - Invoice PDF breaking.
* #4234 [fixed] - default values are not working in system configuration.
* #4228 [fixed] - add a validation if user trying to upload greater size image in image search.
* #4212 [fixed] - Error uninstall developer dependencies going into production mode.
* #4192 [fixed] - db connection failed at first time when setup using bagisto:install.
* #4191 [fixed] - back date should be disabled in booking products.
* #4130 [fixed] - event ticket price field accepts negative values.
* #4124 [fixed] - Client Side validation issue in Special Price for ticket booking Product.
* #4119 [fixed] - Admin should not be able to create multiple cart rule using same coupon code.
* #4117 [fixed] - error in booking product while booking a slot.
* #4105 [fixed] - Issue with total due in cash on delivery.
* #4094 [fixed] - filter is not working properly in case product name contains any special character.
* #4085 [fixed] - Not able to fetch invoice by API.
* #4062 [fixed] - search icon in velocity theme is not clickable.
* #4061 [fixed] - variant image is not visible when item added in wishlist.
* #4030 [fixed] - featured or new label should not visible if product is not exist in default theme.
* #4024 [fixed] - customer group price discount is not applied when product price and discount amount is same.
* #3981 [fixed] - No validation message on creating addresses without required params.
* #3975 [fixed] - Filter is not working properly for status column in case product has not been name and other required details.
* #3964 [fixed] - pay with paypal smart button is missing in checkout.
* #3957 [fixed] - Configurable product parent image is visible in cart instead of variant image.
* #3954 [fixed] - Featured New Product Adding Special Price the 2 columns in mobile version is broke.
* #3940 [fixed] - bagisto:install defines APP_URL to localhost by default.
* #3932 [fixed] - When copying a product, replicating the image causes it to be volatile.
* #3886 [fixed] - Cart item not bound to the account when login with social login.
* #3879 [fixed] - Getting exception on uploading high size image in Invoice Slip Design logo.
* #3807 [fixed] - Can't locate path for migrations in bagisto/packages.
* #3785 [fixed] - Product filter is not working according to channel filter.
* #3638 [fixed] - Promotion, combine "percentage" & "fixed amount to whole cart" cart rules get wrong disco * unt amount.
* #3572 [fixed] - No info about other discounts in case there is multiple group pricing exist in same product.
* #4394 [fixed] - maintenance mode status is not working in channel section.
* #4577 [fixed] - error on minicart while adding configurable item.
* #4393 [fixed] - composer test in windows.
* #4571 [fixed] - video is not showing for variant product in product page.
* #4566 [fixed] - wrong attribute are visible on layered navigation.
* #4567 [fixed] - configurable product variant attribute options are not visible in layered navigation.
* #4590 [fixed] - getting exception on cart when remove minimum amount from backend.
* #4583 [fixed] - inactive template are sending in newsletter mail to subscribed users.
* #4596 [fixed] - Unable to view order at customer end.
* #4495 [fixed] - Only load the locales that are enabled on the channel.
* #4597 [fixed] - Add a product to Wishlist twice issue.
* #4620 [fixed] - value is not saved in fallback locale in configuration section.
* #4573 [fixed] - out of stock items are visible on category & search page when configuration is disabled.
* #3374 [fixed] - Social Login Error.
## **v1.2.0 (8th of September 2020)** - *Release*
@ -274,7 +290,7 @@
* #3900 [fixed] - layout issue on cart page in ar (Default theme)
* #3002 [fixed] - Buggggggg iOS Safari images are stretched.
## **v1.2.0-BETA1 (18th of August 2020)** - *Release*
@ -938,16 +954,12 @@
* #3767 [fixed] - Header-nav on mobile view seem buggy on search item
## **v1.1.2 (24th of March 2020)** - *Release*
## **v1.1.2 (28th of April 2020)** - *Release*
* [feature] - Now customer can cancel order.
* [feature] - Auto and manual currency exchange rates update feature added.
* #797 [fixed] - Add new module
* #2453 [fixed] - Velocity theme is not loading on fresh instance
@ -1006,8 +1018,7 @@
* #2954 [fixed] - The merging cart function does not work when already added all items of product into customer cart
## **v1.1.0 (24th of March 2020)** - *Release*
## **v1.1.1 (14th of April 2020)** - *Release*
* #797 [fixed] - Add new module
@ -1139,10 +1150,6 @@
* #2876 [fixed] - Place order is disable at checkout when select shipping address
## **v1.1.0 (24th of March 2020)** - *Release*
* [feature] Added new booking type product.
@ -1335,7 +1342,6 @@
* #2732 [fixed] - missing product's quick view in category page
## **v1.0.0 (24th of February 2020)** - *Release*
* #2377 [fixed] - Getting exception on creating a new category under any other category.
@ -1676,4 +1682,4 @@
* #2366 [fixed] - Not able to add logo for category, after saving the category logo gets removed.
* #2371 [fixed] - Getting exception on updating Category.
* #2371 [fixed] - Getting exception on updating Category.

View File

@ -61,7 +61,7 @@ class SmartButtonController extends Controller
try {
return response()->json($this->smartButton->createOrder($this->buildRequestBody()));
} catch (\Exception $e) {
throw $e;
return response()->json(json_decode($e->getMessage()), 400);
}
}
@ -76,7 +76,7 @@ class SmartButtonController extends Controller
$this->smartButton->captureOrder(request()->input('orderData.orderID'));
return $this->saveOrder();
} catch (\Exception $e) {
throw $e;
return response()->json(json_decode($e->getMessage()), 400);
}
}

View File

@ -15,6 +15,8 @@ class PaypalServiceProvider extends ServiceProvider
{
include __DIR__ . '/../Http/routes.php';
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'paypal');
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'paypal');
$this->app->register(EventServiceProvider::class);
@ -29,7 +31,7 @@ class PaypalServiceProvider extends ServiceProvider
{
$this->registerConfig();
}
/**
* Register package config.
*

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -0,0 +1,9 @@
<?php
return [
'error' => [
'universal-error' => 'Something went wrong!',
'sdk-validation-error' => 'Client ID not recognized for either production or sandbox!',
'authorization-error' => 'Client ID and Client Secret should be valid!'
]
];

View File

@ -14,8 +14,14 @@
</style>
<script>
let messages = {
universalError: "{{ __('paypal::app.error.universal-error') }}",
sdkValidationError: "{{ __('paypal::app.error.sdk-validation-error') }}",
authorizationError: "{{ __('paypal::app.error.authorization-error') }}"
};
window.onload = (function() {
eventBus.$on('after-payment-method-selected', function(payment) {
eventBus.$on('after-payment-method-selected', function (payment) {
if (payment.method != 'paypal_smart_button') {
$('.paypal-buttons').remove();
@ -23,11 +29,7 @@
}
if (typeof paypal == 'undefined') {
window.flashMessages = [{'type': 'alert-error', 'message': "SDK Validation error: 'client-id not recognized for either production or sandbox: {{core()->getConfigData('sales.paymentmethods.paypal_smart_button.client_id')}}'" }];
window.flashMessages.alertMessage = "SDK Validation error: 'client-id not recognized for either production or sandbox: {{core()->getConfigData('sales.paymentmethods.paypal_smart_button.client_id')}}'";
app.addFlashMessages();
options.alertBox(messages.sdkValidationError);
return;
}
@ -38,8 +40,16 @@
shape: 'rect',
},
authorizationFailed: false,
enableStandardCardFields: false,
alertBox: function (message) {
window.flashMessages = [{'type': 'alert-error', 'message': message }];
window.flashMessages.alertMessage = message;
app.addFlashMessages();
},
createOrder: function(data, actions) {
return window.axios.get("{{ route('paypal.smart-button.create-order') }}")
.then(function(response) {
@ -48,7 +58,14 @@
.then(function(orderData) {
return orderData.id;
})
.catch(function (error) {})
.catch(function (error) {
if (error.response.data.error === 'invalid_client') {
options.authorizationFailed = true;
options.alertBox(messages.authorizationError);
}
return error;
});
},
onApprove: function(data, actions) {
@ -74,16 +91,10 @@
})
},
onCancel: function (data) {
console.log('Canceled payment...');
},
onError: function (err) {
window.flashMessages = [{'type': 'alert-error', 'message': err }];
window.flashMessages.alertMessage = err;
app.addFlashMessages();
onError: function (error) {
if (! options.authorizationFailed) {
options.alertBox(error);
}
}
};

View File

@ -130,7 +130,8 @@ class ProductFlatRepository extends Repository
$allFilterableAttributes = array_filter(array_unique(array_intersect($categoryFilterableAttributes, $productCategoryArrributes['attributes'])));
$attributes = app('Webkul\Attribute\Repositories\AttributeRepository')->getModel()::with(['options' => function($query) use ($productCategoryArrributes) {
return $query->whereIn('id', $productCategoryArrributes['attributeOptions']);
return $query->whereIn('id', $productCategoryArrributes['attributeOptions'])
->orderBy('sort_order');
}
])->whereIn('id', $allFilterableAttributes)->get();