14 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
4f3ab05757 fix: use absolute URL for logo in all mail templates
The logo ``src`` was ``/storage/photos/shares/logo.png`` — a relative
path to a file that doesn't exist.  Email clients cannot resolve
relative URLs.  Replaces with the absolute URL to the actual logo at
``https://boutique.jardinenvie.com/img/logo.png`` across all 4 mail
templates.
2026-02-09 09:37:49 +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
Valentin Lab
9c1f3dfed2 new: show payment-specific confirmation for check/wire orders
Display a tailored confirmation message when the customer pays by
check or wire transfer, including a warning about the 30-day
cancellation policy. The payment type is passed as a query parameter
so the message survives page reloads.

- Add ``getOrderConfirmedByCheckContent()`` and
  ``getOrderConfirmedByWireContent()`` to ``Contents`` repository
- Flash ``payment_type`` through redirect query parameter
- Add migration inserting content rows (id 10, 11)
- Update confirmed view with green checkmark and warning icon
2026-02-09 06:47:18 +01:00
Valentin Lab
7e93219774 fix: allow to re-use a deleted ref in articles 2025-10-15 12:05:16 +02:00
Valentin Lab
8d130b9741 new: add channel management 2025-10-05 09:39:27 +02:00
Valentin Lab
36764f2647 fix: make save button avoid error 500 in delivery method admin page 2025-10-05 03:28:03 +02:00
ludo
64a218afc2 coding style 2024-02-22 19:35:51 +01:00
ludo
869b148e20 add seo 2024-02-19 23:51:32 +01:00
ludo
15a6621a56 add shop cart storage 2024-02-07 21:54:58 +01:00
ludo
1bc9bf9fe9 add migration to catrt storage, update SCOUT 2024-01-29 23:45:55 +01:00
ludo
17e322cd88 update migrations 2024-01-22 22:47:20 +01:00