These standards apply to new themes and contributions targeting PrestaShop 9. They reflect the patterns used in Hummingbird and define what is expected in the ecosystem going forward.
Use correct, semantic HTML5, the right element for the right purpose:
<nav>, <main>, <header>, <footer>, <section>, <article>, <aside><button> for actions, <a> for navigation<br>, <img>, <input>_partials/ directory<nav aria-label="{l s='Main navigation' d='Shop.Mytheme'}">
<ul>
<li><a href="{$urls.pages.index}">{l s='Home' d='Shop.Theme.Global'}</a></li>
<li><a href="{$urls.pages.cart}">{l s='Cart' d='Shop.Theme.Global'}</a></li>
</ul>
</nav>
All custom CSS classes follow the BEM convention, Block, Element, Modifier:
/* Block: standalone component */
.product-card { }
/* Element: part of the block (double underscore) */
.product-card__title { }
.product-card__image { }
/* Modifier: variant of a block or element (double hyphen) */
.product-card--featured { }
.product-card__title--small { }
Rules:
.product-card .product-card__title is wrong)src/scss/ subdirectorysrc/scss/ directory structure, @layer order, and guidance on where to add custom styles.core.js for module backward compatibility only and must not be used for new developmentconst/let, arrow functions, template literals, async/await, native import/exportdata-ps-* attributes to target DOM elements, not CSS classesprestashop event system for cross-component communicationdata-ps-* attribute reference, the events map, and the selectors map.| File type | Convention | Example |
|---|---|---|
| SCSS partials | Underscore prefix, lowercase with hyphens | _product-card.scss |
| JavaScript / TypeScript | Lowercase with hyphens | product-gallery.js |
| Smarty templates | Lowercase with hyphens | product-list.tpl |
| Shared fragments | Placed in a _partials/ directory |
_partials/header.tpl |
.editorconfig file