First off, thank you for considering contributing to the Quick Customer module! It's people like you that make this module better for everyone.
By participating in this project, you are expected to uphold our Code of Conduct:
- Be respectful and inclusive
- Welcome newcomers
- Focus on what is best for the community
- Show empathy towards other community members
Before creating bug reports, please check existing issues as you might find that you don't need to create one. When you are creating a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Describe the behavior you observed and what you expected
- Include screenshots if relevant
- Include your environment details:
- Perfex CRM version
- PHP version
- Browser and version
- Operating system
Feature suggestions are tracked as GitHub issues. When creating a feature suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested feature
- Explain why this feature would be useful
- List any alternatives you've considered
- Fork the repository
- Create a new branch from
main:git checkout -b feature/your-feature-name
- Make your changes
- Test thoroughly on a Perfex CRM installation
- Commit your changes with clear commit messages:
git commit -m "Add feature: description of feature" - Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request
- Follow PSR-12 coding standards
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and small
- Use type hints where appropriate
Example:
/**
* Create a new customer from modal form
*
* @return void Outputs JSON response
*/
public function create()
{
// Implementation
}- Use ES5 syntax for maximum compatibility
- Use semicolons
- Use meaningful variable names
- Add comments for complex logic
- Wrap code in IIFE or jQuery ready function
Example:
(function($) {
'use strict';
// Your code here
})(jQuery);- Use meaningful class names
- Prefix custom classes to avoid conflicts
- Keep specificity low
- Add comments for sections
Example:
/* Quick Customer Modal Styles */
.quick-customer-modal .form-group {
margin-bottom: 15px;
}Before submitting a pull request, ensure:
- Code works on Perfex CRM 2.3.0+
- Tested on PHP 8.1+
- No JavaScript errors in console
- Module activates/deactivates properly
- Permissions are respected
- Works in Chrome, Firefox, Safari
- Responsive design works on tablet
- No conflicts with other modules
- Language strings are translatable
We welcome translations! To add a new language:
- Copy
language/english/quick_customer_lang.php - Create folder:
language/{language_code}/ - Translate all strings in the file
- Test the translation in Perfex CRM
- Submit a pull request
Example language codes:
- Spanish:
spanish - French:
french - German:
german - Portuguese:
portuguese
Use clear and meaningful commit messages:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
Examples:
feat: Add duplicate customer detection
fix: Modal not closing after creation
docs: Update installation instructions
style: Format code according to PSR-12
Understanding the module structure will help you contribute:
quick_customer/
├── quick_customer.php # Main module file
├── install.php # Activation hook
├── assets/
│ ├── quick_customer.js # Frontend JavaScript
│ └── quick_customer.css # Styles
├── controllers/
│ └── Quick_customer.php # AJAX controller
├── language/
│ └── english/
│ └── quick_customer_lang.php # Translations
└── views/
└── customer_modal.php # Modal HTML
Feel free to open an issue with the question label if you have any questions about contributing.
Contributors will be recognized in the README.md file. Thank you for your contributions! 🎉