@@ -121,9 +121,7 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds =
121
121
foreach ($ batchSelectIterator as $ select ) {
122
122
$ productIds = null ;
123
123
foreach ($ connection ->query ($ select )->fetchAll () as $ row ) {
124
- if ($ row ['product_id ' ] &&
125
- $ this ->isWithinDynamicPriceBundle ($ priceTable ->getTableName (), (int ) $ row ['product_id ' ])
126
- ) {
124
+ if ($ row ['product_id ' ]) {
127
125
$ productIds [] = (int ) $ row ['product_id ' ];
128
126
}
129
127
}
@@ -133,33 +131,4 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds =
133
131
}
134
132
}
135
133
}
136
-
137
- /**
138
- * Check if the product is part of a dynamic price bundle configuration
139
- *
140
- * @param string $priceTableName
141
- * @param int $productId
142
- * @return bool
143
- */
144
- private function isWithinDynamicPriceBundle (string $ priceTableName , int $ productId ): bool
145
- {
146
- $ connection = $ this ->resourceConnection ->getConnection ($ this ->connectionName );
147
- $ select = $ connection ->select ();
148
- $ select ->from (['selection ' => 'catalog_product_bundle_selection ' ], 'selection_id ' );
149
- $ select ->joinInner (
150
- ['entity ' => 'catalog_product_entity ' ],
151
- implode (' AND ' , ['selection.parent_product_id = entity.entity_id ' ]),
152
- null
153
- );
154
- $ select ->joinInner (
155
- ['price ' => $ priceTableName ],
156
- implode (' AND ' , ['price.entity_id = selection.product_id ' ]),
157
- null
158
- );
159
- $ select ->where ('selection.product_id = ? ' , $ productId );
160
- $ select ->where ('entity.type_id = ? ' , \Magento \Catalog \Model \Product \Type::TYPE_BUNDLE );
161
- $ select ->where ('price.tax_class_id = ? ' , \Magento \Bundle \Model \Product \Price::PRICE_TYPE_DYNAMIC );
162
-
163
- return (int ) $ connection ->fetchOne ($ select ) != 0 ;
164
- }
165
134
}
0 commit comments