diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2016-07-21 04:59:48 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2016-07-21 04:59:48 +0000 |
| commit | 6435b429b997420ce1b03d2e92554b930a7c184d (patch) | |
| tree | e04495a4e18351b51d8d2fa94264d0882efa5cf1 /views/warenkorb/kundendaten_renderfield.phtml | |
| parent | 0271bef3d4c28fae86f299b3441f6ca90a49d46d (diff) | |
- Template "kundendaten_renderfield.phtml" gehört eher in den Warenkorb als in den admin Ordner
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5687 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/warenkorb/kundendaten_renderfield.phtml')
| -rw-r--r-- | views/warenkorb/kundendaten_renderfield.phtml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/views/warenkorb/kundendaten_renderfield.phtml b/views/warenkorb/kundendaten_renderfield.phtml new file mode 100644 index 0000000..d3cddf3 --- /dev/null +++ b/views/warenkorb/kundendaten_renderfield.phtml @@ -0,0 +1,25 @@ +<?php
+
+ /**
+ * Zeichnet eine einzelne Kundenvariable innerhalb des checkout.phtml
+ */
+
+?>
+<div class="wpsg_checkoutblock">
+ <label class="wpsg_cv" for="wpsg_cv_<?php echo $this->view['field']['id']; ?>">
+ <?php echo wpsg_hspc(__($this->view['field']['name'], 'wpsg')); ?><?php if ($this->view['field']['show'] == '0') { ?> <span class="wpsg_required">*</span><?php } ?>:
+ <?php if ($this->view['field']['typ'] == '0') { // Textfeld ?>
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" type="text" value="<?php echo $this->view['basket']['checkout']['custom'][$this->view['field']['id']]; ?>" />
+ <?php } else if ($this->view['field']['typ'] == '1') { $arAuswahl = explode("|", $this->view['field']['auswahl']); // Auswahlfeld ?>
+ <select class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> <?php echo ((in_array("custom_".$this->view['field']['id'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]">
+ <option value="-1"><?php echo __('Bitte Auswählen', 'wpsg'); ?></option>
+ <?php foreach ((array)$arAuswahl as $a) { ?>
+ <option value="<?php echo wpsg_hspc($a); ?>" <?php echo (($a == $this->view['basket']['checkout']['custom'][$this->view['field']['id']])?'selected="selected"':''); ?>><?php echo wpsg_hspc($a); ?></option>
+ <?php } ?>
+ </select>
+ <?php } else if ($this->view['field']['typ'] == '2') { // Checkbox ?>
+ <input type="hidden" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="0" />
+ <input class="<?php echo (($this->view['field']['show'] == '0')?'validate[required]':''); ?> checkbox" type="checkbox" value="1" name="wpsg[checkout][custom][<?php echo $this->view['field']['id']; ?>]" value="1" <?php echo (($this->view['basket']['checkout']['custom'][$this->view['field']['id']] == '1')?'checked="checked"':''); ?> />
+ <?php } ?>
+ </label>
+</div>
\ No newline at end of file |
