Skip to content

fiae2020/prestashop-shortfacts-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Product Short Facts (Highlights or Bulletpoints or USPs) Module for PrestaShop: Essential for Boosting Conversions!

If you're running a PrestaShop store and want to make your product pages truly stand out, you absolutely need to check out the Product Short Facts module. This tool is designed to grab customer attention and significantly improve your conversion rates by highlighting key product information right where it matters most.

✨ Why You Need This Module

  • Boost Conversions: Easily add eye-catching highlights like "Free Shipping" or "2-Year Warranty" directly to your product pages. These quick facts build trust and encourage purchases.
  • Professional Look: Presents your product benefits with beautiful checkmark styling and a design that looks great on both desktops and mobile devices.
  • Save Time: Got a lot of products? No problem! The module supports bulk import via CSV/text format for quick and easy setup.
  • Flexible Integration: With over 7 hook positions, it integrates seamlessly with PrestaShop 1.7.x and 8.x, allowing you to display facts exactly where you want them.
  • Secure & Fast: Built for performance and security, featuring cached templates and protection against common vulnerabilities like XSS and SQL injection.

πŸ” What Can You Highlight?

  • Unique Selling Points (USPs): "Vegan-Friendly," "Handmade," "Ethically Sourced."
  • Services & Guarantees: "24h Delivery," "Money-Back Guarantee," "Free Returns."
  • Certifications & Awards: "Organic Certified," "Award-Winning Design."
  • Promotions: "Limited Stock," "Sale Item."

⚑ Get It Now!

This module is a game-changer for improving product page trust and overall conversions. It's MIT Licensed and compatible with PrestaShop 1.7.1+ & 8.x.

πŸ”— Find the module here:

  • PrestaShop Forums Topic

Don't miss out on this simple yet powerful way to make your products more appealing to potential buyers!

Installation Guide

Folder Structure

Create the following folder structure in your PrestaShop /modules/ directory:

modules/productshortfacts/
β”œβ”€β”€ productshortfacts.php (main module file)
β”œβ”€β”€ config.xml (module configuration)
β”œβ”€β”€ views/
β”‚   β”œβ”€β”€ templates/
β”‚   β”‚   β”œβ”€β”€ hook/
β”‚   β”‚   β”‚   └── product_short_facts.tpl
β”‚   β”‚   └── admin/
β”‚   β”‚       └── admin_product_form.tpl
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── front.css
β”‚   └── js/
β”‚       └── front.js
β”œβ”€β”€ translations/
β”‚   β”œβ”€β”€ en.php
β”‚   └── de.php (optional)
└── logo.png (16x16 module icon)

Installation Steps

  1. Download/Create Files:

    • Copy all the provided files to the correct folder structure
    • Ensure proper file permissions (644 for files, 755 for folders)
  2. Upload Module:

    • ZIP the entire productshortfacts folder
    • Go to PrestaShop Admin β†’ Modules β†’ Module Manager
    • Click "Upload a module" and select your ZIP file
    • Or copy the folder directly to /modules/productshortfacts/
  3. Install Module:

    • Find "Product Short Facts" in the module list
    • Click "Install"
    • The module will create the database table automatically
  4. Configure Module:

    • Go to Module Settings
    • Choose your preferred display hook location
    • Enable/disable checkmarks
    • Add your author information and Fiverr link

Features

For Store Administrators:

  • βœ… Easy Product Management: Add short facts directly in product editing page
  • βœ… Bulk Import: Import multiple product facts via CSV-like format
  • βœ… Flexible Display: Choose from 7 different hook positions
  • βœ… Responsive Design: Works on all devices
  • βœ… Multi-language Support: Ready for translations

For Customers:

  • βœ… Eye-catching Design: Beautiful checkmarks and modern styling
  • βœ… Mobile Optimized: Perfect display on all screen sizes
  • βœ… Fast Loading: Lightweight and optimized code
  • βœ… Accessible: Screen reader friendly

Hook Positions

For PrestaShop 8.x, the module is optimized to use the most effective hook:

  • displayProductAdditionalInfo - Product additional information tab (Recommended for PrestaShop 8.x)

