Der komplette Codeblock für die Zahlungsart aus der orginalen onepagecheckout.phtml
Code: Alles auswählen
<?php if ($this->callMods('checkout_handlePayment') === true) { ?>
<?php if (!$this->hasMod('wpsg_mod_crefopay')) { ?>
<div class="wpsg_payment">
<h2><?php echo __('Zahlungsarten', 'wpsg'); ?></h2>
<div class="shippay_wrap">
<?php foreach ($this->view['arPayment'] as $p) { ?>
<div class="shippay_item_wrap">
<input <?php echo (($this->view['basket']['checkout']['payment'] == $p['id'] || sizeof($this->view['arPayment']) == 1)?'checked="checked"':''); ?> type="radio" value="<?php echo $p['id']; ?>" name="wpsg[checkout][payment]" id="payment_<?php echo $p['id']; ?>" />
<div class="wpsg_payship_name"><?php echo __($p['name'], 'wpsg'); ?></div>
<?php if (wpsg_isSizedString($p['logo'])) { ?>
<img class="wpsg_payship_logo" src="<?php echo $p['logo']; ?>" alt="<?php echo $p['name']; ?>" />
<?php } ?>
<?php if ((isset($p['hint']) && trim($p['hint']) != '') || $p['price'] > 0) { ?>
<div id="payment_<?php echo $p['id']; ?>_hint" class="shippay_hint">
<?php if ($p['price'] > 0) { ?>
<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($p['price'], $this->get_option('wpsg_currency')); ?><br />
<?php } ?>
<?php echo $this->replaceUniversalPlatzhalter(__($p['hint'], 'wpsg')); ?>
</div>
<?php } ?>
<div class="shippay_checkmark"></div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
Hab mir hier per var_dump das Array $p ausgeben lassen, hier ist kein key "price" enthalten sondern nur "preis".
Hier mal die Ausgbabe von var_dump auf $p für Paypal:
Code: Alles auswählen
array(8) { ["id"]=> int(2) ["name"]=> string(6) "PayPal" ["preis"]=> string(5) "2.00%" ["mwst"]=> string(1) "0" ["mwst_value"]=> int(0) ["mwst_null"]=> string(1) "0" ["hint"]=> string(54) "Zahlen Sie die Bestellung mittels ihres PayPal Kontos." ["logo"]=> string(89) "http://localhost/mister-g.de-online/wp-content/plugins/wpshopgermany/views/gfx/paypal.png" }
[edit]
Hab jetzt in wpsg_mod_paypal.class.php in der function addPayment gesehen, dass dort auf isset($_REQUEST['wpsg_checkout2']) abgefragt wird und darin erst der key "price" gesetzt wird.
Denke das ist das Problem, hier muss noch die extra Bedingung rein für Onepagecheckout.
Wenn ich denk if rauswerfe, wird die errechnete PayPal-Gebühr angezeigt