Skip to content

[BUG] Customer is able to add notification for product in stock, if he adds it into his cart #153

@Hlavtox

Description

@Hlavtox

Describe the bug and add attachments

The module has faulty logic to show the prompt for watchdog. It allows you to set notification and receive them even for products that are in stock. See steps to reproduce.

Expected behavior

Product must take the real stock, without the cart quantity subtracted, to work properly.

Steps to reproduce

  1. Allow product stock notifications in this module, in it's settings.
  2. Create product - 3 pieces in stock, OOSP disabled.
  3. Go to FO to this product, see that you can buy 3 pieces.
  4. Add 3 pieces to cart, refresh the page.
  5. See that you can add a notification. For a product that is in stock.🔴
  6. Do it.
  7. Another customer buys it = simulate it by changing stock of this product ot 2 in the backoffice.
  8. You receive an email that the product is back in stock. For a product that is in stock. 🔴

PrestaShop version(s) where the bug happened

Not relevant

cc @tblivet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Waiting for QA

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions