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