CoolCMS API

OrderAdminNoticeManager
in package

FinalYes

E-mail to the shop administrator about a new order (`ES_NEW_ORDER`).

Sent once, from OrderCheckoutManager::place() after the order is created, the same place where the admin bell notification ORDER_NEW comes from (the presenter produces it right after place()). Status changes do not send it, and an order created in the administration does not either (the administrator knows about it). It is an addition to the bell, so the template is turned off by default and the operator turns it on in System > E-maily.

Fail-soft: the order already exists, so a failure is only logged to eshop.general; the e-mail goes to the queue on its own connection (no transaction is open after place()).

Table of Contents

Constants

ADMIN_ORDER_DESTINATION  : string = 'Admin:Eshop:Order:edit'
Admin edit action of the order; the link goes through the admin router (pretty URL when the page has one).

Properties

$emailGenerator  : OrderEmailGenerator
$emailQueueManager  : EmailQueueManager
$linkGenerator  : LinkGenerator
$siteBaseUrl  : SiteBaseUrl

Methods

__construct()  : mixed
adminOrderLink()  : string
Absolute link to the order in the administration, or `''` when no absolute address is known (CLI without `site.baseUrl`); the template then leaves the link out.
sendNewOrderEmail()  : bool
Queues the new-order e-mail to the administrator; returns whether one was queued (`false` also for a template turned off, which is not an error).

Constants

ADMIN_ORDER_DESTINATION

Admin edit action of the order; the link goes through the admin router (pretty URL when the page has one).

private string ADMIN_ORDER_DESTINATION = 'Admin:Eshop:Order:edit'

Properties

Methods

Absolute link to the order in the administration, or `''` when no absolute address is known (CLI without `site.baseUrl`); the template then leaves the link out.

public adminOrderLink(int $orderId) : string
Parameters
$orderId : int
Return values
string

sendNewOrderEmail()

Queues the new-order e-mail to the administrator; returns whether one was queued (`false` also for a template turned off, which is not an error).

public sendNewOrderEmail(Order $order) : bool
Parameters
$order : Order
Return values
bool
On this page

Search results