diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2019-07-31 18:54:21 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2019-07-31 18:54:21 +0000 |
| commit | e96b183e33afb4038b2e39868f32ebf94a59ba83 (patch) | |
| tree | 92e15cdbff9e5929b98c4efce24a041b6cd253c8 /views/order | |
| parent | 1a8f06b6cf1bfd781c236f44d42a13166fbeac36 (diff) | |
- Gutschein/Coupon
- Task #681
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7490 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/order')
| -rw-r--r-- | views/order/backendEdit/addVoucher.phtml | 16 | ||||
| -rw-r--r-- | views/order/product_table.phtml | 2 | ||||
| -rw-r--r-- | views/order/view.phtml | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/views/order/backendEdit/addVoucher.phtml b/views/order/backendEdit/addVoucher.phtml index 88d8e2b..497b4c4 100644 --- a/views/order/backendEdit/addVoucher.phtml +++ b/views/order/backendEdit/addVoucher.phtml @@ -19,24 +19,31 @@ 'code' => '',
'id' => 0,
'set' => 0,
- 'type' => 'voucher'
+ 'type' => 'voucher',
];
+ //wpsg_debug(array_merge($arCalculation['voucher'], $arCalculation['coupon']));
+ //wpsg_Debug($_REQUEST);
+
// Voucher suchen
foreach (array_merge($arCalculation['voucher'], $arCalculation['coupon']) as $v) {
if ($v['order_voucher_id'] == $_REQUEST['order_voucher_id']) {
+
+ $order_voucher_db = $this->db->fetchRow("SELECT * FROM `".WPSG_TBL_ORDER_VOUCHER."` WHERE `id` = '".wpsg_q($_REQUEST['order_voucher_id'])."' ");
$voucher = $v;
+ //if ($order_voucher_db['coupon'] === '1') $voucher['type'] = 'coupon';
+
}
}
$strVal = ((isset($voucher['set']))?$voucher['set']:0);
- if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(wpsg_tf($strVal), '%');
- else $strVal = wpsg_ff(wpsg_tf($strVal), $this->get_option('wpsg_currency'));
+ if (strpos($strVal, '%') !== false) $strVal = wpsg_ff(abs(wpsg_tf($strVal)), '%');
+ else $strVal = wpsg_ff(abs(wpsg_tf($strVal)), $this->get_option('wpsg_currency'));
?>
@@ -74,6 +81,9 @@ jQuery('#be_voucher_id').val(ui.item.id);
jQuery('#be_voucher_amount').val(ui.item.gs_value);
+ if (ui.item.coupon === '1') jQuery('#be_voucher_coupon').prop('checked', true);
+ else jQuery('#be_voucher_coupon').prop('checked', false);
+
jQuery('#be_voucher_search').val('');
return false;
diff --git a/views/order/product_table.phtml b/views/order/product_table.phtml index 244ee56..0eb1666 100644 --- a/views/order/product_table.phtml +++ b/views/order/product_table.phtml @@ -387,5 +387,5 @@ </tbody>
</table>
-<?php //wpsg_debug($arCalculation); ?>
+<?php // wpsg_debug($arCalculation); ?>
\ No newline at end of file diff --git a/views/order/view.phtml b/views/order/view.phtml index e275f50..fd0670c 100644 --- a/views/order/view.phtml +++ b/views/order/view.phtml @@ -69,7 +69,7 @@ <?php if ($this->hasMod('wpsg_mod_gutschein')) { ?>
- <a href="" id="LinkGutscheinNeu" onclick="return WPSG_BE_Voucher.editVoucher(<?php echo $_REQUEST['edit_id']; ?>);"><span class="glyphicon glyphicon-plus"></span>
+ <a href="" id="LinkGutscheinNeu" onclick="return WPSG_BE_Voucher.editVoucher(-1);"><span class="glyphicon glyphicon-plus"></span>
<?php echo __("Gutschein bearbeiten", "wpsg"); ?>
|