The module also uses these essential admin hooks:

  • displayAdminProductsExtra - For adding short facts in the product edit page
  • actionProductSave - For saving short facts when a product is saved

Usage Instructions

Adding Short Facts to Products:

  1. Go to Catalog β†’ Products
  2. Edit any product
  3. Scroll to Product Short Facts section
  4. Add your key features (e.g., "Free shipping worldwide")
  5. Click Save

Bulk Import:

  1. Go to Modules β†’ Product Short Facts β†’ Configure
  2. Use the Bulk Import section
  3. Format: product_id|short_fact_text (one per line)
  4. Example:
    1|Fast shipping worldwide
    2|30-day money back guarantee
    3|Free technical support
    

Database Schema

The module creates this table:

CREATE TABLE `ps_product_shortfacts` (
    `id_shortfact` int(11) NOT NULL AUTO_INCREMENT,
    `id_product` int(11) NOT NULL,
    `shortfact_text` TEXT NOT NULL,
    `position` int(11) DEFAULT 1,
    `active` tinyint(1) DEFAULT 1,
    `date_add` datetime NOT NULL,
    `date_upd` datetime NOT NULL,
    PRIMARY KEY (`id_shortfact`),
    KEY `id_product` (`id_product`)
);

Performance Optimizations

  • βœ… Caching: Template caching implemented for faster page loads
  • βœ… Reduced Hook Usage: Only essential hooks are registered for better performance
  • βœ… Optimized Queries: Database queries are optimized for speed
  • βœ… Input Validation: Client-side validation reduces server load
  • βœ… Efficient Code: Streamlined code with proper error handling

Customization

Styling:

  • Edit views/css/front.css to customize appearance
  • Use CSS classes: .product-short-facts, .short-fact-item, .short-fact-checkmark

Templates:

  • Modify views/templates/hook/product_short_facts.tpl for frontend display
  • Edit views/templates/admin/admin_product_form.tpl for admin interface

Compatibility

  • βœ… PrestaShop 1.7.1.0+ - Fully supported
  • βœ… PrestaShop 8.x - Fully supported and optimized
  • βœ… PHP 7.2+ - Required
  • βœ… MySQL 5.6+ - Required

Security Features

  • βœ… SQL Injection Protection: All database queries use parameterized queries and proper validation
  • βœ… XSS Protection: All output is properly escaped using PrestaShop's Tools::safeOutput() and Smarty's |escape filters
  • βœ… Input Validation: Form inputs are validated using pattern matching and PrestaShop's Validate class
  • βœ… CSRF Protection: Security tokens are implemented in all forms
  • βœ… Data Sanitization: All user inputs are sanitized before processing

Troubleshooting

Module not appearing:

  • Check file permissions
  • Clear cache: Advanced Parameters β†’ Performance β†’ Clear cache
  • Check PHP error logs

Styles not loading:

  • Ensure CSS file is in correct path
  • Force compile CSS in Performance settings
  • Check browser console for errors

Database errors:

  • Check MySQL user permissions
  • Verify table prefix in queries
  • Check PrestaShop debug mode for detailed errors

Support

Module Author Information:

For professional customizations and support, contact via Fiverr!

License

This module is released under the MIT License.

Changelog

v1.0.1 - Security & Performance Update

  • Optimized for PrestaShop 8.x compatibility
  • Focused on essential hooks for better performance
  • Added security token validation
  • Fixed SQL injection vulnerabilities
  • Added XSS protection
  • Improved input validation
  • Added caching for better performance
  • Enhanced error handling

v1.0.0 - Initial Release

  • Basic short facts functionality
  • Multiple hook positions
  • Admin interface
  • Bulk import feature
  • Responsive design
  • Multi-language ready

β˜• Found this post helpful or enjoyable?

You can support my work by buying me a coffee or donating via PayPal. Every bit helps and is much appreciated!

Buy Me A Coffee Β  Donate via PayPal

Made with ❀️ for the PrestaShop community

Free Forever β€’ Open Source β€’ Enterprise Ready


About

Product Short Facts (Bulletpoints or Highlight) Module for PrestaShop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors