Example #1
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "review",
					Label:     `Product Reviews`,
					SortOrder: 100,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/review/allow_guest
							ID:        "allow_guest",
							Label:     `Allow Guests to Write Reviews`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #2
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "vault",
					Label:     `Vault Provider`,
					SortOrder: 2,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/vault/vault_payment
							ID:      "vault_payment",
							Label:   `Vault Provider`,
							Comment: element.LongText(`Specified provider should be enabled.`),
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Vault\Model\Adminhtml\Source\VaultProvidersMap
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "vault",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/vault/debug
							ID:      `debug`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/vault/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Vault\Model\VaultPaymentInterface`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #3
0
func init() {
	PackageConfiguration = config.MustNewConfiguration(
		&config.Section{
			ID: "web", // defined in ?
			Groups: config.GroupSlice{
				&config.Group{
					ID:        "cors",
					Label:     `CORS Cross Origin Resource Sharing`,
					Comment:   ``,
					SortOrder: 150,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: config.FieldSlice{
						&config.Field{
							// Path: `web/cors/exposed_headers`,
							ID:           "exposed_headers",
							Label:        `Exposed Headers`,
							Comment:      `Indicates which headers are safe to expose to the API of a CORS API specification. Separate via line break`,
							Type:         config.TypeTextarea,
							SortOrder:    10,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.WebsiteID),
							Default:      nil,
							BackendModel: nil, // CSV
							SourceModel:  nil,
						},
						&config.Field{
							// Path: `web/cors/allowed_origins`,
							ID:    "allowed_origins",
							Label: `Allowed Origins`,
							Comment: `Is a list of origins a cross-domain request can be executed from.
