16 Commits

Author SHA1 Message Date
Valentin Lab
ef52addc7d fix: show article name and admin link in stock alert email
Fix ``AlerteStock`` to use ``name`` instead of non-existent ``title``
field on articles, so the article name actually appears in the email.
Add ``lien_article`` variable with a direct link to the admin article
edit page. Update the DB template with a button and text link.
2026-02-20 13:05:31 +01:00
Valentin Lab
5325fa1f06 new: send alert email when Paybox payment arrives on cancelled order
When a Paybox callback confirms payment on an order with status 4
(Annulé), the payment is still recorded but the order status is no
longer forced to « Préparation ». Instead, an alert email is sent to
``commande@jardinenvie.com`` warning that a refund is likely needed.

New ``AlertePaiementAnnule`` mailable with DB template providing order
ref, amount, customer info and payment reference. New method
``OrderMails::sendCancelledOrderPaymentAlert()`` handles the dispatch.
2026-02-20 11:52:03 +01:00
Valentin Lab
936c9473a7 new: send stock alert email when offer stock crosses threshold
When a purchase causes an offer's ``stock_current`` to drop to or below
its ``minimum_ondemand`` threshold, an email is sent to
``commande@jardinenvie.com`` using an editable mail template (Spatie
``MailTemplate``).

The check runs in ``OfferStocks::decreaseStock()`` after updating stock.
Only threshold-crossing events trigger the alert (not every low-stock
sale).  Failures are caught and logged to avoid disrupting the order
flow.
2026-02-13 07:13:56 +01:00
Valentin Lab
4fbbe991d9 fix: order confirmation email shows wrong payment method and incomplete address
The email template had "Carte de crédit" hardcoded regardless of the
actual payment method. The address blocks were also missing the
``address2`` and ``name`` fields.

- Add ``mode_paiement``, ``livraison_nom``, ``facturation_nom``,
  ``livraison_adresse2``, ``facturation_adresse2`` to
  ``ConfirmationCommande`` Mailable
- Migration to replace hardcoded payment label with
  ``{{mode_paiement}}`` and add ``address2`` fields in DB template
- Migration to add ``name`` fields before each address block
2026-02-09 07:23:50 +01:00
ludo
592402a6c1 fixes 2025-02-15 12:12:42 +01:00
ludo
befaa40b48 fixes 2025-01-03 03:46:45 +01:00
ludo
5144c1f7fd fix devops error 2024-01-05 01:30:46 +01:00
Ludovic CANDELLIER
5f215cef81 coding style 2023-09-13 22:53:37 +02:00
Ludovic CANDELLIER
da48f41ec0 minor fix on updating status of order, upgrade datatables 2023-09-13 22:17:49 +02:00
Ludovic CANDELLIER
9f9b7173d7 fixes on mail templates, change order edit layout, add DeliveryTypes, DeliveryTypeCalculations & DeliveryPackages 2023-05-24 23:30:29 +02:00
Ludovic CANDELLIER
313525a25b finish implementing mails 2023-04-17 00:27:03 +02:00
Ludovic CANDELLIER
7d1a34a12e simplify variables names for templates, refactor to be multi-model 2023-03-28 00:17:04 +02:00
Ludovic CANDELLIER
4f9f9b296d cosmetic fixes, enhance profile, fix mails, ... 2023-03-14 23:33:14 +01:00
Ludovic CANDELLIER
b3d16a06b0 adapt to laravel 9 2023-02-27 23:15:16 +01:00
Ludovic CANDELLIER
06107cb8fc Add overlay on css, adapt shelves, fix bienvenue mail on laravel 9 methods 2023-02-14 00:20:00 +01:00
Ludovic CANDELLIER
0ecc7c73c7 enhance components, add mailtemplate, add traits for translations, for stats 2023-02-13 22:52:39 +01:00