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:
commit
1c8810e40d
|
|
@ -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!
|
||||
|
|
@ -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.',
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue