diff options
| author | karl <noreply@maennchen1.de> | 2023-03-29 08:43:18 +0000 |
|---|---|---|
| committer | karl <noreply@maennchen1.de> | 2023-03-29 08:43:18 +0000 |
| commit | 15704b32e727f5d9eda344204df467913c754066 (patch) | |
| tree | 67f78b7b06b2ce577fc40539064b870473700ef1 | |
| parent | 8736dee8aa2e83dea1a237053f626d6103708e88 (diff) | |
- Bugfix: PHP 8.2 Optimierungen
- Feature: Warenwert kann nun in der Bestellverwaltung angezeigt werden
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@8264 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/admin/konfiguration.phtml | 1 | ||||
| -rw-r--r-- | views/admin/versandzonen_list.phtml | 2 | ||||
| -rw-r--r-- | views/mods/mod_abo/index.phtml | 10 | ||||
| -rw-r--r-- | views/mods/mod_export/profil.phtml | 4 | ||||
| -rw-r--r-- | views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml | 18 | ||||
| -rw-r--r-- | views/order/index.phtml | 13 |
6 files changed, 33 insertions, 15 deletions
diff --git a/views/admin/konfiguration.phtml b/views/admin/konfiguration.phtml index 8d4a527..e769137 100644 --- a/views/admin/konfiguration.phtml +++ b/views/admin/konfiguration.phtml @@ -64,6 +64,7 @@ <?php echo wpsg_drawForm_Input('wpsg_produkte_perpage', __('Produkte pro Seite', 'wpsg'), $this->get_option('wpsg_produkte_perpage'), array('help' => 'ProduktePerPage')); ?>
<?php echo wpsg_drawForm_Input('wpsg_order_perpage', __('Bestellungen pro Seite', 'wpsg'), $this->get_option('wpsg_order_perpage'), array('help' => 'Bestellung_pro_Seite')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_showincompleteorder', __('Unvollständige Best. in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showincompleteorder'), array('help' => 'unvollstaendige_Bestellung')); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_showvalueofgoods', __('Warenwert in Bestellverwaltung anzeigen', 'wpsg'), $this->get_option('wpsg_showvalueofgoods'), array('help' => 'Warenwert_Bestellung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_emptyorder_clear', wpsg_translate(__('Bestellungen für 0 #1# direkt abschließen', 'wpsg'), $this->get_option('wpsg_currency')), $this->get_option('wpsg_emptyorder_clear'), array('help' => 'Bestellung_0')); ?>
<?php echo wpsg_drawForm_Select('wpsg_afterinsert', __('Nach neuem Produkt im Warenkorb', 'wpsg'), array(
'0' => __('Auf Seite bleiben', 'wpsg'),
diff --git a/views/admin/versandzonen_list.phtml b/views/admin/versandzonen_list.phtml index ea230d2..55f7ea5 100644 --- a/views/admin/versandzonen_list.phtml +++ b/views/admin/versandzonen_list.phtml @@ -13,7 +13,7 @@ foreach ($arShipping as $s_key => $s) {
- if (intval($s['deleted']) !== 1 && intval($s['active']) === 1) {
+ if (intval($s['deleted']??'') !== 1 && intval($s['active']??'') === 1) {
$arShippingPreset[$s_key] = $s['name'];
diff --git a/views/mods/mod_abo/index.phtml b/views/mods/mod_abo/index.phtml index dc03e8f..b726fc0 100644 --- a/views/mods/mod_abo/index.phtml +++ b/views/mods/mod_abo/index.phtml @@ -79,9 +79,11 @@ <div class="col-lg-6">
<select name="filter[enddate_y]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
- <?php foreach ($this->view['enddate_years'] as $y) { ?>
- <option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
- <?php } ?>
+ <?php if(isset($this->view['enddate_years']) && !empty($this->view['enddate_years'])) {
+ foreach ($this->view['enddate_years'] as $y) { ?>
+ <option <?php echo ((wpsg_getStr($this->view['arFilter']['enddate_y']) == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
+ <?php }
+ } ?>
</select>
</div>
</div>
@@ -127,7 +129,7 @@ <th class="col_customer wpsg_order" data-order="customer"><?php echo __('Kunde', 'wpsg'); ?></th>
<th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
<th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
- <th class="col_products wpsg_order" data-order="products"><?php echo __('Abonnement', 'wpsg'); ?></th>
+ <th class="col_products wpsg_order" data-order="products"><?php echo __('Abonnement', 'wpsg'); ?></th>
<th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
<th class="col_time wpsg_order" data-order="expiration"><?php echo __('Laufzeit', 'wpsg'); ?></th>
<th class="col_state"><?php echo __('Status', 'wpsg'); ?></th>
diff --git a/views/mods/mod_export/profil.phtml b/views/mods/mod_export/profil.phtml index b471e0d..9284f71 100644 --- a/views/mods/mod_export/profil.phtml +++ b/views/mods/mod_export/profil.phtml @@ -222,7 +222,9 @@ <?php if ($this->hasMod('wpsg_mod_produktartikel')) { $temp = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array()); ?>
<?php $arProductCategorySelect = array(); foreach ($temp as $k => $v) $arProductCategorySelect[$v['term_id']] = $v['label']; ?>
- <?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1')], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
+ <?php $productCategoryIds = wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1'); ?>
+ <?php $selectedCategory = $arProductCategorySelect['-1'] ?? ''; ?>
+ <?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[$productCategoryIds], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
<?php } ?>
</form>
diff --git a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml index 0fe4a1d..e00dbb5 100644 --- a/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml +++ b/views/mods/mod_shippingadress/wpsg_order_view_customerdata.phtml @@ -44,21 +44,21 @@ <div class="modal-body">
<div id="shipping_dialog_content">
- <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']); ?>
- <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title'], array('noIndex' => true)); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_firma', __('Firma', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_firma']??''); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_title', __('Anrede', 'wpsg'), $this->view['arTitles'], $this->view['wpsg_mod_shippingadress']['shipping_title']??'', array('noIndex' => true)); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_vname', __('Vorname', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_vname']??''); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_name', __('Name', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_name']??''); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_strasse', __('Straße', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_strasse']??''); ?>
<?php if (wpsg_getStr($this->view['pflicht']['wpsg_showNr']) === '1') { ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_nr', __('Hausnummer', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_nr']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_nr', __('Hausnummer', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_nr']??''); ?>
<?php } ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']); ?>
- <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']); ?>
- <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_plz', __('Postleitzahl', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_plz']??''); ?>
+ <?php echo wpsg_drawForm_Input('dialog_shipping_ort', __('Ort', 'wpsg'), $this->view['wpsg_mod_shippingadress']['shipping_ort']??''); ?>
+ <?php echo wpsg_drawForm_Select('dialog_shipping_land', __('Land', 'wpsg'), $this->view['arCountry'], $this->view['wpsg_mod_shippingadress']['shipping_land']??''); ?>
<br />
diff --git a/views/order/index.phtml b/views/order/index.phtml index cd83cfb..0cbc80b 100644 --- a/views/order/index.phtml +++ b/views/order/index.phtml @@ -248,6 +248,7 @@ <th class="col_payment wpsg_order" data-order="payment"><?php echo __('Bezahlmethode', 'wpsg'); ?></th>
<th class="col_shipping wpsg_order" data-order="shipping"><?php echo __('Versandart', 'wpsg'); ?></th>
<th class="col_products wpsg_order" data-order="products"><?php echo __('Produkte', 'wpsg'); ?></th>
+ <?php if ($this->get_option('wpsg_showvalueofgoods')) { ?><th class="col_productsum wpsg_order" data-order="productsum"><?php echo __('Warenwert', 'wpsg'); ?></th><?php } ?>
<th class="col_sum wpsg_order" data-order="amount"><?php echo __('Bestellwert', 'wpsg'); ?></th>
<th class="col_state wpsg_order" data-order="state"><?php echo __('Status', 'wpsg'); ?></th>
</tr>
@@ -408,6 +409,18 @@ <?php } ?>
</td>
+ <?php if ($this->get_option('wpsg_showvalueofgoods')) { ?>
+ <td class="col_productsum">
+
+ <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
+ <?php foreach ($oOrderProducts as $oOrderProduct) { ?>
+ <?php $product_sum += $oOrderProduct->getPriceSum($this->getBackendTaxview()); ?>
+ <?php } ?>
+ <?php echo wpsg_ff($product_sum, $this->get_option('wpsg_currency')); ?>
+ <?php $product_sum = 0; ?>
+
+ </td>
+ <?php } ?>
<td class="col_sum">
<?php echo wpsg_ff($oOrder->getAmount(), $this->get_option('wpsg_currency')); ?>
</td>
|
