static function methodFields() { //generate a select field from all enum values $shippingMethods = singleton("ShopShipping")->dbObject('Method')->enumValues(); $order = ShopOrder::orderSession(); $ship = array(); //fw $ship = array("Standard" => "Standardversand (" . $order->shippingCosts("Standard") . " " . ShopOrder::getLocalCurrency() . ")"); return $ship; //fw foreach ($shippingMethods as $name => $value) { $price = ShopShipping::$priceInMethods ? " (" . $order->calcShippingCosts($name) . " " . ShopOrder::getLocalCurrency() . ")" : ""; $ship[$name] = _t("Shop.Shipping.{$value}", "%{$value}%") . $price; } return $ship; }
static function methodFields() { //generate a select field from all enum values $paymentMethods = singleton("ShopPayment")->dbObject('Method')->enumValues(); $order = ShopOrder::orderSession(); $pay = array(); //fw $pay = array("Prepayment" => "Vorkasse (Pflichtfeld außer bei DE)"); if (strtoupper($order->InvoiceAddress()->Country) == "DE") { $pay = array_merge($pay, array("Invoice" => "Auf Rechnung")); } return $pay; //fw foreach ($paymentMethods as $name => $value) { $price = ShopPayment::$priceInMethods ? " (" . $order->calcPaymentCosts($name) . " " . ShopOrder::getLocalCurrency() . ")" : ""; $pay[$name] = _t("Shop.Payment.{$value}", "%{$value}%") . $price; } return $pay; }