Logidav Docs

SendingPreparedProductsEmailCommand extends ContainerAwareCommand
in package
uses LockableTrait

Table of Contents

Properties

$entityManger  : mixed

Methods

__construct()  : mixed
configure()  : mixed
execute()  : mixed
addSaleLog()  : mixed
Adds a log entry for a specific sale.
sendAsirPreparedProductsEmails()  : mixed
Sends email notifications for Asir prepared products.
sendCarrierPreparedTruckEmail()  : mixed
Sends email notifications for trucks that have been prepared and departed.
sendingMail()  : bool
sendMenzzoAndAsirInternalStockEmails()  : mixed
Sends email notifications for Menzzo and Asir internal stock products.

Properties

Methods

addSaleLog()

Adds a log entry for a specific sale.

private addSaleLog(int|string $saleId, string $message) : mixed

This method creates a new log entry associated with a sale and a user, storing a custom message. It retrieves the user and sale entities from their respective services and persists the log using the mz.salelog service.

Parameters
$saleId : int|string

The ID of the sale for which the log is being created.

$message : string

A custom message to include in the log entry.

Tags
throws
Exception

If there is an issue retrieving the user, sale, or saving the log entry.

sendAsirPreparedProductsEmails()

Sends email notifications for Asir prepared products.

private sendAsirPreparedProductsEmails() : mixed

This function retrieves products managed by the Asir supplier from the database that require email notifications. It sends the emails using a specified template and updates the database to mark the products as notified (preparation_mail_sent = 1).

sendCarrierPreparedTruckEmail()

Sends email notifications for trucks that have been prepared and departed.

private sendCarrierPreparedTruckEmail() : mixed

This function retrieves products associated with trucks that have departed but have not yet notified the customers. It sends the emails using a specified template and updates the database to mark the trucks as notified (customer_notified = 1).

sendingMail()

private sendingMail(array<string|int, mixed> $saleProduct, string $template, string $subject[, string|null $source = 'Menzzo' ]) : bool
Parameters
$saleProduct : array<string|int, mixed>
$template : string
$subject : string
$source : string|null = 'Menzzo'
Return values
bool

sendMenzzoAndAsirInternalStockEmails()

Sends email notifications for Menzzo and Asir internal stock products.

private sendMenzzoAndAsirInternalStockEmails() : mixed

This function retrieves products from the database that need email notifications, sends the emails using a specified template, and updates the database to mark the products as notified (preparation_mail_sent = 1).


        
On this page

Search results