Пример #1
0
func TestScopeApplyDefaults(t *testing.T) {
	pkgCfg := config.NewConfiguration(
		&config.Section{
			ID: "contact",
			Groups: config.GroupSlice{
				&config.Group{
					ID: "contact",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `contact/contact/enabled`,
							ID:      "enabled",
							Default: true,
						},
					},
				},
				&config.Group{
					ID: "email",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `contact/email/recipient_email`,
							ID:      "recipient_email",
							Default: `[email protected]`,
						},
						&config.Field{
							// Path: `contact/email/sender_email_identity`,
							ID:      "sender_email_identity",
							Default: 2.7182818284590452353602874713527,
						},
						&config.Field{
							// Path: `contact/email/email_template`,
							ID:      "email_template",
							Default: 4711,
						},
					},
				},
			},
		},
	)
	s := config.NewManager()
	s.ApplyDefaults(pkgCfg)
	cer, err := pkgCfg.FindFieldByPath("contact", "email", "recipient_email")
	if err != nil {
		t.Error(err)
		return
	}
	assert.Exactly(t, cer.Default.(string), s.GetString(config.Path("contact/email/recipient_email")))
}
Пример #2
0
func TestSectionSliceDefaults(t *testing.T) {
	pkgCfg := config.NewConfiguration(
		&config.Section{
			ID: "contact",
			Groups: config.GroupSlice{
				&config.Group{
					ID: "contact",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `contact/contact/enabled`,
							ID:      "enabled",
							Default: true,
						},
					},
				},
				&config.Group{
					ID: "email",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `contact/email/recipient_email`,
							ID:      "recipient_email",
							Default: `[email protected]`,
						},
						&config.Field{
							// Path: `contact/email/sender_email_identity`,
							ID:      "sender_email_identity",
							Default: 2.7182818284590452353602874713527,
						},
						&config.Field{
							// Path: `contact/email/email_template`,
							ID:      "email_template",
							Default: 4711,
						},
					},
				},
			},
		},
	)

	assert.Exactly(
		t,
		config.DefaultMap{"default/0/contact/email/sender_email_identity": 2.718281828459045, "default/0/contact/email/email_template": 4711, "default/0/contact/contact/enabled": true, "default/0/contact/email/recipient_email": "*****@*****.**"},
		pkgCfg.Defaults(),
	)
}
Пример #3
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "payment",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "authorizenet_directpost",
				Label:     `Authorize.net Direct Post`,
				Comment:   ``,
				SortOrder: 34,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/authorizenet_directpost/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/payment_action`,
						ID:           "payment_action",
						Label:        `Payment Action`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `authorize`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Authorizenet\Model\Source\PaymentAction
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Credit Card Direct Post (Authorize.net)`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/login`,
						ID:           "login",
						Label:        `API Login ID`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/trans_key`,
						ID:           "trans_key",
						Label:        `Transaction Key`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/trans_md5`,
						ID:           "trans_md5",
						Label:        `Merchant MD5`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `processing`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\Processing
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/test`,
						ID:           "test",
						Label:        `Test Mode`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/cgi_url`,
						ID:           "cgi_url",
						Label:        `Gateway URL`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `https://secure.authorize.net/gateway/transact.dll`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/cgi_url_td`,
						ID:           "cgi_url_td",
						Label:        `Transaction Details Url`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `https://api2.authorize.net/xml/v1/request.api`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/currency`,
						ID:           "currency",
						Label:        `Accepted Currency`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `USD`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Currency
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/debug`,
						ID:           "debug",
						Label:        `Debug`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/email_customer`,
						ID:           "email_customer",
						Label:        `Email Customer`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    130,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/merchant_email`,
						ID:           "merchant_email",
						Label:        `Merchant's Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    140,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/cctypes`,
						ID:           "cctypes",
						Label:        `Credit Card Types`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    150,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `AE,VI,MC,DI`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Authorizenet\Model\Source\Cctype
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/useccv`,
						ID:           "useccv",
						Label:        `Credit Card Verification`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    160,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    170,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    180,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/min_order_total`,
						ID:           "min_order_total",
						Label:        `Minimum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    190,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/max_order_total`,
						ID:           "max_order_total",
						Label:        `Maximum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    200,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    210,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "payment",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "authorizenet_directpost",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/authorizenet_directpost/merchant_email`,
						ID:      "merchant_email",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\Authorizenet\Model\Directpost`,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/create_order_before`,
						ID:      "create_order_before",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/date_delim`,
						ID:      "date_delim",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `/`,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/ccfields`,
						ID:      "ccfields",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `x_card_code,x_exp_date,x_card_num`,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/place_order_url`,
						ID:      "place_order_url",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `authorizenet/directpost_payment/place`,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/cgi_url_test_mode`,
						ID:      "cgi_url_test_mode",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `https://test.authorize.net/gateway/transact.dll`,
					},

					&config.Field{
						// Path: `payment/authorizenet_directpost/cgi_url_td_test_mode`,
						ID:      "cgi_url_td_test_mode",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `https://apitest.authorize.net/xml/v1/request.api`,
					},
				},
			},
		},
	},
)
Пример #4
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "downloadable",
				Label:     `Downloadable Product Options`,
				Comment:   ``,
				SortOrder: 600,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/downloadable/order_item_status`,
						ID:           "order_item_status",
						Label:        `Order Item Status to Enable Downloads`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      9,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Downloadable\Model\System\Config\Source\Orderitemstatus
					},

					&config.Field{
						// Path: `catalog/downloadable/downloads_number`,
						ID:           "downloads_number",
						Label:        `Default Maximum Number of Downloads`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    200,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/downloadable/shareable`,
						ID:           "shareable",
						Label:        `Shareable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    300,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `catalog/downloadable/samples_title`,
						ID:           "samples_title",
						Label:        `Default Sample Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    400,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Samples`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/downloadable/links_title`,
						ID:           "links_title",
						Label:        `Default Link Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    500,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Links`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/downloadable/links_target_new_window`,
						ID:           "links_target_new_window",
						Label:        `Open Links in New Window`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    600,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `catalog/downloadable/content_disposition`,
						ID:           "content_disposition",
						Label:        `Use Content-Disposition`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    700,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `inline`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Downloadable\Model\System\Config\Source\Contentdisposition
					},

					&config.Field{
						// Path: `catalog/downloadable/disable_guest_checkout`,
						ID:           "disable_guest_checkout",
						Label:        `Disable Guest Checkout if Cart Contains Downloadable Items`,
						Comment:      `Guest checkout will only work with shareable.`,
						Type:         config.TypeSelect,
						SortOrder:    800,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
)
Пример #5
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "recently_products",
				Label:     `Recently Viewed/Compared Products`,
				Comment:   ``,
				SortOrder: 350,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/recently_products/scope`,
						ID:           "scope",
						Label:        `Show for Current`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `website`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Reports\Scope
					},

					&config.Field{
						// Path: `catalog/recently_products/viewed_count`,
						ID:           "viewed_count",
						Label:        `Default Recently Viewed Products Count`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      5,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/recently_products/compared_count`,
						ID:           "compared_count",
						Label:        `Default Recently Compared Products Count`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      5,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "reports",
		Label:     "Reports",
		SortOrder: 1000,
		Scope:     scope.NewPerm(scope.DefaultID),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "dashboard",
				Label:     `Dashboard`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `reports/dashboard/ytd_start`,
						ID:           "ytd_start",
						Label:        `Year-To-Date Starts`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      `1,1`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `reports/dashboard/mtd_start`,
						ID:           "mtd_start",
						Label:        `Current Month Starts`,
						Comment:      `Select day of the month.`,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)
Пример #6
0
func init() {
	PackageConfiguration = config.NewConfiguration(
		&config.Section{
			ID:        "general",
			Label:     "General",
			SortOrder: 10,
			Scope:     config.ScopePermAll,

			Groups: config.GroupSlice{
				&config.Group{
					ID:        "single_store_mode",
					Label:     `Single-Store Mode`,
					Comment:   ``,
					SortOrder: 150,
					Scope:     config.NewScopePerm(config.ScopeDefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/single_store_mode/enabled`,
							ID:           "enabled",
							Label:        `Enable Single-Store Mode`,
							Comment:      `This setting will not be taken into account if system has more than one store view.`,
							Type:         config.TypeSelect,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        config.NewScopePerm(config.ScopeDefaultID),
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},
					},
				},

				&config.Group{
					ID:        "store_information",
					Label:     `Store Information`,
					Comment:   ``,
					SortOrder: 100,
					Scope:     config.ScopePermAll,
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/store_information/name`,
							ID:           "name",
							Label:        `Store Name`,
							Comment:      ``,
							Type:         config.TypeText,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `general/store_information/phone`,
							ID:           "phone",
							Label:        `Store Phone Number`,
							Comment:      ``,
							Type:         config.TypeText,
							SortOrder:    20,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil,
						},
					},
				},
			},
		},

		&config.Section{
			ID:        "web",
			Label:     "Web",
			SortOrder: 20,
			Scope:     config.ScopePermAll,
			Groups: config.GroupSlice{
				&config.Group{
					ID:        "url",
					Label:     `Url Options`,
					Comment:   ``,
					SortOrder: 3,
					Scope:     config.NewScopePerm(config.ScopeDefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `web/url/use_store`,
							ID:           "use_store",
							Label:        `Add Store Code to Urls`,
							Comment:      `<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).`,
							Type:         config.TypeSelect,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        config.NewScopePerm(config.ScopeDefaultID),
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Store
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},

						&config.Field{
							// Path: `web/url/redirect_to_base`,
							ID:           "redirect_to_base",
							Label:        `Auto-redirect to Base URL`,
							Comment:      `I.e. redirect from http://example.com/store/ to http://www.example.com/store/`,
							Type:         config.TypeSelect,
							SortOrder:    20,
							Visible:      config.VisibleYes,
							Scope:        config.NewScopePerm(config.ScopeDefaultID),
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Web\Redirect
						},
					},
				},

				&config.Group{
					ID:        "unsecure",
					Label:     `Base URLs`,
					Comment:   `Any of the fields allow fully qualified URLs that end with '/' (slash) e.g. http://example.com/magento/`,
					SortOrder: 10,
					Scope:     config.ScopePermAll,
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `web/unsecure/base_url`,
							ID:           "base_url",
							Label:        `Base URL`,
							Comment:      `Specify URL or {{base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/unsecure/base_link_url`,
							ID:           "base_link_url",
							Label:        `Base Link URL`,
							Comment:      `May start with {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    20,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/unsecure/base_static_url`,
							ID:           "base_static_url",
							Label:        `Base URL for Static View Files`,
							Comment:      `May be empty or start with {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    25,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/unsecure/base_media_url`,
							ID:           "base_media_url",
							Label:        `Base URL for User Media Files`,
							Comment:      `May be empty or start with {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    40,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},
					},
				},

				&config.Group{
					ID:        "secure",
					Label:     `Base URLs (Secure)`,
					Comment:   `Any of the fields allow fully qualified URLs that end with '/' (slash) e.g. https://example.com/magento/`,
					SortOrder: 20,
					Scope:     config.ScopePermAll,
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `web/secure/base_url`,
							ID:           "base_url",
							Label:        `Secure Base URL`,
							Comment:      `Specify URL or {{base_url}}, or {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/secure/base_link_url`,
							ID:           "base_link_url",
							Label:        `Secure Base Link URL`,
							Comment:      `May start with {{secure_base_url}} or {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    20,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/secure/base_static_url`,
							ID:           "base_static_url",
							Label:        `Secure Base URL for Static View Files`,
							Comment:      `May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    25,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/secure/base_media_url`,
							ID:           "base_media_url",
							Label:        `Secure Base URL for User Media Files`,
							Comment:      `May be empty or start with {{secure_base_url}}, or {{unsecure_base_url}} placeholder.`,
							Type:         config.TypeText,
							SortOrder:    40,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Baseurl
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `web/secure/use_in_frontend`,
							ID:           "use_in_frontend",
							Label:        `Use Secure URLs in Frontend`,
							Comment:      `Enter https protocol to use Secure URLs in Frontend.`,
							Type:         config.TypeSelect,
							SortOrder:    50,
							Visible:      config.VisibleYes,
							Scope:        config.ScopePermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Secure
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},

						&config.Field{
							// Path: `web/secure/use_in_adminhtml`,
							ID:           "use_in_adminhtml",
							Label:        `Use Secure URLs in Admin`,
							Comment:      `Enter https protocol to use Secure URLs in Admin.`,
							Type:         config.TypeSelect,
							SortOrder:    60,
							Visible:      config.VisibleYes,
							Scope:        config.NewScopePerm(config.ScopeDefaultID),
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Secure
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},

						&config.Field{
							// Path: `web/secure/offloader_header`,
							ID:           "offloader_header",
							Label:        `Offloader header`,
							Comment:      ``,
							Type:         config.TypeText,
							SortOrder:    70,
							Visible:      config.VisibleYes,
							Scope:        config.NewScopePerm(config.ScopeDefaultID),
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil,
						},
					},
				},
			},
		},
		&config.Section{
			ID: "catalog",
			Groups: config.GroupSlice{
				&config.Group{
					ID: "price",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `catalog/price/scope`,
							ID:      "scope",
							Default: PriceScopeGlobal,
						},
					},
				},
			},
		},
	)
}
Пример #7
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "seo",
				Label:     `Search Engine Optimization`,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/seo/category_url_suffix`,
						ID:           "category_url_suffix",
						Label:        `Category URL Suffix`,
						Comment:      `You need to refresh the cache.`,
						Type:         config.TypeText,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Catalog\Model\System\Config\Backend\Catalog\Url\Rewrite\Suffix
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/seo/product_url_suffix`,
						ID:           "product_url_suffix",
						Label:        `Product URL Suffix`,
						Comment:      `You need to refresh the cache.`,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Catalog\Model\System\Config\Backend\Catalog\Url\Rewrite\Suffix
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/seo/product_use_categories`,
						ID:           "product_use_categories",
						Label:        `Use Categories Path for Product URLs`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `catalog/seo/save_rewrites_history`,
						ID:           "save_rewrites_history",
						Label:        `Create Permanent Redirect for URLs if URL Key Changed`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
)
Пример #8
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "advanced",
		Label:     "Advanced",
		SortOrder: 910,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "modules_disable_output",
				Label:     `Disable Modules Output`,
				Comment:   ``,
				SortOrder: 2,
				Scope:     config.ScopePermAll,
				Fields:    config.FieldSlice{},
			},
		},
	},
	&config.Section{
		ID:        "trans_email",
		Label:     "Store Email Addresses",
		SortOrder: 90,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "ident_custom1",
				Label:     `Custom Email 1`,
				Comment:   ``,
				SortOrder: 4,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `trans_email/ident_custom1/email`,
						ID:           "email",
						Label:        `Sender Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `trans_email/ident_custom1/name`,
						ID:           "name",
						Label:        `Sender Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Sender
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "ident_custom2",
				Label:     `Custom Email 2`,
				Comment:   ``,
				SortOrder: 5,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `trans_email/ident_custom2/email`,
						ID:           "email",
						Label:        `Sender Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `trans_email/ident_custom2/name`,
						ID:           "name",
						Label:        `Sender Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Sender
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "ident_general",
				Label:     `General Contact`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `trans_email/ident_general/email`,
						ID:           "email",
						Label:        `Sender Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `trans_email/ident_general/name`,
						ID:           "name",
						Label:        `Sender Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Sender
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "ident_sales",
				Label:     `Sales Representative`,
				Comment:   ``,
				SortOrder: 2,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `trans_email/ident_sales/email`,
						ID:           "email",
						Label:        `Sender Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `trans_email/ident_sales/name`,
						ID:           "name",
						Label:        `Sender Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Sender
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "ident_support",
				Label:     `Customer Support`,
				Comment:   ``,
				SortOrder: 3,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `trans_email/ident_support/email`,
						ID:           "email",
						Label:        `Sender Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `trans_email/ident_support/name`,
						ID:           "name",
						Label:        `Sender Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Sender
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "design",
		Label:     "Design",
		SortOrder: 30,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "theme",
				Label:     `Design Theme`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `design/theme/theme_id`,
						ID:           "theme_id",
						Label:        `Design Theme`,
						Comment:      `If no value is specified, the system default will be used. The system default may be modified by third party extensions.`,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Theme\Model\Design\Backend\Theme
						SourceModel:  nil, // Magento\Framework\View\Design\Theme\Label::getLabelsCollectionForSystemConfiguration
					},

					&config.Field{
						// Path: `design/theme/ua_regexp`,
						ID:           "ua_regexp",
						Label:        `User-Agent Exceptions`,
						Comment:      `Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered. Examples:<br /><span style="font-family:monospace">Firefox<br />/^mozilla/i</span>`,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Theme\Model\Design\Backend\Exceptions
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "pagination",
				Label:     `Pagination`,
				Comment:   ``,
				SortOrder: 500,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `design/pagination/pagination_frame`,
						ID:           "pagination_frame",
						Label:        `Pagination Frame`,
						Comment:      `How many links to display at once.`,
						Type:         config.TypeText,
						SortOrder:    7,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `design/pagination/pagination_frame_skip`,
						ID:           "pagination_frame_skip",
						Label:        `Pagination Frame Skip`,
						Comment:      `If the current frame position does not cover utmost pages, will render link to current position plus/minus this value.`,
						Type:         config.TypeText,
						SortOrder:    8,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `design/pagination/anchor_text_for_previous`,
						ID:           "anchor_text_for_previous",
						Label:        `Anchor Text for Previous`,
						Comment:      `Alternative text for previous link in pagination menu. If empty, default arrow image will used.`,
						Type:         config.TypeText,
						SortOrder:    9,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `design/pagination/anchor_text_for_next`,
						ID:           "anchor_text_for_next",
						Label:        `Anchor Text for Next`,
						Comment:      `Alternative text for next link in pagination menu. If empty, default arrow image will used.`,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "email",
				Label:     `Transactional Emails`,
				Comment:   ``,
				SortOrder: 510,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `design/email/logo`,
						ID:           "logo",
						Label:        `Logo Image`,
						Comment:      `Allowed file types: jpg, jpeg, gif, png`,
						Type:         config.TypeImage,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Logo
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `design/email/logo_alt`,
						ID:           "logo_alt",
						Label:        `Logo Image Alt`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "dev",
		Label:     "Developer",
		SortOrder: 920,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "debug",
				Label:     `Debug`,
				Comment:   ``,
				SortOrder: 20,
				Scope:     config.NewScopePerm(config.ScopeWebsiteID, config.ScopeStoreID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/debug/template_hints`,
						ID:           "template_hints",
						Label:        `Template Path Hints`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeWebsiteID, config.ScopeStoreID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/debug/template_hints_blocks`,
						ID:           "template_hints_blocks",
						Label:        `Add Block Names to Hints`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    21,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeWebsiteID, config.ScopeStoreID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "template",
				Label:     `Template Settings`,
				Comment:   ``,
				SortOrder: 25,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/template/allow_symlink`,
						ID:           "allow_symlink",
						Label:        `Allow Symlinks`,
						Comment:      `Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.`,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/template/minify_html`,
						ID:           "minify_html",
						Label:        `Minify Html`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    25,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "translate_inline",
				Label:     `Translate Inline`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/translate_inline/active`,
						ID:           "active",
						Label:        `Enabled for Frontend`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Translate
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/translate_inline/active_admin`,
						ID:           "active_admin",
						Label:        `Enabled for Admin`,
						Comment:      `Translate, blocks and other output caches should be disabled for both frontend and admin inline translations.`,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Translate
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "js",
				Label:     `JavaScript Settings`,
				Comment:   ``,
				SortOrder: 100,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/js/merge_files`,
						ID:           "merge_files",
						Label:        `Merge JavaScript Files`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/js/enable_js_bundling`,
						ID:           "enable_js_bundling",
						Label:        `Enable Javascript Bundling`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/js/minify_files`,
						ID:           "minify_files",
						Label:        `Minify JavaScript Files`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "css",
				Label:     `CSS Settings`,
				Comment:   ``,
				SortOrder: 110,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/css/merge_css_files`,
						ID:           "merge_css_files",
						Label:        `Merge CSS Files`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `dev/css/minify_files`,
						ID:           "minify_files",
						Label:        `Minify CSS Files`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "image",
				Label:     `Image Processing Settings`,
				Comment:   ``,
				SortOrder: 120,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/image/default_adapter`,
						ID:           "default_adapter",
						Label:        `Image Adapter`,
						Comment:      `When the adapter was changed, please, flush Catalog Images Cache.`,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Image\Adapter
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Image\Adapter
					},
				},
			},

			&config.Group{
				ID:        "static",
				Label:     `Static Files Settings`,
				Comment:   ``,
				SortOrder: 130,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `dev/static/sign`,
						ID:           "sign",
						Label:        `Sign Static Files`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "general",
		Label:     "General",
		SortOrder: 10,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "country",
				Label:     `Country Options`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `general/country/allow`,
						ID:           "allow",
						Label:        `Allow Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `general/country/default`,
						ID:           "default",
						Label:        `Default Country`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `general/country/eu_countries`,
						ID:           "eu_countries",
						Label:        `European Union Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},
				},
			},

			&config.Group{
				ID:        "locale",
				Label:     `Locale Options`,
				Comment:   ``,
				SortOrder: 8,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `general/locale/timezone`,
						ID:           "timezone",
						Label:        `Timezone`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Locale\Timezone
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Timezone
					},

					&config.Field{
						// Path: `general/locale/code`,
						ID:           "code",
						Label:        `Locale`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale
					},

					&config.Field{
						// Path: `general/locale/firstday`,
						ID:           "firstday",
						Label:        `First Day of Week`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Weekdays
					},

					&config.Field{
						// Path: `general/locale/weekend`,
						ID:           "weekend",
						Label:        `Weekend Days`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    15,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Weekdays
					},
				},
			},

			&config.Group{
				ID:        "store_information",
				Label:     `Store Information`,
				Comment:   ``,
				SortOrder: 100,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{

					&config.Field{
						// Path: `general/store_information/country_id`,
						ID:           "country_id",
						Label:        `Country`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    25,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `general/store_information/region_id`,
						ID:           "region_id",
						Label:        `Region/State`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    27,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `general/store_information/postcode`,
						ID:           "postcode",
						Label:        `ZIP/Postal Code`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `general/store_information/city`,
						ID:           "city",
						Label:        `City`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    45,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `general/store_information/street_line1`,
						ID:           "street_line1",
						Label:        `Street Address`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    55,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `general/store_information/street_line2`,
						ID:           "street_line2",
						Label:        `Street Address Line 2`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `general/store_information/merchant_vat_number`,
						ID:           "merchant_vat_number",
						Label:        `VAT Number`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    61,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "system",
		Label:     "System",
		SortOrder: 900,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "smtp",
				Label:     `Mail Sending Settings`,
				Comment:   ``,
				SortOrder: 20,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/smtp/disable`,
						ID:           "disable",
						Label:        `Disable Email Communications. Output will be logged if disabled.`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `system/smtp/host`,
						ID:           "host",
						Label:        `Host`,
						Comment:      `SMTP Host`,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `system/smtp/port`,
						ID:           "port",
						Label:        `Port (25)`,
						Comment:      `SMTP Port`,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{ // CS feature, not available in Magento
						// Path: `system/smtp/username`,
						ID:           "username",
						Label:        `Username`,
						Comment:      `SMTP Username`,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{ // CS feature, not available in Magento
						// Path: `system/smtp/password`,
						ID:           "password",
						Label:        `Password`,
						Comment:      `SMTP Passowrd`,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil, // @todo encryption
						SourceModel:  nil, // @todo encryption
					},

					&config.Field{
						// Path: `system/smtp/set_return_path`,
						ID:           "set_return_path",
						Label:        `Set Return-Path`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesnocustom
					},

					&config.Field{
						// Path: `system/smtp/return_path_email`,
						ID:           "return_path_email",
						Label:        `Return-Path Email`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Email\Address
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "admin",
		Label:     "Admin",
		SortOrder: 20,
		Scope:     config.NewScopePerm(config.ScopeDefaultID),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "emails",
				Label:     `Admin User Emails`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/emails/forgot_email_template`,
						ID:           "forgot_email_template",
						Label:        `Forgot Password Email Template`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `admin/emails/forgot_email_identity`,
						ID:           "forgot_email_identity",
						Label:        `Forgot and Reset Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},

					&config.Field{
						// Path: `admin/emails/password_reset_link_expiration_period`,
						ID:           "password_reset_link_expiration_period",
						Label:        `Recovery Link Expiration Period (days)`,
						Comment:      `Please enter a number 1 or greater in this field.`,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Password\Link\Expirationperiod
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "startup",
				Label:     `Startup Page`,
				Comment:   ``,
				SortOrder: 20,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/startup/menu_item_id`,
						ID:           "menu_item_id",
						Label:        `Startup Page`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Admin\Page
					},
				},
			},

			&config.Group{
				ID:        "url",
				Label:     `Admin Base URL`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/url/use_custom`,
						ID:           "use_custom",
						Label:        `Use Custom Admin URL`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Usecustom
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `admin/url/custom`,
						ID:           "custom",
						Label:        `Custom Admin URL`,
						Comment:      `Make sure that base URL ends with '/' (slash), e.g. http://yourdomain/magento/`,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Custom
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `admin/url/use_custom_path`,
						ID:           "use_custom_path",
						Label:        `Use Custom Admin Path`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Custompath
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `admin/url/custom_path`,
						ID:           "custom_path",
						Label:        `Custom Admin Path`,
						Comment:      `You will have to log in after you save your custom admin path.`,
						Type:         config.TypeText,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Custompath
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "security",
				Label:     `Security`,
				Comment:   ``,
				SortOrder: 35,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/security/use_form_key`,
						ID:           "use_form_key",
						Label:        `Add Secret Key to URLs`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Admin\Usesecretkey
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `admin/security/use_case_sensitive_login`,
						ID:           "use_case_sensitive_login",
						Label:        `Login is Case Sensitive`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `admin/security/session_lifetime`,
						ID:           "session_lifetime",
						Label:        `Admin Session Lifetime (seconds)`,
						Comment:      `Values less than 60 are ignored.`,
						Type:         config.Type,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "dashboard",
				Label:     `Dashboard`,
				Comment:   ``,
				SortOrder: 40,
				Scope:     config.NewScopePerm(config.ScopeDefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/dashboard/enable_charts`,
						ID:           "enable_charts",
						Label:        `Enable Charts`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "web",
		Label:     "Web",
		SortOrder: 20,
		Scope:     config.ScopePermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "seo",
				Label:     `Search Engine Optimization`,
				Comment:   ``,
				SortOrder: 5,
				Scope:     config.ScopePermAll,
				Fields:    config.FieldSlice{},
			},

			&config.Group{
				ID:        "default",
				Label:     `Default Pages`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     config.ScopePermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `web/default/front`,
						ID:           "front",
						Label:        `Default Web URL`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `web/default/no_route`,
						ID:           "no_route",
						Label:        `Default No-route URL`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        config.ScopePermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "session",
				Label:     `Session Validation Settings`,
				Comment:   ``,
				SortOrder: 60,
				Scope:     config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `web/session/use_remote_addr`,
						ID:           "use_remote_addr",
						Label:        `Validate REMOTE_ADDR`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `web/session/use_http_via`,
						ID:           "use_http_via",
						Label:        `Validate HTTP_VIA`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `web/session/use_http_x_forwarded_for`,
						ID:           "use_http_x_forwarded_for",
						Label:        `Validate HTTP_X_FORWARDED_FOR`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `web/session/use_http_user_agent`,
						ID:           "use_http_user_agent",
						Label:        `Validate HTTP_USER_AGENT`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `web/session/use_frontend_sid`,
						ID:           "use_frontend_sid",
						Label:        `Use SID on Frontend`,
						Comment:      `Allows customers to stay logged in when switching between different stores.`,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        config.NewScopePerm(config.ScopeDefaultID, config.ScopeWebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},

	// Hidden Configuration
	&config.Section{
		ID: "system",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "media_storage_configuration",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/media_storage_configuration/allowed_resources`,
						ID:      "allowed_resources",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   config.NewScopePerm(config.ScopeDefaultID), // @todo search for that
						Default: `{"email_folder":"email"}`,
					},
				},
			},

			&config.Group{
				ID: "emails",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/emails/forgot_email_template`,
						ID:      "forgot_email_template",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   config.NewScopePerm(config.ScopeDefaultID), // @todo search for that
						Default: `system_emails_forgot_email_template`,
					},

					&config.Field{
						// Path: `system/emails/forgot_email_identity`,
						ID:      "forgot_email_identity",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   config.NewScopePerm(config.ScopeDefaultID), // @todo search for that
						Default: `general`,
					},
				},
			},

			&config.Group{
				ID: "dashboard",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/dashboard/enable_charts`,
						ID:      "enable_charts",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   config.NewScopePerm(config.ScopeDefaultID), // @todo search for that
						Default: true,
					},
				},
			},
		},
	},
	&config.Section{
		ID: "general",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "validator_data",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `general/validator_data/input_types`,
						ID:      "input_types",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   config.NewScopePerm(config.ScopeDefaultID), // @todo search for that
						Default: `{"price":"price","media_image":"media_image","gallery":"gallery"}`,
					},
				},
			},
		},
	},
)
Пример #9
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "carriers",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "usps",
				Label:     `USPS`,
				Comment:   ``,
				SortOrder: 110,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/usps/active`,
						ID:           "active",
						Label:        `Enabled for Checkout`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/usps/gateway_url`,
						ID:           "gateway_url",
						Label:        `Gateway URL`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `http://production.shippingapis.com/ShippingAPI.dll`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/gateway_secure_url`,
						ID:           "gateway_secure_url",
						Label:        `Secure Gateway URL`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `https://secure.shippingapis.com/ShippingAPI.dll`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `United States Postal Service`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/userid`,
						ID:           "userid",
						Label:        `User ID`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/password`,
						ID:           "password",
						Label:        `Password`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    53,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/mode`,
						ID:           "mode",
						Label:        `Mode`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    54,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Online\Mode
					},

					&config.Field{
						// Path: `carriers/usps/shipment_requesttype`,
						ID:           "shipment_requesttype",
						Label:        `Packages Request Type`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    55,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Online\Requesttype
					},

					&config.Field{
						// Path: `carriers/usps/container`,
						ID:           "container",
						Label:        `Container`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `VARIABLE`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Usps\Model\Source\Container
					},

					&config.Field{
						// Path: `carriers/usps/size`,
						ID:           "size",
						Label:        `Size`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `REGULAR`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Usps\Model\Source\Size
					},

					&config.Field{
						// Path: `carriers/usps/width`,
						ID:           "width",
						Label:        `Width`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    73,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/length`,
						ID:           "length",
						Label:        `Length`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    72,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/height`,
						ID:           "height",
						Label:        `Height`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    74,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/girth`,
						ID:           "girth",
						Label:        `Girth`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    76,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/machinable`,
						ID:           "machinable",
						Label:        `Machinable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `true`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Usps\Model\Source\Machinable
					},

					&config.Field{
						// Path: `carriers/usps/max_package_weight`,
						ID:           "max_package_weight",
						Label:        `Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      70,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/handling_type`,
						ID:           "handling_type",
						Label:        `Calculate Handling Fee`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `F`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingType
					},

					&config.Field{
						// Path: `carriers/usps/handling_action`,
						ID:           "handling_action",
						Label:        `Handling Applied`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `O`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingAction
					},

					&config.Field{
						// Path: `carriers/usps/handling_fee`,
						ID:           "handling_fee",
						Label:        `Handling Fee`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/allowed_methods`,
						ID:           "allowed_methods",
						Label:        `Allowed Methods`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    130,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `0_FCLE,0_FCL,0_FCP,1,2,3,4,6,7,13,16,17,22,23,25,27,28,33,34,35,36,37,42,43,53,55,56,57,61,INT_1,INT_2,INT_4,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_20,INT_26`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Usps\Model\Source\Method
					},

					&config.Field{
						// Path: `carriers/usps/free_method`,
						ID:           "free_method",
						Label:        `Free Method`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    140,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Usps\Model\Source\Freemethod
					},

					&config.Field{
						// Path: `carriers/usps/free_shipping_enable`,
						ID:           "free_shipping_enable",
						Label:        `Free Shipping Amount Threshold`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1500,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Enabledisable
					},

					&config.Field{
						// Path: `carriers/usps/free_shipping_subtotal`,
						ID:           "free_shipping_subtotal",
						Label:        `Free Shipping Amount Threshold`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    160,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/specificerrmsg`,
						ID:           "specificerrmsg",
						Label:        `Displayed Error Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    170,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/usps/sallowspecific`,
						ID:           "sallowspecific",
						Label:        `Ship to Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    180,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `carriers/usps/specificcountry`,
						ID:           "specificcountry",
						Label:        `Ship to Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    190,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `carriers/usps/debug`,
						ID:           "debug",
						Label:        `Debug`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    200,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/usps/showmethod`,
						ID:           "showmethod",
						Label:        `Show Method if Not Applicable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    210,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/usps/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    220,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "carriers",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "usps",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/usps/cutoff_cost`,
						ID:      "cutoff_cost",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `carriers/usps/free_method`,
						ID:      "free_method",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `carriers/usps/handling`,
						ID:      "handling",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `carriers/usps/methods`,
						ID:      "methods",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `carriers/usps/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\Usps\Model\Carrier`,
					},

					&config.Field{
						// Path: `carriers/usps/isproduction`,
						ID:      "isproduction",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: false,
					},

					&config.Field{
						// Path: `carriers/usps/active_rma`,
						ID:      "active_rma",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: false,
					},

					&config.Field{
						// Path: `carriers/usps/is_online`,
						ID:      "is_online",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},
				},
			},
		},
	},
)
Пример #10
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "promo",
		Label:     "Promotions",
		SortOrder: 400,
		Scope:     scope.NewPerm(scope.DefaultID),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "auto_generated_coupon_codes",
				Label:     `Auto Generated Specific Coupon Codes`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `promo/auto_generated_coupon_codes/length`,
						ID:           "length",
						Label:        `Code Length`,
						Comment:      `Excluding prefix, suffix and separators.`,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      12,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `promo/auto_generated_coupon_codes/format`,
						ID:           "format",
						Label:        `Code Format`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\SalesRule\Model\System\Config\Source\Coupon\Format
					},

					&config.Field{
						// Path: `promo/auto_generated_coupon_codes/prefix`,
						ID:           "prefix",
						Label:        `Code Prefix`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `promo/auto_generated_coupon_codes/suffix`,
						ID:           "suffix",
						Label:        `Code Suffix`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `promo/auto_generated_coupon_codes/dash`,
						ID:           "dash",
						Label:        `Dash Every X Characters`,
						Comment:      `If empty no separation.`,
						Type:         config.TypeText,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "rss",
		Label:     "",
		SortOrder: 0,
		Scope:     scope.NewPerm(),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "catalog",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     scope.NewPerm(),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `rss/catalog/discounts`,
						ID:           "discounts",
						Label:        `Coupons/Discounts`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    12,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Enabledisable
					},
				},
			},
		},
	},
)
Пример #11
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "sales",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "msrp",
				Label:     `Minimum Advertised Price`,
				Comment:   ``,
				SortOrder: 110,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `sales/msrp/enabled`,
						ID:           "enabled",
						Label:        `Enable MAP`,
						Comment:      `<strong style="color:red">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.`,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `sales/msrp/display_price_type`,
						ID:           "display_price_type",
						Label:        `Display Actual Price`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Msrp\Model\Product\Attribute\Source\Type
					},

					&config.Field{
						// Path: `sales/msrp/explanation_message`,
						ID:           "explanation_message",
						Label:        `Default Popup Text Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Our price is lower than the manufacturer's "minimum advertised price." As a result, we cannot show you the price in catalog or the product page. <br /><br /> You have no obligation to purchase the product once you know the price. You can simply remove the item from your cart.`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `sales/msrp/explanation_message_whats_this`,
						ID:           "explanation_message_whats_this",
						Label:        `Default "What's This" Text Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Our price is lower than the manufacturer's "minimum advertised price." As a result, we cannot show you the price in catalog or the product page. <br /><br /> You have no obligation to purchase the product once you know the price. You can simply remove the item from your cart.`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)
