Skip to content
Back to skills

Prestashop Upgrade Toolbox Theme

ASecurity

Reproduce the storefront of the old PrestaShop shop (1.6 or 1.7) on the new PrestaShop 9, as a child theme of hummingbird: capture the old pages from the local reference copy, write one self-contained HTML template per page as the specification, have the merchant validate it, then restitute it as Smarty templates and brand CSS, polish it in bounded loops measured against the old shop, and prove it with a gate on the staging. Use when the merchant wants the new shop to look like the old one; w...

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 1, 2026
developmentjavascriptpythongojavaphpshellbashdatabase

Security analysis

A100/100

Pro scans all 16 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add PrestaShopCorp/PrestaShop-Upgrade-Toolbox --skill prestashop-upgrade-toolbox-theme --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prestashop Upgrade Toolbox Theme?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Prestashop Upgrade Toolbox Theme
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/prestashopcorp-prestashop-upgrade-toolbox-theme/badge)](https://www.skillsdirectory.com/skills/prestashopcorp-prestashop-upgrade-toolbox-theme)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: prestashop-upgrade-toolbox-theme
description: >
  Reproduce the storefront of the old PrestaShop shop (1.6 or 1.7) on the new PrestaShop 9, as a
  child theme of hummingbird: capture the old pages from the local reference copy, write one
  self-contained HTML template per page as the specification, have the merchant validate it, then
  restitute it as Smarty templates and brand CSS, polish it in bounded loops measured against the
  old shop, and prove it with a gate on the staging. Use when the merchant wants the new shop to
  look like the old one; when the old theme cannot run on 9 and has to be rebuilt; when a
  migrated shop shows the default theme; when the colours, fonts, header, footer, home, category,
  product or CMS pages of the old shop must be carried over. NOT for a new design or a rebrand,
  NOT for a shop that is not being migrated (a Shopify or WooCommerce store, a brand-new shop), NOT
  for moving the data (see prestashop-upgrade-toolbox-data).
---

# Reproducing the old storefront (phase 6)

Shared context and conventions: **`prestashop-upgrade-toolbox-core`**. The audit's workstream D (the
theme actually served, diffed against vanilla, and "what the new front must reproduce") is the
input of this skill; the modules decisions (`02-modules.md`) say which blocks still exist.

**Dossier:** write as you go in `migration/03-theme.md`, and what a reader must know in
`migration/page/03-theme.html` (`prestashop-upgrade-toolbox-core`, "The migration dossier").

**Scope: PrestaShop 9 and hummingbird.** The new front is a child theme of hummingbird, the
default theme of PrestaShop 9 (Bootstrap 5.3). A 1.6 or 1.7 theme cannot be ported: its templates,
its hooks and its JavaScript belong to the old core. It is **read**, never copied.

## The fidelity contract

The old shop is **the merchant's own**. What it shows is reproduced, not reinterpreted:

| What | Rule |
|---|---|
| Structure and chrome: header, menu, footer, home sections, category, product and CMS layouts | **faithful** to the validated HTML template, itself faithful to the old shop |
| Palette and fonts | **taken** from the old shop (`identity.json`), verbatim; a derived shade is written as derived |
| Content: products, categories, CMS pages, logo, images | already there — the transplant brought the data, the images follow the files. Never rewritten |
| Texts the old theme hard-coded (reassurance, footer blocks, labels) | carried **word for word**, in every selling language |
| A behaviour the new core does differently (cart, checkout, faceted search, account) | the new core's, restyled — never a rewrite of the buy funnel |

- **A purchased theme** (bought for the old version) is reproduced by its look, never by its
  files: no template, stylesheet, image or font file of the old theme goes into the new one unless
  the merchant shows the licence allows it. Ask once, record the answer in `03-theme.md`.
- **Every gap is written, never silent.** What cannot be reproduced (a block whose module was
  dropped, an effect the new core cannot render, a layout that breaks on a phone) goes in the
  "Gaps" table with the merchant's decision. A faithful page with three written gaps beats an
  uncanny lookalike.

## Where it sits

On the **staging**, after the transplant and the modules: the theme renders what the modules hook,
so it is reproduced on the shop that has them. The theme's **files** are code: a folder of the
shop's project (`themes/<name>/`), versioned, deployed like the rest. Its **database state** — the
shop's `theme_name` — is replaced by every reload of the database: `child_theme.py enable` is a
**replay step** of the day (`cutover-runbook.md`), run after the transplant on the rehearsal and on
the new production. Nothing of the theme is set by hand in the back office.

**Light by default.** One shop, one theme: the path below. **Heavier only when** the old shop is a
multistore whose shops have different themes: one capture, one HTML template set and one child
theme per theme, and the trigger written in `03-theme.md`.

## 1. Capture the old shop

From the **reference** environment — the local copy that runs (`prestashop-upgrade-toolbox-audit`) —
never the production. Pick one page per template, the same names on every capture: `home`, a
`category` with products and facets, a `product` with combinations, a `cms` page; add the ones
the audit's workstream D lists (a manufacturer page, a landing page, the contact form).

```bash
python3 scripts/browser.py check     # a local Chrome or Chromium answers
python3 scripts/capture.py --base <reference URL> --out migration/theme/reference \
  --pages "home=/ category=/3-… product=/1-….html cms=/content/4-…"
```

A shop for professionals hides prices and the add-to-cart button from visitors: capture its pages
logged in as a test customer of the reference copy (`--cookie-file`, a `*.local.*` file holding the
session's Cookie header), and check the staging the same way. A home built with a page builder is a
decision before the templates ([references/reproduction-method.md](references/reproduction-method.md)).

Full-page screenshots, desktop and mobile; `measures.json` (the form of each page) and
`identity.json` (background colours by area, text, link and button colours, header and footer
colours, fonts by characters and the web fonts loaded). A page that answers an error or holds
almost no text is marked not ok — the capture ends `incomplete`, never taken as the spec. A
capture is never written over.

Then write, in `03-theme.md`, the **signature list**: what makes these pages this shop's — header
bars and their order, logo position, menu style, the home's sections in order, the product page's
layout, the footer's columns, the corner radius, the button style. Each later step is checked
against it. Method: [references/reproduction-method.md](references/reproduction-method.md).

## 2. The HTML templates — the specification

One **self-contained** HTML file per captured page (`migration/theme/templates/home.html`, …):
header, menu and footer included, everything inline, the palette and fonts as `--v-*` tokens
taken from `identity.json`, the shop's real texts. Cheap to change, nothing of Smarty yet.

```bash
python3 scripts/capture.py --base file://$PWD/migration/theme/templates/ \
  --out migration/theme/templates-r1 --pages "home=home.html category=category.html …"
python3 scripts/measure_page.py compare --reference migration/theme/reference/measures.json \
  --target migration/theme/templates-r1/measures.json
```

**Fidelity loop, three rounds at most:** look at each template's render next to the old page,
list what differs from the signature list, fix at most three things, capture again
(`templates-r2`…). Then show the merchant the old page and the template side by side, page by
page. **The validated templates are the spec**; the merchant's approval is dated in
`03-theme.md`. A layout the merchant wants changed is changed here, never during the restitution.

## 3. Restitution — the child theme

```bash
python3 scripts/child_theme.py scaffold --dir themes/<name> --display-name "<Shop name>"
```

The skeleton: `config/theme.yml` (top-level keys only), `assets/css/custom.css` with the two
colour levels hummingbird needs, one template per page carrying its marker `data-mt-page`. Read
the parent's templates **on the target** before overriding a block (block names move between
hummingbird versions), then transpose the validated templates:

- **home** — the sections of the old home, interleaved with the native modules
  (`{widget name='…'}`, `{hook h='…'}`), each guarded so an empty module folds its whole section;
- **product** — grafts (`{block … append|prepend}`); the buy block is never rewritten;
- **category** — CSS first; `product_list_header` owned whole if the layout differs;
- **header and footer** — `_partials/` overrides, module templates under
  `themes/<name>/modules/<module>/…`;
- **links** in Smarty (`{$urls…}`, `{url entity=…}`), **assets** relative, **fonts** self-hosted
  in the theme.

Details, and the traps that cost a 500 or an invisible element:
[references/restitution.md](references/restitution.md),
[references/hummingbird-gotchas.md](references/hummingbird-gotchas.md),
[references/palette.md](references/palette.md).

```bash
python3 scripts/child_theme.py lint --dir themes/<name> --palette "#…,#…"
```

