accessories — access to product options attributes
Attribute | Pos. | Req. | Default | Description |
---|---|---|---|---|
code | row | key | Yes | |||
arg | Yes |
Comma-separated list of values to use in setting
attribute ,
type ,
column ,
table ,
name ,
outboard and
passed arguments.
|
||
column | col | field |
Value of attribute=
|
|||
attribute |
Value of name=
|
|||
outboard |
Value of code=
|
|||
table | db | base | database | ||||
passed |
If table= specified, then
[data ,
else [data products
|
|||
type |
select
|
|||
attribute |
Value of name=
|
|||
default | ||||
override | ||||
pre_filter | ||||
display_filter | ||||
item | ||||
item | ||||
prepend | ||||
append | ||||
delimiter | ||||
rows | ||||
cols | ||||
js_check | ||||
js | ||||
lookup_query | ||||
lookup_exclude | ||||
lookup_merge | ||||
lookup | ||||
label_joiner |
-
|
|||
sort |
-
|
|||
options |
-
|
|||
price_data | ||||
value | ||||
cgi_default | ||||
values_default | ||||
blank_default | ||||
price_data | ||||
class | ||||
extra |
Value of class=
|
|||
variant | ||||
check | ||||
interpolate | 0 | interpolate output? | ||
hide | 0 | Hide the tag return value? |
The [accessories]
tag is the "swiss army-knife" tool for choosing or
displaying Interchange's product options (also called
attributes, of which typical examples are size or color).
The default item options can be set via UseModifier
.
See the attribute glossary entry for a complete introduction to item options.
Interchange 5.9.0:
Source: code/SystemTag/accessories.coretag
Lines: 21
# Copyright 2002-2007 Interchange Development Group and others # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. See the LICENSE file for details. # # $Id: accessories.coretag,v 1.4 2007-03-30 23:40:49 pajamian Exp $ UserTag accessories Order code arg UserTag accessories addAttr UserTag accessories attrAlias db table UserTag accessories attrAlias base table UserTag accessories attrAlias database table UserTag accessories attrAlias col column UserTag accessories attrAlias row code UserTag accessories attrAlias field column UserTag accessories attrAlias key code UserTag accessories PosNumber 2 UserTag accessories Version $Revision: 1.4 $ UserTag accessories MapRoutine Vend::Interpolate::tag_accessories
Source: lib/Vend/Interpolate.pm
Lines: 1543
sub tag_accessories { my($code,$extra,$opt,$item) = @_; my $ishash; if(ref $item) { #::logDebug("tag_accessories: item is a hash"); $ishash = 1; } # Had extra if got here #::logDebug("tag_accessories: code=$code opt=" . uneval_it($opt) . " item=" \ . uneval_it($item) . " extra=$extra"); my($attribute, $type, $field, $db, $name, $outboard, $passed); $opt = {} if ! $opt; if($extra) { $extra =~ s/^\s+//; $extra =~ s/\s+$//; @{$opt}{qw/attribute type column table name outboard passed/} = split /\s*,\s*/, $extra; } ($attribute, $type, $field, $db, $name, $outboard, $passed) = @{$opt}{qw/attribute type column table name outboard passed/}; ## Code only passed when we are a product if($code) { GETACC: { my $col = $opt->{column} || $opt->{attribute}; my $key = $opt->{outboard} || $code; last GETACC if ! $col; if($opt->{table}) { $opt->{passed} ||= tag_data($opt->{table}, $col, $key); } else { $opt->{passed} ||= product_field($col, $key); } } return unless $opt->{passed} || $opt->{type}; $opt->{type} ||= 'select'; return unless $opt->{passed} or $opt->{type} =~ /^(text|password|hidden)/i; } return Vend::Form::display($opt, $item); }
Source: lib/Vend/Interpolate.pm
Lines: 1543
sub tag_accessories { my($code,$extra,$opt,$item) = @_; my $ishash; if(ref $item) { #::logDebug("tag_accessories: item is a hash"); $ishash = 1; } # Had extra if got here #::logDebug("tag_accessories: code=$code opt=" . uneval_it($opt) . " item=" \ . uneval_it($item) . " extra=$extra"); my($attribute, $type, $field, $db, $name, $outboard, $passed); $opt = {} if ! $opt; if($extra) { $extra =~ s/^\s+//; $extra =~ s/\s+$//; @{$opt}{qw/attribute type column table name outboard passed/} = split /\s*,\s*/, $extra; } ($attribute, $type, $field, $db, $name, $outboard, $passed) = @{$opt}{qw/attribute type column table name outboard passed/}; ## Code only passed when we are a product if($code) { GETACC: { my $col = $opt->{column} || $opt->{attribute}; my $key = $opt->{outboard} || $code; last GETACC if ! $col; if($opt->{table}) { $opt->{passed} ||= tag_data($opt->{table}, $col, $key); } else { $opt->{passed} ||= product_field($col, $key); } } return unless $opt->{passed} || $opt->{type}; $opt->{type} ||= 'select'; return unless $opt->{passed} or $opt->{type} =~ /^(text|password|hidden)/i; } return Vend::Form::display($opt, $item); }