@@ -121,7 +121,9 @@ 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 ' ] && $ this ->isWithinDynamicPriceBundle ($ priceTable ->getTableName (), (int ) $ row ['product_id ' ])) {
124
+ if ($ row ['product_id ' ] &&
125
+ $ this ->isWithinDynamicPriceBundle ($ priceTable ->getTableName (), (int ) $ row ['product_id ' ])
126
+ ) {
125
127
$ productIds [] = (int ) $ row ['product_id ' ];
126
128
}
127
129
}
@@ -144,12 +146,16 @@ private function isWithinDynamicPriceBundle(string $priceTableName, int $product
144
146
$ connection = $ this ->resourceConnection ->getConnection ($ this ->connectionName );
145
147
$ select = $ connection ->select ();
146
148
$ select ->from (['selection ' => 'catalog_product_bundle_selection ' ], 'selection_id ' );
147
- $ select ->joinInner (['entity ' => 'catalog_product_entity ' ], implode (' AND ' , ['selection.parent_product_id = entity.entity_id ' ]), null );
148
- $ select ->joinInner (['price ' => $ priceTableName ], implode (' AND ' , ['price.entity_id = selection.product_id ' ]), null );
149
+ $ select ->joinInner (['entity ' => 'catalog_product_entity ' ],
150
+ implode (' AND ' , ['selection.parent_product_id = entity.entity_id ' ]), null
151
+ );
152
+ $ select ->joinInner (['price ' => $ priceTableName ],
153
+ implode (' AND ' , ['price.entity_id = selection.product_id ' ]), null
154
+ );
149
155
$ select ->where ('selection.product_id = ? ' , $ productId );
150
156
$ select ->where ('entity.type_id = ? ' , \Magento \Catalog \Model \Product \Type::TYPE_BUNDLE );
151
157
$ select ->where ('price.tax_class_id = ? ' , \Magento \Bundle \Model \Product \Price::PRICE_TYPE_DYNAMIC );
152
158
153
- return intval ( $ connection ->fetchOne ($ select) ) != 0 ;
159
+ return ( int ) $ connection ->fetchOne ($ select ) != 0 ;
154
160
}
155
161
}
0 commit comments