Commit Graph

29 Commits

Author SHA1 Message Date
cfe089d1fe Fix dark mode rendering for tables, form inputs, and notices
All checks were successful
Create Release Package / PHP Lint (push) Successful in 51s
Create Release Package / Build Release (push) Successful in 1m9s
- Override WooCommerce's .input-text background (specificity 0,3,1) with
  [data-bs-theme="dark"] selector for text inputs and textareas
- Remove table-light from <thead> in cart, review-order, orders, and
  payment-methods templates (forces white in dark mode)
- Add .alert.woocommerce-* compound selectors for notice overrides
  outside .woocommerce wrapper ancestry
- Suppress focus ring on programmatically focused notices
  (woocommerce.js focus_populate_live_region adds tabindex + focus)
- Wrap order-details product table in card matching thank-you page style
- Fix thank-you alert icon/text line wrap with d-flex align-items-center
- Bump version to 0.1.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.1.2
2026-02-28 22:13:31 +01:00
cb2d064441 Prepare v0.1.1 bugfix release
All checks were successful
Create Release Package / PHP Lint (push) Successful in 59s
Create Release Package / Build Release (push) Successful in 1m11s
Update CHANGELOG.md with v0.1.1 entry (dark mode selects, notice
styling, product card overflow). Bump version in style.css. Document
CSS specificity learnings in CLAUDE.md. Update README release example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.1.1
2026-02-28 19:32:34 +01:00
e234ba6449 Fix product card images overlapping top border-radius
Add overflow-hidden to the card <article> so the card's own
border-radius clips the product image at the top corners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:25:49 +01:00
f4877833cf Fix dark mode selects, notice borders, and double notice icons
- Override WooCommerce's hardcoded #fff on native <select> and Select2
  widgets for Bootstrap 5 dark mode (background, color, border)
- Suppress WooCommerce icon font ::before on notices — templates
  already render Bootstrap Icons (bi-check-circle, etc.)
- Bump notice selector specificity to .woocommerce .woocommerce-message
  (0,2,0) to beat woocommerce.css border-top: 3px solid override
- Explicitly reset border-top shorthand to prevent WooCommerce's
  colored top-border from bleeding through

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:24:55 +01:00
01404c87ba Update CLAUDE.md session history for v0.1.0 re-release
All checks were successful
Create Release Package / PHP Lint (push) Successful in 57s
Create Release Package / Build Release (push) Successful in 1m9s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.1.0
2026-02-28 19:02:34 +01:00
f3e7ede60c Add v0.1.0 changelog entry
Document all features and fixes between v0.0.1 and v0.1.0:
Docker stack, My Account redesign, product archive card grid,
single product layout, and 14 template quirk fixes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:01:26 +01:00
6ee95f4a2f Fix template quirks and bump version to 0.1.0
All checks were successful
Create Release Package / PHP Lint (push) Successful in 57s
Create Release Package / Build Release (push) Successful in 1m11s
Audit and fix 14 Twig templates for escaping bugs, CSS conflicts,
and missing Bootstrap styling:
- Fix nl2br/esc_html filter order in order details
- Add WC gallery modifier classes for zoom/photoswipe JS init
- Fix HTML entity double-encoding in headings (up-sells, cross-sells, related)
- Remove wrong 'is defined' guards on function calls
- Remove duplicate deprecated hooks in dashboard
- Add |raw to brand description HTML filter chain
- Add role="alert" for accessibility, |esc_attr on notification types
- Style mini-cart remove button as Bootstrap btn
- Make shipping form-check class conditional
- Add shop_table CSS reset and gallery opacity fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:50:19 +01:00
c5f8e88ee4 Fix single product layout conflicts with WooCommerce CSS
WooCommerce's layout CSS fought Bootstrap's grid in three ways:

1. Float-based two-column layout (width: 48% + float) on div.images
   and div.summary squeezed content inside our col-lg-6 columns.
   Reset with float: none; width: 100%.

