From 71cfea51db6d2f3c136af934f479275a9de32561 Mon Sep 17 00:00:00 2001 From: herbygitea Date: Tue, 24 Mar 2026 19:24:15 +0000 Subject: [PATCH] Create pbs-woocommerce-store.md via n8n --- PBS/Tech/Sessions/pbs-woocommerce-store.md | 150 +++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 PBS/Tech/Sessions/pbs-woocommerce-store.md diff --git a/PBS/Tech/Sessions/pbs-woocommerce-store.md b/PBS/Tech/Sessions/pbs-woocommerce-store.md new file mode 100644 index 0000000..8ac5e10 --- /dev/null +++ b/PBS/Tech/Sessions/pbs-woocommerce-store.md @@ -0,0 +1,150 @@ +--- +project: pbs-woocommerce-store +type: session-notes +status: active +tags: + - pbs + - wordpress + - woocommerce + - ecommerce + - stripe + - paypal + - apple-pay + - redis + - staging + - production + - essential-blocks + - css + - ghostscript + - wordfence +created: 2026-03-21 +updated: 2026-03-21 +path: PBS/Tech/Sessions/ +--- + +# WooCommerce Store Setup — Session Notes (March 21, 2026) + +## Session Summary +Full WooCommerce cookbook store built from scratch — staging tested and production deployed in a single day. Both Stripe and PayPal payment processing working. Shop page custom-built with Essential Blocks for full layout control. Test purchases confirmed on both staging and production. Apple Pay domain verification placed on production server. + +## Key Decisions Made + +### Commerce Platform: WooCommerce (Lean Approach) +- **WooCommerce over Shopify** — seamless on-site experience for Sunnies, no monthly platform fee, full data ownership +- **WooCommerce is a stepping stone** — long-term plan is custom commerce backend (Flask/Go/Rust) with direct Stripe API integration +- **Free plugins only** — WooCommerce core + Stripe Gateway + PayPal Payments, no premium dependencies + +### Key Concepts Clarified +- **Shopify vs WooCommerce** — Shopify is a platform (competes with WooCommerce), not a payment processor +- **Shop Pay** is Shopify's digital wallet (exclusive to Shopify stores), not available on WooCommerce. Not a dealbreaker — Apple Pay, Google Pay, and PayPal cover the same need +- **Stripe and PayPal are payment processors** (cash registers); WooCommerce and Shopify are platforms (the store) +- **Custom commerce is realistic** — Flask/Go/Rust backend with direct Stripe API is within reach (estimated: a month of weekends). Stripe handles PCI compliance, fraud, chargebacks. Your code just says "charge $24.99" +- **WooCommerce doesn't lock you in** — all product/order data lives in MySQL, migrateable when custom build is ready + +### Payment Setup +- **Stripe** — primary payment processor, handles credit cards, Apple Pay, Google Pay +- **PayPal** — secondary option, works alongside Stripe on checkout page. Initially hijacked checkout with Smart Buttons; resolved by letting Stripe own card fields and PayPal display as separate option +- **Apple Pay** — domain verification file placed on production at `/.well-known/apple-developer-merchantid-domain-association`, ownership set to `www-data`. Verified through PayPal's Apple Pay integration. Note: file lives inside WordPress container — needs volume mount or re-creation on container rebuild + +### Shop Page Architecture +- **Custom page with Essential Blocks Woo Product Grid** — not the WooCommerce default shop page +- WooCommerce's shop page template overrides custom block layouts when a page is designated as the "Shop page" +- **Workaround:** Keep WooCommerce shop page as default, point site navigation to custom page, set up redirect from `/shop` to custom page slug via Redirection plugin +- Essential Blocks uses different CSS classes than native WooCommerce blocks (`eb_selector` prefix, `.eb-woo-product` classes) + +### Redis + WooCommerce +- **Redis Object Cache v2.7.0 by Till Krüss** on production +- Redis is an object cache (not page cache) — WooCommerce is designed to work with it and handles its own cache invalidation +- No manual exclusions needed — just flush Redis after WooCommerce install +- Source: Pressidium article confirms WooCommerce benefits from Redis for carts, sessions, and checkout queries + +## Completed Tasks — Staging +- [x] WooCommerce installed and configured +- [x] Stripe set up in test mode, successful test purchase +- [x] Declined card test passed (proper error message displayed) +- [x] PayPal set up and working alongside Stripe on checkout +- [x] Essential Blocks Woo Product Grid configured with custom layout +- [x] Product card hover CSS (lift + scale + PBS green shadow `rgba(62, 107, 65, 0.35)`) +- [x] Cookbook PDF compressed from 51MB to 2.6MB with Ghostscript `/ebook` setting +- [x] Digital download verified working +- [x] Mobile checkout tested +- [x] Guest checkout enabled, account creation optional at checkout + +## Completed Tasks — Production +- [x] Apple Pay domain verification file placed and verified +- [x] WooCommerce installed and configured +- [x] Stripe set up with live credentials +- [x] PayPal configured +- [x] Shop page built with Essential Blocks product grid + hover effects +- [x] Custom page set as shop (via navigation, not WooCommerce shop page setting) +- [x] Redis cache flushed after WooCommerce install +- [x] Test purchase completed successfully +- [x] Wordfence IP lockout resolved (phone hotspot trick) + +## Technical Notes + +### Cookbook PDF Compression +- Original Canva export: 51MB +- Compressed with Ghostscript: 2.6MB +- Command: `gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=cookbook_compressed.pdf cookbook_original.pdf` +- Quality verified — 150 dpi sufficient for phone/tablet viewing + +### Custom Hover CSS (Essential Blocks Product Grid) +```css +eb_selector .eb-woo-products-gallery .eb-woo-product { + transition: transform 0.3s ease, box-shadow 0.3s ease; + border-radius: 8px; +} + +eb_selector .eb-woo-products-gallery .eb-woo-product:hover { + transform: translateY(-8px) scale(1.02); + box-shadow: 0 12px 32px rgba(62, 107, 65, 0.35); +} +``` + +### Apple Pay Verification File +- Location: `/var/www/html/.well-known/apple-developer-merchantid-domain-association` +- Ownership: `www-data:www-data` +- ⚠️ File is inside WordPress container — will be lost on container rebuild. Needs volume mount added to compose file for persistence + +### Server Health (Observed During Session) +- Memory: 77%, Swap: 100% — VS Code Remote SSH was a contributing factor +- 1 zombie process (non-critical) +- System restart required (kernel updates pending) +- 6 apt updates available +- Recommendation: close VS Code Remote when not actively editing, schedule reboot + +### WooCommerce Account System +- WooCommerce customer accounts are WordPress user accounts (same `wp_users` table) +- Assigns "Customer" role by default +- Will need role strategy when Ultimate Member is activated (future task) +- No conflict for now since Ultimate Member isn't active + +### Wordfence Lockout Recovery +- Production site returned 503 due to Wordfence IP block +- Fix: logged in via phone mobile hotspot (different IP), removed firewall exception +- Action item: whitelist home IP in Wordfence → Firewall → Whitelisting + +## Known Gaps / Action Items +- [ ] Verify order confirmation emails working on production (WP Mail SMTP is configured there, wasn't on staging) +- [ ] Add volume mount for Apple Pay verification file in Docker compose (persistence across rebuilds) +- [ ] Whitelist home IP in Wordfence +- [ ] Set up redirect from `/shop` to custom shop page (if not done) +- [ ] Apply pending server updates and reboot (`sudo apt update && sudo apt upgrade -y && sudo reboot`) +- [ ] Close VS Code Remote SSH sessions when not in use to free server memory +- [ ] Monitor Linode memory — consider 4GB upgrade as store traffic grows +- [ ] Configure PayPal for production with live credentials (if not completed) +- [ ] Eventually: add n8n order automation workflows (Phase 2 of project plan) + +## Discussion Highlights +- WordPress regret is real — WooCommerce is a pragmatic compromise, not a long-term commitment +- Django/Flask would have been ideal for someone with Travis's skillset, but doesn't serve Jenny's immediate need +- Rust explored as future option — great for systems programming but overkill for a commerce backend; Go is the more natural fit for web services +- Building a custom frontend with direct Stripe API is a realistic project — the store UI is the easy part, payment processing is Stripe's problem +- The "WooCommerce plugin tax" kicks in at subscriptions/memberships/courses — but that's 6+ months out and may be custom-built instead + +--- + +*Session: March 21, 2026* +*Project: Plant Based Southerner — Commerce* +*Maintained by: Travis with Claude* \ No newline at end of file