FOB Product Size Guide
FOB Product Size Guide
A professional product size guide plugin for Botble CMS that displays size charts with images and customizable tables on product pages. Perfect for clothing, footwear, and any products requiring size measurements.

Requirements
- Botble core 7.5.0 or higher.
- PHP 8.2 or higher.
- Ecommerce plugin activated.
Installation
Install via Admin Panel
Go to the Admin Panel and click on the Plugins tab. Click on the "Add new" button, find the FOB Product Size Guide plugin and click on the "Install" button.
Install manually
- Download the plugin from the Botble Marketplace.
- Extract the downloaded file and upload the extracted folder to the
platform/pluginsdirectory. - Go to Admin > Plugins and click on the Activate button.
Features
- Flexible Table Builder: Custom jQuery-based table builder with add/remove rows and columns
- Image Support: Upload size guide diagrams/images alongside tables
- Multiple Assignment Methods: Assign size guides to products, categories, or brands
- Priority System: Product-level > Category > Brand assignment hierarchy
- Bootstrap 5 Compatible: Works seamlessly with all Botble Bootstrap 5 themes
- Tabler UI Admin: Beautiful admin interface matching Botble's design
- Responsive Display: Mobile-friendly tables and modals
- Conditional Display: Show inline or in popup based on table size
- Multi-language: Full translation support
- Theme Independent: Works with all Botble themes
Screenshots






Usage
Creating Size Guides
- Go to Admin > Product Size Guides > Size Guides
- Click Create button
- Fill in the details:
- Name: e.g., "Shoe Size Guide", "Men's Shirt Sizes"
- Description: Optional description for internal reference
- Image: Upload size guide diagram (optional)
- Table Builder:
- Click "Add Column" to add table headers (Size, Measurement, etc.)
- Click "Add Row" to add size data
- Use delete buttons to remove rows/columns
- Status: Published/Draft
- Order: Display priority (lower numbers first)
- Click Save
Table Builder
The custom table builder allows you to create flexible size charts:
- Add Column: Define table headers (e.g., "Size", "Foot Length", "EU Size", "US Size")
- Add Row: Add data for each size
- Delete: Remove any row or column
- Flexible: No limit on rows or columns
Example table structure:
| Size | Foot Length | EU Size |
|------|-------------|---------|
| 35 | 22cm | 35 |
| 36 | 22.5cm | 36 |
| 37 | 23cm | 37 |
Assigning Size Guides
Method 1: Direct Product Assignment
- Edit any product
- Scroll to Product Size Guide metabox
- Select a size guide from the dropdown
- Save the product
Method 2: Category Assignment
- Go to Products > Categories
- Edit a category
- Scroll to Product Size Guide metabox
- Select a size guide from the dropdown
- All products in this category will inherit the size guide
Method 3: Brand Assignment
- Go to Products > Brands
- Edit a brand
- Scroll to Product Size Guide metabox
- Select a size guide from the dropdown
- All products from this brand will inherit the size guide
Assignment Priority
If multiple size guides are assigned, the plugin uses this priority:
- Product-level (highest priority)
- Category-level
- Brand-level (lowest priority)
Global Settings
Navigate to Admin > Product Size Guides > Settings to configure:
Display Settings
- Display Mode: Choose how size guide appears
- Inline: Shows directly on product page (best for short tables)
- Popup: Opens in Bootstrap modal (best for long tables)
- Conditional: Auto-decide based on table row count
- Row Threshold: For conditional mode, tables with more than X rows open in popup
- Button Text: Customize the "Size Guide" link/button text
- Modal Title: Customize popup title
Appearance
- Show Image: Display size guide image above table
- Table Styling: Choose Bootstrap table classes
Frontend Display
The size guide appears on product detail pages after the product attributes section (size/color selectors).
Inline Mode: Table displays directly on the page Popup Mode: "Size Guide" link opens Bootstrap 5 modal Conditional Mode: Auto-switches based on table length
Screenshots
Size Guide in Product Page
Professional size guide with image and responsive table display
Admin Table Builder
Easy-to-use table builder with add/remove rows and columns
Settings Page
Comprehensive settings for display and appearance customization
Development
Building Assets
The plugin uses webpack to compile SCSS and JavaScript files.
# Development build
npm run dev
# Production build
npm run prod
# Watch for changes
npm run watch
# Build specific plugin
npm run dev -- --mix-config=platform/plugins/fob-product-size-guide/webpack.mix.js
Asset Structure
platform/plugins/fob-product-size-guide/
├── webpack.mix.js # Webpack configuration
├── resources/
│ ├── sass/
│ │ ├── size-guide-admin.scss # Admin styles (Tabler UI)
│ │ └── size-guide-frontend.scss # Frontend styles (Bootstrap 5)
│ └── js/
│ ├── size-guide-admin.js # Table builder JavaScript
│ └── size-guide-frontend.js # Frontend modal/display
└── public/ # Compiled assets (production)
├── css/
│ ├── size-guide-admin.css
│ └── size-guide-frontend.css
└── js/
├── size-guide-admin.js
└── size-guide-frontend.js
Database Tables
fob_product_size_guides
Stores size guide definitions with table data in JSON format.
| Column | Type | Description |
|---|---|---|
| id | bigint | Primary key |
| name | string | Size guide name |
| description | text | Optional description |
| image | string | Path to uploaded image |
| table_headers | json | Array of column headers |
| table_rows | json | 2D array of table data |
| status | string | published/draft |
| order | integer | Display order |
fob_product_size_guide_relations
Links size guides to products, categories, or brands.
| Column | Type | Description |
|---|---|---|
| id | bigint | Primary key |
| size_guide_id | bigint | FK to fob_product_size_guides |
| reference_id | bigint | Product/Category/Brand ID |
| reference_type | string | 'product', 'category', or 'brand' |
Sample Data
The plugin includes a seeder to create 10 sample size guides for testing:
php artisan db:seed --class="FriendsOfBotble\\ProductSizeGuide\\Database\\Seeders\\SizeGuideSeeder"
Sample Size Guides Created:
- Women's Shoe Size Guide (11 sizes)
- Men's Shoe Size Guide (13 sizes)
- Women's Clothing Size Guide (6 sizes)
- Men's Clothing Size Guide (6 sizes)
- Men's Shirt Size Guide (6 sizes)
- Kids Clothing Size Guide (10 ages)
- Ring Size Guide (11 sizes)
- Glove Size Guide (6 sizes)
- Hat Size Guide (6 sizes)
- Jeans Size Guide (12 sizes)
Each sample includes realistic size conversion data with multiple measurement columns.
Troubleshooting
Size Guide Not Showing
Check:
- Size guide is assigned to the product, category, or brand
- Size guide status is "Published"
- Plugin is activated
- Assets are compiled and published
Table Not Displaying Correctly
Check:
- Theme is using Bootstrap 5
- Assets are published:
php artisan vendor:publish --tag=cms-public --force - Clear cache:
php artisan cache:clear - Check browser console for JavaScript errors
Modal Not Opening
Check:
- JavaScript file loaded correctly
- Bootstrap 5 is loaded in theme
- No JavaScript conflicts
- Clear browser cache
Browser Support
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers (iOS Safari, Chrome)
Contributing
Please see CONTRIBUTING for details.
Bug Reports
If you discover a bug in this plugin, please create an issue.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Support me ❤️
- PayPal ID: https://www.paypal.me/sangnguyenplus