Skip to content

jeffsenso/prestashop-skills / skills/prestashop-module-development/ps9-core-ai/Component/Grid/skills/create-position-column

create-position-column

Verified

Documents how to add drag-and-drop row reordering to a PrestaShop grid. Requires a PositionColumn in the definition, a dedicated update-position route, and position handling in the repository.

create-position-column

Instructions

  1. Add PositionColumn as the second column (after BulkActionColumn) in the Grid Definition.
  2. Configure the position update route: ->setOption('update_method', 'POST')->setOption('update_route', 'admin_{domain}s_update_position').
  3. Create the admin_{domain}s_update_position POST route in the routing YAML (see create-admin-routing skill).
  4. In the controller, handle the AJAX position update: receive positions[] array, dispatch UpdatePosition{Domain}Command (or use QueryBuilder directly).
  5. In the repository, update the position column for the moved entities.

Rules

Column ordering conventions (PositionColumn as second column) are in Grid/CONTEXT.md. Skill-specific reminders:

  • Position updates are always AJAX — return JSON response, not redirect
  • Position values start at 0 or 1 — be consistent with existing PS convention
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall