All work
Toptronics logo

Move five years of a store onto a new stack without losing a URL or an order

Electronics Retail · Website

Five years of a Romanian electronics store — 315 products, 1,183 orders and 1,792 images — moved off WooCommerce onto Next.js and Postgres, with card payments and an admin console of its own.

Discipline
Electronics Retail
Platform
Website
Live
toptronics.ro

01Problem

Toptronics had been selling in Romania since April 2021 — 315 products, 288 customer accounts and 1,191 orders — on a WooCommerce install wrapped in a bought theme and a page builder. Everything that made the store work also made it slow to change: the product copy was locked inside page-builder shortcodes, so nothing could be restyled without editing every product; there was no SEO plugin at all, so the whole search presence rested on the old /produse/ URLs; and the back office was WordPress's, with stock, orders, media and customers spread across plugins that each had their own idea of the data. Replatforming is easy to propose and hard to survive — five years of rankings live on URLs the new stack does not have, and the order history is the only record of who the customers are.

02Strategy

Treat the migration as the deliverable, not as the step before it. Rebuild the storefront and the back office on one typed stack so the catalogue, the orders and the admin finally share a database; move every product, order, customer, review and image with a tool that can be run, verified, thrown away and run again rather than a one-shot script; and publish a redirect for every old URL so five years of ranking transfers with the catalogue. Then build for the market that actually buys: a Romanian-only storefront, card payments through the gateway Romanian shoppers already recognise, and cash on delivery — the method behind 1,137 of the 1,191 historical orders — treated as a first-class checkout path rather than a fallback.

03What we built

The migration is its own package, not a script. It reads the WooCommerce backup through a throwaway local database, keys every entity in a mapping table so a re-run skips whatever already landed, writes in transactional batches, and ends with a verify command that counts source rows against target rows, checks the relationships that actually break — products with no image, variants with no inventory, orders with no items, duplicate slugs — and prints before-and-after samples of real products. The production run was rehearsed against a disposable database first. On top of that data sits a Next.js storefront — category, brand and product pages, ⌘K search, wishlist, cart, guest checkout and order tracking by number and email — and an admin console spanning 37 tables: products and inventory with stock movements, orders, customers, coupons, banners, homepage sections, review moderation, support tickets, wholesale enquiries, an R2-backed media library, store settings and an audit log. Card payments run through NETOPIA's hosted page; an order is only ever marked paid by the signature-verified callback, and when the merchant account is not fully configured the online methods disappear from checkout rather than taking money the site cannot confirm.

(✦)Deliverables

  • A Romanian-language storefront on Next.js — home, category, brand and product pages, deals, ⌘K search, wishlist, cart, checkout, order tracking, wholesale, support and the legal set.
  • A WooCommerce → PostgreSQL migration tool built as its own package: 315 products with 33 variants, 30 categories, 288 customers, 1,183 orders carrying 1,234 line items and 2,804 timeline events, the product reviews, and 1,792 media files — every entity id-mapped so the run is idempotent.
  • A 705-rule redirect map wired into the build: 315 product, 328 tag, 30 category and 14 page URLs answered with a 301, and 18 abandoned demo URLs answered with a 410 instead of a soft 404.
  • NETOPIA Payments — hosted card page with 3-D Secure, settlement taken only from the signature-verified notification, alongside cash on delivery and bank transfer.
  • Guest checkout with order lookup by order number and email: 1,176 of the 1,191 historical orders were placed without an account, so an account was never made the price of buying.
  • An admin console over 37 tables — products, inventory and stock movements, orders, customers, coupons, banners, homepage sections, review moderation, support tickets, wholesale enquiries, media, store settings and an audit log of who changed what.
  • Cloudflare R2 behind every image, with the old size-variant URLs rewritten back to the originals so the new storefront resizes from a clean source.
  • The ANPC consumer-protection mark and the NETOPIA / Visa / Mastercard lockup in the footer, plus the terms, privacy, shipping, returns and cookie documents a Romanian merchant review asks to see.
  • A standalone REST API on the same PostgreSQL database and session store, so a future mobile app has a backend the day it starts.

(✦)Tech Stack

11

Technologies

  • Next.js
  • React
  • TypeScript
  • tRPC
  • Drizzle ORM
  • PostgreSQL
  • Better Auth
  • Tailwind CSS
  • Cloudflare R2
  • NETOPIA Payments
  • Vercel

04Outcome

The store runs on one database and one codebase: the catalogue the storefront renders is the catalogue the admin edits, and 705 redirect rules keep every old product, category, tag and page URL resolving to its new home instead of a 404. Product copy is content again rather than page-builder markup, so a description can be edited without opening a builder. Customers who checked out as guests — which is nearly all of them — can still find an order with a number and an email. Card payments, cash on delivery and bank transfer sit side by side at checkout, with the consumer-protection and payment marks a Romanian merchant review asks for. And a standalone REST API runs beside the web app on the same database and sessions, so a mobile app can ship later without a second backend behind it.

(✦)FAQ

Questions, answered.

  • How long does a store migration like this take?

    For a catalogue of this size — a few hundred products, five years of orders and a media library — plan on 8–12 weeks from kickoff to launch. The build is rarely what sets the pace: reconciling the old data is, because every store has its own decade of exceptions in it. We rehearse the whole migration against a disposable copy of the database before a single production write.

  • What does a project like this cost?

    It depends on the catalogue size, how much of the old data has to be reshaped, and how much of the back office you need on day one. Send us a short brief and you get an itemised, fixed-price quote within 24 hours — no obligation, no discovery fee.

  • Will we lose our Google rankings when the URLs change?

    Only if nobody plans for it. Every old address gets a rule before launch — here that was 705 of them, covering every product, category, tag and content page as a 301, with the abandoned demo pages answered as 410 rather than left to rot as soft 404s. The redirect map is generated from the migration itself, not hand-typed, so a product that moved cannot be missed from the list.

  • What happens to our existing customers, orders and passwords?

    Customers, addresses, order history, order timelines, wishlists and reviews all move across and stay linked. Passwords are the one thing that cannot: WordPress stores them in a hash format a modern auth system cannot verify, so accounts arrive with a password reset on first sign-in rather than a silent lockout. Everything else a returning customer looks for — their old orders, their address, their list — is already there.

  • Can it take card payments in our market?

    Yes, through whichever gateway your market actually trusts — for Romania that is NETOPIA, elsewhere it might be Stripe, Checkout.com or a local bank's gateway. What stays the same is the rule behind it: an order is marked paid only by a verified callback from the gateway, never by the customer's browser coming back, and cash on delivery keeps working whether or not the card gateway is live.

  • We don't sell electronics. Does any of this apply to us?

    The pattern does: get the catalogue into a database you own, keep every old URL alive, let people buy without an account, and give the team one console instead of five plugins. We have run it for a car fleet, a rental operator and a holiday-home platform — same rooms of the system, different inventory.

(✦) Ready to start?

Let's build your next digital product in UAE.

Website, e-commerce platform, or mobile app — custom-built, conversion-focused, and delivered on time.

Book a Consultation

(✦)The services behind this build