💳 pbShop
pbShop is a shop for sites built on PageBlocks 3.x: products — which are equally tariffs and services — with options and variants, categories, stock, a cart, delivery, orders, prices in several currencies, payments and subscriptions.
📖 The documentation for pbShop is on its own site
pbshop.pageblocks.pro — quick start for the templater, the service and controllers for the developer, the reference.
This page answers one question only: do I need this component. How to use it is written there, and only there — so that the two can never disagree.
Requires PageBlocks: tables and the field constructor, routing, controllers, file templates, migrations and the template engine all come from there. pbShop reinvents none of it — it brings the shop domain logic and two ways to call it, a snippet for the templater and a service for the developer.
⚙️ What it does
Catalogue. Nested categories, a product in several categories at once, friendly URLs with a canonical address, options and specifications, variants with their own price, weight, stock and SKU, a variant generator, filtering by options, and a "from" price for composite products.
Cart and checkout. A guest cart on a cookie, merged into the member cart on sign-in, promo codes, delivery priced against the actual contents, one-click purchase, data-processing consent, and registration at checkout through pbAuth.
Payment. Fifteen drivers out of the box — YooKassa, T‑Bank, CloudPayments, LiqPay, WayForPay, Fondy, Monobank, Portmone, Stripe, PayPal, maib, a bank invoice and others — plus room for your own. The driver verifies its gateway's callback signature, and the service checks the amount on top of that.
Delivery. Carrier-calculated for Nova Poshta, CDEK, Ukrposhta and Russian Post, with branch lookup. Everything else is a table: price per currency, weight tiers, free above a threshold.
Orders and subscriptions. There is no separate "subscription" entity: it is an order with a period, an expiry date, an auto-renewal flag and a stored card token. Recurring charges work on six of the drivers.
Money. Amounts are always integers in minor units — no floating types anywhere. Prices are fixed per currency and are never converted at a rate.
Fiscal receipts. The gateway issues the receipt itself where it can; for every other way money arrives there is a cash-register driver with a document queue and an idempotency key.
Events. The component reports what was paid for; what that unlocks is decided by the site, through listeners it registers itself.
🚫 What it does not do
Sign-in and registration — that is pbAuth or the site itself.
Scheduling. Renewing subscriptions, expiring overdue orders, back-in-stock mailing and picking up unfinished receipts are all called by the shop's cron. The component provides the methods but does not decide when they fire.