`clean` before every deploy: no absolute URL to another host (the old domain, the reference copy,
a localhost), every palette colour in `custom.css` verbatim, the button colours set at component
level.

## 4. Deploy and enable on the staging

```bash
python3 scripts/child_theme.py deploy --dir themes/<name> --root <staging root> \
  --shell-cmd "<SHELL_CMD of the staging profile>" [--owner www-data]
python3 scripts/child_theme.py enable --name <name> --php-cmd "<PHP_CMD>" --root <staging root>
```

`deploy` replaces the theme's folder and purges the compiled templates; `enable` switches the shop,
with the ThemeManager fallback when the console dies on the language context, and **re-hooks the
modules by the theme's hook map** (`global_settings` of `theme.yml`): a child that keeps
hummingbird's map moves the old shop's menu, reassurance or category tree wherever hummingbird
puts them. What the front needs in the database — menu entries, footer link blocks, a module's
display settings — is one idempotent replay script, run after `enable`. All three are the commands
the runbook replays on the day ([references/restitution.md](references/restitution.md)).

## 5. Polish — two bounded loops

Capture the staging with the same page names (`migration/theme/staging-r1`, …), then:

1. **Fidelity** — the rendered page against the validated template and the old page: what still
   differs from the signature list. At most three fixes per round, three rounds.
2. **Form** — `measure_page.py compare` against the **old shop's** measures: the hierarchy of
   titles, the rhythm of the bands, the corner radius, the image ratios, no horizontal scroll, one
   `<h1>`. At most three changes per round, a round that makes the comparison worse is reverted,
   and a clean comparison ends the loop: no change is made to look busy.

Then the **blind review**: write your own review first, ask the merchant's impression without
showing it, then confront both. The quality bar every page must clear (contrast, one `<h1>`,
375 px, recolour reaching the native modules):
[references/quality-bar.md](references/quality-bar.md). Method of both loops and of the review:
[references/polish.md](references/polish.md). Each round is a line of `03-theme.md`.

## 6. The gate

`dossier.py run --step 03-theme` runs the two rows of `03-theme.md`, once their `…` are filled
with this theme's values:

- `child_theme.py lint` → `clean`;
- `verify_theme.py` on the **staging** → `ok`: the child theme served, every page's marker, one
  `<h1>`, no asset loaded from the old domain or the reference copy, the logo and favicon answering
  (and not the target's defaults when a vanilla install is given), the palette in the served CSS,
  the add-to-cart button in a palette colour, no sideways scroll at 375 px. An asset of the
  **content** served by the old domain (a blog feed, a CMS image) fails with its folder: the theme
  cannot change it. Decide it with the merchant — it keeps working if the domain stays — write it
  in `03-theme.md`, and allow that folder only (`--allow-asset`). The theme's paths in the gate
  rows are relative to the dossier (`../themes/<name>`).

Screenshots are the merchant's material, not a proof (`prestashop-upgrade-toolbox-core`): the merchant's
**approval of the rendered staging** is dated in `03-theme.md`, next to the gate.

## Done

- the reference capture `captured`, the signature list written, the purchased-theme question
  answered;
- the HTML templates validated by the merchant, dated;
- the child theme in the project's version control, `lint` clean, deployed and enabled on the
  staging by the scripts, never by hand;
- the polish rounds written, the last `measure_page.py compare` result cited, every gap decided;
- `verify_theme.py` at `STATUS: ok` on the staging, its log cited, the merchant's approval of the
  staging dated;
- `deploy` and `enable` listed as replay steps of the runbook;
- `dossier.py check` at `STATUS: consistent`, with `03-theme` marked done.

Files in this skill

  • SKILL.md12.2 KB
  • references/hummingbird-gotchas.md3.3 KB
  • references/palette.md3.5 KB
  • references/polish.md4.2 KB
  • references/quality-bar.md4.8 KB
  • references/reproduction-method.md6.6 KB
  • references/restitution.md7.1 KB
  • scripts/browser.py16.4 KB
  • scripts/capture.py13.1 KB
  • scripts/child_theme.py17.9 KB
  • scripts/measure_page.py11.3 KB
  • scripts/verify_theme.py18.3 KB
  • tests/test_browser.py8 KB
  • tests/test_capture.py12 KB
  • tests/test_child_theme.py9.5 KB
  • tests/test_verify_theme.py12 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.