Пример #12
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "multishipping",
		Label:     "Multishipping Settings",
		SortOrder: 311,
		Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "options",
				Label:     `Options`,
				Comment:   ``,
				SortOrder: 2,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `multishipping/options/checkout_multiple`,
						ID:           "checkout_multiple",
						Label:        `Allow Shipping to Multiple Addresses`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `multishipping/options/checkout_multiple_maximum_qty`,
						ID:           "checkout_multiple_maximum_qty",
						Label:        `Maximum Qty Allowed for Shipping to Multiple Addresses`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      100,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)
Пример #13
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "google",
		Label:     "Google API",
		SortOrder: 340,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "analytics",
				Label:     `Google Analytics`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `google/analytics/active`,
						ID:           "active",
						Label:        `Enable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `google/analytics/account`,
						ID:           "account",
						Label:        `Account Number`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)
Пример #14
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "customer",
		Label:     "Customer Configuration",
		SortOrder: 130,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "account_share",
				Label:     `Account Sharing Options`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/account_share/scope`,
						ID:           "scope",
						Label:        `Share Customer Accounts`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      true,
						BackendModel: nil, // Magento\Customer\Model\Config\Share
						SourceModel:  nil, // Magento\Customer\Model\Config\Share
					},
				},
			},

			&config.Group{
				ID:        "create_account",
				Label:     `Create New Account Options`,
				Comment:   ``,
				SortOrder: 20,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/create_account/auto_group_assign`,
						ID:           "auto_group_assign",
						Label:        `Enable Automatic Assignment to Customer Group`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/create_account/tax_calculation_address_type`,
						ID:           "tax_calculation_address_type",
						Label:        `Tax Calculation Based On`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `billing`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Address\Type
					},

					&config.Field{
						// Path: `customer/create_account/default_group`,
						ID:           "default_group",
						Label:        `Default Group`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Group
					},

					&config.Field{
						// Path: `customer/create_account/viv_domestic_group`,
						ID:           "viv_domestic_group",
						Label:        `Group for Valid VAT ID - Domestic`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Group
					},

					&config.Field{
						// Path: `customer/create_account/viv_intra_union_group`,
						ID:           "viv_intra_union_group",
						Label:        `Group for Valid VAT ID - Intra-Union`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Group
					},

					&config.Field{
						// Path: `customer/create_account/viv_invalid_group`,
						ID:           "viv_invalid_group",
						Label:        `Group for Invalid VAT ID`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Group
					},

					&config.Field{
						// Path: `customer/create_account/viv_error_group`,
						ID:           "viv_error_group",
						Label:        `Validation Error Group`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    55,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Customer\Model\Config\Source\Group
					},

					&config.Field{
						// Path: `customer/create_account/viv_on_each_transaction`,
						ID:           "viv_on_each_transaction",
						Label:        `Validate on Each Transaction`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    56,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/create_account/viv_disable_auto_group_assign_default`,
						ID:           "viv_disable_auto_group_assign_default",
						Label:        `Default Value for Disable Automatic Group Changes Based on VAT ID`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    57,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\CreateAccount\DisableAutoGroupAssignDefault
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/create_account/vat_frontend_visibility`,
						ID:           "vat_frontend_visibility",
						Label:        `Show VAT Number on Storefront`,
						Comment:      `To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes.`,
						Type:         config.TypeSelect,
						SortOrder:    58,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/create_account/email_domain`,
						ID:           "email_domain",
						Label:        `Default Email Domain`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `example.com`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/create_account/email_template`,
						ID:           "email_template",
						Label:        `Default Welcome Email`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_create_account_email_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/create_account/email_no_password_template`,
						ID:    "email_no_password_template",
						Label: `Default Welcome Email Without Password`,
						Comment: `This email will be sent instead of the Default Welcome Email, if a customer was created without password. <br /><br />
                        Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    75,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_create_account_email_no_password_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/create_account/email_identity`,
						ID:           "email_identity",
						Label:        `Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `general`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},

					&config.Field{
						// Path: `customer/create_account/confirm`,
						ID:           "confirm",
						Label:        `Require Emails Confirmation`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/create_account/email_confirmation_template`,
						ID:           "email_confirmation_template",
						Label:        `Confirmation Link Email`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_create_account_email_confirmation_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/create_account/email_confirmed_template`,
						ID:    "email_confirmed_template",
						Label: `Welcome Email`,
						Comment: `This email will be sent instead of the Default Welcome Email, after account confirmation. <br /><br />
                        Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_create_account_email_confirmed_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/create_account/generate_human_friendly_id`,
						ID:           "generate_human_friendly_id",
						Label:        `Generate Human-Friendly Customer ID`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "password",
				Label:     `Password Options`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/password/forgot_email_template`,
						ID:           "forgot_email_template",
						Label:        `Forgot Email Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_password_forgot_email_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/password/remind_email_template`,
						ID:           "remind_email_template",
						Label:        `Remind Email Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_password_remind_email_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/password/reset_password_template`,
						ID:           "reset_password_template",
						Label:        `Reset Password Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `customer_password_reset_password_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `customer/password/forgot_email_identity`,
						ID:           "forgot_email_identity",
						Label:        `Password Template Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `support`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},

					&config.Field{
						// Path: `customer/password/reset_link_expiration_period`,
						ID:           "reset_link_expiration_period",
						Label:        `Recovery Link Expiration Period (days)`,
						Comment:      `Please enter a number 1 or greater in this field.`,
						Type:         config.TypeText,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      1,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Password\Link\Expirationperiod
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "address",
				Label:     `Name and Address Options`,
				Comment:   ``,
				SortOrder: 40,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/address/street_lines`,
						ID:           "street_lines",
						Label:        `Number of Lines in a Street Address`,
						Comment:      `Leave empty for default (2). Valid range: 1-4`,
						Type:         config.Type,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      2,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Address\Street
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address/prefix_show`,
						ID:           "prefix_show",
						Label:        `Show Prefix`,
						Comment:      `The title that goes before name (Mr., Mrs., etc.)`,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Address
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Nooptreq
					},

					&config.Field{
						// Path: `customer/address/prefix_options`,
						ID:           "prefix_options",
						Label:        `Prefix Dropdown Options`,
						Comment:      `Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.`,
						Type:         config.Type,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address/middlename_show`,
						ID:           "middlename_show",
						Label:        `Show Middle Name (initial)`,
						Comment:      `Always optional.`,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Address
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `customer/address/suffix_show`,
						ID:           "suffix_show",
						Label:        `Show Suffix`,
						Comment:      `The suffix that goes after name (Jr., Sr., etc.)`,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Address
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Nooptreq
					},

					&config.Field{
						// Path: `customer/address/suffix_options`,
						ID:           "suffix_options",
						Label:        `Suffix Dropdown Options`,
						Comment:      `Semicolon (;) separated values.<br/>Put semicolon in the beginning for empty first option.<br/>Leave empty for open text field.`,
						Type:         config.Type,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address/dob_show`,
						ID:           "dob_show",
						Label:        `Show Date of Birth`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Customer
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Nooptreq
					},

					&config.Field{
						// Path: `customer/address/taxvat_show`,
						ID:           "taxvat_show",
						Label:        `Show Tax/VAT Number`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Customer
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Nooptreq
					},

					&config.Field{
						// Path: `customer/address/gender_show`,
						ID:           "gender_show",
						Label:        `Show Gender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Customer\Model\Config\Backend\Show\Customer
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Nooptreq
					},
				},
			},

			&config.Group{
				ID:        "startup",
				Label:     `Login Options`,
				Comment:   ``,
				SortOrder: 90,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/startup/redirect_dashboard`,
						ID:           "redirect_dashboard",
						Label:        `Redirect Customer to Account Dashboard after Logging in`,
						Comment:      `Customer will stay on the current page if "No" is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "address_templates",
				Label:     `Address Templates`,
				Comment:   ``,
				SortOrder: 100,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/address_templates/text`,
						ID:        "text",
						Label:     `Text`,
						Comment:   ``,
						Type:      config.TypeTextarea,
						SortOrder: 1,
						Visible:   config.VisibleYes,
						Scope:     scope.PermAll,
						Default: `{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}
{{depend company}}{{var company}}{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}{{/depend}}
{{depend street3}}{{var street3}}{{/depend}}
{{depend street4}}{{var street4}}{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}
{{var country}}
T: {{var telephone}}
{{depend fax}}F: {{var fax}}{{/depend}}
{{depend vat_id}}VAT: {{var vat_id}}{{/depend}}`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address_templates/oneline`,
						ID:           "oneline",
						Label:        `Text One Line`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}, {{var street}}, {{var city}}, {{var region}} {{var postcode}}, {{var country}}`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address_templates/html`,
						ID:        "html",
						Label:     `HTML`,
						Comment:   ``,
						Type:      config.TypeTextarea,
						SortOrder: 3,
						Visible:   config.VisibleYes,
						Scope:     scope.PermAll,
						Default: `{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}<br/>{{/depend}}
{{depend company}}{{var company}}<br />{{/depend}}
{{if street1}}{{var street1}}<br />{{/if}}
{{depend street2}}{{var street2}}<br />{{/depend}}
{{depend street3}}{{var street3}}<br />{{/depend}}
{{depend street4}}{{var street4}}<br />{{/depend}}
{{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}<br/>
{{var country}}<br/>
{{depend telephone}}T: {{var telephone}}{{/depend}}
{{depend fax}}<br/>F: {{var fax}}{{/depend}}
{{depend vat_id}}<br/>VAT: {{var vat_id}}{{/depend}}`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `customer/address_templates/pdf`,
						ID:        "pdf",
						Label:     `PDF`,
						Comment:   ``,
						Type:      config.TypeTextarea,
						SortOrder: 4,
						Visible:   config.VisibleYes,
						Scope:     scope.PermAll,
						Default: `{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}|
{{depend company}}{{var company}}|{{/depend}}
{{if street1}}{{var street1}}
{{/if}}
{{depend street2}}{{var street2}}|{{/depend}}
{{depend street3}}{{var street3}}|{{/depend}}
{{depend street4}}{{var street4}}|{{/depend}}
{{if city}}{{var city}},|{{/if}}
{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}|
{{var country}}|
{{depend telephone}}T: {{var telephone}}{{/depend}}|
{{depend fax}}<br/>F: {{var fax}}{{/depend}}|
{{depend vat_id}}<br/>VAT: {{var vat_id}}{{/depend}}|`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "online_customers",
				Label:     `Online Customers Options`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/online_customers/online_minutes_interval`,
						ID:           "online_minutes_interval",
						Label:        `Online Minutes Interval`,
						Comment:      `Leave empty for default (15 minutes).`,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "general",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "store_information",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `general/store_information/validate_vat_number`,
						ID:           "validate_vat_number",
						Label:        ``,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    62,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "restriction",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `general/restriction/autocomplete_on_storefront`,
						ID:           "autocomplete_on_storefront",
						Label:        `Enable Autocomplete on login/forgot password forms`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    65,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "customer",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "default",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/default/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},
				},
			},

			&config.Group{
				ID: "address",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/address/prefix_show`,
						ID:      "prefix_show",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/prefix_options`,
						ID:      "prefix_options",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/middlename_show`,
						ID:      "middlename_show",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/suffix_show`,
						ID:      "suffix_show",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/suffix_options`,
						ID:      "suffix_options",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/dob_show`,
						ID:      "dob_show",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `customer/address/gender_show`,
						ID:      "gender_show",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},
				},
			},
		},
	},
)
Пример #15
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "review",
				Label:     `Product Reviews`,
				Comment:   ``,
				SortOrder: 100,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/review/allow_guest`,
						ID:           "allow_guest",
						Label:        `Allow Guests to Write Reviews`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
)
Пример #16
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "carriers",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "fedex",
				Label:     `FedEx`,
				Comment:   ``,
				SortOrder: 120,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/fedex/active`,
						ID:           "active",
						Label:        `Enabled for Checkout`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/fedex/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Federal Express`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/account`,
						ID:           "account",
						Label:        `Account ID`,
						Comment:      `Please make sure to use only digits here. No dashes are allowed.`,
						Type:         config.TypeObscure,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/meter_number`,
						ID:           "meter_number",
						Label:        `Meter Number`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/key`,
						ID:           "key",
						Label:        `Key`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/password`,
						ID:           "password",
						Label:        `Password`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/sandbox_mode`,
						ID:           "sandbox_mode",
						Label:        `Sandbox Mode`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/fedex/production_webservices_url`,
						ID:           "production_webservices_url",
						Label:        `Web-Services URL (Production)`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `https://ws.fedex.com:443/web-services/`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/sandbox_webservices_url`,
						ID:           "sandbox_webservices_url",
						Label:        `Web-Services URL (Sandbox)`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `https://wsbeta.fedex.com:443/web-services/`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/shipment_requesttype`,
						ID:           "shipment_requesttype",
						Label:        `Packages Request Type`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Online\Requesttype
					},

					&config.Field{
						// Path: `carriers/fedex/packaging`,
						ID:           "packaging",
						Label:        `Packaging`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `YOUR_PACKAGING`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Fedex\Model\Source\Packaging
					},

					&config.Field{
						// Path: `carriers/fedex/dropoff`,
						ID:           "dropoff",
						Label:        `Dropoff`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    130,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `REGULAR_PICKUP`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Fedex\Model\Source\Dropoff
					},

					&config.Field{
						// Path: `carriers/fedex/unit_of_measure`,
						ID:           "unit_of_measure",
						Label:        `Weight Unit`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    135,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `LB`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Fedex\Model\Source\Unitofmeasure
					},

					&config.Field{
						// Path: `carriers/fedex/max_package_weight`,
						ID:           "max_package_weight",
						Label:        `Maximum Package Weight (Please consult your shipping carrier for maximum supported shipping weight)`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    140,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      150,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/handling_type`,
						ID:           "handling_type",
						Label:        `Calculate Handling Fee`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    150,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `F`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingType
					},

					&config.Field{
						// Path: `carriers/fedex/handling_action`,
						ID:           "handling_action",
						Label:        `Handling Applied`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    160,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `O`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingAction
					},

					&config.Field{
						// Path: `carriers/fedex/handling_fee`,
						ID:           "handling_fee",
						Label:        `Handling Fee`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    170,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/residence_delivery`,
						ID:           "residence_delivery",
						Label:        `Residential Delivery`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    180,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/fedex/allowed_methods`,
						ID:           "allowed_methods",
						Label:        `Allowed Methods`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    190,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `EUROPE_FIRST_INTERNATIONAL_PRIORITY,FEDEX_1_DAY_FREIGHT,FEDEX_2_DAY_FREIGHT,FEDEX_2_DAY,FEDEX_2_DAY_AM,FEDEX_3_DAY_FREIGHT,FEDEX_EXPRESS_SAVER,FEDEX_GROUND,FIRST_OVERNIGHT,GROUND_HOME_DELIVERY,INTERNATIONAL_ECONOMY,INTERNATIONAL_ECONOMY_FREIGHT,INTERNATIONAL_FIRST,INTERNATIONAL_GROUND,INTERNATIONAL_PRIORITY,INTERNATIONAL_PRIORITY_FREIGHT,PRIORITY_OVERNIGHT,SMART_POST,STANDARD_OVERNIGHT,FEDEX_FREIGHT,FEDEX_NATIONAL_FREIGHT`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Fedex\Model\Source\Method
					},

					&config.Field{
						// Path: `carriers/fedex/smartpost_hubid`,
						ID:           "smartpost_hubid",
						Label:        `Hub ID`,
						Comment:      `The field is applicable if the Smart Post method is selected.`,
						Type:         config.TypeText,
						SortOrder:    200,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/free_method`,
						ID:           "free_method",
						Label:        `Free Method`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    210,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `FEDEX_GROUND`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Fedex\Model\Source\Freemethod
					},

					&config.Field{
						// Path: `carriers/fedex/free_shipping_enable`,
						ID:           "free_shipping_enable",
						Label:        `Free Shipping Amount Threshold`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    220,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Enabledisable
					},

					&config.Field{
						// Path: `carriers/fedex/free_shipping_subtotal`,
						ID:           "free_shipping_subtotal",
						Label:        `Free Shipping Amount Threshold`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    230,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/specificerrmsg`,
						ID:           "specificerrmsg",
						Label:        `Displayed Error Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    240,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/fedex/sallowspecific`,
						ID:           "sallowspecific",
						Label:        `Ship to Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    250,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `carriers/fedex/specificcountry`,
						ID:           "specificcountry",
						Label:        `Ship to Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    260,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `carriers/fedex/debug`,
						ID:           "debug",
						Label:        `Debug`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    270,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/fedex/showmethod`,
						ID:           "showmethod",
						Label:        `Show Method if Not Applicable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    280,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/fedex/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    290,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "carriers",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "fedex",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/fedex/cutoff_cost`,
						ID:      "cutoff_cost",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `carriers/fedex/handling`,
						ID:      "handling",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: false,
					},

					&config.Field{
						// Path: `carriers/fedex/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\Fedex\Model\Carrier`,
					},

					&config.Field{
						// Path: `carriers/fedex/active_rma`,
						ID:      "active_rma",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: false,
					},

					&config.Field{
						// Path: `carriers/fedex/is_online`,
						ID:      "is_online",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},
				},
			},
		},
	},
)
Пример #17
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "payment",
		Label:     "",
		SortOrder: 400,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "checkmo",
				Label:     `Check / Money Order`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/checkmo/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/checkmo/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `pending`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\NewStatus
					},

					&config.Field{
						// Path: `payment/checkmo/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Check / Money order`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/checkmo/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    51,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/checkmo/payable_to`,
						ID:           "payable_to",
						Label:        `Make Check Payable to`,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    61,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/mailing_address`,
						ID:           "mailing_address",
						Label:        `Send Check to`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    62,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/min_order_total`,
						ID:           "min_order_total",
						Label:        `Minimum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    98,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/max_order_total`,
						ID:           "max_order_total",
						Label:        `Maximum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    99,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/checkmo/model`,
						ID:           "model",
						Label:        ``,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    0,
						Visible:      config.VisibleYes,
						Scope:        nil,
						Default:      `Magento\OfflinePayments\Model\Checkmo`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "purchaseorder",
				Label:     `Purchase Order`,
				Comment:   ``,
				SortOrder: 32,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/purchaseorder/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/purchaseorder/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `pending`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\NewStatus
					},

					&config.Field{
						// Path: `payment/purchaseorder/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/purchaseorder/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Purchase Order`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/purchaseorder/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/purchaseorder/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    51,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/purchaseorder/min_order_total`,
						ID:           "min_order_total",
						Label:        `Minimum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    98,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/purchaseorder/max_order_total`,
						ID:           "max_order_total",
						Label:        `Maximum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    99,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/purchaseorder/model`,
						ID:           "model",
						Label:        ``,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    0,
						Visible:      config.VisibleYes,
						Scope:        nil,
						Default:      `Magento\OfflinePayments\Model\Purchaseorder`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "banktransfer",
				Label:     `Bank Transfer Payment`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/banktransfer/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/banktransfer/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Bank Transfer Payment`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/banktransfer/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `pending`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\NewStatus
					},

					&config.Field{
						// Path: `payment/banktransfer/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/banktransfer/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    51,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/banktransfer/instructions`,
						ID:           "instructions",
						Label:        `Instructions`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    62,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/banktransfer/min_order_total`,
						ID:           "min_order_total",
						Label:        `Minimum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    98,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/banktransfer/max_order_total`,
						ID:           "max_order_total",
						Label:        `Maximum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    99,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/banktransfer/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "cashondelivery",
				Label:     `Cash On Delivery Payment`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/cashondelivery/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/cashondelivery/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Cash On Delivery`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/cashondelivery/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `pending`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\NewStatus
					},

					&config.Field{
						// Path: `payment/cashondelivery/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/cashondelivery/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    51,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/cashondelivery/instructions`,
						ID:           "instructions",
						Label:        `Instructions`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    62,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/cashondelivery/min_order_total`,
						ID:           "min_order_total",
						Label:        `Minimum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    98,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/cashondelivery/max_order_total`,
						ID:           "max_order_total",
						Label:        `Maximum Order Total`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    99,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/cashondelivery/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "free",
				Label:     `Zero Subtotal Checkout`,
				Comment:   ``,
				SortOrder: 30,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/free/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/free/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\Newprocessing
					},

					&config.Field{
						// Path: `payment/free/payment_action`,
						ID:           "payment_action",
						Label:        `Automatically Invoice All Items`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Source\Invoice
					},

					&config.Field{
						// Path: `payment/free/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/free/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/free/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/free/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    51,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/free/model`,
						ID:           "model",
						Label:        ``,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    0,
						Visible:      config.VisibleYes,
						Scope:        nil,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "payment",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "checkmo",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/checkmo/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `offline`,
					},
				},
			},

			&config.Group{
				ID: "purchaseorder",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/purchaseorder/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `offline`,
					},
				},
			},

			&config.Group{
				ID: "banktransfer",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/banktransfer/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\OfflinePayments\Model\Banktransfer`,
					},

					&config.Field{
						// Path: `payment/banktransfer/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `offline`,
					},
				},
			},

			&config.Group{
				ID: "cashondelivery",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/cashondelivery/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\OfflinePayments\Model\Cashondelivery`,
					},

					&config.Field{
						// Path: `payment/cashondelivery/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `offline`,
					},
				},
			},

			&config.Group{
				ID: "free",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/free/group`,
						ID:      "group",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `offline`,
					},
				},
			},
		},
	},
)
Пример #18
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "checkout",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "options",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `checkout/options/enable_agreements`,
						ID:           "enable_agreements",
						Label:        `Enable Terms and Conditions`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
)
Пример #19
0
func init() {
	PackageConfiguration = config.NewConfiguration(
		&config.Section{
			ID:        "currency",
			Label:     "Currency Setup",
			SortOrder: 60,
			Scope:     scope.PermAll,
			Groups: config.GroupSlice{
				&config.Group{
					ID:        "options",
					Label:     `Currency Options`,
					Comment:   ``,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `currency/options/base`,
							ID:           "base",
							Label:        `Base Currency`,
							Comment:      `Base currency is used for all online payment transactions. If you have more than one store view, the base currency scope is defined by the catalog price scope ("Catalog" > "Price" > "Catalog Price Scope").`,
							Type:         config.TypeSelect,
							SortOrder:    1,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:      `USD`,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Currency\Base
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Currency
						},

						&config.Field{
							// Path: `currency/options/default`,
							ID:           "default",
							Label:        `Default Display Currency`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    2,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      `USD`,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Currency\DefaultCurrency
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Currency
						},

						&config.Field{
							// Path: `currency/options/allow`,
							ID:           "allow",
							Label:        `Allowed Currencies`,
							Comment:      ``,
							Type:         config.TypeMultiselect,
							SortOrder:    3,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      `USD,EUR`,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Currency\Allow
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Locale\Currency
						},
					},
				},

				&config.Group{
					ID:        "webservicex",
					Label:     `Webservicex`,
					Comment:   ``,
					SortOrder: 40,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `currency/webservicex/timeout`,
							ID:           "timeout",
							Label:        `Connection Timeout in Seconds`,
							Comment:      ``,
							Type:         config.TypeText,
							SortOrder:    0,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID),
							Default:      100,
							BackendModel: nil,
							SourceModel:  nil,
						},
					},
				},

				&config.Group{
					ID:        "import",
					Label:     `Scheduled Import Settings`,
					Comment:   ``,
					SortOrder: 50,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `currency/import/enabled`,
							ID:           "enabled",
							Label:        `Enabled`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    1,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      false,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},

						&config.Field{
							// Path: `currency/import/error_email`,
							ID:           "error_email",
							Label:        `Error Email Recipient`,
							Comment:      ``,
							Type:         config.TypeText,
							SortOrder:    5,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil,
						},

						&config.Field{
							// Path: `currency/import/error_email_identity`,
							ID:           "error_email_identity",
							Label:        `Error Email Sender`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    6,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:      `general`,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
						},

						&config.Field{
							// Path: `currency/import/error_email_template`,
							ID:           "error_email_template",
							Label:        `Error Email Template`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    7,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:      `currency_import_error_email_template`,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
						},

						&config.Field{
							// Path: `currency/import/frequency`,
							ID:           "frequency",
							Label:        `Frequency`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    4,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Cron\Model\Config\Source\Frequency
						},

						&config.Field{
							// Path: `currency/import/service`,
							ID:           "service",
							Label:        `Service`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    2,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      nil,
							BackendModel: nil, // Magento\Config\Model\Config\Backend\Currency\Cron
							SourceModel:  nil, // Magento\Directory\Model\Currency\Import\Source\Service
						},

						&config.Field{
							// Path: `currency/import/time`,
							ID:           "time",
							Label:        `Start Time`,
							Comment:      ``,
							Type:         config.TypeTime,
							SortOrder:    3,
							Visible:      config.VisibleYes,
							Scope:        scope.PermAll,
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil,
						},
					},
				},
			},
		},
		&config.Section{
			ID: "system",
			Groups: config.GroupSlice{
				&config.Group{
					ID:        "currency",
					Label:     `Currency`,
					Comment:   ``,
					SortOrder: 50,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `system/currency/installed`,
							ID:           "installed",
							Label:        `Installed Currencies`,
							Comment:      ``,
							Type:         config.TypeMultiselect,
							SortOrder:    1,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID),
							Default:      `AZN,AZM,AFN,ALL,DZD,AOA,ARS,AMD,AWG,AUD,BSD,BHD,BDT,BBD,BYR,BZD,BMD,BTN,BOB,BAM,BWP,BRL,GBP,BND,BGN,BUK,BIF,KHR,CAD,CVE,CZK,KYD,CLP,CNY,COP,KMF,CDF,CRC,HRK,CUP,DKK,DJF,DOP,XCD,EGP,SVC,GQE,ERN,EEK,ETB,EUR,FKP,FJD,GMD,GEK,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,KGS,LAK,LVL,LBP,LSL,LRD,LYD,LTL,MOP,MKD,MGA,MWK,MYR,MVR,LSM,MRO,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,ANG,TRL,TRY,NZD,NIC,NGN,KPW,NOK,OMR,PKR,PAB,PGK,PYG,PEN,PHP,PLN,QAR,RHD,RON,ROL,RUB,RWF,SHP,STD,SAR,RSD,SCR,SLL,SGD,SKK,SBD,SOS,ZAR,KRW,LKR,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TMM,USD,UGX,UAH,AED,UYU,UZS,VUV,VEB,VEF,VND,CHE,CHW,XOF,XPF,WST,YER,ZMK,ZWD`,
							BackendModel: nil,                    // Magento\Config\Model\Config\Backend\Locale
							SourceModel:  NewSourceCurrencyAll(), // Magento\Config\Model\Config\Source\Locale\Currency\All
						},
					},
				},
			},
		},
		&config.Section{
			ID: "general",
			Groups: config.GroupSlice{
				&config.Group{
					ID: "country",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/country/optional_zip_countries`,
							ID:           "optional_zip_countries",
							Label:        `Zip/Postal Code is Optional for`,
							Comment:      ``,
							Type:         config.TypeMultiselect,
							SortOrder:    3,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID),
							Default:      `HK,IE,MO,PA,GB`,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
						},
					},
				},

				&config.Group{
					ID:        "region",
					Label:     `State Options`,
					Comment:   ``,
					SortOrder: 4,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/region/state_required`,
							ID:           "state_required",
							Label:        `State is Required for`,
							Comment:      ``,
							Type:         config.TypeMultiselect,
							SortOrder:    1,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID),
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
						},

						&config.Field{
							// Path: `general/region/display_all`,
							ID:           "display_all",
							Label:        `Allow to Choose State if It is Optional for Country`,
							Comment:      ``,
							Type:         config.TypeSelect,
							SortOrder:    8,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.DefaultID),
							Default:      nil,
							BackendModel: nil,
							SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
						},
					},
				},
			},
		},

		// Hidden Configuration, may be visible somewhere else ...
		&config.Section{
			ID: "general",
			Groups: config.GroupSlice{
				&config.Group{
					ID: "country",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/country/allow`,
							ID:      "allow",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `AF,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AX,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BL,BT,BO,BA,BW,BV,BR,IO,VG,BN,BG,BF,BI,KH,CM,CA,CD,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CK,CR,HR,CU,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GG,GH,GI,GR,GL,GD,GP,GU,GT,GN,GW,GY,HT,HM,HN,HK,HU,IS,IM,IN,ID,IR,IQ,IE,IL,IT,CI,JE,JM,JP,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,ME,MF,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,FX,MX,FM,MD,MC,MN,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,KP,MP,NO,OM,PK,PW,PA,PG,PY,PE,PH,PN,PL,PS,PT,PR,QA,RE,RO,RS,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,SC,SL,SG,SK,SI,SB,SO,ZA,GS,KR,ES,LK,SD,SR,SJ,SZ,SE,CH,SY,TL,TW,TJ,TZ,TH,TG,TK,TO,TT,TN,TR,TM,TC,TV,VI,UG,UA,AE,GB,US,UM,UY,UZ,VU,VA,VE,VN,WF,EH,YE,ZM,ZW`,
						},

						&config.Field{
							// Path: `general/country/default`,
							ID:      "default",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `US`,
						},
					},
				},

				&config.Group{
					ID: "locale",
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `general/locale/datetime_format_long`,
							ID:      "datetime_format_long",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%A, %B %e %Y [%I:%M %p]`,
						},

						&config.Field{
							// Path: `general/locale/datetime_format_medium`,
							ID:      "datetime_format_medium",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%a, %b %e %Y [%I:%M %p]`,
						},

						&config.Field{
							// Path: `general/locale/datetime_format_short`,
							ID:      "datetime_format_short",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%m/%d/%y [%I:%M %p]`,
						},

						&config.Field{
							// Path: `general/locale/date_format_long`,
							ID:      "date_format_long",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%A, %B %e %Y`,
						},

						&config.Field{
							// Path: `general/locale/date_format_medium`,
							ID:      "date_format_medium",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%a, %b %e %Y`,
						},

						&config.Field{
							// Path: `general/locale/date_format_short`,
							ID:      "date_format_short",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `%m/%d/%y`,
						},

						&config.Field{
							// Path: `general/locale/language`,
							ID:      "language",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `en`,
						},

						&config.Field{
							// Path: `general/locale/code`,
							ID:      "code",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `en_US`,
						},

						&config.Field{
							// Path: `general/locale/timezone`,
							ID:      "timezone",
							Type:    config.TypeHidden,
							Visible: config.VisibleNo,
							Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
							Default: `America/Los_Angeles`,
						},
					},
				},
			},
		},
	)
}
Пример #20
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "productalert",
				Label:     `Product Alerts`,
				Comment:   ``,
				SortOrder: 250,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/productalert/allow_price`,
						ID:           "allow_price",
						Label:        `Allow Alert When Product Price Changes`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `catalog/productalert/allow_stock`,
						ID:           "allow_stock",
						Label:        `Allow Alert When Product Comes Back in Stock`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `catalog/productalert/email_price_template`,
						ID:           "email_price_template",
						Label:        `Price Alert Email Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `catalog_productalert_email_price_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `catalog/productalert/email_stock_template`,
						ID:           "email_stock_template",
						Label:        `Stock Alert Email Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `catalog_productalert_email_stock_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},

					&config.Field{
						// Path: `catalog/productalert/email_identity`,
						ID:           "email_identity",
						Label:        `Alert Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `general`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},
				},
			},

			&config.Group{
				ID:        "productalert_cron",
				Label:     `Product Alerts Run Settings`,
				Comment:   ``,
				SortOrder: 260,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/productalert_cron/frequency`,
						ID:           "frequency",
						Label:        `Frequency`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Cron\Model\Config\Backend\Product\Alert
						SourceModel:  nil, // Magento\Cron\Model\Config\Source\Frequency
					},

					&config.Field{
						// Path: `catalog/productalert_cron/time`,
						ID:           "time",
						Label:        `Start Time`,
						Comment:      ``,
						Type:         config.TypeTime,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/productalert_cron/error_email`,
						ID:           "error_email",
						Label:        `Error Email Recipient`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/productalert_cron/error_email_identity`,
						ID:           "error_email_identity",
						Label:        `Error Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      `general`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},

					&config.Field{
						// Path: `catalog/productalert_cron/error_email_template`,
						ID:           "error_email_template",
						Label:        `Error Email Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      `catalog_productalert_cron_error_email_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "catalog",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "productalert_cron",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/productalert_cron/error_email`,
						ID:      "error_email",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: nil,
					},
				},
			},
		},
	},
)
Пример #21
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "webapi",
		Label:     "Magento Web API",
		SortOrder: 102,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "soap",
				Label:     `SOAP Settings`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `webapi/soap/charset`,
						ID:           "charset",
						Label:        `Default Response Charset`,
						Comment:      `If empty, UTF-8 will be used.`,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)
