1 <?php
2 3 4 5 6
7 class PaymentSiteConfig extends SiteConfigDecorator {
8 function () {
9 return array(
10 'db' => array(
11 'PaymentAfterConfirmMessage' => 'HTMLText',
12 ),
13 'defaults' => array(
14 'PaymentAfterConfirmMessage' => _t('PaymentSiteConfig.PaymentAfterConfirmMessageDefault','Payment After Confirm Message'),
15 )
16 );
17 }
18 function updateCMSFields(FieldSet &$fields) {
19 $tab = WebylonSiteConfig::get_config_tab($fields, 'Cart');
20
21 if (self::$paymentAfterConfirm)
22 $tab->push(new HTMLEditorField('PaymentAfterConfirmMessage', _t('PaymentSiteConfig.PaymentAfterConfirmMessage','Message about Payment only after confirm')));
23 }
24
25 static $paymentAfterConfirm = false;
26
27 static function setPaymentAfterConfirm($val = true) {
28 self::$paymentAfterConfirm = $val;
29 }
30
31 static function getPaymentAfterConfirm() {
32 return self::$paymentAfterConfirm;
33 }
34 }
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-