Merge pull request #1454 from prashant-webkul/development

Cart rule Actions class method getEligibleItems had an boolean expression which wasn't working as intended.
This commit is contained in:
Jitendra Singh 2019-09-13 12:53:01 +05:30 committed by GitHub
commit 1c8810e40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 4 deletions

View File

@ -10,4 +10,6 @@ This repository is only for reporting bugs or issues. If you need support, pleas
2. Create support ticket on https://bagisto.uvdesk.com
3. Visit forums to get support from our community (https://forms.bagisto.com)
Thanks!

View File

@ -31,6 +31,7 @@ return [
'channel-based' => 'Channel based',
'status' => 'Status',
'select-option' => 'Select option',
'category' => 'Category',
'common' => [
'no-result-found' => 'We could not find any records.',

View File

@ -20,7 +20,7 @@
<div class="page-action">
<button type="submit" class="btn btn-lg btn-primary">
{{ __('admin::app.save') }} {{ __('admin::app.attribute') }}
{{ __('admin::app.save') }} {{ __('admin::app.category') }}
</button>
</div>
</div>

View File

@ -26,7 +26,7 @@ abstract class Action
foreach ($items as $item) {
foreach ($matchingIDs as $matchingID) {
if ($matchingID == $item->child ? $item->child->product_id : $item->product_id) {
if ($matchingID == ($item->child ? $item->child->product_id : $item->product_id)) {
$matchedItems->push($item);
}
}

View File

@ -23,7 +23,7 @@ class FixedAmount extends Action
foreach ($matchIDs as $matchID) {
foreach ($eligibleItems as $item) {
if ($item->child ? $item->child->product_id : $item->product_id == $matchID) {
if (($item->child ? $item->child->product_id : $item->product_id) == $matchID) {
return true;
}
}

View File

@ -30,7 +30,7 @@ class PercentOfProduct extends Action
foreach ($matchIDs as $matchID) {
foreach ($eligibleItems as $item) {
if ($item->child ? $item->child->product_id : $item->product_id == $matchID) {
if (($item->child ? $item->child->product_id : $item->product_id) == $matchID) {
return true;
}
}