Documentation ¶
Overview ¶
Package custattr handles all customer and address related attributes. The name custattr has been chosen to be unique so that one can use goimports without conflicts.
Index ¶
- func AddressBackendRegion() *eav.AttributeBackend
- func AddressBackendStreet() *eav.AttributeBackend
- func AddressDataPostcode() *eav.AttributeData
- func AddressSourceCountry() *eav.AttributeSource
- func AddressSourceRegion() *eav.AttributeSource
- func CustomerBackendBilling() *todoABB
- func CustomerBackendDataBoolean() *eav.AttributeBackend
- func CustomerBackendPassword() *eav.AttributeBackend
- func CustomerBackendShipping() *eav.AttributeBackend
- func CustomerBackendStore() *eav.AttributeBackend
- func CustomerBackendWebsite() *eav.AttributeBackend
- func CustomerSourceGroup() todoASG
- func CustomerSourceStore() *eav.AttributeSource
- func CustomerSourceWebsite() *eav.AttributeSource
- func HandlerAddress(i int64) *custHandler
- func HandlerCustomer(i int64) *custHandler
- type AttributeSlice
- type Attributer
- type Customer
- type WSASlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressBackendRegion ¶
func AddressBackendRegion() *eav.AttributeBackend
AddressDataPostcode post code data model @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php
func AddressBackendStreet ¶
func AddressBackendStreet() *eav.AttributeBackend
AddressBackendStreet handles multiline street address @todo @see Mage_Customer_Model_Resource_Address_Attribute_Backend_Street
func AddressDataPostcode ¶
func AddressDataPostcode() *eav.AttributeData
AddressDataPostcode post code data model @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Data/Postcode.php
func AddressSourceCountry ¶
func AddressSourceCountry() *eav.AttributeSource
AddressSourceCountry retrieves slice of countries @todo @see magento2/site/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Country.php
func AddressSourceRegion ¶
func AddressSourceRegion() *eav.AttributeSource
AddressSourceRegion @see magento2/site/app/code/Magento/Customer/Model/Resource/Address/Attribute/Source/Region.php
func CustomerBackendBilling ¶
func CustomerBackendBilling() *todoABB
CustomerBackendBilling handles billing address @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Billing.php
func CustomerBackendDataBoolean ¶
func CustomerBackendDataBoolean() *eav.AttributeBackend
CustomerBackendDataBoolean converts 1 or 0 to bool @todo @see magento2/site/app/code/Magento/Customer/Model/Attribute/Backend/Data/Boolean.php
func CustomerBackendPassword ¶
func CustomerBackendPassword() *eav.AttributeBackend
CustomerBackendPassword handles customer passwords @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Password.php
func CustomerBackendShipping ¶
func CustomerBackendShipping() *eav.AttributeBackend
CustomerBackendShipping handles shipping address @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Shipping.php
func CustomerBackendStore ¶
func CustomerBackendStore() *eav.AttributeBackend
CustomerBackendStore handles store @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Store.php
func CustomerBackendWebsite ¶
func CustomerBackendWebsite() *eav.AttributeBackend
CustomerBackendWebsite handles website @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Backend/Website.php
func CustomerSourceGroup ¶
func CustomerSourceGroup() todoASG
CustomerSourceGroup customer group handling @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Group.php
func CustomerSourceStore ¶
func CustomerSourceStore() *eav.AttributeSource
CustomerSourceStore handle store source @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Store.php
func CustomerSourceWebsite ¶
func CustomerSourceWebsite() *eav.AttributeSource
CustomerSourceWebsite handle store source @todo @see magento2/site/app/code/Magento/Customer/Model/Customer/Attribute/Source/Website.php
func HandlerAddress ¶
func HandlerAddress(i int64) *custHandler
func HandlerCustomer ¶
func HandlerCustomer(i int64) *custHandler
Types ¶
type AttributeSlice ¶
type AttributeSlice []Attributer
AttributeSlice implements eav.AttributeSliceGetter @todo website must be present in the slice
func (AttributeSlice) ByCode ¶
func (s AttributeSlice) ByCode(g eav.AttributeGetter, code string) (interface{}, error)
ByCode returns an custattr.Attributer by code. Use type assertion.
func (AttributeSlice) ByID ¶
func (s AttributeSlice) ByID(g eav.AttributeGetter, id int64) (interface{}, error)
ByID returns an custattr.Attributer by int64 id. Use type assertion.
func (AttributeSlice) Index ¶
func (s AttributeSlice) Index(i eav.AttributeIndex) interface{}
Index returns the current cust.Attributer from index i. Use type assertion.
type Attributer ¶
type Attributer interface { eav.Attributer InputFilter() string Validate() bool // @todo convert php serialize string into a Go type and do only validation here IsSystem() bool SortOrder() int64 DataModel() eav.AttributeDataModeller IsVisible() bool MultilineCount() int64 }
Attributer defines the minimal requirements for a customer attribute. This interface consists of two more tables: customer_eav_attribute and customer_eav_attribute_website. Developers can also extend these tables to add more columns. These columns will be automatically transformed into functions. Scope columns are handled transparently in eav.GetAttributeSelectSql
type Customer ¶
Customer defines attribute properties for a customer and an address. You can use this struct to embed into your own struct for maybe overriding some method receivers.
func NewCustomer ¶
func (*Customer) DataModel ¶
func (a *Customer) DataModel() eav.AttributeDataModeller