Added IVT product export Admin function
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
<div class="row col-12">
|
||||
<div><a href="<?=self::getUrl("Admin", "ivtImportMatchProducts")?>">IVT Produkte zu thetool Produkte matchen</a></div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
<div><a href="<?=self::getUrl("Admin", "ivtDownloadActiveProducts")?>">Produkte in Verwendung herunterladen</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
13
Layout/default/Admin/ivt_active_products.csv.php
Normal file
13
Layout/default/Admin/ivt_active_products.csv.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
ob_end_flush();
|
||||
header("Content-type: text/csv");
|
||||
header('Content-disposition: attachment; filename="ivtproducts-active-'.date('Y-m-d_H-i-s').'.csv"');
|
||||
?>
|
||||
IVT ID;Typ;Produkt;Standardpreis;Anzahl Kunden;Kunde
|
||||
<?php
|
||||
$types = array('-----', 'xDSL', 'FTTH', 'FTTB', 'DOCSIS', 'Funk', 'Telefon', 'Webhosting', 'Carrier', 'Housing', 'TV');
|
||||
foreach($products as $product_id => $product):
|
||||
?>
|
||||
<?=$product_id?>;"<?=$types[$product['product']->typ]?>";"<?=$product['product']->name?>";<?=$product['product']->price?>;<?=$product['count']?>;<?=($product['customer']) ? $product['customer'] : ""?>;
|
||||
<?php
|
||||
endforeach;
|
||||
Reference in New Issue
Block a user