summaryrefslogtreecommitdiff
path: root/views/mods
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods')
-rw-r--r--views/mods/mod_creditcard/paymenthint.phtml6
-rw-r--r--views/mods/mod_smartcheckout/checkout.phtml24
-rw-r--r--views/mods/mod_smartcheckout/product_suggestions.phtml (renamed from views/mods/mod_basketteaser/smartcheckout.phtml)16
3 files changed, 25 insertions, 21 deletions
diff --git a/views/mods/mod_creditcard/paymenthint.phtml b/views/mods/mod_creditcard/paymenthint.phtml
index bfece1b..4542906 100644
--- a/views/mods/mod_creditcard/paymenthint.phtml
+++ b/views/mods/mod_creditcard/paymenthint.phtml
@@ -28,7 +28,7 @@
<div class="wpsg_mod_creditcard_inhaber wpsg_mod_creditcard_field">
<label>
<?php echo __('Inhaber', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['inhaber']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_inhaber", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" autocomplete="cc-name" name="wpsg_mod_creditcard[inhaber]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['inhaber']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
@@ -36,7 +36,7 @@
<div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
<label>
<?php echo __('Kartennummer', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="wpsg_mod_creditcard_knr" name="wpsg_mod_creditcard[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['knr']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_knr", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" inputmode="numeric" autocomplete="cc-number" maxlength="23" id="wpsg_mod_creditcard_knr" name="wpsg_mod_creditcard[knr]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['knr']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
@@ -44,7 +44,7 @@
<div class="wpsg_mod_creditcard_knr wpsg_mod_creditcard_field">
<label>
<?php echo __('Prüfziffer', 'wpsg'); ?><span class="wpsg_required">*</span>:
- <input class="<?php echo ((in_array("mod_creditcard_pruefz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" name="wpsg_mod_creditcard[pruefz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['pruefz']); ?>" />
+ <input class="<?php echo ((in_array("mod_creditcard_pruefz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" inputmode="numeric" autocomplete="cc-csc" maxlength="3" name="wpsg_mod_creditcard[pruefz]" value="<?php echo wpsg_hspc($this->view['wpsg_mod_creditcard']['pruefz']); ?>" />
</label>
</div>
<div class="wpsg_clear"></div>
diff --git a/views/mods/mod_smartcheckout/checkout.phtml b/views/mods/mod_smartcheckout/checkout.phtml
index 068d49b..6bae4ca 100644
--- a/views/mods/mod_smartcheckout/checkout.phtml
+++ b/views/mods/mod_smartcheckout/checkout.phtml
@@ -254,18 +254,19 @@
<div class="sc_choices" :class="{ 'sc_invalid': hasError('shipping') }">
- <label class="sc_choice" v-for="item in state.shipping.list" :key="item.id" :class="{ 'sc_choice_active': form.shipping === item.id }">
+ <?php /* Das label umfasst nur die Kopfzeile, Hinweise der Module können eigene Eingabefelder enthalten */ ?>
+ <div class="sc_choice" v-for="item in state.shipping.list" :key="item.id" :class="{ 'sc_choice_active': form.shipping === item.id }" @click="selectChoice('shipping', item.id, $event)">
<?php /* Radio, Logo und Bezeichnung auf einer Zeile, die Beschreibung darunter */ ?>
- <span class="sc_choice_head">
+ <label class="sc_choice_head">
<input type="radio" name="wpsg[checkout][shipping]" :value="item.id" v-model="form.shipping" @change="refresh" />
<img class="sc_choice_logo" v-if="item.logo" :src="item.logo" :alt="item.name" />
<span class="sc_choice_name">{{ item.name }}</span>
<span class="sc_choice_price" v-if="item.price">{{ item.price }}</span>
- </span>
- <span class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></span>
+ </label>
+ <div class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></div>
- </label>
+ </div>
</div>
@@ -277,19 +278,20 @@
<div class="sc_choices" :class="{ 'sc_invalid': hasError('payment') }">
- <label class="sc_choice" v-for="item in state.payment.list" :key="item.id" :class="{ 'sc_choice_active': form.payment === item.id }">
+ <?php /* Das label umfasst nur die Kopfzeile, Hinweise der Module können eigene Eingabefelder enthalten (z.B. Kreditkarte) */ ?>
+ <div class="sc_choice" v-for="item in state.payment.list" :key="item.id" :class="{ 'sc_choice_active': form.payment === item.id }" @click="selectChoice('payment', item.id, $event)">
<?php /* Radio, Logo und Bezeichnung auf einer Zeile, Beschreibung und Zusatzangaben darunter */ ?>
- <span class="sc_choice_head">
+ <label class="sc_choice_head">
<input type="radio" name="wpsg[checkout][payment]" :value="item.id" v-model="form.payment" @change="refresh" />
<img class="sc_choice_logo" v-if="item.logo" :src="item.logo" :alt="item.name" />
<span class="sc_choice_name">{{ item.name }}</span>
<span class="sc_choice_price" v-if="item.price">{{ item.price }}</span>
- </span>
- <span class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></span>
- <span class="sc_choice_extra" v-if="item.extra" v-html="item.extra"></span>
+ </label>
+ <div class="sc_choice_hint" v-if="item.hint" v-html="item.hint"></div>
+ <div class="sc_choice_extra" v-if="item.extra" v-html="item.extra"></div>
- </label>
+ </div>
</div>
diff --git a/views/mods/mod_basketteaser/smartcheckout.phtml b/views/mods/mod_smartcheckout/product_suggestions.phtml
index 712098c..78acea5 100644
--- a/views/mods/mod_basketteaser/smartcheckout.phtml
+++ b/views/mods/mod_smartcheckout/product_suggestions.phtml
@@ -1,19 +1,21 @@
<?php
/**
- * Template für die Warenkorbteaserprodukte im SmartCheckout
+ * Kompakte Liste vorgeschlagener Produkte unter den Warenkorbpositionen (Warenkorbteaser, Zubehör)
*
- * Das Mengenfeld hat bewusst keinen Namen: es wird so bei den Aktualisierungen des
- * Checkouts nicht mitgeschickt. Erst der Button überträgt die Menge unter
- * wpsg_mod_basketteaser_row[ID] (siehe onModuleClick in smartcheckout.js).
+ * Das Mengenfeld hat bewusst keinen Namen: es wird bei den Aktualisierungen des Checkouts nicht
+ * mitgeschickt. Erst der Button überträgt die Menge unter <send_name>[<ID>] (siehe onModuleClick in
+ * smartcheckout.js). Befüllt über \wpsgSmartcheckout\State::renderSuggestions().
*/
+ $view = $this->view['wpsg_smartcheckout_suggestions'];
+
?>
<div class="sc_teaser">
- <div class="sc_teaser_title"><?php echo esc_html__('Das könnte Sie auch interessieren', 'wpsg'); ?></div>
+ <div class="sc_teaser_title"><?php echo esc_html($view['title']); ?></div>
- <?php foreach ($this->view['wpsg_mod_basketteaser']['products'] as $p) { ?>
+ <?php foreach ($view['products'] as $p) { ?>
<div class="sc_teaser_item" data-sc-item>
<?php if ($p['image'] !== '') { ?>
@@ -35,7 +37,7 @@
<div class="sc_teaser_action">
<input type="text" inputmode="numeric" class="sc_teaser_amount" value="1" data-sc-amount aria-label="<?php echo esc_attr__('Menge', 'wpsg'); ?>" />
- <button type="button" class="sc_button sc_button_secondary" data-sc-send="wpsg_mod_basketteaser_row[<?php echo intval($p['id']); ?>]"><?php echo esc_html__('Hinzufügen', 'wpsg'); ?></button>
+ <button type="button" class="sc_button sc_button_secondary" data-sc-send="<?php echo esc_attr($view['send_name'].'['.intval($p['id']).']'); ?>"><?php echo esc_html__('Hinzufügen', 'wpsg'); ?></button>
</div>
</div>