PrestaShop / PrestaShop

PrestaShop is the universal open-source software platform to build your e-commerce solution.
https://www.prestashop-project.org/
Other
8.25k stars 4.82k forks source link

Stock update via webservice api do not trigger email/stock notifications on stock available #26272

Open tropicaldev opened 3 years ago

tropicaldev commented 3 years ago

Email notifications are not sent to costumer when stocks are updated via webservice api

Expected behavior Email notifications sent to costumer when stocks are updated via webservice api

Steps to Reproduce

  1. Install "Mail Alerts" module and configure to send costumer notifications on "Product availability"
  2. Sign in the store as a costumer
  3. Enter the page product A (with no stock available) and click "send me notification on stock"
  4. Check that an entry in table "ps_mailalert_customer_oos" is created for the costumer
  5. Update the stock of product A via webservice api sending the xml request using insonia, postman or other :
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
  <stock_available>
    <id>1</id>
    <id_product>1</id_product>
    <id_product_attribute>1</id_product_attribute>
    <id_shop>1</id_shop>
    <id_shop_group>0</id_shop_group>
    <quantity>10</quantity>
    <depends_on_stock>0</depends_on_stock>
    <out_of_stock>0</out_of_stock>
    <location>somelocation</location>
  </stock_available>
</prestashop>
  1. Check in the store that stock of product A is updated
  2. Check that emails are not send to the costumer (table "ps_mailalert_customer_oos" still has the entry for the costumer)

Additional information

hibatallahAouadni commented 3 years ago

Hello @tropicaldev

Sorry for the late response :pray: I was able to reproduce the issue with PrestaShop version 1.7.8.0. I’ll add this to the debug backlog so that it’s fixed.

Please be aware that due to the high number of reported issues, some bugs might take a very long time to be resolved. If this issue is important to you and you cannot wait for it to be fixed on the project’s own time, we strongly suggest you consider hiring a specialist to help you.

If you manage to get the problem fixed, then please contribute the fix back to the project as a Pull Request. Remember that the more people contribute, the better PrestaShop becomes for everyone.

Thank you

conricit commented 1 year ago

Hi everyone, I still find this BUG present in the prestashop 8.1.1 version ! Anyone found a solution?