PerfumeBD Fragrance Manager
A WooCommerce plugin for **Perfume BD Official** that manages fragrance-specific taxonomies, displays detailed fragrance data on single product pages, and provides sidebar filter widgets for the shop archive.
by Towfique Elahe · github.com/towfique-elahe/perfumebd-fragrance-manager · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/towfique-elahe/perfumebd-fragrance-manager/archive/refs/heads/main.zipReadme
PerfumeBD Fragrance Manager
A WooCommerce plugin for Perfume BD Official that manages fragrance-specific taxonomies, displays detailed fragrance data on single product pages, and provides sidebar filter widgets for the shop archive.
Features
1. Custom Taxonomy Registration
Registers four product taxonomies (skipped if already registered by another plugin):
| Taxonomy slug | Label |
|---|---|
fragrance-family |
Fragrance Family |
gender |
Gender |
occasion |
Occasion |
season |
Season |
All four appear under the product edit screen in WP Admin and support REST API access.
2. Fragrance Details Tab (Single Product Page)
Adds a "Fragrance Details" tab to every WooCommerce product page (priority 25, appears before the Description tab). The tab is divided into five sections — each section is hidden automatically when it has no data.
| Section | Data source |
|---|---|
| Overview | Taxonomy terms — fragrance family, gender, occasion, season (badge pills) |
| Product Details | SCF fields: bottle_size_ml (appended with "ml"), bottle_type, inspiration_source |
| Performance | SCF fields: longevity, best_for |
| Scent Notes | SCF fields: top_notes, heart_notes, base_notes (comma-separated → individual badges) |
| Suitability | Boolean flags: good_for_summer, good_for_gym, good_for_office, good_for_gifting (✓ / ✗ grid) |
Field retrieval: Uses get_field() from Secure Custom Fields / ACF when available, falls back to get_post_meta().
3. Taxonomy Filter Widgets (Shop Archive Sidebar)
Provides a reusable "PerfumeBD: Taxonomy Filter" WordPress widget. Add one instance per taxonomy to the Shop Page Sidebar widget area.
Each widget:
- Renders a checkbox list identical to the Styler theme's built-in categories widget — same HTML, same CSS classes, same visual style.
- Supports multi-select: clicking a term toggles it in the URL; multiple terms are comma-separated.
- Highlights active (checked) terms.
- Integrates with Styler's pjax AJAX filter — no JavaScript changes needed.
Widget settings
| Setting | Description |
|---|---|
| Title | Heading shown above the filter list |
| Taxonomy | Which taxonomy to filter (dropdown) |
| Show product count | Appends a count badge next to each term |
| Hide terms with no products | Suppresses terms that have zero published products |
URL query parameters
| Taxonomy | Query param |
|---|---|
fragrance-family |
filter_fragrance_family |
gender |
filter_gender |
occasion |
filter_occasion |
season |
filter_season |
Installation
- Upload the
perfumebd-product-detailsfolder towp-content/plugins/. - Go to WP Admin → Plugins and activate PerfumeBD Fragrance Manager.
- Assign taxonomy terms to products via the product edit screen.
- Enter custom field values via Secure Custom Fields field groups.
- Go to WP Admin → Appearance → Widgets, open Shop Page Sidebar, and add one PerfumeBD: Taxonomy Filter widget per taxonomy.
Requirements
| Requirement | Minimum version |
|---|---|
| WordPress | 5.4 |
| PHP | 7.4 |
| WooCommerce | 6.0 |
| Styler theme | Any |
| Secure Custom Fields (SCF) | Optional — falls back to get_post_meta() |
File Structure
perfumebd-product-details/
├── perfumebd-product-details.php Main plugin file
├── assets/
│ └── css/
│ ├── product-details.css Styles for the Fragrance Details tab
│ └── shop-filters.css Minimal spacing for the sidebar filter widget
├── CHANGELOG.md Version history
└── README.md This file
Changelog
See CHANGELOG.md for the full version history.