#15706·opencart

[4.1.x.x] Catalog's specials show incorrect price

Author: tongo-angelovCreated Sep 27, 2026Updated Sep 28, 2026

What version of OpenCart are you reporting this for? 4.1.x.x

Describe the bug Specials' price is not correct

To Reproduce Steps to reproduce the behavior:

  1. Go to admin panel and add discount to Canon EOS 5D and set special to checked
  2. Go to catalog /index.php?route=product/special to view specials

Expected behavior If discount is set to 10%, price should be 10% less and not $10

Screenshots / Screen recordings Set special: Image product/special list:

Image

Server / Test environment (please complete the following information):

  • Ubuntu Server
  • PHP v8.3
  • Apache/2.4.58

Additional context

catalog/model/catalog/product.getSpecials gets discount's value without checking its type:

   $sql = "SELECT *, `p`.`price`, `ps`.`price` as `special` ...

query need to set special's value based on discount type:

   $sql = "SELECT *, `p`.`price`, (CASE WHEN `ps`.`type` = 'P' THEN (`p`.`price` - (`p`.`price` * (`ps`.`price` / 100))) WHEN `ps`.`type` = 'S' THEN (`p`.`price` - `ps`.`price`) ELSE `ps`.`price` END) AS `special` ...
Image