Steps to Reproduce
Cause
$refresh = true in getProductsWithSeparatedGifts()
Thanks for opening this issue! We will help you to keep its state consistent
Ping @PrestaShop/prestashop-core-developers
馃啓
Hello @Hlavtox, thank you for the issue, I just tried to reproduce it, but I didn't manage, here's what I did:
1/ In BO, I created a cart rule with a free gift
2/ In FO, I added one product in my cart, meeting the conditions for the free gift
3/ In FO, cart page, I see that the free gift is correctly added, and when I call $this->context->cart->getProductsWithSeparatedGifts(), I see that the product I added to the cart has is_gift set to false, and the product added as a free gift has is_gift set to true, which is the normal behavior.
Maybe this bug manifests itself in more specific conditions?
I close this issue until a clearly reproducible scenario is defined.
@matthieu-rolland @matks @Progi1984 @jf-viguier
BTW @matthieu-rolland, how it can work for you when the logic that sets this flag is disabled by a condition that is not met?
@Hlavtox I'm not familiar with this feature, but it just does work when I debug in the backend, whether it is in the cart, or on the product page, without doing anything special. Am I missing something obvious? I'm reopening the issue, I'll take the time to debug this.
Meanwhile, could you tell me where exactly do you call $this->context->cart->getProductsWithSeparatedGifts() from ?

@Hlavtox it seems like your 1.7.7 is not up to date, your second capture does not match the code of this method on 1.7.7:
@matthieu-rolland I will confirm with the latest code and let you know. But if its fixed - good!
yeah, right
@matthieu-rolland @matks Fixed in current 1.7.7 code! You were right. 馃殌