diff options
| author | Jean-Luc Beer <noreply@maennchen1.de> | 2025-09-12 08:17:31 +0000 |
|---|---|---|
| committer | Jean-Luc Beer <noreply@maennchen1.de> | 2025-09-12 08:17:31 +0000 |
| commit | 9bbdb358daed1771815731435162ed963f644300 (patch) | |
| tree | 329d184b361b36a32ddc85587c447956075a63af | |
| parent | fa3e4497c99dd1d63d0a27be919d8efa0c82242a (diff) | |
- voucher new column "Produkte"
- voucher product selection sorted and only active products
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8502 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/mods/mod_gutschein/index.phtml | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/views/mods/mod_gutschein/index.phtml b/views/mods/mod_gutschein/index.phtml index a665516..26931c4 100644 --- a/views/mods/mod_gutschein/index.phtml +++ b/views/mods/mod_gutschein/index.phtml @@ -76,7 +76,8 @@ <th class="wpsg_order col_start" data-order="start_date"><?php echo __("Start", 'wpsg'); ?></th>
<th class="wpsg_order col_end" data-order="end_date"><?php echo __("Ende", 'wpsg'); ?></th>
<th class="wpsg_order col_value" data-order="value"><?php echo __("Wert", 'wpsg'); ?></th>
- <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
+ <th class="wpsg_order col_product" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
+ <th class="wpsg_order col_status" data-order="status"><?php echo __("Status", 'wpsg'); ?></th>
</tr>
</thead>
<tbody>
@@ -124,6 +125,28 @@ }
?></td>
+ <td class="col_product"><?php
+
+ if ($oVoucher->getAllowedProduct()) {
+
+ $arAllowed = $oVoucher->getAllowedProduct();
+ $names = [];
+
+ foreach ($arAllowed as $productID) {
+ if (!wpsg_isSizedInt($productID)) continue;
+ try {
+ $p = wpsg_product::getInstance($productID);
+ $names[] = wpsg_hspc($p->getProductName());
+ } catch (\Exception $e) {}
+ }
+ echo implode(', ', $names);
+ } else if ($oVoucher->isLimitedProductgroup()) {
+ echo __('spezielle Produktgruppen', 'wpsg');
+ } else {
+ echo __('Alle', 'wpsg');
+ }
+
+ ?></td>
<td class="col_status">
<?php $comment = $oVoucher->comment; if (wpsg_isSizedString($comment)) { ?>
|
