You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A possible solution is to find the looks that have one or more of the products that are also in the cart. This way you have a set of 'candidate' looks that you can iterate through afterwards.
The text was updated successfully, but these errors were encountered:
SELECT l.*FROM setono_sylius_shop_the_look__look l
JOIN setono_sylius_shop_the_look__look_part p ON (l.id=p.look_id)
JOIN setono_sylius_shop_the_look__look_part_products pp ON (p.id=pp.look_part_id)
WHEREpp.product_idIN (:product_ids)
ANDl.is_enabled=1
In this case the variable :product_ids should contain the product ids in the cart.
On this line: https://github.com/Setono/SyliusShopTheLookPlugin/blob/master/src/OrderProcessor/LookDiscountOrderProcessor.php#L46, all the looks are fetched on each processing of the order. If a shop has thousands of looks this will slow down the order processor.
A possible solution is to find the looks that have one or more of the products that are also in the cart. This way you have a set of 'candidate' looks that you can iterate through afterwards.
The text was updated successfully, but these errors were encountered: