`n
A secure PrestaShop module for managing category-based discounts with time period settings, comprehensive rule management, and protection against security vulnerabilities.
Category Discount is a PrestaShop module that allows you to manage discounts on specific product categories. It offers features for applying, enabling, and disabling discounts with time period settings for each rule. The module provides secure discount management and protects against common security vulnerabilities.
The module was built specifically for PrestaShop 1.7.x with PHP 7.1+ compatibility. It implements secure coding practices including CSRF protection using Tools::getAdminTokenLite and SQL injection prevention through Db::getInstance()->execute and Db::getInstance()->executeS methods. The module integrates seamlessly with PrestaShop's promotion system while maintaining security standards.
Security is a primary focus of this module. All administrative actions are protected using Tools::getAdminTokenLite to prevent CSRF attacks. Database operations utilize secure methods to protect against SQL injection. The module also prevents conflicts by checking for existing special prices before applying category discounts, ensuring data integrity and preventing pricing conflicts.
Download the module's .zip file from the PrestaShop Marketplace or module repository.
Go to your PrestaShop admin panel and navigate to Modules and Services → Modules.
Click on "Upload a module" and upload the .zip file you downloaded.
Once the upload is complete, click the "Install" option to activate the module.
After installation, the module will appear in the Promotions section of your admin panel.
If a special price already exists for any product in the category, the module will prevent the discount from being applied and display a relevant notification to maintain pricing integrity.
Ensure there are no other active special prices for the products in the category, as the module does not override other prices to maintain data integrity.
Make sure there are no active discount rules. Disable or delete all rules from the module's management page before attempting to uninstall.
Discounts start and end based on the server's date and time. The module displays the current date and time at the bottom of the configuration form to help you adjust the discount accordingly.
No, the module allows setting up a discount for only one category at a time. To create multiple discounts, you need to define rules for each category separately.
The module is designed to prevent being disabled or uninstalled if there are active rules. You will need to disable all rules first.
The module will display notifications in the admin panel when a discount's expiration date is approaching.
Let's discuss how I can help bring your online store vision to life with the same level of expertise and attention to detail demonstrated in the Rima project.