Skip to content

Add category update-position endpoint#331

Closed
PrestaEdit wants to merge 1 commit into
PrestaShop:devfrom
PrestaEdit:add-category-position
Closed

Add category update-position endpoint#331
PrestaEdit wants to merge 1 commit into
PrestaShop:devfrom
PrestaEdit:add-category-position

Conversation

@PrestaEdit

Copy link
Copy Markdown
Contributor
Questions Answers
Branch? dev
Description? Fills the UpdateCategoryPositionCommand gap: PUT /categories/{categoryId}/positions (scope category_write) to reorder a category within its parent (parentCategoryId, way, positions list in "<index>_<parentId>_<categoryId>" format, foundFirst bool).
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket? Related to PrestaShop/PrestaShop#39630
How to test? PUT /categories/{id}/positions with a positions payload (client granted category_write) reorders the category. Covered by CategoryPositionEndpointTest.
Possible impacts? Reorders categories within their parent.

Fill the UpdateCategoryPositionCommand gap: PUT /categories/{categoryId}/positions
(scope category_write) to reorder a category within its parent.

Related to PrestaShop/PrestaShop#39630

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Jul 7, 2026
@mattgoud

mattgoud commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

hey @PrestaEdit, thanks for this 🙏 heads up: there's an overlap with #325, which also adds this exact PUT /categories/{categoryId}/positions endpoint (same command, same scope, same CategoryPosition resource) as part of a slightly larger PR that also covers the root add/edit endpoints and closes PrestaShop/PrestaShop#41973.

#325 is a bit further along (already went through review), so to avoid both PRs conflicting on the same new file, would you mind closing this one in favour of #325? happy to credit your input there, and of course if you spot anything your version does better let me know and i'll fold it in 👍

@PrestaEdit

Copy link
Copy Markdown
Contributor Author

Thanks for the heads up @mattgoud — you're right, #325 is the superset (root add/edit + this same position endpoint) and it's further along. Closing this in favour of yours. Your CategoryPosition is already a bit better than mine (Assert\NotBlank + the openapi example + the docblock on the legacy row-id prefix), no folding needed on my side.

@PrestaEdit

Copy link
Copy Markdown
Contributor Author

Superseded by #325.

@PrestaEdit PrestaEdit closed this Jul 9, 2026
@github-project-automation github-project-automation Bot moved this from Ready for review to Closed in PR Dashboard Jul 9, 2026
@ps-jarvis ps-jarvis moved this from Closed to Ready for review in PR Dashboard Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

3 participants