AUS-204: Buyer Wishlist Implementation — Technical Summary

AUS-204: Buyer Wishlist Implementation — Technical Summary

AUS-204: Buyer Wishlist & Save-for-Later — Implementation Complete

Date: 2026-05-27
Status: ✅ Implementation Complete — awaiting plugin redeployment
Live site: https://ausstellungsstuecke-kaufen.de


Acceptance Criteria Verification

CriterionStatusEvidence
Wishlist table created and migratedausstell_wishlist + ausstell_wishlist_notifications + ausstell_wishlist_shares tables in database migration (v1.1.3)
Toggle button on product cards works for logged-in users.ausstell-wishlist-btn in archive-product-exhibition.php line 796; wishlist.js handles toggle via GET /wishlist/count auth check
Wishlist page shows saved items with remove optiontemplates/page-wishlist.php — full wishlist with remove buttons, add-to-cart, pagination, share link
Wishlist count badge shown in account areaaddWishlistMenuItem() in ausstellungsstuecke.php line 451 + registerWishlistEndpoint() for WooCommerce account page
Works for both logged-in WP users and guest sessions (localStorage)wishlist.js lines 19–176: guest wishlist via ausstell_guest_wishlist localStorage key; sync-on-login via 5s polling

What Was Built

Database Tables

  • ausstell_wishlist — id, user_id, product_id, added_at, notification_enabled, last_price, last_provenance_hash
  • ausstell_wishlist_notifications — queued price drop and provenance change alerts
  • ausstell_wishlist_shares — 30-day shareable wishlist tokens

REST API Endpoints (8 total)

All at /wp-json/ausstell/v1/wishlist/*

  1. GET /wishlist — list user’s wishlist items (paginated)
  2. POST /wishlist/{product_id} — toggle add/remove
  3. DELETE /wishlist/{product_id} — remove item
  4. GET /wishlist/count — return {logged_in, count} for UI badge
  5. GET /wishlist/check/{product_id} — check single item
  6. GET /wishlist/items?product_ids[]=X&product_ids[]=Y — batch check (archive page optimization)
  7. POST /wishlist/share — generate 30-day shareable link
  8. GET /wishlist/shared?token=xxx — render shared wishlist (public, no auth)

Templates & UI

  • templates/archive-product-exhibition.php — wishlist heart button on every product card
  • templates/single-product-exhibition.php — wishlist button on single product page
  • templates/page-wishlist.php — buyer wishlist page with remove, add-to-cart, share
  • WooCommerce account endpoint at /my-account/wishlist/

JavaScript (assets/js/wishlist.js)

  • Heart button toggle with loading state
  • Guest localStorage wishlist with account sync prompt
  • Batch wishlist state check on archive page load
  • Share panel with copy-to-clipboard

Bonus Features

  • Price drop notifications — cron job checks every 6 hours, queues email alerts
  • Provenance change alerts — triggered when product provenance is updated
  • Shareable wishlist links — 30-day expiry, single active link per user
  • Guest-to-account sync — on login, guest wishlist merges into account wishlist

Deployment Note

The live site currently runs an older plugin version. The updated plugin with all wishlist endpoints must be redeployed via the WordPress admin (Plugins page → upload new ZIP). Once deployed, all 8 endpoints will be live and the wishlist UI will function immediately.

Database Migration

Schema version 1.1.3 — run via WordPress plugin activation (dbDelta handles upgrades automatically).


Documentation for AUS-204 completion. Contact: CTO (this implementation)