Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Oct 29, 2025

Summary

  • remove the unused promotion end date lookup based on cart rules
  • derive flash deal end dates from the price drop payload
  • keep only products with a resolved end date when presenting flash deals

Testing

  • php -l everblock.php

https://chatgpt.com/codex/tasks/task_e_69022faaf0e08322bc9a5a572800c657

@CySSoO CySSoO merged commit d2dc403 into master Oct 29, 2025
0 of 6 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 5164 to 5166
private function getPricesDropProducts(int $requestedProductCount, string $sortBy, string $sortDirection): array
{
$products = Product::getPricesDrop(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard against varying Product::getPricesDrop signatures

The new implementation unconditionally invokes Product::getPricesDrop with nine parameters including the Context instance. Earlier code used reflection to adapt to the different method signatures that PrestaShop exposes across releases (some versions have no context parameter or expect it in a later position). Without that check, shops running those versions will hit a fatal ArgumentCountError as soon as the flash deals hook executes. Consider restoring the signature detection or providing a safe fallback so the module remains compatible with older cores.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants