/
catalog_before.cfg
275 lines (257 loc) · 10.5 KB
/
catalog_before.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
ParseVariables Yes
#ifdef @UI_BASE
Variable UI_BASE @@UI_BASE@@
#endif
#ifndef UI_BASE
Variable UI_BASE admin
#endif
#ifdef @UI
Variable UI_AFFILIATE_TABLE affiliate
Variable UI_ACCESS_TABLE access
Variable UI_BOTTOMIMG poweredby.gif
Variable UI_C_ALINK #FF0000
Variable UI_C_BG #FFFFFF
Variable UI_C_HEADERTXT #333333
Variable UI_C_INTBLOCK #CCCC99
Variable UI_C_INTBLOCKBAR #73f2d9
Variable UI_C_LINK #0000FF
Variable UI_C_TITLEBARBG #6699FF
Variable UI_C_TITLEBARCONT #000000
Variable UI_C_TITLEBARTXT #FFFFFF
Variable UI_C_TOPBLOCKBAR #336699
Variable UI_C_TXT #000000
Variable UI_C_MENUTEXT #000066
Variable UI_C_MENUBG #FFFFFF
Variable UI_C_MENUTITLE #000066
Variable UI_C_MENUBARBG #000066
Variable UI_C_MENUBARTXT #FFFFAA
Variable UI_C_VLINK #0000CC
Variable UI_C_CONTRAST #FF0000
Variable UI_HELP_BASE_URL http://localhost/ui/help
Variable UI_HELP_HEIGHT 480
Variable UI_HELP_WIDTH 650
Variable UI_LEFT_WIDTH 150
Variable UI_SHIPPED_STATUS shipped
Variable UI_MAIN_WIDTH 600
Variable UI_META_TABLE mv_metadata
Variable UI_PRODUCT_DIR products
Variable UI_PRODUCT_TABLE products
Variable UI_ITEM_DESCRIPTION description
Variable UI_PAGE_DIR pages
Variable UI_OVERALL_WIDTH 750
Variable UI_P_ALINK #EE0000
Variable UI_P_BG #FFFFFF
Variable UI_P_LINK #0000EE
Variable UI_P_VLINK #0000FF
Variable UI_RIGHT_WIDTH 450
Variable UI_SZ_LIST_CUSTOMER 50
Variable UI_SZ_LIST_ORDER 50
Variable UI_T_BG beige
Variable UI_T_PROPERTIES cellpadding=3 cellspacing=0 width=90% border=0
Variable UI_T_ROW_EVEN #EEEEEE
Variable UI_T_ROW_ODD #FFFFFF
Variable UI_SUBMENU_None <<EOV
code next_line indicator depends_on page form name
1 !nevairbe <font size="-1"><b>Welcome to Akopia Interchange</b></font>
EOV
Variable UI_SUBMENU_Merchandising <<EOV
code next_line indicator depends_on page form name
1 __UI_BASE__/merchandising Product Merchandising
2 __UI_BASE__/affiliates Affiliates
3 __UI_BASE__/build_related Generate "others who ..."
4 1 affiliates __UI_BASE__/flex_editor page_title=Create new affiliate&mv_data_table=[var UI_AFFILIATE_TABLE]&help_name=create.new.affiliate&item_id=new&ui_return_to=__UI_BASE__/affiliates&icon_name=admin/icon_people.gif Create new affiliate
EOV
Variable UI_SUBMENU_Reports <<EOV
code next_line indicator depends_on page form name
1 __UI_BASE__/orderstats Orders
2 __UI_BASE__/trafficstats Traffic
[if-mm super]3 __UI_BASE__/tablereport Custom
[/if-mm]
EOV
Variable UI_SUBMENU_Orders <<EOV
code next_line indicator depends_on page form name
1 !showarchive __UI_BASE__/order showpending=1 Pending Orders
2 showarchive __UI_BASE__/order showarchive=1 Archived Orders
3 __UI_BASE__/entry Enter Order
EOV
Variable UI_SUBMENU_Items <<EOV
code next_line indicator depends_on page form name
1 __UI_BASE__/item Item list
9 __UI_BASE__/item_edit item_id=new Create new item
2 item_id sku: [cgi item_id]
3 1 item_id __UI_BASE__/item_edit item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Edit
4 item_id __UI_BASE__/item_price item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Pricing
5 item_id __UI_BASE__/item_up item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Up-sell
6 item_id __UI_BASE__/item_cross item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Cross-sell
7 item_id __UI_BASE__/item_feature item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Promotion
8 item_id __UI_BASE__/item_inventory item_id=[cgi item_id]&ui_sequence_edit=[cgi ui_sequence_edit]&item_id_left=[cgi item_id_left] Inventory
EOV
Variable UI_SUBMENU_Content <<EOV
code next_line indicator depends_on page form name
1 __UI_BASE__/page Page Edit
2 __UI_BASE__/genupload File Transfer
EOV
Variable UI_SUBMENU_Design <<EOV
code next_line indicator depends_on page form name
1 __UI_BASE__/layout Site layout
2 __UI_BASE__/search_wizard Search Builder
3 __UI_BASE__/button_builder Button Builder
4 __UI_BASE__/regenerate Generate Static
5 __UI_BASE__/genupload File Transfer
6 __UI_BASE__/page Page Edit
EOV
Variable UI_SUBMENU_Customers <<EOV
code next_line indicator exclude_on depends_on page form name
1 showactive __UI_BASE__/customer showactive=1 Active Customers
2 showinactive __UI_BASE__/customer showinactive=1 Inactive Customers
3 __UI_BASE__/flex_editor page_title=Create new customer&mv_data_table=userdb&help_name=create.new.customer&item_id=new&ui_return_to=__UI_BASE__/customer Create new customer
4 1 deletecustomer customer __UI_BASE__/customer_ship customer=[cgi customer] Shipping
5 deletecustomer customer __UI_BASE__/customer_bill customer=[cgi customer] Billing
6 deletecustomer customer __UI_BASE__/customer_pref customer=[cgi customer] Preferences
7 deletecustomer customer __UI_BASE__/entry customer=[cgi customer] Enter Order
EOV
#Variable UI_SUBMENU_Admin <<EOV
#code next_line indicator depends_on page form name
#1 __UI_BASE__/tax ui_page_charges=1 Charges
#2 __UI_BASE__/preferences Preferences
#3 __UI_BASE__/flex_select mv_data_table=variable&page_title=Knar editor&ui_meta_specific=1&help_name=knar.main&ui_description_fields=code&ui_return_to=__UI_BASE__/preferences Knar
#4 __UI_BASE__/gentable ui_page_tables=1 Tables
#5 ui_changes_made __UI_BASE__/reconfig Apply Changes
#6 1 ui_page_tables __UI_BASE__/flex_select ui_page_tables=1&mv_data_table=[cgi mv_data_table] Edit
#7 ui_page_tables __UI_BASE__/import_table ui_page_tables=1&mv_data_table=[cgi mv_data_table] Import Data
#8 ui_page_tables __UI_BASE__/export_table ui_page_tables=1&mv_data_table=[cgi mv_data_table] Export Data
#9 ui_page_tables __UI_BASE__/spread ui_page_tables=1&mv_data_table=[cgi mv_data_table] Spreadsheet
#10 ui_page_tables __UI_BASE__/flex_editor ui_page_tables=1&mv_data_table=[cgi mv_data_table]&item_id=new New Entry
#11 ui_page_tables __UI_BASE__/gentable ui_page_tables=1& Re-select Table
#12 1 ui_page_charges __UI_BASE__/tax Tax
#13 ui_page_charges __UI_BASE__/ship ui_page_charges=1 Shipping
#14 ui_page_charges __UI_BASE__/payment ui_page_charges=1 Payment
#EOV
Variable UI_SUBMENU_Admin <<EOV
code next_line indicator exclude_on depends_on page form name
1 __UI_BASE__/genconfig Info
2 __UI_BASE__/tax Tax
3 __UI_BASE__/ship Shipping
4 __UI_BASE__/payment Payment
5 __UI_BASE__/access Access
6 __UI_BASE__/preferences Preferences
7 __UI_BASE__/flex_select mv_data_table=variable&page_title=Knar editor&ui_meta_specific=1&help_name=knar.main&ui_description_fields=code&ui_return_to=__UI_BASE__/preferences Variable Knar
8 __UI_BASE__/gentable Tables
9 __UI_BASE__/reconfig ui_changes_made Apply Changes
10 1 no_dbmenu mv_data_table __UI_BASE__/flex_select mv_data_table=[cgi mv_data_table] Edit
11 no_dbmenu mv_data_table __UI_BASE__/import_table mv_data_table=[cgi mv_data_table] Import Data
12 no_dbmenu mv_data_table __UI_BASE__/export_table mv_data_table=[cgi mv_data_table] Export Data
13 no_dbmenu mv_data_table __UI_BASE__/spread mv_data_table=[cgi mv_data_table] Spreadsheet
14 no_dbmenu mv_data_table __UI_BASE__/flex_editor mv_data_table=[cgi mv_data_table]&item_id=new New Entry
15 no_dbmenu mv_data_table __UI_BASE__/gentable Re-select Table
16 1 access_menu __UI_BASE__/access Users
17 access_menu __UI_BASE__/group Groups
EOV
#endif
ParseVariables No
Sub <<EOR
sub bar_link {
my $base = shift || 'cat';
my $extra;
$base =~ s/(\W.*)//s
and $extra = $1;
my $ref = shift;
my $code = $ref->[0];
my $record = tag_data($base, 'n/a', $code, { hash => 1 });
return $ref->[0] unless $record;
my $url;
my $anchor;
my $highlight;
my $first;
LINK: {
if($record->{link_type} eq 'external') {
$first = $record->{url};
$first =~ s/\s+$//;
$first =~ s/^\s+//;
$url = $first;
}
elsif ($record->{link_type} eq 'internal') {
my ($page, $form) = split /\s+/, $record->{url}, 2;
my $current = $Tag->var('MV_PAGE', 1);
$highlight = 1 if $page eq $current
or
$page eq $CGI->{ui_explode};
$url = $Tag->area( { href => $page, form => $form });
}
elsif ($record->{link_type} eq 'simple') {
my (@items) = split /\s*[\n,]\s*/, $record->{selector};
my @out;
my $fi = $record->{tab};
my $sp = $record->{page};
my %options = (
href => 'scan',
);
push @out, "fi=$fi" if $fi;
push @out, "sp=$sp" if $sp;
push @out, "st=db";
if(! @items) {
push @out, "ra=yes";
$options{arg} = join "\n", @out;
$url = $Tag->area(\%options);
last LINK;
}
push @out, "co=yes";
for(@items) {
my ($col, $string) = split /\s*=\s*/;
push @out, "sf=$col";
push @out, "se=$string";
}
push @out, qq{va=link_image=$record->{banner_image}};
push @out, qq{va=link_banner=$record->{banner_text}};
$options{arg} = join "\n", @out;
$url = $Tag->area(\%options);
}
elsif ($record->{link_type} eq 'complex') {
$record->{search} =~ s/[\r\n+]/\n/g;
$record->{search} .= qq{\nva=link_banner=$record->{banner_text}}
if $record->{banner_text};
$record->{search} .= qq{\nva=link_image=$record->{banner_image}}
if $record->{banner_image};
$url = $Tag->area('scan', $record->{search});
}
else {
$url = "";
}
}
ANCHOR: {
if($record->{display_type} eq 'url') {
$anchor = "";
}
elsif ($record->{display_type} eq 'name') {
$anchor = "$record->{name}";
}
elsif ($record->{display_type} eq 'icon') {
$anchor = qq{<img src="$record->{image}" alt="$record->{name}"};
$anchor .= " $record->{image_prop}"
if $record->{image_prop};
$anchor .= '>';
$anchor .= $record->{name};
}
elsif ($record->{display_type} eq 'image') {
$anchor = qq{<img src="$record->{image}" alt="$record->{name}"};
$anchor .= " $record->{image_prop}"
if $record->{image_prop};
$anchor .= '>';
}
else {
$anchor = "$record->{name}";
}
}
return $url if ! $anchor;
return $anchor if ! $url;
my $tmpl = $record->{link_template}
|| $extra
|| $Variable->{BAR_LINK_TEMPLATE}
|| q{<A HREF="$URL$" CLASS="barlink">$ANCHOR$</A>};
$record->{ANCHOR} = $anchor;
$record->{URL} = $url;
$tmpl =~ s!{HIGHLIGHT}(.*?){/HIGHLIGHT}! $highlight ? $1 : '' !gise;
$tmpl =~ s/\$(\w+)\$/$record->{$1}/g;
return $tmpl;
}
EOR