Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: in ot_payment den Namen der ausgewählten Zahlungsart verfügbar machen

    Teratek

    • Schreiberling
    • Beiträge: 273
    Hallo.

    Ich würde gerne in der checkout_confirmation statt Zuschlag,Rabatt etc den Namen der ausgewählten Zahlungsart abbilden

    Die passende stelle in der ot_payment ist wohl die process funktion

    Code: PHP  [Auswählen]
    function process() {
        global $order, $xtPrice, $PHP_SELF;

        $allowed_zones = explode(',', MODULE_ORDER_TOTAL_PAYMENT_ALLOWED);

        if ($this->enabled && (in_array($_SESSION['delivery_zone'], $allowed_zones) == true ||    MODULE_ORDER_TOTAL_PAYMENT_ALLOWED == '')) {
          $this->xtc_order_total();
          $this->calculate_credit();
          if (basename($PHP_SELF) != FILENAME_CHECKOUT_PAYMENT && isset($this->discount['sum']) && $this->discount['sum']!=0) {
            for ($i=1; $i<=$this->num_payment; $i++) {
              if (isset($this->discount['amount' . $i]) && $this->discount['amount' . $i]!=0) {
                $this->output[] = array('title' => (($this->discount['pro' . $i] != 0.0) ? number_format(abs($this->discount['pro' . $i]), 2, $xtPrice->currencies[$_SESSION['currency']]['decimal_point'], '') . ' % ' .
                                                   (($this->discount['fee' . $i] != 0) ? (($this->discount['pro' . $i] != 0.0) ? ' +' : '') . $xtPrice->xtcFormat(abs($this->discount['fee' . $i]), true) . ' ' : '') : '') .
                                                   (($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE) . ':',
                                        'text' => ($this->discount['amount' . $i] < 0) ? '<span class="color_ot_total">' . $xtPrice->xtcFormat($this->discount['amount' . $i], true).'</span>' : $xtPrice->xtcFormat($this->discount['amount' . $i], true),
                                        'value' => $this->discount['amount' . $i]
                                        );
                                       
                $order->info['subtotal'] += $this->discount['amount' . $i];
                $order->info['total'] += $this->discount['amount' . $i];
              }
            }
          }
        }
      }

    Wie kann ich die Variable dort verfügbar machen um sie an title zu übergeben?

    Linkback: https://www.modified-shop.org/forum/index.php?topic=38622.0

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Also Du könntest z.B. folgendes testen. Ersetze in dem von dir geposteten Code diese Zeile

    Code: PHP  [Auswählen]
                                                   (($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE) . ':',
     

    mit dieser Zeile

    Code: PHP  [Auswählen]
                                                   (($this->discount['amount' . $i] < 0) ? MODULE_ORDER_TOTAL_PAYMENT_DISCOUNT : MODULE_ORDER_TOTAL_PAYMENT_FEE) . ' ' . constant('MODULE_PAYMENT_' . strtoupper($_SESSION['payment']) . '_TEXT_TITLE') .':',
     

    PS:
    Die Zahlungsart steht dir in der Templatedatei 'templates/dein_template/module/checkout_confirmation.html' auch mit der Smartyvariablen {$PAYMENT_METHOD} zur Verfügung.

    Gruss
    Hanspeter

    Teratek

    • Schreiberling
    • Beiträge: 273
    perfekt...hat funktioniert  :-B
    3 Antworten
    3819 Aufrufe
    12. Oktober 2011, 11:47:55 von h-h-h
    5 Antworten
    3144 Aufrufe
    21. November 2014, 15:43:41 von hondocrx
    0 Antworten
    1569 Aufrufe
    28. Oktober 2013, 13:19:32 von TF101