Пример #22
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "customer",
		Label:     "",
		SortOrder: 130,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "online_customers",
				Label:     `Online Customers Options`,
				Comment:   ``,
				SortOrder: 10,
				Scope:     scope.NewPerm(config.IDScopeDefault),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `customer/online_customers/online_minutes_interval`,
						ID:           "online_minutes_interval",
						Label:        `Online Minutes Interval`,
						Comment:      `Leave empty for default (15 minutes).`,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "system",
		Label:     "",
		SortOrder: 0,
		Scope:     scope.NewPerm(),
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "log",
				Label:     `Log Cleaning`,
				Comment:   ``,
				SortOrder: 200,
				Scope:     scope.NewPerm(config.IDScopeDefault),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/log/clean_after_day`,
						ID:           "clean_after_day",
						Label:        `Save Log, Days`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      180,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `system/log/enabled`,
						ID:           "enabled",
						Label:        `Enable Log Cleaning`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `system/log/time`,
						ID:           "time",
						Label:        `Start Time`,
						Comment:      ``,
						Type:         config.TypeTime,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `system/log/frequency`,
						ID:           "frequency",
						Label:        `Frequency`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      `D`,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Log\Cron
						SourceModel:  nil, // Magento\Cron\Model\Config\Source\Frequency
					},

					&config.Field{
						// Path: `system/log/error_email`,
						ID:           "error_email",
						Label:        `Error Email Recipient`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `system/log/error_email_identity`,
						ID:           "error_email_identity",
						Label:        `Error Email Sender`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    6,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      `general`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Identity
					},

					&config.Field{
						// Path: `system/log/error_email_template`,
						ID:           "error_email_template",
						Label:        `Error Email Template`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    7,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(config.IDScopeDefault),
						Default:      `system_log_error_email_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},
				},
			},
		},
	},

	// Hidden Configuration
	&config.Section{
		ID: "log",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "visitor",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `log/visitor/online_update_frequency`,
						ID:      "online_update_frequency",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(config.IDScopeDefault), // @todo search for that
						Default: 60,
					},
				},
			},
		},
	},
	&config.Section{
		ID: "system",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "log",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/log/time`,
						ID:      "time",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(config.IDScopeDefault), // @todo search for that
						Default: nil,
					},

					&config.Field{
						// Path: `system/log/error_email`,
						ID:      "error_email",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(config.IDScopeDefault), // @todo search for that
						Default: nil,
					},
				},
			},
		},
	},
)
Пример #23
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "system",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "adminnotification",
				Label:     `Notifications`,
				Comment:   ``,
				SortOrder: 250,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/adminnotification/use_https`,
						ID:           "use_https",
						Label:        `Use HTTPS to Get Feed`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `system/adminnotification/frequency`,
						ID:           "frequency",
						Label:        `Update Frequency`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\AdminNotification\Model\Config\Source\Frequency
					},

					&config.Field{
						// Path: `system/adminnotification/last_update`,
						ID:           "last_update",
						Label:        `Last Update`,
						Comment:      ``,
						Type:         config.TypeLabel,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "system",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "adminnotification",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/adminnotification/feed_url`,
						ID:      "feed_url",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `notifications.magentocommerce.com/magento2/community/notifications.rss`,
					},

					&config.Field{
						// Path: `system/adminnotification/popup_url`,
						ID:      "popup_url",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `widgets.magentocommerce.com/notificationPopup`,
					},

					&config.Field{
						// Path: `system/adminnotification/severity_icons_url`,
						ID:      "severity_icons_url",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `widgets.magentocommerce.com/%s/%s.gif`,
					},
				},
			},
		},
	},
)
Пример #24
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "checkout",
		Label:     "",
		SortOrder: 305,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "cart",
				Label:     ``,
				Comment:   ``,
				SortOrder: 2,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `checkout/cart/grouped_product_image`,
						ID:           "grouped_product_image",
						Label:        `Grouped Product Image`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `itself`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Catalog\Model\Config\Source\Product\Thumbnail
					},
				},
			},
		},
	},
)
Пример #25
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "shipping",
		Label:     "Shipping Settings",
		SortOrder: 310,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "origin",
				Label:     `Origin`,
				Comment:   ``,
				SortOrder: 1,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `shipping/origin/country_id`,
						ID:           "country_id",
						Label:        `Country`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `US`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `shipping/origin/region_id`,
						ID:           "region_id",
						Label:        `Region/State`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      12,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `shipping/origin/postcode`,
						ID:           "postcode",
						Label:        `ZIP/Postal Code`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      90034,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `shipping/origin/city`,
						ID:           "city",
						Label:        `City`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `shipping/origin/street_line1`,
						ID:           "street_line1",
						Label:        `Street Address`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `shipping/origin/street_line2`,
						ID:           "street_line2",
						Label:        `Street Address Line 2`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "shipping_policy",
				Label:     `Shipping Policy Parameters`,
				Comment:   ``,
				SortOrder: 120,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `shipping/shipping_policy/enable_shipping_policy`,
						ID:           "enable_shipping_policy",
						Label:        `Apply custom Shipping Policy`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `shipping/shipping_policy/shipping_policy_content`,
						ID:           "shipping_policy_content",
						Label:        `Shipping Policy`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
	&config.Section{
		ID:        "carriers",
		Label:     "Shipping Methods",
		SortOrder: 320,
		Scope:     scope.PermAll,
		Groups:    config.GroupSlice{},
	},
)
Пример #26
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "admin",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "emails",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/emails/reset_password_template`,
						ID:           "reset_password_template",
						Label:        `Reset Password Template`,
						Comment:      `Email template chosen based on theme fallback when "Default" option is selected.`,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      `admin_emails_reset_password_template`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Email\Template
					},
				},
			},

			&config.Group{
				ID:        "security",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/security/lockout_failures`,
						ID:           "lockout_failures",
						Label:        `Maximum Login Failures to Lockout Account`,
						Comment:      `We will disable this feature if the value is empty.`,
						Type:         config.Type,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      6,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `admin/security/lockout_threshold`,
						ID:           "lockout_threshold",
						Label:        `Lockout Time (minutes)`,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      30,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `admin/security/password_lifetime`,
						ID:           "password_lifetime",
						Label:        `Password Lifetime (days)`,
						Comment:      `We will disable this feature if the value is empty.`,
						Type:         config.Type,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      90,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `admin/security/password_is_forced`,
						ID:           "password_is_forced",
						Label:        `Password Change`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    130,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\User\Model\System\Config\Source\Password
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "admin",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "emails",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `admin/emails/forgot_email_template`,
						ID:      "forgot_email_template",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `admin_emails_forgot_email_template`,
					},

					&config.Field{
						// Path: `admin/emails/forgot_email_identity`,
						ID:      "forgot_email_identity",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `general`,
					},

					&config.Field{
						// Path: `admin/emails/password_reset_link_expiration_period`,
						ID:      "password_reset_link_expiration_period",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},
				},
			},
		},
	},
)
Пример #27
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "payment",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:    "braintree",
				Label: `Braintree`,
				Comment: `Accept credit/debit cards and PayPal in your Magento store. No setup or monthly fees and your customers never leave your store to complete the purchase.
                    <a href="https://www.braintreegateway.com/login" target="_blank">Click here to login to your existing Braintree account</a>. Or to setup a new account and accept payments on your website, <a href="https://apply.braintreegateway.com/signup/us" target="_blank">click here to signup for a Braintree account</a>.`,
				SortOrder: 25,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/braintree/active`,
						ID:           "active",
						Label:        `Enabled Braintree`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/active_braintree_pay_pal`,
						ID:           "active_braintree_pay_pal",
						Label:        `Enabled PayPal through Braintree`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    11,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Credit Card (Braintree)`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/environment`,
						ID:           "environment",
						Label:        `Environment`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `sandbox`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\Source\Environment
					},

					&config.Field{
						// Path: `payment/braintree/payment_action`,
						ID:           "payment_action",
						Label:        `Payment Action`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `authorize`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\Source\PaymentAction
					},

					&config.Field{
						// Path: `payment/braintree/merchant_account_id`,
						ID:           "merchant_account_id",
						Label:        `Merchant Account ID`,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/merchant_id`,
						ID:           "merchant_id",
						Label:        `Merchant ID`,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/public_key`,
						ID:           "public_key",
						Label:        `Public Key`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/private_key`,
						ID:           "private_key",
						Label:        `Private Key`,
						Comment:      ``,
						Type:         config.TypeObscure,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Config\Model\Config\Backend\Encrypted // @todo Magento\Config\Model\Config\Backend\Encrypted
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/debug`,
						ID:           "debug",
						Label:        `Debug`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/capture_action`,
						ID:           "capture_action",
						Label:        `Capture action`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `invoice`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\Source\CaptureAction
					},

					&config.Field{
						// Path: `payment/braintree/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `processing`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\Processing
					},

					&config.Field{
						// Path: `payment/braintree/use_vault`,
						ID:           "use_vault",
						Label:        `Use Vault`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    130,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/duplicate_card`,
						ID:           "duplicate_card",
						Label:        `Allow Duplicate Cards`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    140,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/useccv`,
						ID:           "useccv",
						Label:        `CVV Verification`,
						Comment:      `Be sure to Enable AVS and/or CVV in Your Braintree Account in Settings/Processing Section`,
						Type:         config.TypeSelect,
						SortOrder:    150,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/cctypes`,
						ID:           "cctypes",
						Label:        `Credit Card Types`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    160,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `AE,VI,MC,DI,JCB`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\Source\CcType
					},

					&config.Field{
						// Path: `payment/braintree/enable_cc_detection`,
						ID:           "enable_cc_detection",
						Label:        `Enable Credit Card auto-detection on Storefront`,
						Comment:      `Typing in a credit card number will automatically select the credit card type`,
						Type:         config.TypeSelect,
						SortOrder:    170,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/fraudprotection`,
						ID:    "fraudprotection",
						Label: `Advanced Fraud Protection`,
						Comment: `Be sure to Enable Advanced Fraud Protection in Your Braintree Account in
                        Settings/Processing Section`,
						Type:         config.TypeSelect,
						SortOrder:    180,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/kount_id`,
						ID:           "kount_id",
						Label:        `Your Kount ID`,
						Comment:      `Used for direct fraud tool integration. Make sure you also contact <a href="mailto:[email protected]">[email protected]</a> to setup your Kount account.`,
						Type:         config.TypeTextarea,
						SortOrder:    185,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/usecache`,
						ID:           "usecache",
						Label:        `Use Cache`,
						Comment:      `Some of results will be cached to improve performance. Magento cache have to be enabled`,
						Type:         config.TypeSelect,
						SortOrder:    190,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    230,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    200,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/braintree/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    210,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\System\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/braintree/countrycreditcard`,
						ID:           "countrycreditcard",
						Label:        `Country Specific Credit Card Types`,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    220,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\Braintree\Model\System\Config\Backend\Countrycreditcard
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree/verify_3dsecure`,
						ID:           "verify_3dsecure",
						Label:        `3d Secure Verification`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    150,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},

			&config.Group{
				ID:        "braintree_paypal",
				Label:     `PayPal through Braintree`,
				Comment:   ``,
				SortOrder: 40,
				Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/braintree_paypal/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `PayPal (Braintree)`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree_paypal/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree_paypal/merchant_name_override`,
						ID:           "merchant_name_override",
						Label:        `Override Merchant Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `payment/braintree_paypal/payment_action`,
						ID:           "payment_action",
						Label:        `Payment Action`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `authorize`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\Source\PaymentAction
					},

					&config.Field{
						// Path: `payment/braintree_paypal/order_status`,
						ID:           "order_status",
						Label:        `New Order Status`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    60,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `processing`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Sales\Model\Config\Source\Order\Status\Processing
					},

					&config.Field{
						// Path: `payment/braintree_paypal/allowspecific`,
						ID:           "allowspecific",
						Label:        `Payment from Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeAllowspecific,
						SortOrder:    70,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Payment\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `payment/braintree_paypal/specificcountry`,
						ID:           "specificcountry",
						Label:        `Payment from Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Braintree\Model\System\Config\Source\Country
					},

					&config.Field{
						// Path: `payment/braintree_paypal/display_on_shopping_cart`,
						ID:           "display_on_shopping_cart",
						Label:        `Display on Shopping Cart`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree_paypal/require_billing_address`,
						ID:           "require_billing_address",
						Label:        `Require Customer's Billing Address`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree_paypal/allow_shipping_address_override`,
						ID:           "allow_shipping_address_override",
						Label:        `Allow to Edit Shipping Address Entered During Checkout on PayPal Side`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    110,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `payment/braintree_paypal/debug`,
						ID:           "debug",
						Label:        `Debug`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    120,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "payment",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "braintree",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/braintree/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\Braintree\Model\PaymentMethod`,
					},

					&config.Field{
						// Path: `payment/braintree/data_js`,
						ID:      "data_js",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `https://js.braintreegateway.com/v1/braintree-data.js`,
					},

					&config.Field{
						// Path: `payment/braintree/masked_fields`,
						ID:      "masked_fields",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `cvv,number`,
					},
				},
			},

			&config.Group{
				ID: "braintree_paypal",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `payment/braintree_paypal/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\Braintree\Model\PaymentMethod\PayPal`,
					},

					&config.Field{
						// Path: `payment/braintree_paypal/active`,
						ID:      "active",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: false,
					},

					&config.Field{
						// Path: `payment/braintree_paypal/dispaly_on_shopping_cart`,
						ID:      "dispaly_on_shopping_cart",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: true,
					},
				},
			},
		},
	},
)
Пример #28
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "carriers",
		Label:     "",
		SortOrder: 320,
		Scope:     scope.PermAll,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "flatrate",
				Label:     `Flat Rate`,
				Comment:   ``,
				SortOrder: 2,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/flatrate/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/flatrate/name`,
						ID:           "name",
						Label:        `Method Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Fixed`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/flatrate/price`,
						ID:           "price",
						Label:        `Price`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      5.00,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/flatrate/handling_type`,
						ID:           "handling_type",
						Label:        `Calculate Handling Fee`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    7,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `F`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingType
					},

					&config.Field{
						// Path: `carriers/flatrate/handling_fee`,
						ID:           "handling_fee",
						Label:        `Handling Fee`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    8,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/flatrate/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/flatrate/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Flat Rate`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/flatrate/type`,
						ID:           "type",
						Label:        `Type`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `I`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\OfflineShipping\Model\Config\Source\Flatrate
					},

					&config.Field{
						// Path: `carriers/flatrate/sallowspecific`,
						ID:           "sallowspecific",
						Label:        `Ship to Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `carriers/flatrate/specificcountry`,
						ID:           "specificcountry",
						Label:        `Ship to Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    91,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `carriers/flatrate/showmethod`,
						ID:           "showmethod",
						Label:        `Show Method if Not Applicable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    92,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/flatrate/specificerrmsg`,
						ID:           "specificerrmsg",
						Label:        `Displayed Error Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `This shipping method is not available. To use this shipping method, please contact us.`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "tablerate",
				Label:     `Table Rates`,
				Comment:   ``,
				SortOrder: 3,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/tablerate/handling_type`,
						ID:           "handling_type",
						Label:        `Calculate Handling Fee`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    7,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `F`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Source\HandlingType
					},

					&config.Field{
						// Path: `carriers/tablerate/handling_fee`,
						ID:           "handling_fee",
						Label:        `Handling Fee`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    8,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/tablerate/condition_name`,
						ID:           "condition_name",
						Label:        `Condition`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      `package_weight`,
						BackendModel: nil,
						SourceModel:  nil, // Magento\OfflineShipping\Model\Config\Source\Tablerate
					},

					&config.Field{
						// Path: `carriers/tablerate/include_virtual_price`,
						ID:           "include_virtual_price",
						Label:        `Include Virtual Products in Price Calculation`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/tablerate/export`,
						ID:           "export",
						Label:        `Export`,
						Comment:      ``,
						Type:         config.TypeCustom, // @todo: Magento\OfflineShipping\Block\Adminhtml\Form\Field\Export,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/import`,
						ID:           "import",
						Label:        `Import`,
						Comment:      ``,
						Type:         config.TypeCustom, // @todo: Magento\OfflineShipping\Block\Adminhtml\Form\Field\Import,
						SortOrder:    6,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.WebsiteID),
						Default:      nil,
						BackendModel: nil, // Magento\OfflineShipping\Model\Config\Backend\Tablerate
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/name`,
						ID:           "name",
						Label:        `Method Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Table Rate`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Best Way`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/tablerate/sallowspecific`,
						ID:           "sallowspecific",
						Label:        `Ship to Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `carriers/tablerate/specificcountry`,
						ID:           "specificcountry",
						Label:        `Ship to Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    91,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `carriers/tablerate/showmethod`,
						ID:           "showmethod",
						Label:        `Show Method if Not Applicable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    92,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/tablerate/specificerrmsg`,
						ID:           "specificerrmsg",
						Label:        `Displayed Error Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `This shipping method is not available. To use this shipping method, please contact us.`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},

			&config.Group{
				ID:        "freeshipping",
				Label:     `Free Shipping`,
				Comment:   ``,
				SortOrder: 2,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/freeshipping/active`,
						ID:           "active",
						Label:        `Enabled`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/freeshipping/free_shipping_subtotal`,
						ID:           "free_shipping_subtotal",
						Label:        `Minimum Order Amount`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    4,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/freeshipping/name`,
						ID:           "name",
						Label:        `Method Name`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    3,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Free`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/freeshipping/sort_order`,
						ID:           "sort_order",
						Label:        `Sort Order`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    100,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/freeshipping/title`,
						ID:           "title",
						Label:        `Title`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    2,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `Free Shipping`,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `carriers/freeshipping/sallowspecific`,
						ID:           "sallowspecific",
						Label:        `Ship to Applicable Countries`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    90,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      false,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Shipping\Model\Config\Source\Allspecificcountries
					},

					&config.Field{
						// Path: `carriers/freeshipping/specificcountry`,
						ID:           "specificcountry",
						Label:        `Ship to Specific Countries`,
						Comment:      ``,
						Type:         config.TypeMultiselect,
						SortOrder:    91,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Directory\Model\Config\Source\Country
					},

					&config.Field{
						// Path: `carriers/freeshipping/showmethod`,
						ID:           "showmethod",
						Label:        `Show Method if Not Applicable`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    92,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `carriers/freeshipping/specificerrmsg`,
						ID:           "specificerrmsg",
						Label:        `Displayed Error Message`,
						Comment:      ``,
						Type:         config.TypeTextarea,
						SortOrder:    80,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      `This shipping method is not available. To use this shipping method, please contact us.`,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},

	// Hidden Configuration, may be visible somewhere else ...
	&config.Section{
		ID: "carriers",
		Groups: config.GroupSlice{
			&config.Group{
				ID: "flatrate",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/flatrate/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\OfflineShipping\Model\Carrier\Flatrate`,
					},
				},
			},

			&config.Group{
				ID: "tablerate",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/tablerate/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\OfflineShipping\Model\Carrier\Tablerate`,
					},
				},
			},

			&config.Group{
				ID: "freeshipping",
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `carriers/freeshipping/cutoff_cost`,
						ID:      "cutoff_cost",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: 50,
					},

					&config.Field{
						// Path: `carriers/freeshipping/model`,
						ID:      "model",
						Type:    config.TypeHidden,
						Visible: config.VisibleNo,
						Scope:   scope.NewPerm(scope.DefaultID), // @todo search for that
						Default: `Magento\OfflineShipping\Model\Carrier\Freeshipping`,
					},
				},
			},
		},
	},
)
Пример #29
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "system",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "backup",
				Label:     `Scheduled Backup Settings`,
				Comment:   ``,
				SortOrder: 500,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `system/backup/enabled`,
						ID:           "enabled",
						Label:        `Enable Scheduled Backup`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},

					&config.Field{
						// Path: `system/backup/type`,
						ID:           "type",
						Label:        `Backup Type`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    20,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Backup\Model\Config\Source\Type
					},

					&config.Field{
						// Path: `system/backup/time`,
						ID:           "time",
						Label:        `Start Time`,
						Comment:      ``,
						Type:         config.TypeTime,
						SortOrder:    30,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `system/backup/frequency`,
						ID:           "frequency",
						Label:        `Frequency`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    40,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil, // Magento\Backup\Model\Config\Backend\Cron
						SourceModel:  nil, // Magento\Cron\Model\Config\Source\Frequency
					},

					&config.Field{
						// Path: `system/backup/maintenance`,
						ID:           "maintenance",
						Label:        `Maintenance Mode`,
						Comment:      `Please put your store into maintenance mode during backup.`,
						Type:         config.TypeSelect,
						SortOrder:    50,
						Visible:      config.VisibleYes,
						Scope:        scope.NewPerm(scope.DefaultID),
						Default:      nil,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Yesno
					},
				},
			},
		},
	},
)
Пример #30
0
var PackageConfiguration = config.NewConfiguration(
	&config.Section{
		ID:        "catalog",
		Label:     "",
		SortOrder: 0,
		Scope:     nil,
		Groups: config.GroupSlice{
			&config.Group{
				ID:        "seo",
				Label:     ``,
				Comment:   ``,
				SortOrder: 0,
				Scope:     nil,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/seo/search_terms`,
						ID:           "search_terms",
						Label:        `Popular Search Terms`,
						Comment:      ``,
						Type:         config.TypeSelect,
						SortOrder:    1,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      true,
						BackendModel: nil,
						SourceModel:  nil, // Magento\Config\Model\Config\Source\Enabledisable
					},
				},
			},

			&config.Group{
				ID:        "search",
				Label:     `Catalog Search`,
				Comment:   ``,
				SortOrder: 500,
				Scope:     scope.PermAll,
				Fields: config.FieldSlice{
					&config.Field{
						// Path: `catalog/search/engine`,
						ID:           "engine",
						Label:        ``,
						Comment:      ``,
						Type:         config.Type,
						SortOrder:    0,
						Visible:      config.VisibleYes,
						Scope:        nil,
						Default:      `mysql`,
						BackendModel: nil, // Magento\CatalogSearch\Model\Adminhtml\System\Config\Backend\Engine
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/search/min_query_length`,
						ID:           "min_query_length",
						Label:        `Minimal Query Length`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    5,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      1,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/search/max_query_length`,
						ID:           "max_query_length",
						Label:        `Maximum Query Length`,
						Comment:      ``,
						Type:         config.TypeText,
						SortOrder:    10,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      128,
						BackendModel: nil,
						SourceModel:  nil,
					},

					&config.Field{
						// Path: `catalog/search/use_layered_navigation_count`,
						ID:           "use_layered_navigation_count",
						Label:        `Apply Layered Navigation if Search Results are Less Than`,
						Comment:      `Enter "0" to enable layered navigation for any number of results.`,
						Type:         config.TypeText,
						SortOrder:    25,
						Visible:      config.VisibleYes,
						Scope:        scope.PermAll,
						Default:      0,
						BackendModel: nil,
						SourceModel:  nil,
					},
				},
			},
		},
	},
)