示例#1
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)
}
示例#2
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "catalog",
			SortOrder: 40,
			Scope:     scope.PermAll,
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "frontend",
					SortOrder: 100,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: catalog/frontend/swatches_per_product
							ID:        "swatches_per_product",
							Label:     `Swatches per Product`,
							Type:      element.TypeText,
							SortOrder: 300,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   16,
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&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: `{"swatch_visual":"swatch_visual","swatch_text":"swatch_text"}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "checkout",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "cart",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: checkout/cart/configurable_product_image
							ID:        "configurable_product_image",
							Label:     `Configurable Product Image`,
							Type:      element.TypeSelect,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `parent`,
							// SourceModel: Otnegam\Catalog\Model\Config\Source\Product\Thumbnail
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#4
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "webapi",
			Label:     `Otnegam Web API`,
			SortOrder: 102,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Webapi::config_webapi
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "soap",
					Label:     `SOAP Settings`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: webapi/soap/charset
							ID:        "charset",
							Label:     `Default Response Charset`,
							Comment:   element.LongText(`If empty, UTF-8 will be used.`),
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#5
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)
}
示例#6
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)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "checkout",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "options",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: checkout/options/enable_agreements
							ID:        "enable_agreements",
							Label:     `Enable Terms and Conditions`,
							Type:      element.TypeSelect,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#8
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "rss",
			Label:     `RSS Feeds`,
			SortOrder: 80,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Rss::rss
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "config",
					Label:     `Rss Config`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: rss/config/active
							ID:        "active",
							Label:     `Enable RSS`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Rss\Model\System\Config\Backend\Links
							// SourceModel: Otnegam\Config\Model\Config\Source\Enabledisable
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "google",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "analytics",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: google/analytics/experiments
							ID:        "experiments",
							Label:     `Enable Content Experiments`,
							Type:      element.TypeSelect,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},

		// Hidden Configuration, may be visible somewhere else ...
		&element.Section{
			ID: "google",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "optimizer",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: google/optimizer/active
							ID:      `active`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#10
0
func TestScopeApplyDefaults(t *testing.T) {
	defer debugLogBuf.Reset()
	defer infoLogBuf.Reset()

	pkgCfg := element.MustNewConfiguration(
		&element.Section{
			ID: "contact",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "contact",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: `contact/contact/enabled`,
							ID:      "enabled",
							Default: true,
						},
					),
				},
				&element.Group{
					ID: "email",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: `contact/email/recipient_email`,
							ID:      "recipient_email",
							Default: `[email protected]`,
						},
						&element.Field{
							// Path: `contact/email/sender_email_identity`,
							ID:      "sender_email_identity",
							Default: 2.7182818284590452353602874713527,
						},
						&element.Field{
							// Path: `contact/email/email_template`,
							ID:      "email_template",
							Default: 4711,
						},
					),
				},
			),
		},
	)
	s := config.NewService()
	s.ApplyDefaults(pkgCfg)
	cer, err := pkgCfg.FindFieldByPath("contact", "email", "recipient_email")
	if err != nil {
		t.Error(err)
		return
	}
	sval, err := s.String(config.Path("contact/email/recipient_email"))
	assert.NoError(t, err)
	assert.Exactly(t, cer.Default.(string), sval)
	assert.NoError(t, s.Close())
}
示例#11
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)
}
示例#12
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)
}
示例#13
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "google",
			Label:     `Google API`,
			SortOrder: 340,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_GoogleAnalytics::google
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "analytics",
					Label:     `Google Analytics`,
					SortOrder: 10,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: google/analytics/active
							ID:        "active",
							Label:     `Enable`,
							Type:      element.TypeSelect,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: google/analytics/account
							ID:        "account",
							Label:     `Account Number`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#14
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)
}
示例#15
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "design",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "head",
					Label:     `HTML Head`,
					SortOrder: 20,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/head/shortcut_icon
							ID:        "shortcut_icon",
							Label:     `Favicon Icon`,
							Comment:   element.LongText(`Allowed file types: ICO, PNG, GIF, JPG, JPEG, APNG, SVG. Not all browsers support all these formats!`),
							Type:      element.TypeImage,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image\Favicon
						},

						&element.Field{
							// Path: design/head/default_title
							ID:        "default_title",
							Label:     `Default Title`,
							Type:      element.TypeText,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/title_prefix
							ID:        "title_prefix",
							Label:     `Title Prefix`,
							Type:      element.TypeText,
							SortOrder: 12,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/title_suffix
							ID:        "title_suffix",
							Label:     `Title Suffix`,
							Type:      element.TypeText,
							SortOrder: 14,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/default_description
							ID:        "default_description",
							Label:     `Default Description`,
							Type:      element.TypeTextarea,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/default_keywords
							ID:        "default_keywords",
							Label:     `Default Keywords`,
							Type:      element.TypeTextarea,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/includes
							ID:        "includes",
							Label:     `Miscellaneous Scripts`,
							Comment:   element.LongText(`This will be included before head closing tag in page HTML.`),
							Type:      element.TypeTextarea,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/head/demonotice
							ID:        "demonotice",
							Label:     `Display Demo Store Notice`,
							Type:      element.TypeSelect,
							SortOrder: 80,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "search_engine_robots",
					Label:     `Search Engine Robots`,
					SortOrder: 25,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/search_engine_robots/default_robots
							ID:        "default_robots",
							Label:     `Default Robots`,
							Comment:   element.LongText(`This will be included before head closing tag in page HTML.`),
							Type:      element.TypeSelect,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `INDEX,FOLLOW`,
							// SourceModel: Otnegam\Config\Model\Config\Source\Design\Robots
						},

						&element.Field{
							// Path: design/search_engine_robots/custom_instructions
							ID:        "custom_instructions",
							Label:     `Edit custom instruction of robots.txt File`,
							Type:      element.TypeTextarea,
							SortOrder: 70,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Admin\Robots
						},

						&element.Field{
							// Path: design/search_engine_robots/reset_to_defaults
							ID:        "reset_to_defaults",
							Label:     `Reset to Defaults`,
							Comment:   element.LongText(`This action will delete your custom instructions and reset robots.txt file to system's default settings.`),
							Type:      element.TypeButton,
							SortOrder: 80,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "header",
					Label:     `Header`,
					SortOrder: 30,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/header/logo_src
							ID:        "logo_src",
							Label:     `Logo Image`,
							Comment:   element.LongText(`Allowed file types:PNG, GIF, JPG, JPEG, SVG.`),
							Type:      element.TypeImage,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Image\Logo
						},

						&element.Field{
							// Path: design/header/logo_width
							ID:        "logo_width",
							Label:     `Logo Image Width`,
							Type:      element.TypeText,
							SortOrder: 11,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/header/logo_height
							ID:        "logo_height",
							Label:     `Logo Image Height`,
							Type:      element.TypeText,
							SortOrder: 12,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/header/logo_alt
							ID:        "logo_alt",
							Label:     `Logo Image Alt`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/header/welcome
							ID:        "welcome",
							Label:     `Welcome Text`,
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "footer",
					Label:     `Footer`,
					SortOrder: 40,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/footer/copyright
							ID:        "copyright",
							Label:     `Copyright`,
							Type:      element.TypeTextarea,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/footer/absolute_footer
							ID:        "absolute_footer",
							Label:     `Miscellaneous HTML`,
							Comment:   element.LongText(`This will be displayed just before body closing tag.`),
							Type:      element.TypeTextarea,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},
			),
		},

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

						&element.Field{
							// Path: design/invalid_caches/layout
							ID:      `layout`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},

						&element.Field{
							// Path: design/invalid_caches/translate
							ID:      `translate`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
						},
					),
				},

				&element.Group{
					ID: "head",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/head/_value
							ID:      `_value`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"default_title":"Otnegam Commerce","default_description":"Default Description","default_keywords":"Otnegam, Varien, E-commerce","default_media_type":"text\/html","default_charset":"utf-8"}`,
						},

						&element.Field{
							// Path: design/head/_attribute
							ID:      `_attribute`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"translate":"default_description"}`,
						},
					),
				},

				&element.Group{
					ID: "search_engine_robots",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/search_engine_robots/default_custom_instructions
							ID:      `default_custom_instructions`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `
User-agent: *
Disallow: /index.php/
Disallow: /*?
Disallow: /checkout/
Disallow: /app/
Disallow: /lib/
Disallow: /*.php$
Disallow: /pkginfo/
Disallow: /report/
Disallow: /var/
Disallow: /catalog/
Disallow: /customer/
Disallow: /sendfriend/
Disallow: /review/
Disallow: /*SID=
                    `,
						},
					),
				},

				&element.Group{
					ID: "header",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/header/_value
							ID:      `_value`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"logo_alt":"Otnegam Commerce","welcome":"Default welcome msg!"}`,
						},

						&element.Field{
							// Path: design/header/_attribute
							ID:      `_attribute`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"translate":"welcome"}`,
						},
					),
				},

				&element.Group{
					ID: "footer",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/footer/_value
							ID:      `_value`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"copyright":"Copyright \u00a9 2015 Otnegam. All rights reserved."}`,
						},

						&element.Field{
							// Path: design/footer/_attribute
							ID:      `_attribute`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `{"translate":"copyright"}`,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "theme",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "customization",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: theme/customization/custom_css
							ID:      `custom_css`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Otnegam\Theme\Model\Theme\Customization\File\CustomCss`,
						},
					),
				},
			),
		},
		&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: `{"site_favicons":"favicon"}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID:        "newrelicreporting",
			Label:     `New Relic Reporting`,
			SortOrder: 1100,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_NewRelicReporting::config_newrelicreporting
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "general",
					Label:     `General`,
					SortOrder: 1,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: newrelicreporting/general/enable
							ID:        "enable",
							Label:     `Enable New Relic Integration`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: newrelicreporting/general/api_url
							ID:        "api_url",
							Label:     `New Relic API URL`,
							Type:      element.TypeText,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `https://api.newrelic.com/deployments.xml`,
						},

						&element.Field{
							// Path: newrelicreporting/general/insights_api_url
							ID:        "insights_api_url",
							Label:     `Insights API URL`,
							Comment:   element.LongText(`Use %s to replace the account ID in the URL`),
							Type:      element.TypeText,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `https://insights-collector.newrelic.com/v1/accounts/%s/events`,
						},

						&element.Field{
							// Path: newrelicreporting/general/account_id
							ID:        "account_id",
							Label:     `New Relic Account ID`,
							Comment:   element.LongText(`"Need a New Relic account? <a href="http://www.newrelic.com/magento" target="_blank">Click here to get one`),
							Type:      element.TypeText,
							SortOrder: 4,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: newrelicreporting/general/app_id
							ID:        "app_id",
							Label:     `New Relic Application ID`,
							Comment:   element.LongText(`This can commonly be found at the end of the URL when viewing the APM after "/applications/"`),
							Type:      element.TypeText,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: newrelicreporting/general/api
							ID:        "api",
							Label:     `New Relic API Key`,
							Comment:   element.LongText(`This is located by navigating to Events -> Deployments from the New Relic APM website`),
							Type:      element.TypeObscure,
							SortOrder: 6,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: newrelicreporting/general/insights_insert_key
							ID:        "insights_insert_key",
							Label:     `Insights API Key`,
							Comment:   element.LongText(`Generated under Insights in Manage data -> API Keys -> Insert Keys`),
							Type:      element.TypeObscure,
							SortOrder: 7,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Encrypted
						},

						&element.Field{
							// Path: newrelicreporting/general/app_name
							ID:        "app_name",
							Label:     `New Relic Application Name`,
							Comment:   element.LongText(`This is located by navigating to Settings from the New Relic APM website`),
							Type:      element.TypeText,
							SortOrder: 8,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},
					),
				},

				&element.Group{
					ID:        "cron",
					Label:     `Cron`,
					SortOrder: 2,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: newrelicreporting/cron/enable_cron
							ID:        "enable_cron",
							Label:     `Enable Cron`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   false,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#17
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)
}
示例#18
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "design",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "email",
					Label:     `Emails`,
					SortOrder: 510,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: design/email/logo
							ID:        "logo",
							Label:     `Logo Image`,
							Comment:   element.LongText(`Allowed file types: jpg, jpeg, gif, png. To optimize logo for high-resolution displays, upload an image that is 3x normal size and then specify 1x dimensions in width/height fields below.`),
							Type:      element.TypeImage,
							SortOrder: 10,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// BackendModel: Otnegam\Config\Model\Config\Backend\Email\Logo
						},

						&element.Field{
							// Path: design/email/logo_alt
							ID:        "logo_alt",
							Label:     `Logo Image Alt`,
							Type:      element.TypeText,
							SortOrder: 20,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/email/logo_width
							ID:        "logo_width",
							Label:     `Logo Width`,
							Comment:   element.LongText(`Only necessary if image has been uploaded above. Enter number of pixels, without appending "px".`),
							Type:      element.TypeText,
							SortOrder: 30,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

						&element.Field{
							// Path: design/email/logo_height
							ID:        "logo_height",
							Label:     `Logo Height`,
							Comment:   element.LongText(`Only necessary if image has been uploaded above. Enter number of pixels, without appending "px".`),
							Type:      element.TypeText,
							SortOrder: 40,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
						},

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

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

		// 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: `{"email_folder":"email"}`,
						},
					),
				},

				&element.Group{
					ID: "emails",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/emails/forgot_email_template
							ID:      `forgot_email_template`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `system_emails_forgot_email_template`,
						},

						&element.Field{
							// Path: system/emails/forgot_email_identity
							ID:      `forgot_email_identity`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `general`,
						},
					),
				},

				&element.Group{
					ID: "smtp",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: system/smtp/disable
							ID:      `disable`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: false,
						},

						&element.Field{
							// Path: system/smtp/host
							ID:      `host`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `localhost`,
						},

						&element.Field{
							// Path: system/smtp/port
							ID:      `port`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: 25,
						},
					),
				},
			),
		},
		&element.Section{
			ID: "trans_email",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "ident_custom1",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: trans_email/ident_custom1/email
							ID:      `email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[email protected]`,
						},

						&element.Field{
							// Path: trans_email/ident_custom1/name
							ID:      `name`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Custom 1`,
						},
					),
				},

				&element.Group{
					ID: "ident_custom2",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: trans_email/ident_custom2/email
							ID:      `email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[email protected]`,
						},

						&element.Field{
							// Path: trans_email/ident_custom2/name
							ID:      `name`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Custom 2`,
						},
					),
				},

				&element.Group{
					ID: "ident_general",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: trans_email/ident_general/email
							ID:      `email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[email protected]`,
						},

						&element.Field{
							// Path: trans_email/ident_general/name
							ID:      `name`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Owner`,
						},
					),
				},

				&element.Group{
					ID: "ident_sales",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: trans_email/ident_sales/email
							ID:      `email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[email protected]`,
						},

						&element.Field{
							// Path: trans_email/ident_sales/name
							ID:      `name`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `Sales`,
						},
					),
				},

				&element.Group{
					ID: "ident_support",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: trans_email/ident_support/email
							ID:      `email`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `[email protected]`,
						},

						&element.Field{
							// Path: trans_email/ident_support/name
							ID:      `name`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `CustomerSupport`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#19
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)
}
示例#20
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)
}
示例#21
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)
}
示例#22
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)
}
示例#23
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)
}
示例#24
0
func init() {
	ConfigStructure = element.MustNewConfiguration(
		&element.Section{
			ID: "web",
			Groups: element.NewGroupSlice(
				&element.Group{
					ID: "default",
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: web/default/cms_home_page
							ID:        "cms_home_page",
							Label:     `CMS Home Page`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `home`,
							// SourceModel: Otnegam\Cms\Model\Config\Source\Page
						},

						&element.Field{
							// Path: web/default/cms_no_route
							ID:        "cms_no_route",
							Label:     `CMS No Route Page`,
							Type:      element.TypeSelect,
							SortOrder: 2,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `no-route`,
							// SourceModel: Otnegam\Cms\Model\Config\Source\Page
						},

						&element.Field{
							// Path: web/default/cms_no_cookies
							ID:        "cms_no_cookies",
							Label:     `CMS No Cookies Page`,
							Type:      element.TypeSelect,
							SortOrder: 3,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `enable-cookies`,
							// SourceModel: Otnegam\Cms\Model\Config\Source\Page
						},

						&element.Field{
							// Path: web/default/show_cms_breadcrumbs
							ID:        "show_cms_breadcrumbs",
							Label:     `Show Breadcrumbs for CMS Pages`,
							Type:      element.TypeSelect,
							SortOrder: 5,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   true,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},

				&element.Group{
					ID:        "browser_capabilities",
					Label:     `Browser Capabilities Detection`,
					SortOrder: 200,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: web/browser_capabilities/cookies
							ID:        "cookies",
							Label:     `Redirect to CMS-page if Cookies are Disabled`,
							Type:      element.TypeSelect,
							SortOrder: 100,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: web/browser_capabilities/javascript
							ID:        "javascript",
							Label:     `Show Notice if JavaScript is Disabled`,
							Type:      element.TypeSelect,
							SortOrder: 200,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},

						&element.Field{
							// Path: web/browser_capabilities/local_storage
							ID:        "local_storage",
							Label:     `Show Notice if Local Storage is Disabled`,
							Type:      element.TypeSelect,
							SortOrder: 300,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							// SourceModel: Otnegam\Config\Model\Config\Source\Yesno
						},
					),
				},
			),
		},
		&element.Section{
			ID:        "cms",
			Label:     `Content Management`,
			SortOrder: 1001,
			Scope:     scope.PermAll,
			Resource:  0, // Otnegam_Cms::config_cms
			Groups: element.NewGroupSlice(
				&element.Group{
					ID:        "wysiwyg",
					Label:     `WYSIWYG Options`,
					SortOrder: 100,
					Scope:     scope.PermAll,
					Fields: element.NewFieldSlice(
						&element.Field{
							// Path: cms/wysiwyg/enabled
							ID:        "enabled",
							Label:     `Enable WYSIWYG Editor`,
							Type:      element.TypeSelect,
							SortOrder: 1,
							Visible:   element.VisibleYes,
							Scope:     scope.PermAll,
							Default:   `enabled`,
							// SourceModel: Otnegam\Cms\Model\Config\Source\Wysiwyg\Enabled
						},
					),
				},
			),
		},

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

						&element.Field{
							// Path: web/default/no_route
							ID:      `no_route`,
							Type:    element.TypeHidden,
							Visible: element.VisibleNo,
							Default: `cms/noroute/index`,
						},
					),
				},
			),
		},
		&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: `{"wysiwyg_image_folder":"wysiwyg"}`,
						},
					),
				},
			),
		},
	)
	Backend = NewBackend(ConfigStructure)
}
示例#25
0
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)
}
示例#26
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)
}
示例#27
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)
}
示例#28
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)
}
示例#29
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)
}
示例#30
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)
}