diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2020-04-27 04:07:19 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2020-04-27 04:07:19 +0000 |
| commit | ef7678be4649d041a651dc226427a58b6b49c9f2 (patch) | |
| tree | 8d3e0e0955d833b338f1c0d7a975135e748e0415 /views | |
| parent | cbfa0aeec5711e6ca684ebf7cd4094285858596c (diff) | |
- Feature: Umstellung PayPal Plus auf API V2
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7704 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views')
| -rw-r--r-- | views/js/frontend.js | 18 | ||||
| -rw-r--r-- | views/mods/mod_gutschein/add.phtml | 14 | ||||
| -rw-r--r-- | views/mods/mod_produktartikel/produkt_edit_allgemein.phtml | 4 | ||||
| -rw-r--r-- | views/order/product_table.phtml | 1 | ||||
| -rw-r--r-- | views/warenkorb/basket.phtml | 3 | ||||
| -rw-r--r-- | views/warenkorb/overview.phtml | 3 |
6 files changed, 33 insertions, 10 deletions
diff --git a/views/js/frontend.js b/views/js/frontend.js index b364265..98b9799 100644 --- a/views/js/frontend.js +++ b/views/js/frontend.js @@ -208,4 +208,20 @@ }
};
-
\ No newline at end of file +
+ wpsg_round = function(value, exp) {
+
+ if (typeof exp === 'undefined' || +exp === 0) return Math.round(value);
+
+ value = +value;
+ exp = +exp;
+
+ if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) return NaN;
+
+ value = value.toString().split('e');
+ value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)));
+
+ value = value.toString().split('e');
+ return +(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp));
+
+ }
\ No newline at end of file diff --git a/views/mods/mod_gutschein/add.phtml b/views/mods/mod_gutschein/add.phtml index 3166f21..cc0752a 100644 --- a/views/mods/mod_gutschein/add.phtml +++ b/views/mods/mod_gutschein/add.phtml @@ -22,22 +22,22 @@ <?php wpsg_drawForm_AdminboxStart(); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Betrag', 'wpsg'), wpsg_ff($this->view['mod_gutschein']['value'])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_value', __('Betrag', 'wpsg'), wpsg_ff(@$this->view['mod_gutschein']['value'])); ?>
<?php echo wpsg_drawForm_Input(false, __('Bereits verwendet'), wpsg_ff($used), ['field_id' => 'wpsg_voucher_used', 'readonly' => true]); ?>
<div style="margin-top:-15px;">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_coupon', __('Als Wertgutschein behandeln', 'wpsg'), $this->view['mod_gutschein']['coupon']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_coupon', __('Als Wertgutschein behandeln', 'wpsg'), @$this->view['mod_gutschein']['coupon']); ?>
</div>
<div class="wpsg_mod_gutschein_coupon wpsg_mod_gutschein_coupon_0">
<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_calc', __('Berechnung', 'wpsg'), array(
'w' => __('Absoluter Betrag', 'wpsg'),
'p' => __('Prozentual', 'wpsg')
- ), $this->view['mod_gutschein']['calc']); ?>
+ ), wpsg_getStr($this->view['mod_gutschein']['calc'], 'w')); ?>
</div>
- <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), $this->view['mod_gutschein']['start'], array('datepicker' => true)); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), $this->view['mod_gutschein']['end'], array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_start', __('Gültig ab', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['start']), array('datepicker' => true)); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_end', __('Gültig bis', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['end']), array('datepicker' => true)); ?>
<?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
@@ -58,10 +58,10 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_minvalue', __('Minimaler Warenwert', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['minvalue']), array('help' => 'wpsg_mod_gutschein_minvalue')); ?>
<?php if (!wpsg_isSizedInt($this->view['edit_id'])) { ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), $this->view['mod_gutschein']['count']); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_gutschein_count', __('Menge', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['count'], '1')); ?>
<?php } ?>
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), $this->view['mod_gutschein']['multi']); ?>
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_gutschein_multi', __('Mehrfach verwendbar', 'wpsg'), wpsg_getStr($this->view['mod_gutschein']['multi'], '0')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_gutschein_comment', __('Kommentar', 'wpsg'), @$this->view['mod_gutschein']['comment']); ?>
<?php if ($this->hasMod('wpsg_mod_productgroups') && wpsg_isSizedArray($this->view['wpsg_mod_gutschein']['arProductGroups'])) { ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_gutschein_productgroups', __('Beschränkung auf Produktgruppen', 'wpsg'), $this->view['wpsg_mod_gutschein']['arProductGroups'], $this->view['mod_gutschein']['productgroups'], array('multiple' => ((sizeof($this->view['wpsg_mod_gutschein']['arProductGroups']) > 5)?5:sizeof($this->view['wpsg_mod_gutschein']['arProductGroups'])), 'help' => 'wpsg_mod_gutschein_productgroups')); ?>
diff --git a/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml index 2a49cfa..5b0359b 100644 --- a/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml +++ b/views/mods/mod_produktartikel/produkt_edit_allgemein.phtml @@ -9,9 +9,9 @@ <?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[path]', __('URL Path Segment', 'wpsg'), wpsg_getStr($this->view['data']['post_name']), array('help' => 'wpsg_mod_produktartikel_url_path_seg')); ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_ean'))) { ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[ean]', __('EAN', 'wpsg'), $this->view['data']['ean'], array('help' => 'wpsg_mod_produktartikel_ean')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[ean]', __('EAN', 'wpsg'), wpsg_getStr($this->view['data']['ean']), array('help' => 'wpsg_mod_produktartikel_ean')); ?>
<?php } ?>
<?php if (wpsg_isSizedInt($this->get_option('wpsg_mod_produktartikel_gtin'))) { ?>
-<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[gtin]', __('GTIN', 'wpsg'), $this->view['data']['gtin'], array('help' => 'wpsg_mod_produktartikel_gtin')); ?>
+<?php echo wpsg_drawForm_Input('wpsg_mod_produktartikel[gtin]', __('GTIN', 'wpsg'), wpsg_getStr($this->view['data']['gtin']), array('help' => 'wpsg_mod_produktartikel_gtin')); ?>
<?php } ?>
\ No newline at end of file diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index fb98ba4..58a92ca 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -68,6 +68,7 @@ <a href="#" class="wpsg-glyphlink-td" title="<?php echo __('Produkt löschen', 'wpsg'); ?>" onclick="return WPSG_BE_Product.removeProduct(<?php echo $p['order_product_id']; ?>);"><span class="glyphicon glyphicon-trash"></span></a>
</td>
</tr>
+ <?php $this->callMods('order_view_row_before', array(&$p, $i)); ?>
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?> wpsg_productrow_add">
<td class="wpsg_cell_name"></td>
<td class="wpsg_cell_preis"><?php echo wpsg_ff($product_price); ?> <?php echo $this->get_option('wpsg_currency'); ?></td>
diff --git a/views/warenkorb/basket.phtml b/views/warenkorb/basket.phtml index 879955f..aadaa2c 100644 --- a/views/warenkorb/basket.phtml +++ b/views/warenkorb/basket.phtml @@ -96,6 +96,9 @@ </div>
</div>
+
+ <?php $this->callMods('basket_row_before', array(&$product_data, $i)); ?>
+
<div class="product_action">
<div class="title">
<?php echo __("Einzelpreis", "wpsg"); ?>
diff --git a/views/warenkorb/overview.phtml b/views/warenkorb/overview.phtml index f6ffdfc..f661e7f 100644 --- a/views/warenkorb/overview.phtml +++ b/views/warenkorb/overview.phtml @@ -226,6 +226,9 @@ <?php echo wpsg_hspc($product_data['menge']); ?>
</div>
</div>
+
+ <?php $this->callMods('overview_row_before', array(&$product_data, $i)); ?>
+
<div class="product_action">
<div class="title">
<?php echo __("Einzelpreis", "wpsg"); ?>
|
