Conditional product messages & CTAs

Presentation

Conditional product messages & CTAs is a PrestaShop module that allows you to display dynamic and personalized messages on product pages based on specific conditions such as stock level, price, or weight. It is designed for e-commerce merchants who want to automate alerts, informational notices, or promotional messages without manually editing each product description.

The module operates through a flexible rule-based system configured directly from the back-office. Once a rule is created, messages automatically appear on targeted products and disappear as soon as the defined conditions are no longer met.

Key benefits:

  • Conditional rules based on stock, price, and weight
  • Customizable message and CTA templates
  • Scheduling with start and end dates
  • Targeting by product, category, or entire catalog
  • Compatible with PrestaShop 8.x to 9.x

Features

Dynamic Conditional Rules

The module allows you to create rules using one or multiple conditions:

  • Stock (e.g., Stock < 5)
  • Price (e.g., Price > 100)
  • Weight (e.g., Weight > 30)

Conditions can be combined using AND / OR logic within condition groups, enabling complex scenarios such as:

  • Group 1: Stock < 10 AND Price > 50
  • OR
  • Group 2: Stock = 0

The message is displayed automatically when the defined criteria are satisfied.

Custom Message Templates

Seven system templates are included by default: Danger, Success, Warning, Info, Dark, Light, and Primary.

You can create unlimited custom templates with full control over:

  • Background color
  • Text color
  • Border style (type, width, radius)
  • Custom CSS

A live preview feature allows you to review the design before saving.

Call To Action (CTA) Buttons

Each message can include a configurable CTA button:

  • Multilingual button text
  • Internal or external URL
  • Open in new tab option
  • Positioning to the right or embedded within the message

Several button templates are provided (Danger, Info, Primary, Secondary, Success, Warning), and custom CTA styles can also be created.

Scheduling and Targeting

Messages can be scheduled with a start and end date, making them ideal for limited-time promotions.

Targeting options include:

  • All products
  • Specific products
  • One or multiple categories

The module is fully multilingual and compatible with all standard PrestaShop themes.

Installation

  1. Download the module from your PrestaShop Addons account
  2. In the back-office, go to Modules > Module Manager
  3. Click Upload a module
  4. Select the ZIP file
  5. Click Install, then Configure

The module is compatible with PrestaShop 8.0 to 9.x and requires PHP 8.1 or higher.

Configuration

Creating a Rule

Rule creation is handled through a 5-step wizard:

  1. General information (name, message, template, advanced options)
  2. CTA configuration
  3. Condition setup
  4. Product targeting
  5. Review and save

Once saved, the rule is automatically active.

Advanced Options

Advanced configuration includes:

  • Shortcode placement
  • Custom CSS class
  • Custom CSS ID
  • Scheduling (start and end dates)

The module can be inserted manually via hook:

  • Smarty: {hook h='displayWepresta_pmr'}
  • Twig: {{ renderhook('displayWepresta_pmr') }}

Requirements

  • PrestaShop 8.x or 9.x
  • PHP 8.1 or higher
  • Compatible with all themes
  • HTTPS recommended

FAQ

The message is not displaying

Please check:

  • The rule is active
  • The conditions are met
  • The product is correctly targeted
  • The scheduling dates are valid
  • PrestaShop cache has been cleared

Can system templates be modified?

No. System templates cannot be modified. You can create custom templates to meet your specific needs.

Are dynamic variables supported?

Currently, the module displays the message exactly as written. Dynamic variables are planned for a future release.

Support

Contact us through your WePresta customer area or by email for any questions or technical assistance.

Changelog

Version 1.0.0

  • Initial release
  • Conditional rules (stock, price, weight)
  • Message and CTA templates
  • Scheduling system
  • Product and category targeting
Loading...