File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
app/code/Magento/SalesRule/Model/Rule/Condition Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
6
7
7
8
namespace Magento \SalesRule \Model \Rule \Condition ;
8
9
@@ -22,7 +23,7 @@ class Product extends \Magento\Rule\Model\Condition\Product\AbstractProduct
22
23
protected function _addSpecialAttributes (array &$ attributes )
23
24
{
24
25
parent ::_addSpecialAttributes ($ attributes );
25
- $ attributes ['quote_item_qty ' ] = __ ('Quantity in cart ' );
26
+ $ attributes ['parent:: quote_item_qty ' ] = __ ('Quantity in cart ' );
26
27
$ attributes ['quote_item_price ' ] = __ ('Price in cart ' );
27
28
$ attributes ['quote_item_row_total ' ] = __ ('Row total in cart ' );
28
29
Original file line number Diff line number Diff line change 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \SalesRule \Model \Rule \Condition \Product ;
7
9
8
10
use Magento \Catalog \Model \ResourceModel \Product \Collection ;
@@ -45,7 +47,7 @@ public function getNewChildSelectOptions()
45
47
$ pAttributes = [];
46
48
$ iAttributes = [];
47
49
foreach ($ productAttributes as $ code => $ label ) {
48
- if (strpos ($ code , 'quote_item_ ' ) === 0 ) {
50
+ if (strpos ($ code , 'quote_item_ ' ) === 0 || strpos ( $ code , ' parent::quote_item_ ' ) === 0 ) {
49
51
$ iAttributes [] = [
50
52
'value ' => \Magento \SalesRule \Model \Rule \Condition \Product::class . '| ' . $ code ,
51
53
'label ' => $ label ,
You can’t perform that action at this time.
0 commit comments