Context

Petbox is a Polish online pet shop. Most of its money is in food bought on repeat. A customer can buy the same bag three ways: once, on a recurring delivery, or as a subscription to their pet’s daily need, where the shop works out when the bag will be empty and ships the next one before it is.

It reached me through Gophery in 2024. On the new theme I was the main developer, so its structure and standards were mine. Gophery’s lead tested the work, talked to the client and ran the infrastructure.

Problem and constraints

The shop ran on a theme built around a page builder. Templates lived in the builder rather than in code, so every change was manual, and the pages stayed heavy however much they were tuned.

The product page was the worst of it. Three purchase types, several sizes and a quantity field, and every change waited for a reply from the server before the price moved.

Decisions

Decision

Take the page builder out first, then rewrite the theme in one go.

Alternatives

  • Keep the builder and strip out what was unused. Cheaper and quicker, but the weight comes from the builder itself, not from its settings.

Why

The builder came out in late 2024 and the new theme followed in 2025: templates in code, the logic split by what it does, and a real build step. That build is what later made React and TypeScript in the theme practical.

The cost was the size of the change. The rewrite went out in one piece, and some account screens shipped looking worse than they should have, because getting the theme out mattered more that month.

Decision

Rebuild the product summary in React, with every price worked out on the server and sent with the page.

Alternatives

  • Keep the old front end and patch it. The least work, and every change would still have waited for the server.
  • Fetch the same data when the component starts. One request instead of many, but still a wait before the buttons work.

Why

The server prepares everything the summary needs: every size, the price for all three purchase types, availability, cross-sells and the free delivery threshold. It goes out with the page. React reads it on load and never asks again, so changing size or purchase type is arithmetic in the browser. The server is asked only when something changes state, such as adding to the cart.

Set against the other ways to do it, React holds up. WooCommerce’s own variation form also sends prices with the page, but knows nothing about subscriptions or the daily-need price. WordPress’s Interactivity API, or Alpine.js on the Blade markup, would mean smaller scripts and markup rendered on the server. Both suit a few toggles better than a pricing model with three purchase types, sizes, quantities and a monthly cost per pet. React fits for two reasons. The panel is a small application, and TypeScript keeps its pricing model in check. And the cart and checkout already run on React, because that is what WooCommerce’s blocks are built with, so the shop has one way of building its interactive parts.

It cost a second language in the theme and a build step in the critical path. And a WordPress developer can no longer fix the product page without knowing React.

Decision

Extend WooCommerce's block cart and checkout rather than go back to the classic one.

Alternatives

  • The classic checkout with template overrides, as the old theme had. Every extension point known, and no longer the one WooCommerce sets up by default.

Why

Gophery’s lead and I settled this together. The block checkout was new when the shop moved to it in mid-2025, and it had few places to hook into. The loyalty points, the eco packaging option and the cross-sells each had to be built as an extension of it.

Google Pay and Apple Pay open Stripe’s express checkout window, which cannot show a parcel locker picker. So before the delivery options reach that window, the list is cut to courier options. Parcel lockers stay in the normal checkout.

The cost: the blocks are WooCommerce’s, so any update can change what the extensions are built on.

Evidence

A dry dog food product page on petbox.pl. To the right of the gallery, the summary lists the rating, availability and 24-hour shipping, a price from 89.90 zł with per-kilogram prices for subscription and one-off purchase, and three purchase options, with the standard purchase expanded to show a size selector, a quantity stepper and the add to cart button.
The product summary is one React component.
Home page
The petbox.pl home page in August 2024, archived by the Wayback Machine. A teal top bar with a phone number, a yellow shop menu button, a long row of navigation links and a summer promotion banner. Product images below the banner did not survive archiving.
The same page in November 2026, on the new theme. A simpler header with dog and cat menus, a promotion banner and a row of brand logos.
Before, from the Wayback Machine, which lost some product images on the way. After, the live site.
The cart with one bag of dog food. Two notices above it count down to free delivery and to a 2% discount, cross-sells sit below the product, and the summary on the right shows the loyalty points earned, an eco packaging option, Google Pay and the checkout button.
The cart: free delivery and volume discount thresholds, loyalty points, eco packaging and cross-sells.
The checkout form: contact email, a choice between ordering privately or as a company, name fields, a postcode field with a mask, city, street, house number and phone number with a +48 prefix, and an order summary on the right.
The checkout, with address suggestions working alongside the input masks. That took a second pass: the first version lagged when typing on phones.

Outcome

The new theme has been in production since 2025, and the React product summary since 2026.

Lighthouse gives the home page 88 for performance on a phone. For a WooCommerce shop this size, with this many plugins and changes on top, I count that as a small miracle. It is a lab score for one page, though, not a measure of every visit.

Other work on the shop:

  • an integration with the shop’s ERP system, so advertising can work from real purchase costs,
  • product data prepared for a new sales channel,
  • emails that tell a shopper a product they wanted is back in stock,
  • products that leave “temporarily unavailable” by themselves when stock returns,
  • a food calculator on the product page, filled in from the product description,
  • buying as a company in the checkout, with the tax ID validated.

What I would not repeat

Shipping the rewrite as one change. It was the fastest way off the page builder. But nobody can review a change that size properly, and the account screens got the least attention.

Next time I would move one template at a time, with the old and the new theme side by side. Slower to start, safer to launch.

Building it on WooCommerce and a long list of plugins. Each plugin has its own idea of the cart and the checkout, and after launch most fixes were where two of them met. There was no time to replace them. The shop has grown a great deal since, and the ideas keep coming. Knowing that, I would write most of what the plugins do myself, or not build it on WooCommerce at all.