Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and add new functionality #74

Merged
merged 3 commits into from
Sep 12, 2024
Merged

Conversation

Hlavtox
Copy link
Contributor

@Hlavtox Hlavtox commented Sep 6, 2024

Questions Answers
Description? I need to implement some new functionality into a fork of this module, so I first went and put the common things into the native one. See below
Type? refacto
BC breaks? yes
Deprecations? no
Fixed ticket?
How to test? Try all settings of this module and see that it works fine.

Changes

  • Bumped compatibility to 1.7.7
  • Deleted old unused files and templates
  • Made the code to get current category more readable
  • Removed the usage of old mechanism that stores the category in a cookie. We have a reliable info from Product and Category controllers.
  • Added functionality to mark the path to the current category so we can implement a "opened category tree", if the template supports it. There is a in_path boolean in every category.
  • Handled a case when the parent category could be disabled or inaccessible for current customer groups.

What it enables to do

So now with just a few template modifications, throwing {if $node.in_path} here and there, you can render the category tree opened.

Snímek obrazovky 2024-09-06 130334

ps_categorytree.php Outdated Show resolved Hide resolved
ps_categorytree.php Outdated Show resolved Hide resolved
@Hlavtox
Copy link
Contributor Author

Hlavtox commented Sep 6, 2024

@kpodemski Ready to go :-)

Copy link
Contributor

@kpodemski kpodemski left a comment

Choose a reason for hiding this comment

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

I like this :)

@ps-jarvis ps-jarvis added the waiting for QA Status: Waiting for QA feedback label Sep 6, 2024
Copy link

@ShaiMagal ShaiMagal left a comment

Choose a reason for hiding this comment

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

WH

@florine2623 florine2623 self-assigned this Sep 10, 2024
Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

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

Hello @Hlavtox ,

I see that the version has changed to v3.0.0. But I don't see the bump.
Screenshot 2024-09-12 at 10 58 28

In my BO, I still have v2.0.3.
Screenshot 2024-09-12 at 10 59 19

Could you take a look please ?
Thanks :)

@Hlavtox
Copy link
Contributor Author

Hlavtox commented Sep 12, 2024

@florine2623 Try two things

  • Uninstall Distribution API client
  • Clear cache in performance section

Go back and you should see 3.0.0 :-)

Copy link
Contributor

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

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

Hello @Hlavtox ,

Thanks for the PR !

Tested the following :

  • bump to v3.0.0
  • tested all settings options, checked on FO the result

LGTM ✅

@florine2623 florine2623 added QA ✔️ and removed waiting for QA Status: Waiting for QA feedback labels Sep 12, 2024
@nicosomb nicosomb merged commit 1171475 into PrestaShop:dev Sep 12, 2024
7 checks passed
@Hlavtox Hlavtox mentioned this pull request Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants