Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Sep 8, 2025

Summary

  • refactor lookbook block configuration for single image and product markers
  • add AJAX controller to render presented product in Bootstrap modal
  • display interactive markers on lookbook image and load product via modal

Testing

  • php -l models/EverblockPrettyBlocks.php
  • php -l everblock.php
  • php -l controllers/front/lookbook.php
  • php -l config/allowed_files.php
  • composer validate --no-check-all

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

@CySSoO CySSoO merged commit 6a6e470 into master Sep 8, 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.

$token = Tools::getValue('token');
if (!$token || $token !== Tools::getToken()) {
die();

[P1] Accept the same token that the template sends

The JS markers call {$link->getModuleLink('everblock', 'lookbook', ['token' => $static_token])} (lines 62‑73 of prettyblock_lookbook.tpl), so the request carries the front office static_token generated with Tools::getToken(false). The controller then rejects the request unless Tools::getToken() matches that value (lines 30‑32). Tools::getToken() and Tools::getToken(false) are different in PrestaShop, so for anonymous shoppers the token comparison always fails and the controller immediately die()s, resulting in an empty modal for every click. The controller should validate against the same token that the template embeds (e.g. Tools::getToken(false) or passing token instead of static_token).


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".

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