Product Positions — Complete Guide
Install, configure and use the product positions module: drag & drop, multi-criteria auto-sort, position pinning and protection against ERP imports for PrestaShop 8 and 9.
Overview
The Product Positions module provides a modern drag & drop interface to reorder products within your PrestaShop categories, along with powerful auto-sort tools and a pinning system that protects your chosen positions against automated changes (ERP imports, CSV files, third-party scripts).
The module is compatible with PrestaShop 8 and 9, in single-store and multi-store mode, and is fully multilingual (FR, EN, ES, DE, IT). It writes directly to the standard PrestaShop position column: the order defined in the back office appears identically on the front office, with no extra configuration and no theme integration.
Compatibility and requirements
- PrestaShop 8.0 to 9.x — a single package covers both branches, with no specific configuration.
- PHP 8.0 to 8.4.
- Single-store and multi-store.
- No Composer dependency, no external service, no third-party JavaScript: jQuery and jQuery UI ship natively with PrestaShop.
- PrestaShop 1.7 is not supported: the admin API and hook system differ too much to guarantee reliable behavior.
PrestaShop 9 compatibility is available from module version 1.2.0. If you are migrating a PrestaShop 8 store to PrestaShop 9, install the latest module version before or after the upgrade: your positions and your pins are preserved, as the pin table is not altered by the update.
Installation
- In the back office, open Modules > Module Manager.
- Click Upload a module and drop the ZIP archive.
- Once installation completes, the Catalog > Product Positions entry appears in the menu.
On installation, the module creates a dedicated table for the pinning system and registers the hooks required for automatic restoration of locked positions.
To update the module, simply upload the new archive over the old one: migration scripts run automatically, and your pins and positions are preserved.
Interface
The management screen is made of three main areas:
- Category tree on the left: full navigation through the hierarchy, instant search, product counter and pin counter for each category.
- Toolbar at the top right: search within the current category, the Locking menu (orange) and the Auto-sort menu (purple).
- Product list in the centre: each product has a drag & drop handle, a click-to-edit position number, and four quick actions — pin, move to top, move to bottom, edit the product page.
Shop and language selectors at the top of the screen let you switch context without leaving the page.
Reordering products manually
Drag & drop
Grab the handle on the left of a product and drag it to the desired spot. Positions are saved automatically as soon as you release.
Editing the number directly
Click a product’s position number to edit it with the keyboard. Confirm with Enter; press Escape to cancel. The module automatically shifts the other products to accommodate the new position.
The “Top” and “Bottom” buttons
Two quick buttons send a product to the first or last position of the category in a single click.
Auto-sort
The Auto-sort menu applies a ranking to every product in the category according to the chosen criterion. Available criteria are:
- By name: A to Z or Z to A, based on the name in the current language.
- By price: ascending or descending.
- By stock: highest stock first or lowest stock first, with alphabetical order as a tiebreaker.
- By sales (last 90 days): best sellers or slowest movers first, computed from valid orders of the current shop.
- Newest / oldest: based on the product creation date.
- Reference A to Z: alphabetical sort by internal reference.
- Reverse current order: flips the whole list.
- Random shuffle: a random order on each run.
The Also apply to subcategories option propagates the sort to every descendant category in a single operation.
Pinned products keep their position during a sort: only unpinned products are reorganized (see the next section).
Position pinning
Pinning freezes a product’s position so that it changes neither during an auto-sort nor after an external modification (ERP import, product update from the back office, script). It is an optional protection layer: without pinning, your manual order stays valid as long as you do not run an auto-sort and no external system touches the positions.
Pinning a single product
On each product row, the pin icon toggles the pinned / unpinned state of the product within the current category. A pinned product gets an orange edge and a small pin badge on its position number. The pin counter in the status bar and in the category tree updates automatically.
You can still move a pinned product manually (drag & drop, direct editing, quick buttons): the locked position then follows the movement. Only auto-sorts and external changes are blocked.
Locking the whole category
The Locking > Lock the whole category menu pins every product of the current category to its present position in one go. This is the recommended option for catalogs pushed by an ERP that regularly re-synchronizes categories: once the category is locked, no external import can change the order.
Unlock everything
The Unlock everything option removes all pins from the current category in a single action. Current positions are kept; only the protection is lifted.
Restore pinned positions
The Restore pinned positions option manually replays the restoration algorithm on the current category. Useful after a large import to visually confirm that every locked position is back in place — even though the automatic restoration hook already fires on every product update.
Use cases
Set the first N products manually, sort the rest A to Z
A common scenario: manually position the first 5 or 10 products of a category (featured items, best sellers, new arrivals), then sort everything else alphabetically.
- Select the category in the tree.
- Arrange your first N products in the desired order (drag & drop or direct editing).
- Click the pin icon on each of these N products.
- Open Auto-sort > By name > A to Z.
The N pinned products stay at their positions; the other products are sorted alphabetically starting at position N+1. The same mechanism works with every sort criterion.
Protecting a category against an ERP import
A common scenario: your ERP or an external script regularly re-synchronizes product / category links, which resets the positions.
- Organize the category in the order you want.
- Open Locking > Lock the whole category.
- Confirm: every product is pinned at its current position.
From that moment on, every update to a locked product that goes through PrestaShop — back-office product page, webservice, native CSV import, third-party module handling the Product object — automatically triggers the restoration of its original position.
A script that writes straight to the database, without going through the Product object, fires no PrestaShop hook: automatic restoration cannot happen in that case. Run Locking > Restore pinned positions after the import, or call that restoration at the end of your synchronization script.
Multi-store
The module is fully compatible with the PrestaShop multi-store feature. The shop selector at the top of the interface switches context. Positions and pins are independent per (category, shop) pair: pinning a product in shop A does not lock it in shop B.
Multilingual
The back-office interface is translated into French, English, Spanish, German and Italian. The language selector at the top of the screen changes the language of the tree and of the displayed product names; positions are shared across all languages of a shop (native PrestaShop behavior).
Performance
The module uses optimized SQL queries joining on existing indexes (category_product, product_shop, stock_available). Position saving is debounced on the JavaScript side to avoid successive requests during fast reordering. The pin table has a composite primary key and two secondary indexes for very fast restorations, even on categories with several hundred products. Restoration is also guarded against re-entrancy, which prevents any loop during bulk updates.
Uninstallation
Uninstalling the module drops the pin table and removes the corresponding menu entry. Positions in category_product remain intact: your current order is preserved. Only the protection (pinning and automatic restoration) is lifted.
FAQ
Do I have to pin every product for the manual order to be kept?
No. The order set by drag & drop or direct editing is saved in the standard PrestaShop position column and stays there as long as no auto-sort or external import changes it. Pinning is an optional protection layer, useful only if you want to combine manual positions with auto-sort, or if your ERP touches product / category links during imports.
Is the order set in the back office reflected on the front office?
Yes, with no extra configuration. The module writes to the native category_product.position column that PrestaShop already uses to order product lists on the front. No theme integration and no additional hook are required.
My ERP re-synchronizes categories on every import: what should I do?
Open the Locking > Lock the whole category menu. That pins every product at its current position in one go. The automatic restoration hook then puts positions back in place every time the ERP modifies a locked product through the Product object. If your ERP writes straight to SQL, add a call to Restore pinned positions at the end of the import.
Can a pinned product be moved?
Yes. Pinning protects against automated changes (auto-sort, external imports). When you manually move a pinned product (drag & drop, position editing, top or bottom button), the locked position is updated to follow the movement.
Does auto-sort work with subcategories?
Yes. Tick the Also apply to subcategories option in the sort menu to propagate the criterion to every subcategory of the current category in a single operation.
Is the module compatible with PrestaShop 9?
Yes, since version 1.2.0. The same package covers PrestaShop 8.0 to 9.x, in single-store and multi-store mode, with no Composer dependency and no external JavaScript (jQuery and jQuery UI ship natively with PrestaShop).
Does the module replace the native category positions screen?
No, it complements it. The native PrestaShop screen remains available; the module provides a more modern interface with pinning and multi-criteria sorting as a bonus.
The product list does not load, or the search behaves oddly.
Clear the PrestaShop cache (Advanced Parameters > Performance), then reload the page with a forced browser refresh. The module appends a version number to its CSS and JS files, but an aggressive browser cache or proxy can still keep an old copy after an update.