dwindown
|
4471cd600f
|
feat: Complete markdown syntax refinement and variable protection
✅ New cleaner syntax implemented:
- [card:type] instead of [card type='type']
- [button:style](url)Text[/button] instead of [button url='...' style='...']
- Standard markdown images: 
✅ Variable protection from markdown parsing:
- Variables with underscores (e.g., {order_items_table}) now protected
- HTML comment placeholders prevent italic/bold parsing
- All variables render correctly in preview
✅ Button rendering fixes:
- Buttons work in Visual mode inside cards
- Buttons work in Preview mode
- Button clicks prevented in visual editor
- Proper styling for solid and outline buttons
✅ Backward compatibility:
- Old syntax still supported
- No breaking changes
✅ Bug fixes:
- Fixed order_item_table → order_items_table naming
- Fixed button regex to match across newlines
- Added button/image parsing to parseMarkdownBasics
- Prevented button clicks on .button and .button-outline classes
📚 Documentation:
- NEW_MARKDOWN_SYNTAX.md - Complete user guide
- MARKDOWN_SYNTAX_AND_VARIABLES.md - Technical analysis
|
2025-11-15 20:05:50 +07:00 |
|
dwindown
|
a3aab7f4a0
|
feat: Complete Default Email Templates for All Events! 📧
## Task 7 Complete: Default Email Content ✅
### New File Created:
**`DefaultEmailTemplates.php`**
- Comprehensive default templates for all 9 events
- Separate templates for staff vs customer recipients
- Professional, well-structured HTML with card blocks
- All use modern card-based email builder syntax
### Email Templates Included:
**Order Events:**
1. **Order Placed** (Staff)
- Hero card with order notification
- Order details, customer info, items list
- View order button
2. **Order Processing** (Customer)
- Success card confirmation
- Order summary with status
- What's next information
- Track order button
3. **Order Completed** (Customer)
- Success card celebration
- Order details with completion date
- Thank you message
- View order + Continue shopping buttons
4. **Order Cancelled** (Staff)
- Warning card notification
- Order and customer details
- View order button
5. **Order Refunded** (Customer)
- Info card with refund notification
- Refund details and amount
- Timeline expectations
- View order button
**Product Events:**
6. **Low Stock Alert** (Staff)
- Warning card
- Product details with stock levels
- Action required message
- View product button
7. **Out of Stock Alert** (Staff)
- Warning card
- Product details
- Immediate action required
- Manage product button
**Customer Events:**
8. **New Customer** (Customer)
- Hero welcome card
- Account details
- Feature list (order history, tracking, etc.)
- My Account + Start Shopping buttons
9. **Customer Note** (Customer)
- Info card
- Order details
- Note content display
- View order button
### Integration:
- Updated `TemplateProvider.php` to use DefaultEmailTemplates
- Automatic template generation for all events
- Push notification templates also complete
- Proper variable mapping per event type
### Features:
- Card-based modern design
- Hero/Success/Warning/Info card types
- Multiple buttons with solid/outline styles
- Proper variable placeholders
- Professional copy for all scenarios
- Consistent branding throughout
All 7 tasks now complete! 🎉
|
2025-11-13 15:27:16 +07:00 |
|