]> git.imager.perl.org - bse.git/blame - site/docs/bse_import.pod
save the product tier on ordering
[bse.git] / site / docs / bse_import.pod
CommitLineData
df2663f0
TC
1=head1 NAME
2
3bse_import.pod - importing products into BSE
4
5=head1 DESCRIPTION
6
7=head1 CONFIGURATION
8
9Section C<< [import profile I<profilename>] >>.
10
11=over
12
13=item *
14
15map_I<fieldname> = input column number (starting from 1)
16
17=item *
18
19set_I<fieldname> = set the given field to a value
20
21=item *
22
23xform_I<fieldname> - code to proceess the column, with $_ set to
24value from map / set, $product set to a hash with the other values
25set. Result is the value in $_. Run after map_* and set_*.
26
27=item *
28
29file_path - path_sep (almost always ":") separated list of locations
30to search for image files
31
32=item *
33
3f58d535 34source - type of input format, default and currently C<XLS> or C<CSV>.
df2663f0
TC
35
36=item *
37
38target - type of output record, default Product, can currently be
3f58d535 39C<Article> or C<Product>.
df2663f0
TC
40
41=item *
42
43cat1, cat2, cat3 - catalog names
44
45=back
46
47=head2 XLS source
48
49Configuration:
50
51=over
52
53=item *
54
55sheet - sheet number to import from
56
57=item *
58
59skiprows - number of rows to skip (eg. header rows)
60
61=back
62
63=head2 Article imports
64
65=head3 Configuration
66
67=over
68
69=item *
70
71codes - use the "code_field" to identify the existing article.
72Default false.
73
74=item *
75
76code_field - the name of the input field to identify an existing
77article or title. Default "product_code" for products, "linkAlias"
78for articles.
79
80=item *
81
3f58d535
TC
82update_only - if true, records are only updated, the summary, body and
83description fields are no longer populated from title, title is no
84longer required to be mapped, and codes defaults to true. If
85C<code_field> isn't specified the first mapped field from C<id> or
86C<linkAlias> is selected (or C<product_code> for products)
87
88=item *
89
90ignore_missing - ignore missing image and article files. Default: 1.
df2663f0
TC
91
92=item *
93
94reset_images - reset images for an article being imported. Default: 0.
95
96=item *
97
3f58d535
TC
98reset_files - reset files for an article being imported. Default: 0.
99
100=item *
101
df2663f0
TC
102reset_steps - reset step parents for an article being imported. Default: 0.
103
104=back
105
106=head3 Special article field names
107
108=over
109
110=item *
111
112image1_file .. image10_file - name of an image file found in
113
114=item *
115
116imageI<N>_alt, imageI<N>_name, imageI<N>_url, imageI<N>_storage - set
117the appropriate fields for an image
118
119=item *
120
3f58d535
TC
121C<< file1_file >> .. C<< file10_file >> - name of an article file to
122attach to the article.
123
124=item *
125
126C<< file1I<N>_name >>, C<< file1I<N>_displayName >>, C<<
127file1I<N>_storage >>, C<< file1I<N>_description >>, C<<
128file1I<N>_forSale >>, C<< file1I<N>_download >>, C<<
129file1I<N>_requireUser >>, C<< file1I<N>_notes >>, C<<
130file1I<N>_hide_from_list >>, C<< file1I<N>_category >> - set other
131file fields.
132
133=item *
134
df2663f0
TC
135step1 .. step10 - step parent id or linkAlias
136
137=item *
138
139tags - / separated list of article tags
140
141=back
142
143=head2 Product imports
144
145=head3 Configuration
146
147All article config also applies here.
148
149=over
150
151=item *
152
153price_dollar - prices are in dollars (default: 0)
154
155=item *
156
157product_template - template name for products (default: system default)
158
159=item *
160
161catalog_template - template for catalogs (default: system default)
162
163=item *
164
165prodopt_value_sep - separator for product options (default: "!")
166
167=item *
168
169reset_prodopts - reset product options when updating a product (true)
170
171=back
172
173=head3 Special product field names
174
175A mapping for C<retailPrice> is B<required>.
176
177=over
178
179=item *
180
181tier_price_I<N> - price for tier id I<N>
182
183=item *
184
185prodopt1_name .. prodopt5_name - names of product options
186
187=item *
188
189prodopt1_values .. prodopt5_values - values for the product option
190(separated by ! by default, see prodopt_value_sep.
191
192=back
193
194=cut