If the special "*" value is present in the list, all origins will be allowed.
An origin may contain a wildcard (*) to replace 0 or more characters
(i.e.: http://*.domain.com). Usage of wildcards implies a small performance penality.
Only one wildcard can be used per origin.
Default value is ["*"]`,
							Type:         config.TypeTextarea,
							SortOrder:    20,
							Visible:      config.VisibleYes,
							Scope:        scope.NewPerm(scope.WebsiteID),
							Default:      nil,
							BackendModel: nil, // CSV
							SourceModel:  nil,
						},
						// TODO add other fields
					},
				},
			},
		},
	)
}
Example #4
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "search",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/search/engine
							ID:        "engine",
							Label:     `Search Engine`,
							Type:      element.TypeSelect,
							SortOrder: 19,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Search\Model\Adminhtml\System\Config\Source\Engine
						},

						&element.Field{
							// Path: catalog/search/search_type
							ID:      "search_type",
							Type:    element.Type,
							Visible: element.VisibleYes,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #5
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "multishipping",
			Label:     `Multishipping Settings`,
			SortOrder: 311,
			Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
			Resource:  0, // Otnegam_Multishipping::config_multishipping
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `Options`,
					SortOrder: 2,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: multishipping/options/checkout_multiple
							ID:        "checkout_multiple",
							Label:     `Allow Shipping to Multiple Addresses`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: multishipping/options/checkout_multiple_maximum_qty
							ID:        "checkout_multiple_maximum_qty",
							Label:     `Maximum Qty Allowed for Shipping to Multiple Addresses`,
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   100,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #6
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "dev",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "js",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: dev/js/session_storage_logging
							ID:        "session_storage_logging",
							Label:     `Log JS Errors to Session Storage`,
							Comment:   element.LongText(`If enabled, can be used by functional tests for extended reporting`),
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: dev/js/session_storage_key
							ID:        "session_storage_key",
							Label:     `Log JS Errors to Session Storage Key`,
							Comment:   element.LongText(`Use this key to retrieve collected js errors`),
							Type:      element.TypeText,
							SortOrder: 110,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `collected_errors`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #7
0
func TestBasePathInScope(t *testing.T) {
	t.Parallel()
	tests := []struct {
		sg      config.ScopedGetter
		p       scope.Perm
		wantErr error
	}{
		{
			config.NewMockGetter().NewScoped(0, 0, 0),
			scope.NewPerm(scope.DefaultID, scope.WebsiteID),
			nil,
		},
		{
			config.NewMockGetter().NewScoped(0, 0, 4),
			scope.NewPerm(scope.StoreID),
			nil,
		},
		{
			config.NewMockGetter().NewScoped(0, 4, 0),
			scope.NewPerm(scope.StoreID),
			errors.New("Scope permission insufficient: Have 'Group'; Want 'Store'"),
		},
	}
	for _, test := range tests {
		p1 := NewPath("a/b/c", WithField(&element.Field{
			Scope: test.p,
		}))
		haveErr := p1.InScope(test.sg)

		if test.wantErr != nil {
			assert.EqualError(t, haveErr, test.wantErr.Error())
		} else {
			assert.NoError(t, haveErr)
		}
	}
}
Example #8
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "cron",
					Label:     `Cron (Scheduled Tasks) - all the times are in minutes`,
					Comment:   element.LongText(`For correct URLs generated during cron runs please make sure that Web > Secure and Unsecure Base URLs are explicitly set.`),
					SortOrder: 15,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #9
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "promo",
			Label:     `Promotions`,
			SortOrder: 400,
			Scope:     scope.NewPerm(scope.DefaultID),
			Resource:  0, // Otnegam_SalesRule::config_promo
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "auto_generated_coupon_codes",
					Label:     `Auto Generated Specific Coupon Codes`,
					SortOrder: 10,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: promo/auto_generated_coupon_codes/length
							ID:        "length",
							Label:     `Code Length`,
							Comment:   element.LongText(`Excluding prefix, suffix and separators.`),
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   12,
						},

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

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

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

						&element.Field{
							// Path: promo/auto_generated_coupon_codes/dash
							ID:        "dash",
							Label:     `Dash Every X Characters`,
							Comment:   element.LongText(`If empty no separation.`),
							Type:      element.TypeText,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
						},
					),
				},
			),
		},
		&element.Section{
			ID: "rss",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "catalog",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: rss/catalog/discounts
							ID:        "discounts",
							Label:     `Coupons/Discounts`,
							Type:      element.TypeSelect,
							SortOrder: 12,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "cataloginventory",
			Label:     `Inventory`,
			SortOrder: 50,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_CatalogInventory::cataloginventory
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `Stock Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cataloginventory/options/can_subtract
							ID:        "can_subtract",
							Label:     `Decrease Stock When Order is Placed`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/can_back_in_stock
							ID:        "can_back_in_stock",
							Label:     `Set Items' Status to be In Stock When Order is Cancelled`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/show_out_of_stock
							ID:        "show_out_of_stock",
							Label:     `Display Out of Stock Products`,
							Comment:   element.LongText(`Products will still be shown by direct product URLs.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\CatalogInventory\Model\Config\Backend\ShowOutOfStock
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/options/stock_threshold_qty
							ID:        "stock_threshold_qty",
							Label:     `Only X left Threshold`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: cataloginventory/options/display_product_stock_status
							ID:        "display_product_stock_status",
							Label:     `Display Products Availability in Stock on Storefront`,
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "item_options",
					Label:     `Product Stock Options`,
					Comment:   element.LongText(`Please note that these settings apply to individual items in the cart, not to the entire cart.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cataloginventory/item_options/manage_stock
							ID:        "manage_stock",
							Label:     `Manage Stock`,
							Comment:   element.LongText(`Changing can take some time due to processing whole catalog.`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
							// BackendModel: Otnegam\CatalogInventory\Model\Config\Backend\Managestock
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/item_options/backorders
							ID:        "backorders",
							Label:     `Backorders`,
							Comment:   element.LongText(`Changing can take some time due to processing whole catalog.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\CatalogInventory\Model\Config\Backend\Backorders
							// SourceModel: Otnegam\CatalogInventory\Model\Source\Backorders
						},

						&element.Field{
							// Path: cataloginventory/item_options/max_sale_qty
							ID:        "max_sale_qty",
							Label:     `Maximum Qty Allowed in Shopping Cart`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   10000,
						},

						&element.Field{
							// Path: cataloginventory/item_options/min_qty
							ID:        "min_qty",
							Label:     `Out-of-Stock Threshold`,
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// BackendModel: Otnegam\CatalogInventory\Model\System\Config\Backend\Minqty
						},

						&element.Field{
							// Path: cataloginventory/item_options/min_sale_qty
							ID:        "min_sale_qty",
							Label:     `Minimum Qty Allowed in Shopping Cart`,
							Type:      element.Type,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   1,
							// BackendModel: Otnegam\CatalogInventory\Model\System\Config\Backend\Minsaleqty
						},

						&element.Field{
							// Path: cataloginventory/item_options/notify_stock_qty
							ID:        "notify_stock_qty",
							Label:     `Notify for Quantity Below`,
							Type:      element.TypeText,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   1,
						},

						&element.Field{
							// Path: cataloginventory/item_options/auto_return
							ID:        "auto_return",
							Label:     `Automatically Return Credit Memo Item to Stock`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/item_options/enable_qty_increments
							ID:        "enable_qty_increments",
							Label:     `Enable Qty Increments`,
							Type:      element.TypeSelect,
							SortOrder: 8,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: cataloginventory/item_options/qty_increments
							ID:        "qty_increments",
							Label:     `Qty Increments`,
							Type:      element.TypeText,
							SortOrder: 9,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   1,
							// BackendModel: Otnegam\CatalogInventory\Model\System\Config\Backend\Qtyincrements
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #11
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "carriers",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "dhl",
					Label:     `DHL`,
					SortOrder: 140,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: carriers/dhl/active
							ID:        "active",
							Label:     `Enabled for Checkout`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/dhl/active_rma
							ID:        "active_rma",
							Label:     `Enabled for RMA`,
							Type:      element.TypeSelect,
							SortOrder: 15,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/dhl/gateway_url
							ID:        "gateway_url",
							Label:     `Gateway URL`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `https://xmlpi-ea.dhl.com/XMLShippingServlet`,
						},

						&element.Field{
							// Path: carriers/dhl/title
							ID:        "title",
							Label:     `Title`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `DHL`,
						},

						&element.Field{
							// Path: carriers/dhl/id
							ID:        "id",
							Label:     `Access ID`,
							Type:      element.TypeObscure,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/dhl/password
							ID:        "password",
							Label:     `Password`,
							Type:      element.TypeObscure,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   nil,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted @todo Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: carriers/dhl/account
							ID:        "account",
							Label:     `Account Number`,
							Type:      element.TypeText,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: carriers/dhl/content_type
							ID:        "content_type",
							Label:     `Content Type`,
							Type:      element.TypeSelect,
							SortOrder: 90,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `N`,
							// SourceModel: Otnegam\Dhl\Model\Source\Contenttype
						},

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

						&element.Field{
							// Path: carriers/dhl/handling_action
							ID:        "handling_action",
							Label:     `Handling Applied`,
							Comment:   element.LongText(`"Per Order" allows a single handling fee for the entire order. "Per Package" allows an individual handling fee for each package.`),
							Type:      element.TypeSelect,
							SortOrder: 110,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `O`,
							// SourceModel: Otnegam\Shipping\Model\Source\HandlingAction
						},

						&element.Field{
							// Path: carriers/dhl/handling_fee
							ID:        "handling_fee",
							Label:     `Handling Fee`,
							Type:      element.TypeText,
							SortOrder: 120,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: carriers/dhl/divide_order_weight
							ID:        "divide_order_weight",
							Label:     `Divide Order Weight`,
							Comment:   element.LongText(`Select this to allow DHL to optimize shipping charges by splitting the order if it exceeds 70 kg.`),
							Type:      element.TypeSelect,
							SortOrder: 130,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/dhl/unit_of_measure
							ID:        "unit_of_measure",
							Label:     `Weight Unit`,
							Type:      element.TypeSelect,
							SortOrder: 140,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `K`,
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Unitofmeasure
						},

						&element.Field{
							// Path: carriers/dhl/size
							ID:        "size",
							Label:     `Size`,
							Type:      element.TypeSelect,
							SortOrder: 150,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `R`,
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Size
						},

						&element.Field{
							// Path: carriers/dhl/height
							ID:        "height",
							Label:     `Height`,
							Type:      element.TypeText,
							SortOrder: 151,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: carriers/dhl/depth
							ID:        "depth",
							Label:     `Depth`,
							Type:      element.TypeText,
							SortOrder: 152,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: carriers/dhl/width
							ID:        "width",
							Label:     `Width`,
							Type:      element.TypeText,
							SortOrder: 153,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: carriers/dhl/doc_methods
							ID:        "doc_methods",
							Label:     `Allowed Methods`,
							Type:      element.TypeMultiselect,
							SortOrder: 170,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `2,5,6,7,9,B,C,D,U,K,L,G,W,I,N,O,R,S,T,X`,
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Doc
						},

						&element.Field{
							// Path: carriers/dhl/nondoc_methods
							ID:        "nondoc_methods",
							Label:     `Allowed Methods`,
							Type:      element.TypeMultiselect,
							SortOrder: 170,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `1,3,4,8,P,Q,E,F,H,J,M,V,Y`,
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Nondoc
						},

						&element.Field{
							// Path: carriers/dhl/ready_time
							ID:        "ready_time",
							Label:     `Ready time`,
							Comment:   element.LongText(`Package ready time after order submission (in hours)`),
							Type:      element.TypeText,
							SortOrder: 180,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

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

						&element.Field{
							// Path: carriers/dhl/free_method_doc
							ID:        "free_method_doc",
							Label:     `Free Method`,
							Type:      element.TypeSelect,
							SortOrder: 1200,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Freedoc
						},

						&element.Field{
							// Path: carriers/dhl/free_method_nondoc
							ID:        "free_method_nondoc",
							Label:     `Free Method`,
							Type:      element.TypeSelect,
							SortOrder: 1200,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Dhl\Model\Source\Method\Freenondoc
						},

						&element.Field{
							// Path: carriers/dhl/free_shipping_enable
							ID:        "free_shipping_enable",
							Label:     `Free Shipping Amount Threshold`,
							Type:      element.TypeSelect,
							SortOrder: 1210,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},

						&element.Field{
							// Path: carriers/dhl/free_shipping_subtotal
							ID:        "free_shipping_subtotal",
							Label:     `Free Shipping Amount Threshold`,
							Type:      element.TypeText,
							SortOrder: 1220,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: carriers/dhl/sallowspecific
							ID:        "sallowspecific",
							Label:     `Ship to Applicable Countries`,
							Type:      element.TypeSelect,
							SortOrder: 1900,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Shipping\Model\Config\Source\Allspecificcountries
						},

						&element.Field{
							// Path: carriers/dhl/specificcountry
							ID:         "specificcountry",
							Label:      `Ship to Specific Countries`,
							Type:       element.TypeMultiselect,
							SortOrder:  1910,
							Visible:    element.VisibleYes,
							Scope:      scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							CanBeEmpty: true,
							// SourceModel: Otnegam\Directory\Model\Config\Source\Country
						},

						&element.Field{
							// Path: carriers/dhl/showmethod
							ID:        "showmethod",
							Label:     `Show Method if Not Applicable`,
							Type:      element.TypeSelect,
							SortOrder: 1940,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: carriers/dhl/sort_order
							ID:        "sort_order",
							Label:     `Sort Order`,
							Type:      element.TypeText,
							SortOrder: 2000,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: carriers/dhl/debug
							ID:        "debug",
							Label:     `Debug`,
							Type:      element.TypeSelect,
							SortOrder: 1950,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "media_storage_configuration",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/media_storage_configuration/allowed_resources
							ID:      `allowed_resources`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"dhl_folder":"dhl"}`,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "carriers",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "dhl",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: carriers/dhl/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Dhl\Model\Carrier`,
						},

						&element.Field{
							// Path: carriers/dhl/account
							ID:      `account`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},

						&element.Field{
							// Path: carriers/dhl/free_method
							ID:      `free_method`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `G`,
						},

						&element.Field{
							// Path: carriers/dhl/shipment_days
							ID:      `shipment_days`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Mon,Tue,Wed,Thu,Fri`,
						},

						&element.Field{
							// Path: carriers/dhl/is_online
							ID:      `is_online`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #12
0
	"github.com/corestoreio/csfw/store/scope"
)

var PackageConfiguration = config.MustNewConfiguration(
	&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,
					},
				},
Example #13
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "persistent",
			Label:     `Persistent Shopping Cart`,
			SortOrder: 500,
			Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
			Resource:  0, // Otnegam_Persistent::persistent
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `General Options`,
					SortOrder: 10,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: persistent/options/enabled
							ID:        "enabled",
							Label:     `Enable Persistence`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: persistent/options/lifetime
							ID:        "lifetime",
							Label:     `Persistence Lifetime (seconds)`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   31536000,
						},

						&element.Field{
							// Path: persistent/options/remember_enabled
							ID:        "remember_enabled",
							Label:     `Enable "Remember Me"`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: persistent/options/remember_default
							ID:        "remember_default",
							Label:     `"Remember Me" Default Value`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: persistent/options/logout_clear
							ID:        "logout_clear",
							Label:     `Clear Persistence on Sign Out`,
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: persistent/options/shopping_cart
							ID:        "shopping_cart",
							Label:     `Persist Shopping Cart`,
							Type:      element.TypeSelect,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #14
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "catalog",
			Label:     `Catalog`,
			SortOrder: 40,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Catalog::config_catalog
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "fields_masks",
					Label:     `Product Fields Auto-Generation`,
					SortOrder: 90,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/fields_masks/sku
							ID:        "sku",
							Label:     `Mask for SKU`,
							Comment:   element.LongText(`Use {{name}} as Product Name placeholder`),
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_title
							ID:        "meta_title",
							Label:     `Mask for Meta Title`,
							Comment:   element.LongText(`Use {{name}} as Product Name placeholder`),
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_keyword
							ID:        "meta_keyword",
							Label:     `Mask for Meta Keywords`,
							Comment:   element.LongText(`Use {{name}} as Product Name or {{sku}} as Product SKU placeholders`),
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}}`,
						},

						&element.Field{
							// Path: catalog/fields_masks/meta_description
							ID:        "meta_description",
							Label:     `Mask for Meta Description`,
							Comment:   element.LongText(`Use {{name}} and {{description}} as Product Name and Product Description placeholders`),
							Type:      element.TypeText,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   `{{name}} {{description}}`,
						},
					),
				},

				&element.Group{
					ID:        "frontend",
					Label:     `Storefront`,
					SortOrder: 100,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/frontend/list_mode
							ID:        "list_mode",
							Label:     `List Mode`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `grid-list`,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\ListMode
						},

						&element.Field{
							// Path: catalog/frontend/grid_per_page_values
							ID:        "grid_per_page_values",
							Label:     `Products per Page on Grid Allowed Values`,
							Comment:   element.LongText(`Comma-separated.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `9,15,30`,
						},

						&element.Field{
							// Path: catalog/frontend/grid_per_page
							ID:        "grid_per_page",
							Label:     `Products per Page on Grid Default Value`,
							Comment:   element.LongText(`Must be in the allowed values list`),
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   9,
						},

						&element.Field{
							// Path: catalog/frontend/list_per_page_values
							ID:        "list_per_page_values",
							Label:     `Products per Page on List Allowed Values`,
							Comment:   element.LongText(`Comma-separated.`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `5,10,15,20,25`,
						},

						&element.Field{
							// Path: catalog/frontend/list_per_page
							ID:        "list_per_page",
							Label:     `Products per Page on List Default Value`,
							Comment:   element.LongText(`Must be in the allowed values list`),
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   10,
						},

						&element.Field{
							// Path: catalog/frontend/flat_catalog_category
							ID:        "flat_catalog_category",
							Label:     `Use Flat Catalog Category`,
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\Catalog\Model\Indexer\Category\Flat\System\Config\Mode
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: catalog/frontend/flat_catalog_product
							ID:        "flat_catalog_product",
							Label:     `Use Flat Catalog Product`,
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// BackendModel: Otnegam\Catalog\Model\Indexer\Product\Flat\System\Config\Mode
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: catalog/frontend/default_sort_by
							ID:        "default_sort_by",
							Label:     `Product Listing Sort by`,
							Type:      element.TypeSelect,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `position`,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\ListSort
						},

						&element.Field{
							// Path: catalog/frontend/list_allow_all
							ID:        "list_allow_all",
							Label:     `Allow All Products per Page`,
							Comment:   element.LongText(`Whether to show "All" option in the "Show X Per Page" dropdown`),
							Type:      element.TypeSelect,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: catalog/frontend/parse_url_directives
							ID:        "parse_url_directives",
							Label:     `Allow Dynamic Media URLs in Products and Categories`,
							Comment:   element.LongText(`E.g. {{media url="path/to/image.jpg"}} {{skin url="path/to/picture.gif"}}. Dynamic directives parsing impacts catalog performance.`),
							Type:      element.TypeSelect,
							SortOrder: 200,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "placeholder",
					Label:     `Product Image Placeholders`,
					SortOrder: 300,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/placeholder/placeholder
							ID:        "placeholder",
							Type:      element.TypeImage,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image
						},
					),
				},

				&element.Group{
					ID:        "seo",
					Label:     `Search Engine Optimization`,
					SortOrder: 500,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/seo/title_separator
							ID:        "title_separator",
							Label:     `Page Title Separator`,
							Type:      element.TypeText,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `-`,
						},

						&element.Field{
							// Path: catalog/seo/category_canonical_tag
							ID:        "category_canonical_tag",
							Label:     `Use Canonical Link Meta Tag For Categories`,
							Type:      element.TypeSelect,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: catalog/seo/product_canonical_tag
							ID:        "product_canonical_tag",
							Label:     `Use Canonical Link Meta Tag For Products`,
							Type:      element.TypeSelect,
							SortOrder: 8,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "price",
					Label:     `Price`,
					SortOrder: 400,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/price/scope
							ID:        "scope",
							Label:     `Catalog Price Scope`,
							Comment:   element.LongText(`This defines the base currency scope ("Currency Setup" > "Currency Options" > "Base Currency").`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// BackendModel: Otnegam\Catalog\Model\Indexer\Product\Price\System\Config\PriceScope
							// SourceModel: Otnegam\Catalog\Model\Config\Source\Price\Scope
						},
					),
				},

				&element.Group{
					ID:        "navigation",
					Label:     `Category Top Navigation`,
					SortOrder: 500,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/navigation/max_depth
							ID:        "max_depth",
							Label:     `Maximal Depth`,
							Type:      element.TypeText,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
						},
					),
				},

				&element.Group{
					ID:        "custom_options",
					Label:     `Date & Time Custom Options`,
					SortOrder: 700,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/custom_options/use_calendar
							ID:        "use_calendar",
							Label:     `Use JavaScript Calendar`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: catalog/custom_options/date_fields_order
							ID:        "date_fields_order",
							Label:     `Date Fields Order`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `m,d,y`,
						},

						&element.Field{
							// Path: catalog/custom_options/time_format
							ID:        "time_format",
							Label:     `Time Format`,
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `12h`,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\TimeFormat
						},

						&element.Field{
							// Path: catalog/custom_options/year_range
							ID:        "year_range",
							Label:     `Year Range`,
							Comment:   element.LongText(`Please use a four-digit year format.`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "design",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "watermark",
					Label:     `Product Image Watermarks`,
					SortOrder: 400,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/watermark/size
							ID:        "size",
							Label:     `Watermark Default Size`,
							Comment:   element.LongText(`Example format: 200x300.`),
							Type:      element.TypeText,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/watermark/imageOpacity
							ID:        "imageOpacity",
							Label:     `Watermark Opacity, Percent`,
							Type:      element.TypeText,
							SortOrder: 150,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/watermark/image
							ID:        "image",
							Label:     `Watermark`,
							Comment:   element.LongText(`Allowed file types: jpeg, gif, png.`),
							Type:      element.TypeImage,
							SortOrder: 200,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image
						},

						&element.Field{
							// Path: design/watermark/position
							ID:        "position",
							Label:     `Watermark Position`,
							Type:      element.TypeSelect,
							SortOrder: 300,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\Watermark\Position
						},
					),
				},
			),
		},
		&element.Section{
			ID: "cms",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "wysiwyg",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cms/wysiwyg/use_static_urls_in_catalog
							ID:        "use_static_urls_in_catalog",
							Label:     `Use Static URLs for Media Content in WYSIWYG for Catalog`,
							Comment:   element.LongText(`This applies only to catalog products and categories. Media content will be inserted into the editor as a static URL. Media content is not updated if the system configuration base URL changes.`),
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
		&element.Section{
			ID: "rss",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "catalog",
					Label:     `Catalog`,
					SortOrder: 3,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: rss/catalog/new
							ID:        "new",
							Label:     `New Products`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},

						&element.Field{
							// Path: rss/catalog/special
							ID:        "special",
							Label:     `Special Products`,
							Type:      element.TypeSelect,
							SortOrder: 11,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},

						&element.Field{
							// Path: rss/catalog/category
							ID:        "category",
							Label:     `Top Level Category`,
							Type:      element.TypeSelect,
							SortOrder: 14,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "product",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/product/flat
							ID:      `flat`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"max_index_count":"64"}`,
						},

						&element.Field{
							// Path: catalog/product/default_tax_group
							ID:      `default_tax_group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 2,
						},
					),
				},

				&element.Group{
					ID: "seo",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/seo/product_url_suffix
							ID:      `product_url_suffix`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `.html`,
						},

						&element.Field{
							// Path: catalog/seo/category_url_suffix
							ID:      `category_url_suffix`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `.html`,
						},

						&element.Field{
							// Path: catalog/seo/product_use_categories
							ID:      `product_use_categories`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: catalog/seo/save_rewrites_history
							ID:      `save_rewrites_history`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},

				&element.Group{
					ID: "custom_options",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/custom_options/forbidden_extensions
							ID:      `forbidden_extensions`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `php,exe`,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "media_storage_configuration",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/media_storage_configuration/allowed_resources
							ID:      `allowed_resources`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"tmp_images_folder":"tmp","catalog_images_folder":"catalog","product_custom_options_fodler":"custom_options"}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #15
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "tax",
			Label:     `Tax`,
			SortOrder: 303,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Tax::config_tax
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "classes",
					Label:     `Tax Classes`,
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/classes/shipping_tax_class
							ID:        "shipping_tax_class",
							Label:     `Tax Class for Shipping`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Tax\Model\TaxClass\Source\Product
						},

						&element.Field{
							// Path: tax/classes/default_product_tax_class
							ID:        "default_product_tax_class",
							Label:     `Default Tax Class for Product`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   2,
							// BackendModel: Otnegam\Tax\Model\Config\TaxClass
							// SourceModel: Otnegam\Tax\Model\TaxClass\Source\Product
						},

						&element.Field{
							// Path: tax/classes/default_customer_tax_class
							ID:        "default_customer_tax_class",
							Label:     `Default Tax Class for Customer`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   3,
							// SourceModel: Otnegam\Tax\Model\TaxClass\Source\Customer
						},
					),
				},

				&element.Group{
					ID:        "calculation",
					Label:     `Calculation Settings`,
					SortOrder: 20,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/calculation/algorithm
							ID:        "algorithm",
							Label:     `Tax Calculation Method Based On`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `TOTAL_BASE_CALCULATION`,
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Algorithm
						},

						&element.Field{
							// Path: tax/calculation/based_on
							ID:        "based_on",
							Label:     `Tax Calculation Based On`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `shipping`,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\Config\Source\Basedon
						},

						&element.Field{
							// Path: tax/calculation/price_includes_tax
							ID:        "price_includes_tax",
							Label:     `Catalog Prices`,
							Comment:   element.LongText(`This sets whether catalog prices entered from Otnegam Admin include tax.`),
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// BackendModel: Otnegam\Tax\Model\Config\Price\IncludePrice
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\PriceType
						},

						&element.Field{
							// Path: tax/calculation/shipping_includes_tax
							ID:        "shipping_includes_tax",
							Label:     `Shipping Prices`,
							Comment:   element.LongText(`This sets whether shipping amounts entered from Otnegam Admin or obtained from gateways include tax.`),
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// BackendModel: Otnegam\Tax\Model\Config\Price\IncludePrice
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\PriceType
						},

						&element.Field{
							// Path: tax/calculation/apply_after_discount
							ID:        "apply_after_discount",
							Label:     `Apply Customer Tax`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Apply
						},

						&element.Field{
							// Path: tax/calculation/discount_tax
							ID:        "discount_tax",
							Label:     `Apply Discount On Prices`,
							Comment:   element.LongText(`Apply discount on price including tax is calculated based on store tax if "Apply Tax after Discount" is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `["0","0"]`,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\PriceType
						},

						&element.Field{
							// Path: tax/calculation/apply_tax_on
							ID:        "apply_tax_on",
							Label:     `Apply Tax On`,
							Type:      element.TypeSelect,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Tax\Model\Config\Source\Apply\On
						},

						&element.Field{
							// Path: tax/calculation/cross_border_trade_enabled
							ID:        "cross_border_trade_enabled",
							Label:     `Enable Cross Border Trade`,
							Comment:   element.LongText(`When catalog price includes tax, enable this setting to fix the price no matter what the customer's tax rate.`),
							Type:      element.TypeSelect,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "defaults",
					Label:     `Default Tax Destination Calculation`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/defaults/country
							ID:        "country",
							Label:     `Default Country`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `US`,
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Country
						},

						&element.Field{
							// Path: tax/defaults/region
							ID:        "region",
							Label:     `Default State`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Region
						},

						&element.Field{
							// Path: tax/defaults/postcode
							ID:        "postcode",
							Label:     `Default Post Code`,
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "display",
					Label:     `Price Display Settings`,
					SortOrder: 40,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/display/type
							ID:        "type",
							Label:     `Display Product Prices In Catalog`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/display/shipping
							ID:        "shipping",
							Label:     `Display Shipping Prices`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},
					),
				},

				&element.Group{
					ID:        "cart_display",
					Label:     `Shopping Cart Display Settings`,
					SortOrder: 50,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/cart_display/price
							ID:        "price",
							Label:     `Display Prices`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/cart_display/subtotal
							ID:        "subtotal",
							Label:     `Display Subtotal`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/cart_display/shipping
							ID:        "shipping",
							Label:     `Display Shipping Amount`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/cart_display/grandtotal
							ID:        "grandtotal",
							Label:     `Include Tax In Order Total`,
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/cart_display/full_summary
							ID:        "full_summary",
							Label:     `Display Full Tax Summary`,
							Type:      element.TypeSelect,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/cart_display/zero_tax
							ID:        "zero_tax",
							Label:     `Display Zero Tax Subtotal`,
							Type:      element.TypeSelect,
							SortOrder: 120,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "sales_display",
					Label:     `Orders, Invoices, Credit Memos Display Settings`,
					SortOrder: 60,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/sales_display/price
							ID:        "price",
							Label:     `Display Prices`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/sales_display/subtotal
							ID:        "subtotal",
							Label:     `Display Subtotal`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/sales_display/shipping
							ID:        "shipping",
							Label:     `Display Shipping Amount`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// BackendModel: Otnegam\Tax\Model\Config\Notification
							// SourceModel: Otnegam\Tax\Model\System\Config\Source\Tax\Display\Type
						},

						&element.Field{
							// Path: tax/sales_display/grandtotal
							ID:        "grandtotal",
							Label:     `Include Tax In Order Total`,
							Type:      element.TypeSelect,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/sales_display/full_summary
							ID:        "full_summary",
							Label:     `Display Full Tax Summary`,
							Type:      element.TypeSelect,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/sales_display/zero_tax
							ID:        "zero_tax",
							Label:     `Display Zero Tax Subtotal`,
							Type:      element.TypeSelect,
							SortOrder: 120,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "tax",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "cart_display",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/cart_display/discount
							ID:      `discount`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},

				&element.Group{
					ID: "sales_display",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/sales_display/discount
							ID:      `discount`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},

				&element.Group{
					ID: "notification",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/notification/info_url
							ID:      `info_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `http://docs.magento.com/m2/ce/user_guide/tax/warning-messages.html`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #16
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "currency",
			Label:     `Currency Setup`,
			SortOrder: 60,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Backend::currency
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "options",
					Label:     `Currency Options`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: currency/options/base
							ID:        "base",
							Label:     `Base Currency`,
							Comment:   element.LongText(`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:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `USD`,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Currency\Base
							// SourceModel: Otnegam\Config\Model\Config\Source\Locale\Currency
						},

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

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

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

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

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

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

						&element.Field{
							// Path: currency/import/error_email_template
							ID:        "error_email_template",
							Label:     `Error Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `currency_import_error_email_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

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

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

						&element.Field{
							// Path: currency/import/time
							ID:        "time",
							Label:     `Start Time`,
							Type:      element.TypeTime,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "system",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "currency",
					Label:     `Currency`,
					SortOrder: 50,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/currency/installed
							ID:         "installed",
							Label:      `Installed Currencies`,
							Type:       element.TypeMultiselect,
							SortOrder:  1,
							Visible:    element.VisibleYes,
							Scope:      scope.NewPerm(scope.DefaultID),
							CanBeEmpty: true,
							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: Otnegam\Config\Model\Config\Backend\Locale
							// SourceModel: Otnegam\Config\Model\Config\Source\Locale\Currency\All
						},
					),
				},
			),
		},
		&element.Section{
			ID: "general",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "country",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: general/country/optional_zip_countries
							ID:         "optional_zip_countries",
							Label:      `Zip/Postal Code is Optional for`,
							Type:       element.TypeMultiselect,
							SortOrder:  3,
							Visible:    element.VisibleYes,
							Scope:      scope.NewPerm(scope.DefaultID),
							CanBeEmpty: true,
							Default:    `HK,IE,MO,PA,GB`,
							// SourceModel: Otnegam\Directory\Model\Config\Source\Country
						},
					),
				},

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

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

				&element.Group{
					ID: "locale",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: general/locale/weight_unit
							ID:        "weight_unit",
							Label:     `Weight Unit`,
							Type:      element.TypeSelect,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `lbs`,
							// SourceModel: Otnegam\Directory\Model\Config\Source\WeightUnit
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "currency",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "import",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: currency/import/error_email
							ID:      `error_email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "general",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "country",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: general/country/allow
							ID:      `allow`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							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`,
						},

						&element.Field{
							// Path: general/country/default
							ID:      `default`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `US`,
						},
					),
				},

				&element.Group{
					ID: "locale",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: general/locale/datetime_format_long
							ID:      `datetime_format_long`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%A, %B %e %Y [%I:%M %p]`,
						},

						&element.Field{
							// Path: general/locale/datetime_format_medium
							ID:      `datetime_format_medium`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%a, %b %e %Y [%I:%M %p]`,
						},

						&element.Field{
							// Path: general/locale/datetime_format_short
							ID:      `datetime_format_short`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%m/%d/%y [%I:%M %p]`,
						},

						&element.Field{
							// Path: general/locale/date_format_long
							ID:      `date_format_long`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%A, %B %e %Y`,
						},

						&element.Field{
							// Path: general/locale/date_format_medium
							ID:      `date_format_medium`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%a, %b %e %Y`,
						},

						&element.Field{
							// Path: general/locale/date_format_short
							ID:      `date_format_short`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `%m/%d/%y`,
						},

						&element.Field{
							// Path: general/locale/language
							ID:      `language`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `en`,
						},

						&element.Field{
							// Path: general/locale/code
							ID:      `code`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `en_US`,
						},

						&element.Field{
							// Path: general/locale/timezone
							ID:      `timezone`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `America/Los_Angeles`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #17
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "downloadable",
					Label:     `Downloadable Product Options`,
					SortOrder: 600,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/downloadable/order_item_status
							ID:        "order_item_status",
							Label:     `Order Item Status to Enable Downloads`,
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   9,
							// SourceModel: Otnegam\Downloadable\Model\System\Config\Source\Orderitemstatus
						},

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

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

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

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

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

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

						&element.Field{
							// Path: catalog/downloadable/disable_guest_checkout
							ID:        "disable_guest_checkout",
							Label:     `Disable Guest Checkout if Cart Contains Downloadable Items`,
							Comment:   element.LongText(`Guest checkout will only work with shareable.`),
							Type:      element.TypeSelect,
							SortOrder: 800,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #18
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "tax",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "weee",
					Label:     `Fixed Product Taxes`,
					SortOrder: 100,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: tax/weee/enable
							ID:        "enable",
							Label:     `Enable FPT`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/weee/display_list
							ID:        "display_list",
							Label:     `Display Prices In Product Lists`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Weee\Model\Config\Source\Display
						},

						&element.Field{
							// Path: tax/weee/display
							ID:        "display",
							Label:     `Display Prices On Product View Page`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Weee\Model\Config\Source\Display
						},

						&element.Field{
							// Path: tax/weee/display_sales
							ID:        "display_sales",
							Label:     `Display Prices In Sales Modules`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Weee\Model\Config\Source\Display
						},

						&element.Field{
							// Path: tax/weee/display_email
							ID:        "display_email",
							Label:     `Display Prices In Emails`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Weee\Model\Config\Source\Display
						},

						&element.Field{
							// Path: tax/weee/apply_vat
							ID:        "apply_vat",
							Label:     `Apply Tax To FPT`,
							Type:      element.TypeSelect,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: tax/weee/include_in_subtotal
							ID:        "include_in_subtotal",
							Label:     `Include FPT In Subtotal`,
							Type:      element.TypeSelect,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
		&element.Section{
			ID: "sales",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "totals_sort",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/totals_sort/weee
							ID:        "weee",
							Label:     `Fixed Product Tax`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   35,
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "sales",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "totals_sort",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/totals_sort/weee_tax
							ID:      `weee_tax`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 35,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "general",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "validator_data",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: general/validator_data/input_types
							ID:      `input_types`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"weee":"weee"}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "payment",
			SortOrder: 400,
			Scope:     scope.PermAll,
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "checkmo",
					Label:     `Check / Money Order`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/checkmo/active
							ID:        "active",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

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

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

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

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

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

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

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

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

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

						&element.Field{
							// Path: payment/checkmo/model
							ID:      "model",
							Type:    element.Type,
							Visible: element.VisibleYes,
							Default: `Otnegam\OfflinePayments\Model\Checkmo`,
						},
					),
				},

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

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

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

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

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

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

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

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

						&element.Field{
							// Path: payment/purchaseorder/model
							ID:      "model",
							Type:    element.Type,
							Visible: element.VisibleYes,
							Default: `Otnegam\OfflinePayments\Model\Purchaseorder`,
						},
					),
				},

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

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

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

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

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

						&element.Field{
							// Path: payment/banktransfer/instructions
							ID:        "instructions",
							Label:     `Instructions`,
							Type:      element.TypeTextarea,
							SortOrder: 62,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

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

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

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

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

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

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

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

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

						&element.Field{
							// Path: payment/cashondelivery/instructions
							ID:        "instructions",
							Label:     `Instructions`,
							Type:      element.TypeTextarea,
							SortOrder: 62,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

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

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

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

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

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

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

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

						&element.Field{
							// Path: payment/free/title
							ID:        "title",
							Label:     `Title`,
							Type:      element.TypeText,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

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

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

						&element.Field{
							// Path: payment/free/model
							ID:      "model",
							Type:    element.Type,
							Visible: element.VisibleYes,
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "checkmo",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/checkmo/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `offline`,
						},
					),
				},

				&element.Group{
					ID: "purchaseorder",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/purchaseorder/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `offline`,
						},
					),
				},

				&element.Group{
					ID: "banktransfer",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/banktransfer/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\OfflinePayments\Model\Banktransfer`,
						},

						&element.Field{
							// Path: payment/banktransfer/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `offline`,
						},
					),
				},

				&element.Group{
					ID: "cashondelivery",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/cashondelivery/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\OfflinePayments\Model\Cashondelivery`,
						},

						&element.Field{
							// Path: payment/cashondelivery/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `offline`,
						},
					),
				},

				&element.Group{
					ID: "free",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/free/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `offline`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #20
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "sitemap",
			Label:     `XML Sitemap`,
			SortOrder: 70,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sitemap::config_sitemap
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "category",
					Label:     `Categories Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/category/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `daily`,
							// SourceModel: Otnegam\Sitemap\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/category/priority
							ID:        "priority",
							Label:     `Priority`,
							Comment:   element.LongText(`Valid values range from 0.0 to 1.0.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   0.5,
							// BackendModel: Otnegam\Sitemap\Model\Config\Backend\Priority
						},
					),
				},

				&element.Group{
					ID:        "product",
					Label:     `Products Options`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/product/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `daily`,
							// SourceModel: Otnegam\Sitemap\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/product/priority
							ID:        "priority",
							Label:     `Priority`,
							Comment:   element.LongText(`Valid values range from 0.0 to 1.0.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   1,
							// BackendModel: Otnegam\Sitemap\Model\Config\Backend\Priority
						},

						&element.Field{
							// Path: sitemap/product/image_include
							ID:        "image_include",
							Label:     `Add Images into Sitemap`,
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `all`,
							// SourceModel: Otnegam\Sitemap\Model\Source\Product\Image\IncludeImage
						},
					),
				},

				&element.Group{
					ID:        "page",
					Label:     `CMS Pages Options`,
					SortOrder: 3,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/page/changefreq
							ID:        "changefreq",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `daily`,
							// SourceModel: Otnegam\Sitemap\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/page/priority
							ID:        "priority",
							Label:     `Priority`,
							Comment:   element.LongText(`Valid values range from 0.0 to 1.0.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   0.25,
							// BackendModel: Otnegam\Sitemap\Model\Config\Backend\Priority
						},
					),
				},

				&element.Group{
					ID:        "generate",
					Label:     `Generation Settings`,
					SortOrder: 4,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/generate/enabled
							ID:        "enabled",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sitemap/generate/error_email
							ID:        "error_email",
							Label:     `Error Email Recipient`,
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sitemap/generate/error_email_identity
							ID:        "error_email_identity",
							Label:     `Error Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `general`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sitemap/generate/error_email_template
							ID:        "error_email_template",
							Label:     `Error Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `sitemap_generate_error_email_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sitemap/generate/frequency
							ID:        "frequency",
							Label:     `Frequency`,
							Type:      element.TypeSelect,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Cron\Model\Config\Backend\Sitemap
							// SourceModel: Otnegam\Cron\Model\Config\Source\Frequency
						},

						&element.Field{
							// Path: sitemap/generate/time
							ID:        "time",
							Label:     `Start Time`,
							Type:      element.TypeTime,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "limit",
					Label:     `Sitemap File Limits`,
					SortOrder: 5,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/limit/max_lines
							ID:        "max_lines",
							Label:     `Maximum No of URLs Per File`,
							Type:      element.TypeText,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   50000,
						},

						&element.Field{
							// Path: sitemap/limit/max_file_size
							ID:        "max_file_size",
							Label:     `Maximum File Size`,
							Comment:   element.LongText(`File size in bytes.`),
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   10485760,
						},
					),
				},

				&element.Group{
					ID:        "search_engines",
					Label:     `Search Engine Submission Settings`,
					SortOrder: 6,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/search_engines/submission_robots
							ID:        "submission_robots",
							Label:     `Enable Submission to Robots.txt`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "sitemap",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "generate",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/generate/error_email
							ID:      `error_email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},
					),
				},

				&element.Group{
					ID: "file",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sitemap/file/valid_paths
							ID:      `valid_paths`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"available":{"any_path":"\/*\/*.xml"}}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #21
