<we:shopField>
Since version: 3.5.0.0 | Requires endtag: no | Required modules: shop
Description
With this we:tag free input fields can be generated for shop items or the shopping cart itself. Then the fields are saved either directly with the item in the shopping cart or in the shopping cart itself. Thereby it is possible to create variations of items or to provide the shopping cart with a survey. In the order view these fields are displayed in addition to the usual article entries. Free fields will be passed as a request parameter with a special name.
Attributes
name
Default value: - | since version: 3.5.0.0 | required: yes
Set this attribute to the name of the field to be saved with the article / shopping cart.
reference
Default value: - | since version: 3.5.0.0 | required: yes
Determine whether the free field is for an article or the shopping cart.
Allowed values:
- article
- cart
shopname
Default value: - | since version: 3.5.0.0 | required: yes
Set this attribute to the name of the shop the free field should be saved to.
type
Default value: - | since version: 3.5.0.0 | required: no
Set this attribute to the type of input field.
Allowed values:
- checkbox
- choice
- hidden
- print
- select
- textarea
- textinput
- radio
value
Default value: - | since version: 3.5.0.0 | required: no
Set a value for fields of the types checkbox, hidden, select, textarea, textinput, radio.
values
Default value: - | since version: 3.5.0.0 | required: no
Set this attribute to a comma sepearted list of values for the fields of the type choice and select.
checked
Default value: - | since version: 3.5.0.0 | required: no
Determine if a field of the type checkbox or radio should be checked by default.
Allowed values:
- true
- false
mode
Default value: - | since version: 3.5.0.0 | required: no
Set the behaviour of fields of the type choice. If mode=add, multiple values can be selected.
Allowed values:
- add
xml
Default value: - | since version: - | required: no
Setting this attribute to "true" generates code conforming to the XHTML standard. Leaving it unset or setting it to "false" generates HTML code.
Allowed values:
- true
- false
Syntax
<we:shopField name="attribute" reference="article|cart" shopname="attribute" [type="checkbox|choice|hidden|print|select|textarea|textinput|radio"] [value="attribute"] [values="attribute"] [checked="true|false"] [mode="add"] [xml="true|false"] />
Examples
Example1:type="select"
<we:shopField name="sort" shopname="demoshop" reference="article" values="s,m,l" type="select" />
Example2: type="checkbox"
<we:shopField name="check" reference="article" shopname="demoshop" type="checkbox" checked="true" />