Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/Jobs/Emails/IMailTemplatesConstants.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface IMailTemplatesConstants
const net_selling_price = 'net_selling_price';
const new_category = 'new_category';
const number = 'number';
const main_venue_address = 'main_venue_address';
const old_category = 'old_category';
const order_amount = 'order_amount';
const order_amount_adjusted = 'order_amount_adjusted';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Illuminate\Support\Facades\Log;
use libs\utils\FormatUtils;
use models\summit\SummitAttendeeTicket;
use models\summit\SummitVenue;
use SimpleSoftwareIO\QrCode\Facades\QrCode;
/**
* Class SummitAttendeeTicketEmail
Expand Down Expand Up @@ -98,6 +99,13 @@ public function __construct(SummitAttendeeTicket $ticket, array $payload = [], ?

$payload[IMailTemplatesConstants::promo_code] = ($ticket->hasPromoCode()) ? $ticket->getPromoCode()->getCode() : '';

$main_venue_addresses = collect($ticket->getOrder()->getSummit()->getMainVenues())
->map(function(SummitVenue $venue) {
return $venue->getAddress1() . ' ' . $venue->getAddress2() . ', ' . $venue->getCity() . ', ' . $venue->getState();
})->toArray();

$payload[IMailTemplatesConstants::main_venue_address] = implode(' - ', $main_venue_addresses);

Comment thread
romanetar marked this conversation as resolved.
$support_email = $summit->getSupportEmail();
$payload[IMailTemplatesConstants::support_email] = !empty($support_email) ? $support_email : Config::get("registration.support_email", null);

Expand Down Expand Up @@ -196,6 +204,7 @@ public static function getEmailTemplateSchema(): array{
$payload[IMailTemplatesConstants::owner_full_name]['type'] = 'string';
$payload[IMailTemplatesConstants::owner_company]['type'] = 'string';
$payload[IMailTemplatesConstants::promo_code]['type'] = 'string';
$payload[IMailTemplatesConstants::main_venue_address]['type'] = 'string';
$payload[IMailTemplatesConstants::support_email]['type'] = 'string';
$payload[IMailTemplatesConstants::message]['type'] = 'string';

Expand Down