2. Nested content wrapper (.container + #primary + <main>) from
   woocommerce_output_content_wrapper doubled up on the parent
   theme's existing .container. Remove the hooks entirely.

3. Sale badge (position: absolute; top: -.5em; z-index: 9) escaped
   the image column and blocked breadcrumb clicks. Override to
   top: 0.5em; z-index: 1 and use gx-* (horizontal-only gutters)
   to avoid negative margin-top on the .row.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 18:25:01 +01:00
7fda8e1962 Add Bootstrap 5 single product page layout
Add two-column responsive grid (image gallery + product summary) for
single product pages, following the same bridge pattern used for
product archives.

Key changes:
- Create content-single-product.php bridge and Twig layout template
- Add single product renderer at template_redirect priority 11
- Disable WooCommerce block compatibility layer that strips classic
  hooks when parent theme has theme.json
- Move PHP templates to woocommerce/ subfolder for cleaner structure
- Fix Twig templates to self-compute context data not passed by
  wc_get_template() (tabs, short-description, meta, rating)
- Fix Underscore.js triple-brace syntax conflict in variation template
  by wrapping in {% verbatim %}

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 17:55:39 +01:00
00872a6568 Add Bootstrap 5 product archive with card grid and sidebar
Replace WooCommerce's default shop/category page rendering with a
Bootstrap 5 card grid layout featuring responsive columns, sale badges,
star ratings, and an offcanvas sidebar for filters on mobile.

Key implementation details:

- Bypass parent theme's TemplateController for product archives via
  wp_bootstrap_should_render_template filter, render at template_redirect
  priority 11 using the same page shell injection pattern as plugin pages

- Add archive-product.php (Bootstrap layout with optional sidebar) and
  content-product.php (PHP bridge for wc_get_template_part interception)

- Inject global $product into Twig context in TemplateOverride to fix
  empty price/add-to-cart/rating/sale-flash in loop sub-templates — Twig
  has isolated variable scopes and cannot access PHP globals directly

- Fix pagination URLs: use get_pagenum_link() instead of ?page= query
  param (WordPress uses 'paged' for archive pagination, not 'page')

- Fix double-escaped &ndash; in result count by adding |raw filter

- Reset WooCommerce float-based layout CSS (woocommerce-layout.css) for
  shop pages to prevent conflicts with Bootstrap flex grid

- Register shop-sidebar widget area with Bootstrap-styled markup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:06:33 +01:00
7034134678 Polish My Account templates with Bootstrap 5 patterns
Redesign navigation with endpoint icons, offcanvas-lg responsive
pattern, and sticky sidebar. Replace flat dashboard with card-based
welcome greeting (avatar) and quick-action grid. Wrap all forms
(edit-account, edit-address, lost/reset-password) in card sections
with icon headers. Restructure view-order with summary card and
status badge component. Override WooCommerce's float-based layout
and max-width constraint to let Bootstrap flex grid handle sizing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 13:28:15 +01:00
b8001a5ab0 Fix CSS dependency handle and update documentation
Correct wc-bootstrap-overrides stylesheet dependency from unregistered
'woocommerce' handle to 'woocommerce-general'. Update README directory
structure to reflect wc-base.html.twig rename and .env-dist location.
Add Fixed section to CHANGELOG.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:58:43 +01:00
c3b16b68c5 Fix unstyled pages: rename base.html.twig to avoid parent collision
The child's templates/base.html.twig was shadowing the parent's
views/base.html.twig (full HTML page shell) because prependPath()
made Twig find the child's minimal wrapper first. Rename to
wc-base.html.twig so the parent's page shell renders correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:29:20 +01:00
c0d1dc85c4 Refine Docker stack configuration
- Use mariadb:latest and wordpress:php8.4 floating tags
- Add private registry image name (hub.bundespruefstelle.ch/woocommerce)
- Add restart policies (always for prod, unless-stopped for dev)
- Move .env-dist to project root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:15:46 +01:00
624de0cae6 Add Docker development environment
Multistage Dockerfile (WooCommerce download, wp-bootstrap npm build,
Composer deps, WordPress runtime), Compose stack with MariaDB, and
auto-setup entrypoint that installs WordPress and activates the theme
on first boot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:59:20 +01:00
404f3a7264 Bump version to 0.0.1 for initial release
All checks were successful
Create Release Package / PHP Lint (push) Successful in 55s
Create Release Package / Build Release (push) Successful in 1m7s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
v0.0.1
2026-02-28 11:26:07 +01:00
ff68b979c7 Add twig/twig ^3.0 as Composer dependency
Required by WooCommerceExtension which extends
Twig\Extension\AbstractExtension.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:22:27 +01:00
c432bdc02d Update documentation for v0.1.0 release
- README: document rendering bridge architecture, template coverage,
  directory structure, and how the interception pipeline works
- CHANGELOG: comprehensive list of all features added across phases 1-9
- PLAN: update dependencies to reflect completed bridge implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:20:46 +01:00
cb4e57a2e3 Add wc-core symlink to .gitignore
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:18:04 +01:00
46eb7f0a22 Add WooCommerce-to-Twig rendering bridge
Intercept WooCommerce's PHP template loading via
woocommerce_before_template_part / woocommerce_after_template_part hooks
to render Bootstrap 5 Twig templates instead. This makes all 99 child
theme templates functional in a standard WooCommerce environment.

- Create WooCommerceExtension (Twig AbstractExtension) with ~50 functions
  and 7 filters covering WC API, WordPress hooks, escaping, and forms
- Rewrite TemplateOverride to use hook-based interception with stack-based
  output buffering for nested template support
- Wire bridge initialization at init priority 20 in functions.php
- Fix invalid {% do return() %} in two order templates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 11:15:59 +01:00
49b1d52701 Implement Phase 9 & reusable components; skip Phase 8 (emails)
Phase 8 (Emails) skipped: WooCommerce email rendering uses
wc_get_template_html() which bypasses the Twig pipeline entirely.
Email customization deferred to plugins or block email editor.

Phase 9 - Supplementary (7 templates):
- Brand description with thumbnail, taxonomy archive delegate
- Brands A-Z shortcode with alphabetical index navigation
- Single brand thumbnail shortcode
- REST API OAuth login and grant-access forms
- Back-in-stock notification form with email input

Reusable Components (6 templates):
- price: product price display with sale handling
- rating: star rating with Bootstrap Icons (filled/half/empty)
- address-card: billing/shipping address card with edit link
- status-badge: contextual order status badges
- quantity-input: +/- input group widget
- form-field: universal form field renderer (text/select/textarea/checkbox)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:53:44 +01:00
8b1793097c Implement Phase 6 & 7: My Account and Order Details templates (Bootstrap 5, HPOS)
Phase 6 - My Account (15 templates):
- Account layout with sidebar navigation (list-group) and content area
- Orders table with status badges, pagination, and responsive design
- View order with order notes as list-group items
- Address cards with edit/add buttons
- Login/Register side-by-side card layout
- Account edit, password change, downloads, payment methods forms
- Lost/reset password forms and confirmation

Phase 7 - Order Details (5 templates):
- Order details table with items, totals, and customer note
- Line item rows with refund quantity display
- Customer billing/shipping address cards
- Order tracking form
- Order again button

All order templates use WC_Order object methods only (HPOS compatible).
Bootstrap 5 components: cards, tables, list-groups, badges, forms, alerts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:43:30 +01:00
594d810439 Implement Phase 4 & 5: cart and checkout templates (Bootstrap 5, HPOS)
Phase 4 - Cart (9 templates):
- cart: 8+4 column layout, table-responsive items, coupon input-group
- cart-empty: centered empty state with cart-x icon
- cart-item-data: inline dl for variation details
- cart-totals: card with list-group-flush rows, sticky sidebar
- cart-shipping: form-check radio per shipping method
- cross-sells: product loop grid section
- mini-cart: offcanvas-compatible item list with remove buttons
- proceed-to-checkout-button: btn-primary btn-lg w-100
- shipping-calculator: collapsible form with form-select/form-control

Phase 5 - Checkout (12 templates):
- form-checkout: 7+5 column layout, sticky order review sidebar
- form-billing: card with field wrapper, optional account creation
- form-shipping: card with ship-to-different-address collapse toggle
- form-coupon: collapsible input-group with alert-info toggle
- form-login: collapsible login reusing global/form-login.html.twig
- review-order: card with table-sm, tfoot subtotal/shipping/total
- payment: list-group of payment gateways with radio selection
- payment-method: form-check with description collapse
- terms: form-check checkbox with T&C link
- thankyou: HPOS compatible, alert-success + order details list-group
- order-received: confirmation message
- cart-errors: alert-danger with return-to-cart button

All order data accessed via WC_Order methods (HPOS compatible).
CSS additions: cart thumbnail sizing, checkout form field overrides,
payment box transitions, dark mode focus states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:33:49 +01:00
9917105951 Implement Phase 3: single product page templates (Bootstrap 5)
Add 21 Twig template overrides for the single product page:

Product layout:
- product-image: gallery with thumbnail strip, img-fluid rounded
- title: h1 entry-title
- price: fs-3 fw-bold with sale del/ins markup
- short-description: lead text-body-secondary
- meta: dl row with SKU, categories, tags
- rating: Bootstrap Icon stars with half-star, review count link
- stock: badge (bg-success/bg-danger/bg-warning) per status
- sale-flash: badge bg-danger fs-6
- share: hook-only wrapper
- product-attributes: table-sm table-striped

Related/upsells:
- related, up-sells: section with product loop grid

Tabs:
- tabs: nav-tabs + tab-content with fade transitions
- description: tab-pane with prose content
- additional-information: tab-pane with attributes hook

Add to cart (4 product types + variation JS):
- simple: input-group quantity + btn-primary btn-lg
- variable: form-select per attribute + variation display
- grouped: table-borderless with quantity per child product
- external: btn-outline-primary with external link icon
- variation: Underscore.js script templates (Bootstrap-styled)
- variation-add-to-cart-button: quantity + submit with hidden fields

CSS additions: gallery thumbnail hover, variation selector spacing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:28:13 +01:00
c9c99a6b88 Implement Phase 2: product archive and shop loop templates (Bootstrap 5)
Add 15 Twig template overrides for the product archive and shop loop:
- archive-product: 3+9 grid layout with optional filter sidebar
- content-product: card component with hook-based content injection
- content-product-cat: category card with thumbnail
- product-searchform: input-group with search icon button
- loop/loop-start, loop-end: responsive row-cols grid
- loop/header: archive title with description hook
- loop/result-count: showing X-Y of Z with aria-relevant
- loop/orderby: form-select-sm sort dropdown
- loop/pagination: delegates to components/pagination.html.twig
- loop/no-products-found: alert-info empty state
- loop/add-to-cart: btn-primary-sm with AJAX data attributes
- loop/price: fw-semibold with sale/regular markup
- loop/rating: Bootstrap Icon stars (full, half, empty)
- loop/sale-flash: badge bg-danger positioned overlay

CSS additions: product card hover, sale badge z-index, star rating sizing,
price del/ins styling, WooCommerce grid reset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:23:09 +01:00
01b807a769 Implement Phase 1: global templates and notices (Bootstrap 5)
Add 9 Twig template overrides for WooCommerce's global and notice templates:
- global/wrapper-start, wrapper-end: conditional container with _theme_wrapped
- global/breadcrumb: Bootstrap breadcrumb component with aria-current
- global/sidebar: offcanvas-lg for mobile, standard aside for desktop
- global/quantity-input: input-group with +/- buttons
- global/form-login: responsive form with form-control, form-check
- notices/notice, error, success: Bootstrap alert-dismissible with icons

Supporting changes:
- assets/js/quantity.js: +/- button handler respecting min/max/step
- assets/css/wc-bootstrap.css: WooCommerce notice fallback styles, spinner removal
- functions.php: register quantity.js script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:19:10 +01:00
9592b8cae5 Add comprehensive template conversion plan (PLAN.md)
9-phase plan covering all ~125 customer-facing WooCommerce templates,
organized by priority: globals, archive, single product, cart, checkout,
my account, orders, emails, and supplementary. Includes Bootstrap 5
component mappings, CSS/JS strategy, reusable components, accessibility
checklist, and per-file tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 10:05:58 +01:00
0b4f136674 Update CLAUDE.md: mark woocommerce as read-only, note docker not yet available
Add constraints section documenting that the woocommerce plugin is read-only
and that the Docker environment is not yet set up. Track composer.lock.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 09:56:14 +01:00
399354b7d2 Initial theme scaffold from wp-theme-template
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 09:42:35 +01:00