All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Linux compatibility: Fixed the bootstrap include path to load
custplaceApi.phpwith the correct filename casing on case-sensitive servers - Customer name fallback: Invitations now reuse
lastnameasfirstnamewhen the first name is empty, preventing API rejection for stores with malformed customer name data - Fallback observability: Added an informative PrestaShop log entry when the firstname fallback is applied
- Product widget multi-SKU support: Added
data-skusgeneration so the product review widget can query reviews for the main product SKU and its combination SKUs - Official answers option: Added a new back-office checkbox to include official review answers in the product widget through the
data-with-answersattribute
- Product reviews widget bundle: Updated the product widget script to
v1.3to support the new multi-SKU integration options - Product page widget payload: Extended widget rendering to send combination references alongside the base product reference when available
- Protected manual invitation action: Switched manual invitation sending from
GETtoPOST - CSRF validation: Added CSRF token generation and verification for manual invitation requests from the order page
- Encrypted token handling in configuration forms: Prevented stored encrypted API and widget tokens from being re-submitted and encrypted again on save
- Secret field UX: Replaced stored secret values in password inputs with masked placeholders while preserving existing values when fields are left blank
- Invitation product SKU resolution: Invitation payload generation now prefers the ordered combination reference over the parent product reference when a combination SKU exists
- Version consistency: Aligned module version metadata across runtime and module manifest files to
2.1.0
Version 2.0.0 represents a major upgrade to the Custplace PrestaShop module with extensive new features, improved flexibility, and enhanced developer integration capabilities.
- Dynamic Order Status Selection: Replaced hardcoded status IDs (2, 11) with admin-configurable checkbox selection
- Multi-Status Support: Administrators can now select multiple order statuses that trigger invitation sending
- Backward Compatibility: Automatic migration from hardcoded statuses to configurable system
- User-Friendly Interface: Checkbox-based selection in admin configuration panel
- Custom Template ID: Optional invitation template ID field for personalized invitation campaigns
- Dynamic Template Assignment: Template ID automatically included in API requests when configured
- Flexible Configuration: Template can be enabled/disabled without affecting core functionality
- Dual Environment Support: Toggle between production and test environments
- Automatic Domain Switching:
- Production API:
apis.custplace.com - Test API:
apis.kustplace.com - Production Widgets:
widgets.custplace.com - Test Widgets:
widgets.kustplace.com
- Production API:
- Seamless Testing: Easy switching for pre-production testing without code changes
- Separate Configuration Section: Dedicated test mode configuration block
- Flexible Category Filtering: Exclude orders containing products from specific categories
- CSV Input Support: Flexible parsing supporting multiple formats:
1,2,3(no spaces)1, 2, 3(spaces after commas)1,2, 3(mixed spacing)
- Automatic Validation: Only numeric, positive category IDs are accepted
- Product-Level Checking: Comprehensive category checking for all order products
- Customer Language Priority: Fixed admin context issue - now uses customer's language from order data
- Database-Level Detection: Direct SQL query to retrieve customer's language preference
- Fallback Mechanism: Graceful fallback to shop default language if customer language unavailable
- Context-Aware Processing: Ensures invitations are sent in customer's preferred language
- User-Agent Header: Automatic PrestaShop version identification (
PrestaShop/X.X.X) - Source Identification: Custom
X-Source-Id: 39header for tracking module requests - Enhanced Tracking: Better API request identification and debugging capabilities
- WordPress-Style Filters:
actionCustplaceInvitationDatahook for invitation data modification - Flexible Data Manipulation: Developers can add, modify, or enhance invitation data
- Validation & Fallback: Automatic validation ensures required fields remain intact
- Error Handling: Graceful error handling with fallback to original data
- Safe Integration: Hook failures don't break invitation sending process
- PrestaShop Logger Integration: Full integration with PrestaShop's built-in logging system
- Multi-Level Logging:
- Success (Informative): Successful invitation sending with order reference and invitation ID
- Warnings: API responses with non-success status codes
- Errors: HTTP errors, cURL failures, JSON parsing errors, API error codes
- Admin Interface Access: Logs viewable in PrestaShop admin under Advanced Parameters > Logs
- Filterable Logs: Filter by object "custplace" and type "Module"
- Detailed Error Messages: Comprehensive error information for debugging
- Complete README Update: Comprehensive documentation covering all new features
- Configuration Guide: Detailed explanation of all four configuration sections
- Developer Integration Guide: Hook usage examples and best practices
- Logging & Monitoring Section: Instructions for accessing and interpreting logs
- Installation Instructions: Updated installation guide with new configuration options
- Four-Section Layout: Reorganized configuration into logical sections:
- Invitation Settings: Core API and invitation configuration
- Trust Badge: Badge widget configuration
- Product Reviews: Product review widget configuration
- Test Mode: Test environment configuration
- Improved User Experience: Better organization and visual separation of different feature sets
- Enhanced Form Validation: Comprehensive validation for all configuration options
- ConfigurationService Enhancements:
- Added trigger status management methods
- Implemented CSV parsing for category exclusions
- Added test mode URL generation methods
- Enhanced form value handling for checkboxes
- InvitationService Updates:
- Dynamic status checking instead of hardcoded values
- Category exclusion validation
- Customer language detection improvements
- Hook system integration
- Enhanced error handling and logging
- Dynamic Endpoint Selection: Automatic API endpoint switching based on test mode
- Enhanced Error Handling: Comprehensive error catching and logging
- Header Management: Standardized header configuration with version tracking
- Response Processing: Improved response parsing with detailed error logging
- Admin vs Customer Context: Fixed issue where admin language was used instead of customer language
- Database Query Solution: Implemented direct database query to retrieve customer's order language
- Context Independence: Invitation language now independent of admin user's language setting
- Checkbox Field Processing: Fixed checkbox field data not being saved properly
- Field Name Mapping: Corrected PrestaShop checkbox field naming convention handling
- Form Validation: Enhanced form validation to prevent configuration loss
- Migration System: Automatic migration from hardcoded status IDs to configurable system
- Default Values: Preserved existing behavior for installations upgrading from previous versions
- Configuration Preservation: Existing API keys and settings maintained during upgrade
- Input Sanitization: Enhanced validation for all user inputs
- Category ID Validation: Strict numeric validation for category exclusions
- Template ID Validation: Proper validation for optional template ID field
- SQL Injection Prevention: Parameterized queries for all database operations
- Information Disclosure Prevention: Sanitized error messages in logs
- Graceful Degradation: System continues to function even when individual features fail
- Validation Fallbacks: Multiple layers of validation with safe fallback mechanisms
- Service-Oriented Design: Clean separation of concerns across service classes
- Consistent Error Handling: Standardized error handling patterns throughout the module
- Code Documentation: Comprehensive PHPDoc documentation for all new methods
- Type Safety: Improved type declarations and parameter validation
- Efficient Category Checking: Optimized product category validation
- Caching Considerations: Proper handling of configuration caching
- Database Query Optimization: Efficient queries for language and category detection
- Version Consistency: Updated version numbers across all module files
- Change Documentation: Comprehensive changelog for tracking modifications
- Code Standards: Consistent coding standards throughout the module
- Status Triggers: Existing installations automatically migrate from hardcoded statuses [2, 11] to configurable system
- API Keys: Existing plain text API keys automatically encrypted
- Configuration Preservation: All existing settings preserved during upgrade
After upgrading to version 2.0.0, administrators should:
- Review Trigger Statuses: Verify that the correct order statuses are selected for invitation triggering
- Configure New Features:
- Set up invitation template ID if using custom templates
- Configure category exclusions if needed
- Enable test mode for pre-production testing
- Test Configuration: Use test mode to verify all settings before production use
- PrestaShop: 1.7.0.0 or higher
- PHP: 7.4 or higher (as per PrestaShop requirements)
- cURL: Required for API communications
- JSON: Required for data serialization
Previous versions focused on core functionality:
- Basic invitation sending system
- Widget integration (trust badge and product reviews)
- API communication with Custplace service
- Basic configuration options
Note: This changelog documents all changes made during the development of version 2.0.0. For technical support or questions about any of these features, please contact support@custplace.com.