getEligble items in action fixed as its was not working as boolean expression
This commit is contained in:
parent
d02c903470
commit
685aedf528
|
|
@ -26,7 +26,7 @@ abstract class Action
|
||||||
|
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
foreach ($matchingIDs as $matchingID) {
|
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);
|
$matchedItems->push($item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class FixedAmount extends Action
|
||||||
|
|
||||||
foreach ($matchIDs as $matchID) {
|
foreach ($matchIDs as $matchID) {
|
||||||
foreach ($eligibleItems as $item) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class PercentOfProduct extends Action
|
||||||
|
|
||||||
foreach ($matchIDs as $matchID) {
|
foreach ($matchIDs as $matchID) {
|
||||||
foreach ($eligibleItems as $item) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue