Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Sep 15, 2025

Summary

  • consolidate holiday opening and closing fields into single EVERBLOCK_HOLIDAY_HOURS_*
  • read unified field in getStoreHolidayHoursConfig
  • trim holiday slot patterns when building store locator data
  • document that opening and holiday hours accept complex patterns

Testing

  • php -l everblock.php
  • php -l models/EverblockTools.php
  • vendor/bin/phpstan analyse everblock.php models/EverblockTools.php (fails: vendor/bin/phpstan: No such file or directory)
  • composer global require phpstan/phpstan (fails: curl error 56 while downloading https://repo.packagist.org/packages.json: CONNECT tunnel failed, response 403)

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

@CySSoO CySSoO merged commit 6c92e8b into master Sep 15, 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 suggestions.

Reply with @codex fix comments to fix any unresolved comments.

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, or 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 fix this CI failure" or "@codex address that feedback".

Comment on lines 3302 to +3308
$result = [];
$holidays = self::getFrenchHolidays((int) date('Y'));
foreach ($holidays as $date) {
$openKey = 'EVERBLOCK_OPEN_' . (int) $storeId . '_' . $date;
$closeKey = 'EVERBLOCK_CLOSE_' . (int) $storeId . '_' . $date;
$open = Configuration::get($openKey);
$close = Configuration::get($closeKey);
if ($open && $close) {
$result[$date] = trim($open) . ' - ' . trim($close);
$hoursKey = 'EVERBLOCK_HOLIDAY_HOURS_' . (int) $storeId . '_' . $date;
$hours = Configuration::get($hoursKey);
if ($hours) {
$result[$date] = trim($hours);

Choose a reason for hiding this comment

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

[P1] Migrate existing holiday hour configuration

The new implementation only reads and saves EVERBLOCK_HOLIDAY_HOURS_* entries and no longer looks at the previous EVERBLOCK_OPEN_* and EVERBLOCK_CLOSE_* configuration keys. Shops that already configured holiday opening and closing times will now have empty fields in the back office and the store locator will treat every holiday as closed until an administrator re-enters the data. Consider migrating the old OPEN_/CLOSE_ values into the new combined field or providing a fallback so existing stores keep their configured holiday hours.

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