CMXX - Webhooks and giftcards
This commit is contained in:
@@ -4,21 +4,20 @@
|
||||
|
||||
<?=template_order_email_header()?>
|
||||
<?php include './custom/translations/translations_'.strtoupper(language_code).'.php';?>
|
||||
|
||||
</tr>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?=$address_name?><br>
|
||||
<?=$address_street?><br>
|
||||
<?=$address_zip?>, <?=$address_city?><br>
|
||||
<?=$address_country?>
|
||||
<?=$invoice_cust['customer']['name']?><br>
|
||||
<?=$invoice_cust['customer']['street']?><br>
|
||||
<?=$invoice_cust['customer']['zip']?>, <?=$invoice_cust['customer']['city']?><br>
|
||||
<?=$invoice_cust['customer']['country']?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><br></td></tr>
|
||||
<tr>
|
||||
<td><h2>Invoice: <?=$order_id?></h2></td>
|
||||
<td><p>Date: <?php echo date("Y-m-d", strtotime($order_created))?></p></td>
|
||||
<td><h2>Invoice: <?=$invoice_cust['invoice']['id']?></h2></td>
|
||||
<td><p>Date: <?php echo date("Y-m-d", strtotime($invoice_cust['invoice']['created']))?></p></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -39,45 +38,43 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$subtotal = 0;
|
||||
foreach($products as $product): ?>
|
||||
foreach($invoice_cust['products'] as $product): ?>
|
||||
<tr>
|
||||
<td><?=$product['name']?></td>
|
||||
<td><?=$product['item_options']?></td>
|
||||
<td><?=$product['item_quantity']?></td>
|
||||
<td><?=currency_code?> <?=number_format($product['item_price'],2)?></td>
|
||||
<td style="text-align:right;"><?=currency_code?> <?=number_format($product['item_price'] * $product['item_quantity'],2)?></td>
|
||||
<td><?=${$product['product_name']} ?? $product['product_name'] ?></td>
|
||||
<td><?=implode(", ", $product['options'])?></td>
|
||||
<td><?=$product['quantity']?></td>
|
||||
<td><?=currency_code?> <?=number_format($product['price'],2)?></td>
|
||||
<td style="text-align:right;"><?=currency_code?> <?=number_format($product['line_total'],2)?></td>
|
||||
</tr>
|
||||
<?php $subtotal += $product['item_price']*$product['item_quantity'];?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td colspan="5" class="item-list-end"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="subtotal"><?=$total_subtotal?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($subtotal,2)?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($invoice_cust['pricing']['subtotal'],2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="subtotal"><?=$total_discount?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($total-($subtotal+$shippingtotal),2)?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($invoice_cust['pricing']['discount_total'],2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="shipping"><?=$total_shipping?></td>
|
||||
<td class="num"><?=currency_code?><?=number_format($shippingtotal,2)?></td>
|
||||
<td class="num"><?=currency_code?><?=number_format($invoice_cust['pricing']['shipping_total'],2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="tax"><?=$total_vat?></td>
|
||||
<td class="num" style="border-bottom: 1px solid #0e0f10;"><?=currency_code?><?=number_format($taxtotal,2)?></td>
|
||||
<td class="num" style="border-bottom: 1px solid #0e0f10;"><?=currency_code?><?=number_format($invoice_cust['pricing']['tax_total'],2)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="total"><?=$total_total?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($total,2)?></td>
|
||||
<td class="num"><?=currency_code?> <?=number_format($invoice_cust['pricing']['payment_amount'],2)?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($order['payer_email'] == 'Paid'){
|
||||
<?php if($invoice_cust['invoice']['payment_status'] === 1){
|
||||
echo '
|
||||
<div class="content-wrapper">
|
||||
<p>Het totaalbedrag van deze factuur is betaald</p>
|
||||
|
||||
@@ -149,7 +149,9 @@ define('db_user','morvalwatches');//morvalwatches_prod
|
||||
define('db_pass','4~gv71bM6');
|
||||
// Database name
|
||||
define('db_name','shoppingcart_advanced'); //morvalwatches
|
||||
// API BASE URL
|
||||
/* API */
|
||||
define('clientID','paul@veliti.nl'); //morvalwatches
|
||||
define('clientsecret','test1234'); //morvalwatches
|
||||
define('api_url','https://dev.veliti.nl/api.php'); //morvalwatches
|
||||
define('img_url',substr(api_url, 0, -8));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user