0
	"github.com/corestoreio/csfw/config/element"
	"github.com/corestoreio/csfw/store/scope"
	"github.com/stretchr/testify/assert"
)

// configStructure might be a duplicate of primitives_test but note that the
// test package names are different.
var configStructure = element.MustNewConfiguration(
	&element.Section{
		ID: "web",
		Groups: element.NewGroupSlice(
			&element.Group{
				ID:        "cors",
				Label:     `CORS Cross Origin Resource Sharing`,
				SortOrder: 150,
				Scope:     scope.NewPerm(scope.DefaultID),
				Fields: element.NewFieldSlice(
					&element.Field{
						// Path: `web/cors/exposed_headers`,
						ID:        "exposed_headers",
						Label:     `Exposed Headers`,
						Comment:   element.LongText(`Indicates which headers are safe to expose to the API of a CORS API specification. Separate via line break`),
						Type:      element.TypeTextarea,
						SortOrder: 10,
						Visible:   element.VisibleYes,
						Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						Default:   "Content-Type,X-CoreStore-ID",
					},
					&element.Field{
						// Path: `web/cors/allow_credentials`,
						ID:        "allow_credentials",
Example #22
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "authorizenet_directpost",
					Label:     `Authorize.net Direct Post`,
					SortOrder: 34,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/authorizenet_directpost/active
							ID:        "active",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "authorizenet_directpost",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/authorizenet_directpost/merchant_email
							ID:      `merchant_email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Authorizenet\Model\Directpost`,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/create_order_before
							ID:      `create_order_before`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/date_delim
							ID:      `date_delim`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `/`,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/ccfields
							ID:      `ccfields`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `x_card_code,x_exp_date,x_card_num`,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/place_order_url
							ID:      `place_order_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `authorizenet/directpost_payment/place`,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/cgi_url_test_mode
							ID:      `cgi_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://test.authorize.net/gateway/transact.dll`,
						},

						&element.Field{
							// Path: payment/authorizenet_directpost/cgi_url_td_test_mode
							ID:      `cgi_url_td_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://apitest.authorize.net/xml/v1/request.api`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #23
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "wishlist",
			Label:     `Wish List`,
			SortOrder: 140,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Wishlist::config_wishlist
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "email",
					Label:     `Share Options`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/email/email_identity
							ID:        "email_identity",
							Label:     `Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `general`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: wishlist/email/email_template
							ID:        "email_template",
							Label:     `Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `wishlist_email_email_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: wishlist/email/number_limit
							ID:        "number_limit",
							Label:     `Max Emails Allowed to be Sent`,
							Comment:   element.LongText(`10 by default. Max - 10000`),
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   10,
						},

						&element.Field{
							// Path: wishlist/email/text_limit
							ID:        "text_limit",
							Label:     `Email Text Length Limit`,
							Comment:   element.LongText(`255 by default`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   255,
						},
					),
				},

				&element.Group{
					ID:        "general",
					Label:     `General Options`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/general/active
							ID:        "active",
							Label:     `Enabled`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "wishlist_link",
					Label:     `My Wish List Link`,
					SortOrder: 3,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: wishlist/wishlist_link/use_qty
							ID:        "use_qty",
							Label:     `Display Wish List Summary`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Wishlist\Model\Config\Source\Summary
						},
					),
				},
			),
		},
		&element.Section{
			ID: "rss",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "wishlist",
					Label:     `Wish List`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: rss/wishlist/active
							ID:        "active",
							Label:     `Enable RSS`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #24
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "recently_products",
					Label:     `Recently Viewed/Compared Products`,
					SortOrder: 350,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/recently_products/scope
							ID:        "scope",
							Label:     `Show for Current`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `website`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Reports\Scope
						},

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

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

						&element.Field{
							// Path: reports/dashboard/mtd_start
							ID:        "mtd_start",
							Label:     `Current Month Starts`,
							Comment:   element.LongText(`Select day of the month.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   true,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #25
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "shipping",
			Label:     `Shipping Settings`,
			SortOrder: 310,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Shipping::config_shipping
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "origin",
					Label:     `Origin`,
					SortOrder: 1,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: shipping/origin/country_id
							ID:        "country_id",
							Label:     `Country`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   `US`,
							// SourceModel: Otnegam\Directory\Model\Config\Source\Country
						},

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

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

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

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

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

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

						&element.Field{
							// Path: shipping/shipping_policy/shipping_policy_content
							ID:        "shipping_policy_content",
							Label:     `Shipping Policy`,
							Type:      element.TypeTextarea,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
		&element.Section{
			ID:        "carriers",
			Label:     `Shipping Methods`,
			SortOrder: 320,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Shipping::carriers
			Groups:    element.NewGroupSlice(),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #26
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "sales",
			Label:     `Sales`,
			SortOrder: 300,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sales::config_sales
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "general",
					Label:     `General`,
					SortOrder: 5,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/general/hide_customer_ip
							ID:      "hide_customer_ip",
							Label:   `Hide Customer IP`,
							Comment: element.LongText(`Choose whether a customer IP is shown in orders, invoices, shipments, and credit memos.`),
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "totals_sort",
					Label:     `Checkout Totals Sort Order`,
					SortOrder: 10,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/totals_sort/discount
							ID:        "discount",
							Label:     `Discount`,
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   20,
						},

						&element.Field{
							// Path: sales/totals_sort/grand_total
							ID:        "grand_total",
							Label:     `Grand Total`,
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   100,
						},

						&element.Field{
							// Path: sales/totals_sort/shipping
							ID:        "shipping",
							Label:     `Shipping`,
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   30,
						},

						&element.Field{
							// Path: sales/totals_sort/subtotal
							ID:        "subtotal",
							Label:     `Subtotal`,
							Type:      element.TypeText,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   10,
						},

						&element.Field{
							// Path: sales/totals_sort/tax
							ID:        "tax",
							Label:     `Tax`,
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   40,
						},
					),
				},

				&element.Group{
					ID:        "reorder",
					Label:     `Reorder`,
					SortOrder: 20,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/reorder/allow
							ID:        "allow",
							Label:     `Allow Reorder`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "identity",
					Label:     `Invoice and Packing Slip Design`,
					SortOrder: 40,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/identity/logo
							ID:        "logo",
							Label:     `Logo for PDF Print-outs (200x50)`,
							Comment:   element.LongText(`Your default logo will be used in PDF and HTML documents.<br />(jpeg, tiff, png) If your pdf image is distorted, try to use larger file-size image.`),
							Type:      element.TypeImage,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image\Pdf
						},

						&element.Field{
							// Path: sales/identity/logo_html
							ID:        "logo_html",
							Label:     `Logo for HTML Print View`,
							Comment:   element.LongText(`Logo for HTML documents only. If empty, default will be used.<br />(jpeg, gif, png)`),
							Type:      element.TypeImage,
							SortOrder: 150,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image
						},

						&element.Field{
							// Path: sales/identity/address
							ID:        "address",
							Label:     `Address`,
							Type:      element.TypeTextarea,
							SortOrder: 200,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "minimum_order",
					Label:     `Minimum Order Amount`,
					SortOrder: 50,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/minimum_order/active
							ID:        "active",
							Label:     `Enable`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales/minimum_order/amount
							ID:        "amount",
							Label:     `Minimum Amount`,
							Comment:   element.LongText(`Subtotal after discount`),
							Type:      element.Type,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
						},

						&element.Field{
							// Path: sales/minimum_order/tax_including
							ID:        "tax_including",
							Label:     `Include Tax to Amount`,
							Type:      element.TypeSelect,
							SortOrder: 15,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales/minimum_order/description
							ID:        "description",
							Label:     `Description Message`,
							Comment:   element.LongText(`This message will be shown in the shopping cart when the subtotal (after discount) is lower than the minimum allowed amount.`),
							Type:      element.TypeTextarea,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales/minimum_order/error_message
							ID:        "error_message",
							Label:     `Error to Show in Shopping Cart`,
							Type:      element.TypeTextarea,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales/minimum_order/multi_address
							ID:        "multi_address",
							Label:     `Validate Each Address Separately in Multi-address Checkout`,
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales/minimum_order/multi_address_description
							ID:        "multi_address_description",
							Label:     `Multi-address Description Message`,
							Comment:   element.LongText(`We'll use the default description above if you leave this empty.`),
							Type:      element.TypeTextarea,
							SortOrder: 50,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales/minimum_order/multi_address_error_message
							ID:        "multi_address_error_message",
							Label:     `Multi-address Error to Show in Shopping Cart`,
							Comment:   element.LongText(`We'll use the default error above if you leave this empty.`),
							Type:      element.TypeTextarea,
							SortOrder: 60,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "dashboard",
					Label:     `Dashboard`,
					SortOrder: 60,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/dashboard/use_aggregated_data
							ID:        "use_aggregated_data",
							Label:     `Use Aggregated Data (beta)`,
							Comment:   element.LongText(`Improves dashboard performance but provides non-realtime data.`),
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "orders",
					Label:     `Orders Cron Settings`,
					SortOrder: 70,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/orders/delete_pending_after
							ID:        "delete_pending_after",
							Label:     `Pending Payment Order Lifetime (minutes)`,
							Type:      element.TypeText,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   480,
						},
					),
				},
			),
		},
		&element.Section{
			ID:        "sales_email",
			Label:     `Sales Emails`,
			SortOrder: 301,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sales::sales_email
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:    "general",
					Label: `General Settings`,
					Scope: scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/general/async_sending
							ID:        "async_sending",
							Label:     `Asynchronous sending`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\Sales\Model\Config\Backend\Email\AsyncSending
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},

				&element.Group{
					ID:        "order",
					Label:     `Order`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/order/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/order/identity
							ID:        "identity",
							Label:     `New Order Confirmation Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/order/template
							ID:        "template",
							Label:     `New Order Confirmation Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_order_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/order/guest_template
							ID:        "guest_template",
							Label:     `New Order Confirmation Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_order_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/order/copy_to
							ID:        "copy_to",
							Label:     `Send Order Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/order/copy_method
							ID:        "copy_method",
							Label:     `Send Order Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "order_comment",
					Label:     `Order Comments`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/order_comment/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/order_comment/identity
							ID:        "identity",
							Label:     `Order Comment Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/order_comment/template
							ID:        "template",
							Label:     `Order Comment Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_order_comment_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/order_comment/guest_template
							ID:        "guest_template",
							Label:     `Order Comment Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_order_comment_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/order_comment/copy_to
							ID:        "copy_to",
							Label:     `Send Order Comment Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/order_comment/copy_method
							ID:        "copy_method",
							Label:     `Send Order Comments Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "invoice",
					Label:     `Invoice`,
					SortOrder: 3,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/invoice/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/invoice/identity
							ID:        "identity",
							Label:     `Invoice Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/invoice/template
							ID:        "template",
							Label:     `Invoice Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_invoice_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/invoice/guest_template
							ID:        "guest_template",
							Label:     `Invoice Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_invoice_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/invoice/copy_to
							ID:        "copy_to",
							Label:     `Send Invoice Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/invoice/copy_method
							ID:        "copy_method",
							Label:     `Send Invoice Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "invoice_comment",
					Label:     `Invoice Comments`,
					SortOrder: 4,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/invoice_comment/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/invoice_comment/identity
							ID:        "identity",
							Label:     `Invoice Comment Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/invoice_comment/template
							ID:        "template",
							Label:     `Invoice Comment Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_invoice_comment_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/invoice_comment/guest_template
							ID:        "guest_template",
							Label:     `Invoice Comment Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_invoice_comment_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/invoice_comment/copy_to
							ID:        "copy_to",
							Label:     `Send Invoice Comment Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/invoice_comment/copy_method
							ID:        "copy_method",
							Label:     `Send Invoice Comments Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "shipment",
					Label:     `Shipment`,
					SortOrder: 5,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/shipment/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/shipment/identity
							ID:        "identity",
							Label:     `Shipment Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/shipment/template
							ID:        "template",
							Label:     `Shipment Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_shipment_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/shipment/guest_template
							ID:        "guest_template",
							Label:     `Shipment Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_shipment_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/shipment/copy_to
							ID:        "copy_to",
							Label:     `Send Shipment Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/shipment/copy_method
							ID:        "copy_method",
							Label:     `Send Shipment Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "shipment_comment",
					Label:     `Shipment Comments`,
					SortOrder: 6,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/shipment_comment/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/shipment_comment/identity
							ID:        "identity",
							Label:     `Shipment Comment Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/shipment_comment/template
							ID:        "template",
							Label:     `Shipment Comment Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_shipment_comment_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/shipment_comment/guest_template
							ID:        "guest_template",
							Label:     `Shipment Comment Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_shipment_comment_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/shipment_comment/copy_to
							ID:        "copy_to",
							Label:     `Send Shipment Comment Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/shipment_comment/copy_method
							ID:        "copy_method",
							Label:     `Send Shipment Comments Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "creditmemo",
					Label:     `Credit Memo`,
					SortOrder: 7,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/creditmemo/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/creditmemo/identity
							ID:        "identity",
							Label:     `Credit Memo Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/creditmemo/template
							ID:        "template",
							Label:     `Credit Memo Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_creditmemo_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/creditmemo/guest_template
							ID:        "guest_template",
							Label:     `Credit Memo Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_creditmemo_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/creditmemo/copy_to
							ID:        "copy_to",
							Label:     `Send Credit Memo Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/creditmemo/copy_method
							ID:        "copy_method",
							Label:     `Send Credit Memo Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},

				&element.Group{
					ID:        "creditmemo_comment",
					Label:     `Credit Memo Comments`,
					SortOrder: 8,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_email/creditmemo_comment/enabled
							ID:      "enabled",
							Label:   `Enabled`,
							Type:    element.TypeSelect,
							Visible: element.VisibleYes,
							Scope:   scope.PermAll,
							Default: true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: sales_email/creditmemo_comment/identity
							ID:        "identity",
							Label:     `Credit Memo Comment Email Sender`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Identity
						},

						&element.Field{
							// Path: sales_email/creditmemo_comment/template
							ID:        "template",
							Label:     `Credit Memo Comment Email Template`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_creditmemo_comment_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/creditmemo_comment/guest_template
							ID:        "guest_template",
							Label:     `Credit Memo Comment Email Template for Guest`,
							Comment:   element.LongText(`Email template chosen based on theme fallback when "Default" option is selected.`),
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `sales_email_creditmemo_comment_guest_template`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Template
						},

						&element.Field{
							// Path: sales_email/creditmemo_comment/copy_to
							ID:        "copy_to",
							Label:     `Send Credit Memo Comment Email Copy To`,
							Comment:   element.LongText(`Comma-separated`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: sales_email/creditmemo_comment/copy_method
							ID:        "copy_method",
							Label:     `Send Credit Memo Comments Email Copy Method`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `bcc`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Email\Method
						},
					),
				},
			),
		},
		&element.Section{
			ID:        "sales_pdf",
			Label:     `PDF Print-outs`,
			SortOrder: 302,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Sales::sales_pdf
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "invoice",
					Label:     `Invoice`,
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_pdf/invoice/put_order_id
							ID:        "put_order_id",
							Label:     `Display Order ID in Header`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "shipment",
					Label:     `Shipment`,
					SortOrder: 20,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_pdf/shipment/put_order_id
							ID:        "put_order_id",
							Label:     `Display Order ID in Header`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "creditmemo",
					Label:     `Credit Memo`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales_pdf/creditmemo/put_order_id
							ID:        "put_order_id",
							Label:     `Display Order ID in Header`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
		&element.Section{
			ID: "rss",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "order",
					Label:     `Order`,
					SortOrder: 4,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: rss/order/status
							ID:        "status",
							Label:     `Customer Order Status Notification`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},
		&element.Section{
			ID: "dev",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "grid",
					Label:     `Grid Settings`,
					SortOrder: 131,
					Scope:     scope.NewPerm(scope.DefaultID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: dev/grid/async_indexing
							ID:        "async_indexing",
							Label:     `Asynchronous indexing`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							Default:   false,
							// BackendModel: Otnegam\Sales\Model\Config\Backend\Grid\AsyncIndexing
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #27
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "productalert",
					Label:     `Product Alerts`,
					SortOrder: 250,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/productalert/allow_price
							ID:        "allow_price",
							Label:     `Allow Alert When Product Price Changes`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

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

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

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

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

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

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

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

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

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

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "catalog",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "productalert_cron",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/productalert_cron/error_email
							ID:      `error_email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #28
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "sales",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "msrp",
					Label:     `Minimum Advertised Price`,
					SortOrder: 110,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: sales/msrp/enabled
							ID:        "enabled",
							Label:     `Enable MAP`,
							Comment:   element.LongText(`<strong style="color:red">Warning!</strong> Enabling MAP by default will hide all product prices on Storefront.`),
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

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

						&element.Field{
							// Path: sales/msrp/explanation_message
							ID:        "explanation_message",
							Label:     `Default Popup Text Message`,
							Type:      element.TypeTextarea,
							SortOrder: 40,
							Visible:   element.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.`,
						},

						&element.Field{
							// Path: sales/msrp/explanation_message_whats_this
							ID:        "explanation_message_whats_this",
							Label:     `Default "What's This" Text Message`,
							Type:      element.TypeTextarea,
							SortOrder: 50,
							Visible:   element.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.`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #29
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "system",
			SortOrder: 900,
			Scope:     scope.PermAll,
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "media_storage_configuration",
					Label:     `Storage Configuration for Media`,
					SortOrder: 900,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/media_storage_configuration/media_storage
							ID:        "media_storage",
							Label:     `Media Storage`,
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// SourceModel: Otnegam\MediaStorage\Model\Config\Source\Storage\Media\Storage
						},

						&element.Field{
							// Path: system/media_storage_configuration/media_database
							ID:        "media_database",
							Label:     `Select Media Database`,
							Type:      element.TypeSelect,
							SortOrder: 200,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
							// BackendModel: Otnegam\MediaStorage\Model\Config\Backend\Storage\Media\Database
							// SourceModel: Otnegam\MediaStorage\Model\Config\Source\Storage\Media\Database
						},

						&element.Field{
							// Path: system/media_storage_configuration/synchronize
							ID:        "synchronize",
							Comment:   element.LongText(`After selecting a new media storage location, press the Synchronize button to transfer all media to that location. Media will not be available in the new location until the synchronization process is complete.`),
							Type:      element.TypeButton,
							SortOrder: 300,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
						},

						&element.Field{
							// Path: system/media_storage_configuration/configuration_update_time
							ID:        "configuration_update_time",
							Label:     `Environment Update Time`,
							Type:      element.TypeText,
							SortOrder: 400,
							Visible:   element.VisibleYes,
							Scope:     scope.NewPerm(scope.DefaultID),
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
Example #30
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "paypal_notice",
					SortOrder: 3,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup`),
					Fields:    element.NewFieldSlice(),
				},

				&element.Group{
					ID:        "account",
					Label:     `Merchant Location`,
					SortOrder: 1,
					Scope:     scope.NewPerm(scope.DefaultID, scope.WebsiteID),
					Fields: element.NewFieldSlice(
						&element.Field{
							ConfigPath: `paypal/general/merchant_country`, // Original: payment/account/merchant_country
							ID:         "merchant_country",
							Label:      `Merchant Country`,
							Comment:    element.LongText(`If not specified, Default Country from General Config will be used`),
							Type:       element.TypeSelect,
							SortOrder:  5,
							Visible:    element.VisibleYes,
							Scope:      scope.NewPerm(scope.DefaultID, scope.WebsiteID),
							// BackendModel: Otnegam\Paypal\Model\System\Config\Backend\MerchantCountry
							// SourceModel: Otnegam\Paypal\Model\System\Config\Source\MerchantCountry
						},
					),
				},
			),
		},
		&element.Section{
			ID: "payment_all_paypal",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "payments_pro_hosted_solution_without_bml",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_us",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "paypal_group_all_in_one",
					Label:     `PayPal All-in-One Payment Solutions&nbsp;&nbsp;<i>Accept and process credit cards and PayPal payments.</i>`,
					Comment:   element.LongText(`Choose a secure bundled payment solution for your business.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup`),
					Fields:    element.NewFieldSlice(),
				},

				&element.Group{
					ID:        "paypal_payment_gateways",
					Label:     `PayPal Payment Gateways`,
					Comment:   element.LongText(`Process payments using your own internet merchant account.`),
					SortOrder: 15,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content`),
					Fields:    element.NewFieldSlice(),
				},

				&element.Group{
					ID:        "paypal_alternative_payment_methods",
					Label:     `PayPal Express Checkout`,
					Comment:   element.LongText(`Add another payment method to your existing solution or as a stand-alone option.`),
					SortOrder: 20,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content`),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_gb",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "paypal_group_all_in_one",
					Label:     `PayPal All-in-One Payment Solutions&nbsp;&nbsp;<i>Accept and process credit cards and PayPal payments.</i>`,
					Comment:   element.LongText(`Choose a secure bundled payment solution for your business.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup`),
					Fields:    element.NewFieldSlice(),
				},

				&element.Group{
					ID:        "paypal_alternative_payment_methods",
					Label:     `PayPal Express Checkout`,
					Comment:   element.LongText(`Add another payment method to your existing solution or as a stand-alone option.`),
					SortOrder: 20,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://merchant.paypal.com/cgi-bin/marketingweb?cmd=_render-content`),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_de",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "paypal_payment_solutions",
					Label:     `PayPal Payment Solutions`,
					Comment:   element.LongText(`Add another payment method to your existing solution or as a stand-alone option.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup`),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_other",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "paypal_payment_solutions",
					Label:     `PayPal Payment Solutions`,
					Comment:   element.LongText(`Add another payment method to your existing solution or as a stand-alone option.`),
					SortOrder: 10,
					Scope:     scope.PermAll,
					HelpURL:   element.LongText(`https://www.paypal-marketing.com/emarketing/partner/na/merchantlineup/home.page#mainTab=checkoutlineup&subTab=newlineup`),
					Fields:    element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_ca",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_au",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_jp",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_fr",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_it",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_es",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_hk",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},
		&element.Section{
			ID: "payment_nz",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:     "paypal_payment_solutions",
					Fields: element.NewFieldSlice(),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "paypal",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "style",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: paypal/style/logo
							ID:      `logo`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},
					),
				},

				&element.Group{
					ID: "wpp",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: paypal/wpp/api_password
							ID:      `api_password`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/wpp/api_signature
							ID:      `api_signature`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/wpp/api_username
							ID:      `api_username`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/wpp/button_flavor
							ID:      `button_flavor`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `dynamic`,
						},
					),
				},

				&element.Group{
					ID: "wpuk",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: paypal/wpuk/user
							ID:      `user`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/wpuk/pwd
							ID:      `pwd`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},
					),
				},

				&element.Group{
					ID: "fetch_reports",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: paypal/fetch_reports/ftp_login
							ID:      `ftp_login`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/fetch_reports/ftp_password
							ID:      `ftp_password`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: paypal/fetch_reports/schedule
							ID:      `schedule`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: paypal/fetch_reports/time
							ID:      `time`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `00,00,00`,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "payment",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "paypal_express",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/paypal_express/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Express`,
						},

						&element.Field{
							// Path: payment/paypal_express/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal Express Checkout`,
						},

						&element.Field{
							// Path: payment/paypal_express/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/paypal_express/solution_type
							ID:      `solution_type`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Mark`,
						},

						&element.Field{
							// Path: payment/paypal_express/line_items_enabled
							ID:      `line_items_enabled`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_express/visible_on_cart
							ID:      `visible_on_cart`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_express/visible_on_product
							ID:      `visible_on_product`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_express/allow_ba_signup
							ID:      `allow_ba_signup`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `never`,
						},

						&element.Field{
							// Path: payment/paypal_express/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/paypal_express/authorization_honor_period
							ID:      `authorization_honor_period`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 3,
						},

						&element.Field{
							// Path: payment/paypal_express/order_valid_period
							ID:      `order_valid_period`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 29,
						},

						&element.Field{
							// Path: payment/paypal_express/child_authorization_number
							ID:      `child_authorization_number`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_express/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_express/skip_order_review_step
							ID:      `skip_order_review_step`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},

				&element.Group{
					ID: "paypal_express_bml",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/paypal_express_bml/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Bml`,
						},

						&element.Field{
							// Path: payment/paypal_express_bml/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal Credit`,
						},

						&element.Field{
							// Path: payment/paypal_express_bml/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},
					),
				},

				&element.Group{
					ID: "payflow_express",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/payflow_express/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal Express Checkout Payflow Edition`,
						},

						&element.Field{
							// Path: payment/payflow_express/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/payflow_express/line_items_enabled
							ID:      `line_items_enabled`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_express/visible_on_cart
							ID:      `visible_on_cart`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_express/visible_on_product
							ID:      `visible_on_product`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_express/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/payflow_express/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_express/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\PayflowExpress`,
						},
					),
				},

				&element.Group{
					ID: "payflow_express_bml",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/payflow_express_bml/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Payflow\Bml`,
						},

						&element.Field{
							// Path: payment/payflow_express_bml/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal Credit`,
						},

						&element.Field{
							// Path: payment/payflow_express_bml/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},
					),
				},

				&element.Group{
					ID: "payflowpro",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/payflowpro/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Payflow\Transparent`,
						},

						&element.Field{
							// Path: payment/payflowpro/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Credit Card`,
						},

						&element.Field{
							// Path: payment/payflowpro/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/payflowpro/cctypes
							ID:      `cctypes`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `AE,VI`,
						},

						&element.Field{
							// Path: payment/payflowpro/useccv
							ID:      `useccv`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflowpro/tender
							ID:      `tender`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `C`,
						},

						&element.Field{
							// Path: payment/payflowpro/verbosity
							ID:      `verbosity`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `MEDIUM`,
						},

						&element.Field{
							// Path: payment/payflowpro/user
							ID:      `user`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: payment/payflowpro/pwd
							ID:      `pwd`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: payment/payflowpro/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/payflowpro/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflowpro/date_delim
							ID:      `date_delim`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},

						&element.Field{
							// Path: payment/payflowpro/ccfields
							ID:      `ccfields`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `csc,expdate,acct`,
						},

						&element.Field{
							// Path: payment/payflowpro/place_order_url
							ID:      `place_order_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal/transparent/requestSecureToken`,
						},

						&element.Field{
							// Path: payment/payflowpro/cgi_url_test_mode
							ID:      `cgi_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowlink.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflowpro/cgi_url
							ID:      `cgi_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowlink.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflowpro/transaction_url_test_mode
							ID:      `transaction_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflowpro/transaction_url
							ID:      `transaction_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflowpro/avs_street
							ID:      `avs_street`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/payflowpro/avs_zip
							ID:      `avs_zip`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/payflowpro/avs_international
							ID:      `avs_international`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/payflowpro/avs_security_code
							ID:      `avs_security_code`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflowpro/cc_year_length
							ID:      `cc_year_length`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 2,
						},
					),
				},

				&element.Group{
					ID: "paypal_billing_agreement",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/paypal_billing_agreement/active
							ID:      `active`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_billing_agreement/allow_billing_agreement_wizard
							ID:      `allow_billing_agreement_wizard`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/paypal_billing_agreement/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Method\Agreement`,
						},

						&element.Field{
							// Path: payment/paypal_billing_agreement/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal Billing Agreement`,
						},

						&element.Field{
							// Path: payment/paypal_billing_agreement/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/paypal_billing_agreement/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},

				&element.Group{
					ID: "payflow_link",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/payflow_link/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Payflowlink`,
						},

						&element.Field{
							// Path: payment/payflow_link/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/payflow_link/verbosity
							ID:      `verbosity`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `HIGH`,
						},

						&element.Field{
							// Path: payment/payflow_link/user
							ID:      `user`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: payment/payflow_link/pwd
							ID:      `pwd`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: payment/payflow_link/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/payflow_link/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Credit Card`,
						},

						&element.Field{
							// Path: payment/payflow_link/partner
							ID:      `partner`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal`,
						},

						&element.Field{
							// Path: payment/payflow_link/csc_required
							ID:      `csc_required`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_link/csc_editable
							ID:      `csc_editable`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_link/url_method
							ID:      `url_method`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `GET`,
						},

						&element.Field{
							// Path: payment/payflow_link/email_confirmation
							ID:      `email_confirmation`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/payflow_link/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_link/transaction_url_test_mode
							ID:      `transaction_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_link/transaction_url
							ID:      `transaction_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_link/cgi_url_test_mode
							ID:      `cgi_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowlink.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_link/cgi_url
							ID:      `cgi_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowlink.paypal.com`,
						},
					),
				},

				&element.Group{
					ID: "payflow_advanced",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/payflow_advanced/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Payflowadvanced`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/verbosity
							ID:      `verbosity`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `HIGH`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/user
							ID:      `user`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}},"PayPal"]`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/pwd
							ID:      `pwd`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"_value":null,"_attribute":{"backend_model":"Otnegam\\Config\\Model\\Config\\Backend\\Encrypted"}}`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Credit Card`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/partner
							ID:      `partner`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/vendor
							ID:      `vendor`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `PayPal`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/csc_required
							ID:      `csc_required`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_advanced/csc_editable
							ID:      `csc_editable`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_advanced/url_method
							ID:      `url_method`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `GET`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/email_confirmation
							ID:      `email_confirmation`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/payflow_advanced/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},

						&element.Field{
							// Path: payment/payflow_advanced/transaction_url_test_mode
							ID:      `transaction_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/transaction_url
							ID:      `transaction_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowpro.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/cgi_url_test_mode
							ID:      `cgi_url_test_mode`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://pilot-payflowlink.paypal.com`,
						},

						&element.Field{
							// Path: payment/payflow_advanced/cgi_url
							ID:      `cgi_url`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `https://payflowlink.paypal.com`,
						},
					),
				},

				&element.Group{
					ID: "hosted_pro",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: payment/hosted_pro/model
							ID:      `model`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Paypal\Model\Hostedpro`,
						},

						&element.Field{
							// Path: payment/hosted_pro/title
							ID:      `title`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Payment by cards or by PayPal account`,
						},

						&element.Field{
							// Path: payment/hosted_pro/payment_action
							ID:      `payment_action`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Authorization`,
						},

						&element.Field{
							// Path: payment/hosted_pro/group
							ID:      `group`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `paypal`,
						},

						&element.Field{
							// Path: payment/hosted_pro/display_ec
							ID:      `display_ec`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: payment/hosted_pro/verify_peer
							ID:      `verify_peer`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: true,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}