Version Description
Download this release
Release Info
Developer | SkyVerge |
Plugin | Facebook for WooCommerce |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.5 to 2.1.0
- assets/css/admin/facebook-for-woocommerce-products-admin.css +29 -0
- assets/css/admin/products-categories.css +14 -0
- assets/js/admin/facebook-for-woocommerce-products-admin.js +279 -2
- assets/js/admin/facebook-for-woocommerce-products-admin.min.js +1 -1
- assets/js/admin/facebook-for-woocommerce-products-admin.min.old.js +2 -0
- assets/js/admin/facebook-for-woocommerce-products-admin.min.old.min.js +1 -0
- assets/js/admin/facebook-for-woocommerce-settings-sync.js +1 -1
- assets/js/admin/google-product-category-fields.js +342 -0
- assets/js/admin/google-product-category-fields.min.js +1 -0
- assets/js/admin/orders.js +541 -0
- assets/js/admin/orders.min.js +1 -0
- assets/js/admin/product-categories.js +40 -0
- assets/js/admin/product-categories.min.js +1 -0
- assets/js/admin/settings-commerce.js +48 -0
- assets/js/admin/settings-commerce.min.js +1 -0
- changelog.txt +7 -0
- class-wc-facebookcommerce.php +110 -8
- facebook-commerce.php +21 -15
- facebook-for-woocommerce.php +2 -2
- i18n/languages/facebook-for-woocommerce.pot +446 -88
- includes/AJAX.php +158 -0
- includes/API.php +270 -4
- includes/API/Catalog/Product_Group/Products/Read/Request.php +13 -0
- includes/API/Catalog/Product_Item/Find/Request.php +2 -2
- includes/API/Catalog/Request.php +13 -0
- includes/API/Catalog/Send_Item_Updates/Request.php +7 -3
- includes/API/Exceptions/Request_Limit_Reached.php +30 -0
- includes/API/Orders/Abstract_Request.php +35 -0
- includes/API/Orders/Acknowledge/Request.php +62 -0
- includes/API/Orders/Cancel/Request.php +66 -0
- includes/API/Orders/Fulfillment/Request.php +61 -0
- includes/API/Orders/Order.php +167 -0
- includes/API/Orders/Read/Request.php +79 -0
- includes/API/Orders/Read/Response.php +39 -0
- includes/API/Orders/Refund/Request.php +61 -0
- includes/API/Orders/Request.php +101 -0
- includes/API/Orders/Response.php +47 -0
- includes/API/Request.php +68 -0
- includes/API/Response.php +13 -0
- includes/API/Traits/Idempotent_Request.php +45 -0
- includes/API/Traits/Rate_Limited_API.php +15 -5
- includes/Admin.php +508 -313
- includes/Admin/Enhanced_Catalog_Attribute_Fields.php +236 -0
- includes/Admin/Google_Product_Category_Field.php +165 -0
- includes/Admin/Orders.php +637 -0
- includes/Admin/Product_Categories.php +468 -0
- includes/Admin/Products.php +278 -0
- includes/Admin/Settings.php +20 -15
- includes/Admin/Settings_Screens/Product_Sync.php +92 -1
- includes/Commerce.php +144 -0
- includes/Commerce/Orders.php +889 -0
- includes/Handlers/Connection.php +197 -7
- includes/Product_Categories.php +53 -0
- includes/Products.php +905 -36
- includes/Products/FBCategories.php +118 -0
- includes/Products/Sync.php +28 -0
- includes/Products/Sync/Background.php +13 -13
- includes/Products/fb_google_category_to_attribute_mapping.json +1 -0
assets/css/admin/facebook-for-woocommerce-products-admin.css
CHANGED
@@ -35,6 +35,35 @@
|
|
35 |
Â
clear: both;
|
36 |
Â
}
|
37 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
38 |
Â
.notice .button.js-wc-plugin-framework-notice-dismiss {
|
39 |
Â
margin-left: 10px;
|
40 |
Â
}
|
35 |
Â
clear: both;
|
36 |
Â
}
|
37 |
Â
|
38 |
+
#woocommerce-product-data .wc_facebook_commerce_enabled_field label,
|
39 |
+
#woocommerce-product-data .wc_facebook_commerce_fields label {
|
40 |
+
padding-right: 37px;
|
41 |
+
position: relative;
|
42 |
+
width: 113px;
|
43 |
+
}
|
44 |
+
#woocommerce-product-data .wc_facebook_commerce_enabled_field label .woocommerce-help-tip,
|
45 |
+
#woocommerce-product-data .wc_facebook_commerce_fields label .woocommerce-help-tip {
|
46 |
+
margin: 0;
|
47 |
+
position: absolute;
|
48 |
+
top: 4px;
|
49 |
+
right: 12px;
|
50 |
+
}
|
51 |
+
|
52 |
+
#woocommerce-product-data #wc-facebook-google-product-category-fields {
|
53 |
+
width: 50%;
|
54 |
+
}
|
55 |
+
|
56 |
+
#woocommerce-product-data .wc-facebook-google-product-category-field select {
|
57 |
+
float: none;
|
58 |
+
width: 100%;
|
59 |
+
max-width: none;
|
60 |
+
}
|
61 |
+
|
62 |
+
#woocommerce-product-data #wc-facebook-google-product-category-fields .select2-container {
|
63 |
+
float: none;
|
64 |
+
width: 100% !important;
|
65 |
+
}
|
66 |
+
|
67 |
Â
.notice .button.js-wc-plugin-framework-notice-dismiss {
|
68 |
Â
margin-left: 10px;
|
69 |
Â
}
|
assets/css/admin/products-categories.css
ADDED
@@ -0,0 +1,14 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
.term-wc_facebook_google_product_category_id-wrap #wc-facebook-google-product-category-fields {
|
2 |
+
width: 50%;
|
3 |
+
}
|
4 |
+
|
5 |
+
.term-wc_facebook_google_product_category_id-wrap .wc-facebook-google-product-category-field select {
|
6 |
+
float: none;
|
7 |
+
width: 100%;
|
8 |
+
max-width: none;
|
9 |
+
}
|
10 |
+
|
11 |
+
.term-wc_facebook_google_product_category_id-wrap #wc-facebook-google-product-category-fields .select2-container {
|
12 |
+
float: none;
|
13 |
+
width: 100% !important;
|
14 |
+
}
|
assets/js/admin/facebook-for-woocommerce-products-admin.js
CHANGED
@@ -124,10 +124,105 @@ jQuery( document ).ready( function( $ ) {
|
|
124 |
Â
}
|
125 |
Â
|
126 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
127 |
Â
/**
|
128 |
Â
* Determines whether the current product has synced variations.
|
129 |
Â
*
|
130 |
-
* @since 2.0
|
131 |
Â
*
|
132 |
Â
* @returns {boolean}
|
133 |
Â
*/
|
@@ -145,13 +240,154 @@ jQuery( document ).ready( function( $ ) {
|
|
145 |
Â
}
|
146 |
Â
|
147 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
// toggle Facebook settings fields for simple products
|
149 |
Â
const syncModeSelect = $( '#wc_facebook_sync_mode' );
|
150 |
Â
const facebookSettingsPanel = syncModeSelect.closest( '.woocommerce_options_panel' );
|
151 |
Â
|
152 |
Â
syncModeSelect.on( 'change', function() {
|
153 |
Â
|
154 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
155 |
Â
syncModeSelect.prop( 'original', $( this ).val() );
|
156 |
Â
|
157 |
Â
} ).trigger( 'change' );
|
@@ -160,9 +396,25 @@ jQuery( document ).ready( function( $ ) {
|
|
160 |
Â
toggleSyncAndShowOption( ! $( this ).prop( 'checked' ), syncModeSelect );
|
161 |
Â
} ).trigger( 'change' );
|
162 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
163 |
Â
// toggle Facebook settings fields for variations
|
164 |
Â
$( '.woocommerce_variations' ).on( 'change', '.js-variable-fb-sync-toggle', function() {
|
Â
|
|
165 |
Â
toggleFacebookSettings( $( this ).val() !== 'sync_disabled', $( this ).closest( '.wc-metabox-content' ) );
|
Â
|
|
Â
|
|
166 |
Â
$( this ).prop( 'original', $( this ).val() );
|
167 |
Â
} );
|
168 |
Â
|
@@ -177,6 +429,8 @@ jQuery( document ).ready( function( $ ) {
|
|
177 |
Â
const jsSyncModeToggle = $( this ).closest( '.wc-metabox-content' ).find( '.js-variable-fb-sync-toggle' );
|
178 |
Â
toggleSyncAndShowOption( ! $( this ).prop( 'checked' ), jsSyncModeToggle );
|
179 |
Â
} );
|
Â
|
|
Â
|
|
180 |
Â
} );
|
181 |
Â
|
182 |
Â
// show/hide Custom Image URL setting
|
@@ -198,11 +452,34 @@ jQuery( document ).ready( function( $ ) {
|
|
198 |
Â
$( '.variable_is_virtual:visible' ).trigger( 'change' );
|
199 |
Â
} );
|
200 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
201 |
Â
|
202 |
Â
let submitProductSave = false;
|
203 |
Â
|
204 |
Â
$( 'form#post input[type="submit"]' ).on( 'click', function( e ) {
|
205 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
206 |
Â
if ( ! submitProductSave ) {
|
207 |
Â
e.preventDefault();
|
208 |
Â
} else {
|
124 |
Â
}
|
125 |
Â
|
126 |
Â
|
127 |
+
/**
|
128 |
+
* Toggles (shows/hides) the visibility of Facebook Commerce setting fields.
|
129 |
+
*
|
130 |
+
* @since 2.1.0
|
131 |
+
*
|
132 |
+
* @param {boolean} enabled whether the settings fields should be enabled or not
|
133 |
+
* @param {jQuery} $container a common ancestor of all the elements that can be shown/hidden
|
134 |
+
*/
|
135 |
+
function toggleFacebookCommerceSettings( enabled, $container ) {
|
136 |
+
|
137 |
+
let $group = $container.find( '.wc-facebook-commerce-options-group' );
|
138 |
+
|
139 |
+
if ( enabled ) {
|
140 |
+
$group.show();
|
141 |
+
} else {
|
142 |
+
$group.hide();
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Disables and changes the checked status of the Sell on Instagram setting field.
|
149 |
+
*
|
150 |
+
* Additionally, shows/hides messages explaining that the product is not ready for Commerce.
|
151 |
+
*
|
152 |
+
* @since 2.1.0
|
153 |
+
*
|
154 |
+
* @param {boolean} enabled whether the setting field should be enabled or not
|
155 |
+
* @param {jQuery} $container a common ancestor of all the elements that need to modified
|
156 |
+
*/
|
157 |
+
function toggleFacebookSellOnInstagramSetting( enabled, $container ) {
|
158 |
+
|
159 |
+
let $field = $container.find( '#wc_facebook_commerce_enabled' );
|
160 |
+
let checked = $field.prop( 'original' );
|
161 |
+
|
162 |
+
$field.prop( 'checked', enabled ? checked : false ).prop( 'disabled', ! enabled );
|
163 |
+
|
164 |
+
// trigger change to hide fields based on the new state
|
165 |
+
$field.trigger( 'change' );
|
166 |
+
|
167 |
+
// restore previously stored value so that we can later restore the field to the status it had before we disabled it here
|
168 |
+
$field.prop( 'original', checked );
|
169 |
+
|
170 |
+
$container.find( '#product-not-ready-notice, #variable-product-not-ready-notice' ).hide();
|
171 |
+
|
172 |
+
if ( $( 'select#product-type' ).val().match( /variable/ ) && ! isSyncEnabledForVariableProduct() ) {
|
173 |
+
$container.find( '#variable-product-not-ready-notice' ).show();
|
174 |
+
} else if ( ! enabled ) {
|
175 |
+
$container.find( '#product-not-ready-notice' ).show();
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Determines whether product properties are configured using appropriate values for Commerce.
|
182 |
+
*
|
183 |
+
* @since 2.1.0
|
184 |
+
*
|
185 |
+
* @return {boolean}
|
186 |
+
*/
|
187 |
+
function isProductReadyForCommerce() {
|
188 |
+
|
189 |
+
if ( ! isSyncEnabledForProduct() ) {
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( ! isPriceDefinedForProduct() ) {
|
194 |
+
return false;
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! isStockManagementEnabledForProduct() ) {
|
198 |
+
return false;
|
199 |
+
}
|
200 |
+
|
201 |
+
return true;
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Determines whether the product or one of its variations has Facebook Sync enabled.
|
207 |
+
*
|
208 |
+
* @since 2.1.0
|
209 |
+
*
|
210 |
+
* @return {boolean}
|
211 |
+
*/
|
212 |
+
function isSyncEnabledForProduct() {
|
213 |
+
|
214 |
+
if ( $( 'select#product-type' ).val().match( /variable/ ) ) {
|
215 |
+
return isSyncEnabledForVariableProduct();
|
216 |
+
}
|
217 |
+
|
218 |
+
return isSyncEnabledForSimpleProduct();
|
219 |
+
}
|
220 |
+
|
221 |
+
|
222 |
Â
/**
|
223 |
Â
* Determines whether the current product has synced variations.
|
224 |
Â
*
|
225 |
+
* @since 2.1.0
|
226 |
Â
*
|
227 |
Â
* @returns {boolean}
|
228 |
Â
*/
|
240 |
Â
}
|
241 |
Â
|
242 |
Â
|
243 |
+
/**
|
244 |
+
* Determines whether the product has Facebook Sync enabled.
|
245 |
+
*
|
246 |
+
* @since 2.1.0
|
247 |
+
*
|
248 |
+
* @return {boolean}
|
249 |
+
*/
|
250 |
+
function isSyncEnabledForSimpleProduct() {
|
251 |
+
|
252 |
+
return $( '#wc_facebook_sync_mode' ).val() !== 'sync_disabled';
|
253 |
+
}
|
254 |
+
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Determines whether the product has a Regular Price or Facebook Price defined.
|
258 |
+
*
|
259 |
+
* @since 2.1.0
|
260 |
+
*
|
261 |
+
* @return {boolean}
|
262 |
+
*/
|
263 |
+
function isPriceDefinedForProduct() {
|
264 |
+
|
265 |
+
if ( $( 'select#product-type' ).val().match( /variable/ ) ) {
|
266 |
+
// TODO: determine whether variations enabled for sync have a Regular Price or Facebook Price defined {WV 2020-09-19}
|
267 |
+
return true;
|
268 |
+
}
|
269 |
+
|
270 |
+
return isPriceDefinedForSimpleProduct();
|
271 |
+
}
|
272 |
+
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Determines whether a simple product has a Regular Price or Facebook Price defined.
|
276 |
+
*
|
277 |
+
* @since 2.1.0
|
278 |
+
*
|
279 |
+
* @return {boolean}
|
280 |
+
*/
|
281 |
+
function isPriceDefinedForSimpleProduct() {
|
282 |
+
|
283 |
+
return $( '#_regular_price' ).val().length || $( '#fb_product_price' ).val().length;
|
284 |
+
}
|
285 |
+
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Determines whether the product has Manage Stock enabled and Stock quantity defined.
|
289 |
+
*
|
290 |
+
* @since 2.1.0
|
291 |
+
*
|
292 |
+
* @return {boolean}
|
293 |
+
*/
|
294 |
+
function isStockManagementEnabledForProduct() {
|
295 |
+
|
296 |
+
// TODO: determine whether variations enabled for sync have stock management enabled {WV 2020-09-19}
|
297 |
+
|
298 |
+
return isStockManagementEnabledForSimpleProduct();
|
299 |
+
}
|
300 |
+
|
301 |
+
|
302 |
+
/**
|
303 |
+
* Determines whether a simple product has Manage Stock enabled and Stock quantity defined.
|
304 |
+
*
|
305 |
+
* @since 2.1.0
|
306 |
+
*
|
307 |
+
* @return {boolean}
|
308 |
+
*/
|
309 |
+
function isStockManagementEnabledForSimpleProduct() {
|
310 |
+
|
311 |
+
return $( '#_manage_stock' ).prop( 'checked' ) && $( '#_stock' ).val().length;
|
312 |
+
}
|
313 |
+
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Determines whether we should ask the user to select a Google Product Category.
|
317 |
+
*
|
318 |
+
* @since 2.1.0
|
319 |
+
*
|
320 |
+
* @return {boolean}
|
321 |
+
*/
|
322 |
+
function shouldShowMissingGoogleProductCategoryAlert() {
|
323 |
+
|
324 |
+
if ( ! $( '#wc_facebook_commerce_enabled' ).prop( 'checked' ) ) {
|
325 |
+
return false;
|
326 |
+
}
|
327 |
+
|
328 |
+
if ( ! isProductReadyForCommerce() ) {
|
329 |
+
return false;
|
330 |
+
}
|
331 |
+
|
332 |
+
let selectedCategories = $( '.wc_facebook_commerce_fields .wc-facebook-google-product-category-select' ).map( ( i, element ) => {
|
333 |
+
return $( element ).val() ? $( element ).val() : null;
|
334 |
+
} );
|
335 |
+
|
336 |
+
return selectedCategories.length < 2;
|
337 |
+
}
|
338 |
+
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Shows an alert asking the user to select a Google product category and sub-category.
|
342 |
+
*
|
343 |
+
* @since 2.1.0
|
344 |
+
*
|
345 |
+
* @param {jQuery.Event} event a jQuery Event object for the submit event
|
346 |
+
* @returns {boolean}
|
347 |
+
*/
|
348 |
+
function showMissingGoogleProductCategoryAlert( event ) {
|
349 |
+
|
350 |
+
event.preventDefault();
|
351 |
+
|
352 |
+
alert( facebook_for_woocommerce_products_admin.i18n.missing_google_product_category_message );
|
353 |
+
|
354 |
+
return false;
|
355 |
+
}
|
356 |
+
|
357 |
+
|
358 |
+
// handle change events for the Sell on Instagram checkbox field
|
359 |
+
$( '#facebook_options #wc_facebook_commerce_enabled' ).on( 'change', function() {
|
360 |
+
|
361 |
+
let checked = $( this ).prop( 'checked' );
|
362 |
+
|
363 |
+
// toggle visibility of all commerce fields
|
364 |
+
if ( checked ) {
|
365 |
+
$( '.wc_facebook_commerce_fields' ).show();
|
366 |
+
} else {
|
367 |
+
$( '.wc_facebook_commerce_fields').hide();
|
368 |
+
}
|
369 |
+
|
370 |
+
// toggle visibility of attribute fields
|
371 |
+
if ( $( '.product_attributes' ).find( '.woocommerce_attribute' ).length ) {
|
372 |
+
$( '.show_if_has_attributes' ).show();
|
373 |
+
} else {
|
374 |
+
$( '.show_if_has_attributes' ).hide();
|
375 |
+
}
|
376 |
+
|
377 |
+
$( this ).prop( 'original', checked );
|
378 |
+
} ).trigger( 'change' );
|
379 |
+
|
380 |
Â
// toggle Facebook settings fields for simple products
|
381 |
Â
const syncModeSelect = $( '#wc_facebook_sync_mode' );
|
382 |
Â
const facebookSettingsPanel = syncModeSelect.closest( '.woocommerce_options_panel' );
|
383 |
Â
|
384 |
Â
syncModeSelect.on( 'change', function() {
|
385 |
Â
|
386 |
+
let syncEnabled = $( this ).val() !== 'sync_disabled';
|
387 |
+
|
388 |
+
toggleFacebookSettings( syncEnabled, facebookSettingsPanel );
|
389 |
+
toggleFacebookCommerceSettings( syncEnabled, facebookSettingsPanel );
|
390 |
+
|
391 |
Â
syncModeSelect.prop( 'original', $( this ).val() );
|
392 |
Â
|
393 |
Â
} ).trigger( 'change' );
|
396 |
Â
toggleSyncAndShowOption( ! $( this ).prop( 'checked' ), syncModeSelect );
|
397 |
Â
} ).trigger( 'change' );
|
398 |
Â
|
399 |
+
// check whether the product meets the requirements for Commerce
|
400 |
+
$( '#woocommerce-product-data' ).on(
|
401 |
+
'change',
|
402 |
+
'#_regular_price, #_manage_stock, #_stock, #wc_facebook_sync_mode, #fb_product_price',
|
403 |
+
function( event ) {
|
404 |
+
|
405 |
+
// allow validation handlers that run on change to run before we check any field values
|
406 |
+
setTimeout( function() {
|
407 |
+
toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), $( '#facebook_options' ) );
|
408 |
+
}, 1 );
|
409 |
+
}
|
410 |
+
);
|
411 |
+
|
412 |
Â
// toggle Facebook settings fields for variations
|
413 |
Â
$( '.woocommerce_variations' ).on( 'change', '.js-variable-fb-sync-toggle', function() {
|
414 |
+
|
415 |
Â
toggleFacebookSettings( $( this ).val() !== 'sync_disabled', $( this ).closest( '.wc-metabox-content' ) );
|
416 |
+
toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), $( '#facebook_options' ) );
|
417 |
+
|
418 |
Â
$( this ).prop( 'original', $( this ).val() );
|
419 |
Â
} );
|
420 |
Â
|
429 |
Â
const jsSyncModeToggle = $( this ).closest( '.wc-metabox-content' ).find( '.js-variable-fb-sync-toggle' );
|
430 |
Â
toggleSyncAndShowOption( ! $( this ).prop( 'checked' ), jsSyncModeToggle );
|
431 |
Â
} );
|
432 |
+
|
433 |
+
toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), $( '#facebook_options' ) );
|
434 |
Â
} );
|
435 |
Â
|
436 |
Â
// show/hide Custom Image URL setting
|
452 |
Â
$( '.variable_is_virtual:visible' ).trigger( 'change' );
|
453 |
Â
} );
|
454 |
Â
|
455 |
+
// open modal explaining sell on Instagram requirements
|
456 |
+
$( '#facebook_options' ).on( 'click', '#product-not-ready-notice-open-modal', function( event ) {
|
457 |
+
|
458 |
+
event.preventDefault();
|
459 |
+
|
460 |
+
// close existing modals
|
461 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
462 |
+
|
463 |
+
new $.WCBackboneModal.View( {
|
464 |
+
target: 'facebook-for-woocommerce-modal',
|
465 |
+
string: {
|
466 |
+
message: facebook_for_woocommerce_products_admin.product_not_ready_modal_message,
|
467 |
+
buttons: facebook_for_woocommerce_products_admin.product_not_ready_modal_buttons
|
468 |
+
}
|
469 |
+
} );
|
470 |
+
} );
|
471 |
+
|
472 |
+
// toggle Sell on Instagram checkbox on page load
|
473 |
+
toggleFacebookSellOnInstagramSetting( isProductReadyForCommerce(), facebookSettingsPanel );
|
474 |
Â
|
475 |
Â
let submitProductSave = false;
|
476 |
Â
|
477 |
Â
$( 'form#post input[type="submit"]' ).on( 'click', function( e ) {
|
478 |
Â
|
479 |
+
if ( shouldShowMissingGoogleProductCategoryAlert() ) {
|
480 |
+
return showMissingGoogleProductCategoryAlert( e );
|
481 |
+
}
|
482 |
+
|
483 |
Â
if ( ! submitProductSave ) {
|
484 |
Â
e.preventDefault();
|
485 |
Â
} else {
|
assets/js/admin/facebook-for-woocommerce-products-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";jQuery(document).ready(function(
|
1 |
+
"use strict";jQuery(document).ready(function(r){var t,e,c,n,i,o,s,a,_,d,l,u,p,f,m,g=window.pagenow.length?window.pagenow:"";window.typenow.length&&window.typenow;"edit-product"===g&&(t=!1,r("input#doaction, input#doaction2").on("click",function(o){if(t)return!0;o.preventDefault();var e,c=r(this),o=c.prev("select").val();"facebook_include"===o?(e=[],r.each(r('input[name="post[]"]:checked'),function(){e.push(parseInt(r(this).val(),10))}),r.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_bulk_action_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_bulk_action_prompt_nonce,toggle:o,products:e},function(o){o&&!o.success?(r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(t=!0,c.trigger("click"))})):(t=!0,c.trigger("click"))})),"product"===g&&(e=function(o,e){e.find(".enable-if-sync-enabled").prop("disabled",!o)},c=function(o,e){o?(e.find("option[value='sync_and_show']").show(),e.prop("original")&&e.val(e.prop("original"))):(e.find("option[value='sync_and_show']").hide(),"sync_and_show"===e.val()&&e.val("sync_and_hide"))},n=function(o,e){var c=e.find("#wc_facebook_commerce_enabled"),t=c.prop("original");c.prop("checked",!!o&&t).prop("disabled",!o),c.trigger("change"),c.prop("original",t),e.find("#product-not-ready-notice, #variable-product-not-ready-notice").hide(),r("select#product-type").val().match(/variable/)&&!s()?e.find("#variable-product-not-ready-notice").show():o||e.find("#product-not-ready-notice").show()},i=function(){return!!o()&&(!!_()&&!!l())},o=function(){return(r("select#product-type").val().match(/variable/)?s:a)()},s=function(){var o=r(".js-variable-fb-sync-toggle");return 0===o.length?!!facebook_for_woocommerce_products_admin.is_sync_enabled_for_product:!!o.map(function(o,e){return"sync_disabled"!==r(e).val()?e:null}).length},a=function(){return"sync_disabled"!==r("#wc_facebook_sync_mode").val()},_=function(){return!!r("select#product-type").val().match(/variable/)||d()},d=function(){return r("#_regular_price").val().length||r("#fb_product_price").val().length},l=function(){return u()},u=function(){return r("#_manage_stock").prop("checked")&&r("#_stock").val().length},r("#facebook_options #wc_facebook_commerce_enabled").on("change",function(){var o=r(this).prop("checked");o?r(".wc_facebook_commerce_fields").show():r(".wc_facebook_commerce_fields").hide(),r(".product_attributes").find(".woocommerce_attribute").length?r(".show_if_has_attributes").show():r(".show_if_has_attributes").hide(),r(this).prop("original",o)}).trigger("change"),p=r("#wc_facebook_sync_mode"),f=p.closest(".woocommerce_options_panel"),p.on("change",function(){var o="sync_disabled"!==r(this).val();e(o,f),function(o,e){e=e.find(".wc-facebook-commerce-options-group");o?e.show():e.hide()}(o,f),p.prop("original",r(this).val())}).trigger("change"),r("#_virtual").on("change",function(){c(!r(this).prop("checked"),p)}).trigger("change"),r("#woocommerce-product-data").on("change","#_regular_price, #_manage_stock, #_stock, #wc_facebook_sync_mode, #fb_product_price",function(o){setTimeout(function(){n(i(),r("#facebook_options"))},1)}),r(".woocommerce_variations").on("change",".js-variable-fb-sync-toggle",function(){e("sync_disabled"!==r(this).val(),r(this).closest(".wc-metabox-content")),n(i(),r("#facebook_options")),r(this).prop("original",r(this).val())}),r("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){r(".js-variable-fb-sync-toggle").each(function(){e("sync_disabled"!==r(this).val(),r(this).closest(".wc-metabox-content")),r(this).prop("original",r(this).val())}),r(".variable_is_virtual").on("change",function(){var o=r(this).closest(".wc-metabox-content").find(".js-variable-fb-sync-toggle");c(!r(this).prop("checked"),o)}),n(i(),r("#facebook_options"))}),r("#woocommerce-product-data").on("change",".js-fb-product-image-source",function(){var o=r(this).closest(".woocommerce_options_panel, .wc-metabox-content"),e=r(this).val();o.find(".product-image-source-field").closest(".form-field").hide(),o.find(".show-if-product-image-source-"+e).closest(".form-field").show()}),r(".js-fb-product-image-source:checked:visible").trigger("change"),r("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){r(".js-variable-fb-sync-toggle:visible").trigger("change"),r(".js-fb-product-image-source:checked:visible").trigger("change"),r(".variable_is_virtual:visible").trigger("change")}),r("#facebook_options").on("click","#product-not-ready-notice-open-modal",function(o){o.preventDefault(),r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:facebook_for_woocommerce_products_admin.product_not_ready_modal_message,buttons:facebook_for_woocommerce_products_admin.product_not_ready_modal_buttons}})}),n(i(),f),m=!1,r('form#post input[type="submit"]').on("click",function(o){if(!!r("#wc_facebook_commerce_enabled").prop("checked")&&(!!i()&&r(".wc_facebook_commerce_fields .wc-facebook-google-product-category-select").map(function(o,e){return r(e).val()?r(e).val():null}).length<2))return o.preventDefault(),alert(facebook_for_woocommerce_products_admin.i18n.missing_google_product_category_message),!1;if(m)return!0;o.preventDefault();var e=r(this),c=parseInt(r("input#post_ID").val(),10),t=[],n=r('textarea[name="tax_input[product_tag]"]').length?r('textarea[name="tax_input[product_tag]"]').val().split(","):[],a="sync_disabled"!==r("#wc_facebook_sync_mode").val(),o=s();r('#taxonomy-product_cat input[name="tax_input[product_cat][]"]:checked').each(function(){t.push(parseInt(r(this).val(),10))}),r('#taxonomy-product_tag input[name="tax_input[product_tag][]"]:checked').each(function(){n.push(parseInt(r(this).val(),10))}),0<c?r.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_prompt_nonce,sync_enabled:a?"enabled":"disabled",var_sync_enabled:o?"enabled":"disabled",product:c,categories:t,tags:n},function(o){o&&!o.success&&a?(r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(m=!0,e.trigger("click"))}):(m=!0,e.trigger("click"))}))});
|
assets/js/admin/facebook-for-woocommerce-products-admin.min.old.js
ADDED
@@ -0,0 +1,2 @@
|
|
Â
|
|
Â
|
1 |
+
"use strict";jQuery(document).ready(function(i){var o=window.pagenow.length?window.pagenow:"";window.typenow.length&&window.typenow;if("edit-product"===o){var a=!1;i("input#doaction, input#doaction2").on("click",function(o){if(a)return!0;o.preventDefault();var e=i(this),c=e.prev("select").val();if("facebook_include"===c){var t=[];i.each(i('input[name="post[]"]:checked'),function(){t.push(parseInt(i(this).val(),10))}),i.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_bulk_action_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_bulk_action_prompt_nonce,toggle:c,products:t},function(o){o&&!o.success?(i("#wc-backbone-modal-dialog .modal-close").trigger("click"),new i.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(a=!0,e.trigger("click"))})}else a=!0,e.trigger("click")})}if("product"===o){var t=function(o,e){e.find(".enable-if-sync-enabled").prop("disabled",!o)},e=function(o,e){o?(e.find("option[value='sync_and_show']").show(),e.prop("original")&&e.val(e.prop("original"))):(e.find("option[value='sync_and_show']").hide(),"sync_and_show"===e.val()&&e.val("sync_and_hide"))},c=function(o,e){var c=e.find("#wc_facebook_commerce_enabled"),t=c.prop("original");c.prop("checked",!!o&&t).prop("disabled",!o),c.trigger("change"),c.prop("original",t),e.find("#product-not-ready-notice, #variable-product-not-ready-notice").hide(),i("select#product-type").val().match(/variable/)&&!r()?e.find("#variable-product-not-ready-notice").show():o||e.find("#product-not-ready-notice").show()},s=function(){return!!n()&&(!!_()&&!!u())},n=function(){return(i("select#product-type").val().match(/variable/)?r:d)()},r=function(){var o=i(".js-variable-fb-sync-toggle");return 0===o.length?!!facebook_for_woocommerce_products_admin.is_sync_enabled_for_product:!!o.map(function(o,e){return"sync_disabled"!==i(e).val()?e:null}).length},d=function(){return"sync_disabled"!==i("#wc_facebook_sync_mode").val()},_=function(){return!!i("select#product-type").val().match(/variable/)||l()},l=function(){return i("#_regular_price").val().length||i("#fb_product_price").val().length},u=function(){return p()},p=function(){return i("#_manage_stock").prop("checked")&&i("#_stock").val().length};i("#facebook_options #wc_facebook_commerce_enabled").on("change",function(){var o=i(this).prop("checked");o?i(".wc_facebook_commerce_fields").show():i(".wc_facebook_commerce_fields").hide(),i(".product_attributes").find(".woocommerce_attribute").length?i(".show_if_has_attributes").show():i(".show_if_has_attributes").hide(),i(this).prop("original",o)}).trigger("change");var f=i("#wc_facebook_sync_mode"),m=f.closest(".woocommerce_options_panel");f.on("change",function(){var o,e,c="sync_disabled"!==i(this).val();t(c,m),o=c,e=m.find(".wc-facebook-commerce-options-group"),o?e.show():e.hide(),f.prop("original",i(this).val())}).trigger("change"),i("#_virtual").on("change",function(){e(!i(this).prop("checked"),f)}).trigger("change"),i("#woocommerce-product-data").on("change","#_regular_price, #_manage_stock, #_stock, #wc_facebook_sync_mode, #fb_product_price",function(o){setTimeout(function(){c(s(),i("#facebook_options"))},1)}),i(".woocommerce_variations").on("change",".js-variable-fb-sync-toggle",function(){t("sync_disabled"!==i(this).val(),i(this).closest(".wc-metabox-content")),c(s(),i("#facebook_options")),i(this).prop("original",i(this).val())}),i("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){i(".js-variable-fb-sync-toggle").each(function(){t("sync_disabled"!==i(this).val(),i(this).closest(".wc-metabox-content")),i(this).prop("original",i(this).val())}),i(".variable_is_virtual").on("change",function(){var o=i(this).closest(".wc-metabox-content").find(".js-variable-fb-sync-toggle");e(!i(this).prop("checked"),o)}),c(s(),i("#facebook_options"))}),i("#woocommerce-product-data").on("change",".js-fb-product-image-source",function(){var o=i(this).closest(".woocommerce_options_panel, .wc-metabox-content"),e=i(this).val();o.find(".product-image-source-field").closest(".form-field").hide(),o.find(".show-if-product-image-source-"+e).closest(".form-field").show()}),i(".js-fb-product-image-source:checked:visible").trigger("change"),i("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){i(".js-variable-fb-sync-toggle:visible").trigger("change"),i(".js-fb-product-image-source:checked:visible").trigger("change"),i(".variable_is_virtual:visible").trigger("change")}),i("#facebook_options").on("click","#product-not-ready-notice-open-modal",function(o){o.preventDefault(),i("#wc-backbone-modal-dialog .modal-close").trigger("click"),new i.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:facebook_for_woocommerce_products_admin.product_not_ready_modal_message,buttons:facebook_for_woocommerce_products_admin.product_not_ready_modal_buttons}})}),c(s(),m);var g=!1;i('form#post input[type="submit"]').on("click",function(o){if(!!i("#wc_facebook_commerce_enabled").prop("checked")&&!!s()&&i(".wc_facebook_commerce_fields .wc-facebook-google-product-category-select").map(function(o,e){return i(e).val()?i(e).val():null}).length<2)return o.preventDefault(),alert(facebook_for_woocommerce_products_admin.i18n.missing_google_product_category_message),!1;if(g)return!0;o.preventDefault();var e=i(this),c=parseInt(i("input#post_ID").val(),10),t=[],a=i('textarea[name="tax_input[product_tag]"]').length?i('textarea[name="tax_input[product_tag]"]').val().split(","):[],n="sync_disabled"!==i("#wc_facebook_sync_mode").val(),r="sync_disabled"!==i(".js-variable-fb-sync-toggle").val();i('#taxonomy-product_cat input[name="tax_input[product_cat][]"]:checked').each(function(){t.push(parseInt(i(this).val(),10))}),i('#taxonomy-product_tag input[name="tax_input[product_tag][]"]:checked').each(function(){a.push(parseInt(i(this).val(),10))}),0<c?i.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_prompt_nonce,sync_enabled:n?"enabled":"disabled",var_sync_enabled:r?"enabled":"disabled",product:c,categories:t,tags:a},function(o){o&&!o.success&&n?(i("#wc-backbone-modal-dialog .modal-close").trigger("click"),new i.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(g=!0,e.trigger("click"))}):(g=!0,e.trigger("click"))})}});
|
2 |
+
//# sourceMappingURL=facebook-for-woocommerce-products-admin.min.js.map
|
assets/js/admin/facebook-for-woocommerce-products-admin.min.old.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
"use strict";jQuery(document).ready(function(r){var t,c,e,a,i,o,n,s,d,_,l,u,p,f,m,g=window.pagenow.length?window.pagenow:"";window.typenow.length&&window.typenow,"edit-product"===g&&(t=!1,r("input#doaction, input#doaction2").on("click",function(o){if(t)return!0;o.preventDefault();var e,c=r(this),o=c.prev("select").val();"facebook_include"===o?(e=[],r.each(r('input[name="post[]"]:checked'),function(){e.push(parseInt(r(this).val(),10))}),r.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_bulk_action_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_bulk_action_prompt_nonce,toggle:o,products:e},function(o){o&&!o.success?(r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(t=!0,c.trigger("click"))})):(t=!0,c.trigger("click"))})),"product"===g&&(c=function(o,e){e.find(".enable-if-sync-enabled").prop("disabled",!o)},e=function(o,e){o?(e.find("option[value='sync_and_show']").show(),e.prop("original")&&e.val(e.prop("original"))):(e.find("option[value='sync_and_show']").hide(),"sync_and_show"===e.val()&&e.val("sync_and_hide"))},a=function(o,e){var c=e.find("#wc_facebook_commerce_enabled"),t=c.prop("original");c.prop("checked",!!o&&t).prop("disabled",!o),c.trigger("change"),c.prop("original",t),e.find("#product-not-ready-notice, #variable-product-not-ready-notice").hide(),r("select#product-type").val().match(/variable/)&&!n()?e.find("#variable-product-not-ready-notice").show():o||e.find("#product-not-ready-notice").show()},i=function(){return!!o()&&!!d()&&!!l()},o=function(){return(r("select#product-type").val().match(/variable/)?n:s)()},n=function(){var o=r(".js-variable-fb-sync-toggle");return 0===o.length?!!facebook_for_woocommerce_products_admin.is_sync_enabled_for_product:!!o.map(function(o,e){return"sync_disabled"!==r(e).val()?e:null}).length},s=function(){return"sync_disabled"!==r("#wc_facebook_sync_mode").val()},d=function(){return!!r("select#product-type").val().match(/variable/)||_()},_=function(){return r("#_regular_price").val().length||r("#fb_product_price").val().length},l=function(){return u()},u=function(){return r("#_manage_stock").prop("checked")&&r("#_stock").val().length},r("#facebook_options #wc_facebook_commerce_enabled").on("change",function(){var o=r(this).prop("checked");o?r(".wc_facebook_commerce_fields").show():r(".wc_facebook_commerce_fields").hide(),r(".product_attributes").find(".woocommerce_attribute").length?r(".show_if_has_attributes").show():r(".show_if_has_attributes").hide(),r(this).prop("original",o)}).trigger("change"),p=r("#wc_facebook_sync_mode"),f=p.closest(".woocommerce_options_panel"),p.on("change",function(){var o,e="sync_disabled"!==r(this).val();c(e,f),o=e,e=f.find(".wc-facebook-commerce-options-group"),o?e.show():e.hide(),p.prop("original",r(this).val())}).trigger("change"),r("#_virtual").on("change",function(){e(!r(this).prop("checked"),p)}).trigger("change"),r("#woocommerce-product-data").on("change","#_regular_price, #_manage_stock, #_stock, #wc_facebook_sync_mode, #fb_product_price",function(o){setTimeout(function(){a(i(),r("#facebook_options"))},1)}),r(".woocommerce_variations").on("change",".js-variable-fb-sync-toggle",function(){c("sync_disabled"!==r(this).val(),r(this).closest(".wc-metabox-content")),a(i(),r("#facebook_options")),r(this).prop("original",r(this).val())}),r("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){r(".js-variable-fb-sync-toggle").each(function(){c("sync_disabled"!==r(this).val(),r(this).closest(".wc-metabox-content")),r(this).prop("original",r(this).val())}),r(".variable_is_virtual").on("change",function(){var o=r(this).closest(".wc-metabox-content").find(".js-variable-fb-sync-toggle");e(!r(this).prop("checked"),o)}),a(i(),r("#facebook_options"))}),r("#woocommerce-product-data").on("change",".js-fb-product-image-source",function(){var o=r(this).closest(".woocommerce_options_panel, .wc-metabox-content"),e=r(this).val();o.find(".product-image-source-field").closest(".form-field").hide(),o.find(".show-if-product-image-source-"+e).closest(".form-field").show()}),r(".js-fb-product-image-source:checked:visible").trigger("change"),r("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){r(".js-variable-fb-sync-toggle:visible").trigger("change"),r(".js-fb-product-image-source:checked:visible").trigger("change"),r(".variable_is_virtual:visible").trigger("change")}),r("#facebook_options").on("click","#product-not-ready-notice-open-modal",function(o){o.preventDefault(),r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:facebook_for_woocommerce_products_admin.product_not_ready_modal_message,buttons:facebook_for_woocommerce_products_admin.product_not_ready_modal_buttons}})}),a(i(),f),m=!1,r('form#post input[type="submit"]').on("click",function(o){if(r("#wc_facebook_commerce_enabled").prop("checked")&&i()&&r(".wc_facebook_commerce_fields .wc-facebook-google-product-category-select").map(function(o,e){return r(e).val()?r(e).val():null}).length<2)return o.preventDefault(),alert(facebook_for_woocommerce_products_admin.i18n.missing_google_product_category_message),!1;if(m)return!0;o.preventDefault();var e=r(this),c=parseInt(r("input#post_ID").val(),10),t=[],a=r('textarea[name="tax_input[product_tag]"]').length?r('textarea[name="tax_input[product_tag]"]').val().split(","):[],n="sync_disabled"!==r("#wc_facebook_sync_mode").val(),o="sync_disabled"!==r(".js-variable-fb-sync-toggle").val();r('#taxonomy-product_cat input[name="tax_input[product_cat][]"]:checked').each(function(){t.push(parseInt(r(this).val(),10))}),r('#taxonomy-product_tag input[name="tax_input[product_tag][]"]:checked').each(function(){a.push(parseInt(r(this).val(),10))}),0<c?r.post(facebook_for_woocommerce_products_admin.ajax_url,{action:"facebook_for_woocommerce_set_product_sync_prompt",security:facebook_for_woocommerce_products_admin.set_product_sync_prompt_nonce,sync_enabled:n?"enabled":"disabled",var_sync_enabled:o?"enabled":"disabled",product:c,categories:t,tags:a},function(o){o&&!o.success&&n?(r("#wc-backbone-modal-dialog .modal-close").trigger("click"),new r.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:o.data})):(m=!0,e.trigger("click"))}):(m=!0,e.trigger("click"))}))});
|
assets/js/admin/facebook-for-woocommerce-settings-sync.js
CHANGED
@@ -81,7 +81,7 @@ jQuery( document ).ready( function( $ ) {
|
|
81 |
Â
toggleSettingOptions( false );
|
82 |
Â
}
|
83 |
Â
|
84 |
-
// toggle availability of options
|
85 |
Â
$( 'input#wc_facebook_enable_product_sync' ).on( 'change', function ( e ) {
|
86 |
Â
|
87 |
Â
if ( $( 'form.wc-facebook-settings' ).hasClass( 'disconnected' ) ) {
|
81 |
Â
toggleSettingOptions( false );
|
82 |
Â
}
|
83 |
Â
|
84 |
+
// toggle availability of options within field groups
|
85 |
Â
$( 'input#wc_facebook_enable_product_sync' ).on( 'change', function ( e ) {
|
86 |
Â
|
87 |
Â
if ( $( 'form.wc-facebook-settings' ).hasClass( 'disconnected' ) ) {
|
assets/js/admin/google-product-category-fields.js
ADDED
@@ -0,0 +1,342 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
3 |
+
*
|
4 |
+
* This source code is licensed under the license found in the
|
5 |
+
* LICENSE file in the root directory of this source tree.
|
6 |
+
*
|
7 |
+
* @package FacebookCommerce
|
8 |
+
*/
|
9 |
+
|
10 |
+
jQuery( document ).ready( ( $ ) => {
|
11 |
+
|
12 |
+
'use strict';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Google product category field handler.
|
16 |
+
*
|
17 |
+
* @since 2.1.0
|
18 |
+
*
|
19 |
+
* @type {WC_Facebook_Google_Product_Category_Fields} object
|
20 |
+
*/
|
21 |
+
window.WC_Facebook_Google_Product_Category_Fields = class WC_Facebook_Google_Product_Category_Fields {
|
22 |
+
/**
|
23 |
+
* Handler constructor.
|
24 |
+
*
|
25 |
+
* @since 2.1.0
|
26 |
+
*
|
27 |
+
* @param {Object[]} categories The full categories list, indexed by the category ID
|
28 |
+
* @param {string} categories[].label The category label
|
29 |
+
* @param {string[]} categories[].options The category's child categories' IDs
|
30 |
+
* @param {string} categories[].parent The category's parent category ID
|
31 |
+
* @param {string} input_id The element that should receive the latest concrete category ID
|
32 |
+
*/
|
33 |
+
constructor(categories, input_id) {
|
34 |
+
|
35 |
+
this.categories = categories;
|
36 |
+
|
37 |
+
this.input_id = input_id;
|
38 |
+
|
39 |
+
var $input = $( '#' + this.input_id );
|
40 |
+
|
41 |
+
$( '<div id="wc-facebook-google-product-category-fields"></div>' )
|
42 |
+
.insertBefore( $input )
|
43 |
+
.on( 'change', 'select.wc-facebook-google-product-category-select', ( event ) => {
|
44 |
+
this.onChange( $( event.target ) );
|
45 |
+
} );
|
46 |
+
|
47 |
+
this.addInitialSelects( $input.val() );
|
48 |
+
var optionalSelectorID = this.globalsHolder().enhanced_attribute_optional_selector;
|
49 |
+
|
50 |
+
if(typeof(optionalSelectorID) !== 'undefined') {
|
51 |
+
// Initial trigger for the optional attributes selector
|
52 |
+
$( '#' + optionalSelectorID ).on('change', function(){
|
53 |
+
$('.wc-facebook-enhanced-catalog-attribute-optional-row')
|
54 |
+
.toggleClass('hidden', !$(this).prop("checked"));
|
55 |
+
});
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
globalsHolder() {
|
60 |
+
if(typeof(facebook_for_woocommerce_product_categories) !== 'undefined'){
|
61 |
+
return facebook_for_woocommerce_product_categories;
|
62 |
+
} else if(typeof(facebook_for_woocommerce_settings_sync) !== 'undefined'){
|
63 |
+
return facebook_for_woocommerce_settings_sync;
|
64 |
+
} else {
|
65 |
+
return facebook_for_woocommerce_products_admin;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
getPageType(){
|
70 |
+
if(typeof(facebook_for_woocommerce_product_categories) !== 'undefined'){
|
71 |
+
if( $( 'input[name=tag_ID]' ).length === 0){
|
72 |
+
return this.globalsHolder().enhanced_attribute_page_type_add_category;
|
73 |
+
} else {
|
74 |
+
return this.globalsHolder().enhanced_attribute_page_type_edit_category;
|
75 |
+
}
|
76 |
+
} else {
|
77 |
+
return this.globalsHolder().enhanced_attribute_page_type_edit_product;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Adds the initial select fields for the previously selected values.
|
84 |
+
*
|
85 |
+
* If there is no previously selected value, it adds two selected fields with no selected option.
|
86 |
+
*
|
87 |
+
* @param {string} categoryId the selected google product category
|
88 |
+
*/
|
89 |
+
addInitialSelects( categoryId ) {
|
90 |
+
|
91 |
+
if ( categoryId ) {
|
92 |
+
|
93 |
+
this.getSelectedCategoryIds( categoryId ).forEach( ( pair ) => {
|
94 |
+
this.addSelect( this.getOptions( pair[1] ), pair[0] );
|
95 |
+
} );
|
96 |
+
|
97 |
+
var options = this.getOptions( categoryId );
|
98 |
+
|
99 |
+
if ( Object.keys( options ).length ) {
|
100 |
+
this.addSelect( options );
|
101 |
+
}
|
102 |
+
|
103 |
+
} else {
|
104 |
+
|
105 |
+
this.addSelect( this.getOptions() );
|
106 |
+
this.addSelect( {} );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Sets the enhanced attributes to show
|
112 |
+
*
|
113 |
+
*/
|
114 |
+
requestAttributesIfValid() {
|
115 |
+
// if an input with this id isn't available then we can't show
|
116 |
+
// enhanced attributes on this page, (for example it may be the
|
117 |
+
// product sync page)
|
118 |
+
var canShowEnhancedAttributesID = 'wc_facebook_can_show_enhanced_catalog_attributes_id';
|
119 |
+
if($( '#'+canShowEnhancedAttributesID ).val() !== 'true'){
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
|
123 |
+
$('.wc-facebook-enhanced-catalog-attribute-row').remove();
|
124 |
+
|
125 |
+
if(this.isValid()) {
|
126 |
+
var inputSelector = '#' + this.input_id;
|
127 |
+
var $inputParent = $( inputSelector ).parents('div.form-field');
|
128 |
+
var optionalSelectorID = this.globalsHolder().enhanced_attribute_optional_selector;
|
129 |
+
if( this.getPageType() === this.globalsHolder().enhanced_attribute_page_type_edit_category ){
|
130 |
+
$inputParent = $( inputSelector ).parents('tr.form-field');
|
131 |
+
} else if( this.getPageType() === this.globalsHolder().enhanced_attribute_page_type_edit_product ) {
|
132 |
+
$inputParent = $( inputSelector ).parents('p.form-field');
|
133 |
+
}
|
134 |
+
$.get( this.globalsHolder().ajax_url, {
|
135 |
+
action: 'wc_facebook_enhanced_catalog_attributes',
|
136 |
+
security: '',
|
137 |
+
selected_category: $( inputSelector ).val(),
|
138 |
+
tag_id: parseInt($( 'input[name=tag_ID]' ).val(), 10),
|
139 |
+
taxonomy: $( 'input[name=taxonomy]' ).val(),
|
140 |
+
item_id: parseInt( $( 'input[name=post_ID]' ).val(), 10 ),
|
141 |
+
page_type: this.getPageType(),
|
142 |
+
}, function( response ) {
|
143 |
+
var $response = $(response);
|
144 |
+
|
145 |
+
$( '#' + optionalSelectorID, $response ).on('change', function(){
|
146 |
+
$('.wc-facebook-enhanced-catalog-attribute-optional-row')
|
147 |
+
.toggleClass('hidden', !$(this).prop("checked"));
|
148 |
+
});
|
149 |
+
$response.insertAfter($inputParent);
|
150 |
+
// Ensure tooltips work:
|
151 |
+
$(document.body).trigger('init_tooltips');
|
152 |
+
});
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Updates the subsequent selects whenever one of the selects changes.
|
159 |
+
*
|
160 |
+
* @since 2.1.0
|
161 |
+
*/
|
162 |
+
onChange(element) {
|
163 |
+
|
164 |
+
// remove following select fields if their options depended on the value of the current select field
|
165 |
+
if ( element.hasClass( 'locked' ) ) {
|
166 |
+
element.closest( '.wc-facebook-google-product-category-field' ).nextAll().remove();
|
167 |
+
}
|
168 |
+
|
169 |
+
var categoryId = element.val();
|
170 |
+
|
171 |
+
if ( categoryId ) {
|
172 |
+
|
173 |
+
var options = this.getOptions( categoryId );
|
174 |
+
|
175 |
+
if ( Object.keys( options ).length ) {
|
176 |
+
this.addSelect( options );
|
177 |
+
}
|
178 |
+
|
179 |
+
} else {
|
180 |
+
|
181 |
+
// use category ID from the last select field that has a selected value
|
182 |
+
categoryId = element.closest( '#wc-facebook-google-product-category-fields' )
|
183 |
+
.find( '.wc-facebook-google-product-category-select' )
|
184 |
+
.not( element )
|
185 |
+
.last()
|
186 |
+
.val();
|
187 |
+
|
188 |
+
if ( ! categoryId ) {
|
189 |
+
this.addSelect( {} );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
$( '#' + this.input_id ).val( categoryId );
|
194 |
+
this.requestAttributesIfValid();
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Returns true if there have been at least two levels of category selected
|
199 |
+
*
|
200 |
+
* @return {boolean}
|
201 |
+
*/
|
202 |
+
isValid() {
|
203 |
+
var selectsWithValueCount = $('.wc-facebook-google-product-category-select')
|
204 |
+
.filter(function(_i, el) { return $(el).val() !== ""; })
|
205 |
+
.length;
|
206 |
+
return selectsWithValueCount >= 2;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Adds a new select with the given options.
|
211 |
+
*
|
212 |
+
* @since 2.1.0
|
213 |
+
*
|
214 |
+
* @param {Object.<string, string>} options an object with option IDs as keys and option labels as values
|
215 |
+
* @param {string} selected the selected option ID
|
216 |
+
*/
|
217 |
+
addSelect( options, selected ) {
|
218 |
+
|
219 |
+
var $container = $( '#wc-facebook-google-product-category-fields' );
|
220 |
+
var $otherSelects = $container.find( '.wc-facebook-google-product-category-select' );
|
221 |
+
var $select = $( '<select class="wc-enhanced-select wc-facebook-google-product-category-select"></select>' );
|
222 |
+
|
223 |
+
$otherSelects.addClass( 'locked' );
|
224 |
+
|
225 |
+
$container.append( $( '<div class="wc-facebook-google-product-category-field" style="margin-bottom: 16px">' ).append( $select ) );
|
226 |
+
|
227 |
+
$select.attr( 'data-placeholder', this.getSelectPlaceholder( $otherSelects, options ) ).append( $( '<option value=""></option>' ) );
|
228 |
+
|
229 |
+
Object.keys( options ).forEach( ( key ) => {
|
230 |
+
$select.append( $( '<option value="' + key + '">' + options[ key ] + '</option>' ) );
|
231 |
+
} );
|
232 |
+
|
233 |
+
$select.val( selected ).select2( { allowClear: true } );
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Gets the placeholder string for a select field based on the number of existing select fields.
|
239 |
+
*
|
240 |
+
* @since 2.1.0
|
241 |
+
*
|
242 |
+
* @param {jQuery} $otherSelects a jQuery object matching existing select fields
|
243 |
+
* @param {Object.<string, string>} options an object with option IDs as keys and option labels as values
|
244 |
+
* @return {string}
|
245 |
+
*/
|
246 |
+
getSelectPlaceholder( $otherSelects, options ) {
|
247 |
+
|
248 |
+
if ( 0 === $otherSelects.length ) {
|
249 |
+
return facebook_for_woocommerce_google_product_category.i18n.top_level_dropdown_placeholder;
|
250 |
+
}
|
251 |
+
|
252 |
+
if ( 1 === $otherSelects.length && 0 === Object.keys( options ).length ) {
|
253 |
+
return facebook_for_woocommerce_google_product_category.i18n.second_level_empty_dropdown_placeholder;
|
254 |
+
}
|
255 |
+
|
256 |
+
return facebook_for_woocommerce_google_product_category.i18n.general_dropdown_placeholder;
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Gets an array of options for the given category ID.
|
262 |
+
*
|
263 |
+
* @since 2.1.0
|
264 |
+
*
|
265 |
+
* @param {string} category_id The given category ID
|
266 |
+
* @return {Object.<string, string>} an object with option IDs as keys and option labels as values
|
267 |
+
*/
|
268 |
+
getOptions(category_id) {
|
269 |
+
|
270 |
+
if ( 'undefined' === typeof category_id || '' === category_id ) {
|
271 |
+
return this.getTopLevelOptions();
|
272 |
+
}
|
273 |
+
|
274 |
+
if ( 'undefined' === typeof this.categories[ category_id ] ) {
|
275 |
+
return [];
|
276 |
+
}
|
277 |
+
|
278 |
+
if ( 'undefined' === typeof this.categories[ category_id ]['options'] ) {
|
279 |
+
return [];
|
280 |
+
}
|
281 |
+
|
282 |
+
return this.categories[ category_id ]['options'];
|
283 |
+
}
|
284 |
+
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Gets an array of top level category options.
|
288 |
+
*
|
289 |
+
* @since 2.1.0
|
290 |
+
*
|
291 |
+
* @return {Object.<string, string>} an object with option IDs as keys and option labels as values
|
292 |
+
*/
|
293 |
+
getTopLevelOptions()Â {
|
294 |
+
|
295 |
+
let options = {};
|
296 |
+
|
297 |
+
Object.keys( this.categories ).forEach( ( key ) => {
|
298 |
+
|
299 |
+
if ( this.categories[ key ].parent ) {
|
300 |
+
return;
|
301 |
+
}
|
302 |
+
|
303 |
+
options[ key ] = this.categories[ key ].label;
|
304 |
+
} );
|
305 |
+
|
306 |
+
return options;
|
307 |
+
}
|
308 |
+
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Gets the ID of the selected category and all its ancestors.
|
312 |
+
*
|
313 |
+
* The method returns an array of arrays, where each entry is a pair of category IDs.
|
314 |
+
* The first entry in the pair is the category ID and the second entry is the ID of the corresponding parent category.
|
315 |
+
*
|
316 |
+
* We use an array of arrays to be able to present the select fields in the correct order.
|
317 |
+
* Object keys are automatically ordered causing options for categories with larger IDs to be displayed last.
|
318 |
+
*
|
319 |
+
* @param {string} categoryId
|
320 |
+
* @param {Array.<string[]>} categoryId
|
321 |
+
*/
|
322 |
+
getSelectedCategoryIds( categoryId ) {
|
323 |
+
|
324 |
+
var options = [];
|
325 |
+
|
326 |
+
do {
|
327 |
+
if ( 'undefined' !== typeof this.categories[ categoryId ] ) {
|
328 |
+
|
329 |
+
options.push( [ categoryId, this.categories[ categoryId ].parent ] );
|
330 |
+
|
331 |
+
categoryId = this.categories[ categoryId ].parent;
|
332 |
+
}
|
333 |
+
} while ( '' !== categoryId );
|
334 |
+
|
335 |
+
return options.reverse();
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
}
|
340 |
+
|
341 |
+
|
342 |
+
} );
|
assets/js/admin/google-product-category-fields.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
"use strict";var _createClass=function(){function a(e,t){for(var o=0;o<t.length;o++){var a=t[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,t,o){return t&&a(e.prototype,t),o&&a(e,o),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}jQuery(document).ready(function(n){function a(e,t){var o=this;_classCallCheck(this,a),this.categories=e,this.input_id=t;t=n("#"+this.input_id);n('<div id="wc-facebook-google-product-category-fields"></div>').insertBefore(t).on("change","select.wc-facebook-google-product-category-select",function(e){o.onChange(n(e.target))}),this.addInitialSelects(t.val());t=this.globalsHolder().enhanced_attribute_optional_selector;void 0!==t&&n("#"+t).on("change",function(){n(".wc-facebook-enhanced-catalog-attribute-optional-row").toggleClass("hidden",!n(this).prop("checked"))})}window.WC_Facebook_Google_Product_Category_Fields=(_createClass(a,[{key:"globalsHolder",value:function(){return"undefined"!=typeof facebook_for_woocommerce_product_categories?facebook_for_woocommerce_product_categories:"undefined"!=typeof facebook_for_woocommerce_settings_sync?facebook_for_woocommerce_settings_sync:facebook_for_woocommerce_products_admin}},{key:"getPageType",value:function(){return"undefined"!=typeof facebook_for_woocommerce_product_categories?0===n("input[name=tag_ID]").length?this.globalsHolder().enhanced_attribute_page_type_add_category:this.globalsHolder().enhanced_attribute_page_type_edit_category:this.globalsHolder().enhanced_attribute_page_type_edit_product}},{key:"addInitialSelects",value:function(e){var t=this;e?(this.getSelectedCategoryIds(e).forEach(function(e){t.addSelect(t.getOptions(e[1]),e[0])}),e=this.getOptions(e),Object.keys(e).length&&this.addSelect(e)):(this.addSelect(this.getOptions()),this.addSelect({}))}},{key:"requestAttributesIfValid",value:function(){var e,t,o;"true"===n("#wc_facebook_can_show_enhanced_catalog_attributes_id").val()&&(n(".wc-facebook-enhanced-catalog-attribute-row").remove(),this.isValid()&&(e="#"+this.input_id,t=n(e).parents("div.form-field"),o=this.globalsHolder().enhanced_attribute_optional_selector,this.getPageType()===this.globalsHolder().enhanced_attribute_page_type_edit_category?t=n(e).parents("tr.form-field"):this.getPageType()===this.globalsHolder().enhanced_attribute_page_type_edit_product&&(t=n(e).parents("p.form-field")),n.get(this.globalsHolder().ajax_url,{action:"wc_facebook_enhanced_catalog_attributes",security:"",selected_category:n(e).val(),tag_id:parseInt(n("input[name=tag_ID]").val(),10),taxonomy:n("input[name=taxonomy]").val(),item_id:parseInt(n("input[name=post_ID]").val(),10),page_type:this.getPageType()},function(e){e=n(e);n("#"+o,e).on("change",function(){n(".wc-facebook-enhanced-catalog-attribute-optional-row").toggleClass("hidden",!n(this).prop("checked"))}),e.insertAfter(t),n(document.body).trigger("init_tooltips")})))}},{key:"onChange",value:function(e){e.hasClass("locked")&&e.closest(".wc-facebook-google-product-category-field").nextAll().remove();var t,o=e.val();o?(t=this.getOptions(o),Object.keys(t).length&&this.addSelect(t)):(o=e.closest("#wc-facebook-google-product-category-fields").find(".wc-facebook-google-product-category-select").not(e).last().val())||this.addSelect({}),n("#"+this.input_id).val(o),this.requestAttributesIfValid()}},{key:"isValid",value:function(){return 2<=n(".wc-facebook-google-product-category-select").filter(function(e,t){return""!==n(t).val()}).length}},{key:"addSelect",value:function(t,e){var o=n("#wc-facebook-google-product-category-fields"),a=o.find(".wc-facebook-google-product-category-select"),c=n('<select class="wc-enhanced-select wc-facebook-google-product-category-select"></select>');a.addClass("locked"),o.append(n('<div class="wc-facebook-google-product-category-field" style="margin-bottom: 16px">').append(c)),c.attr("data-placeholder",this.getSelectPlaceholder(a,t)).append(n('<option value=""></option>')),Object.keys(t).forEach(function(e){c.append(n('<option value="'+e+'">'+t[e]+"</option>"))}),c.val(e).select2({allowClear:!0})}},{key:"getSelectPlaceholder",value:function(e,t){return 0===e.length?facebook_for_woocommerce_google_product_category.i18n.top_level_dropdown_placeholder:1===e.length&&0===Object.keys(t).length?facebook_for_woocommerce_google_product_category.i18n.second_level_empty_dropdown_placeholder:facebook_for_woocommerce_google_product_category.i18n.general_dropdown_placeholder}},{key:"getOptions",value:function(e){return void 0===e||""===e?this.getTopLevelOptions():void 0===this.categories[e]||void 0===this.categories[e].options?[]:this.categories[e].options}},{key:"getTopLevelOptions",value:function(){var t=this,o={};return Object.keys(this.categories).forEach(function(e){t.categories[e].parent||(o[e]=t.categories[e].label)}),o}},{key:"getSelectedCategoryIds",value:function(e){for(var t=[];void 0!==this.categories[e]&&(t.push([e,this.categories[e].parent]),e=this.categories[e].parent),""!==e;);return t.reverse()}}]),a)});
|
assets/js/admin/orders.js
ADDED
@@ -0,0 +1,541 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
3 |
+
*
|
4 |
+
* This source code is licensed under the license found in the
|
5 |
+
* LICENSE file in the root directory of this source tree.
|
6 |
+
*
|
7 |
+
* @package FacebookCommerce
|
8 |
+
*/
|
9 |
+
|
10 |
+
jQuery( document ).ready( ( $ ) => {
|
11 |
+
|
12 |
+
'use strict';
|
13 |
+
|
14 |
+
const isCommerceOrder = Boolean( wc_facebook_commerce_orders.is_commerce_order );
|
15 |
+
|
16 |
+
const commerceOrderOperations = {
|
17 |
+
/**
|
18 |
+
* Restrict order status options to only allowed options.
|
19 |
+
*
|
20 |
+
* @param {Object} $orderStatus Order select jQuery DOM object
|
21 |
+
*/
|
22 |
+
restrict_order_statuses: $orderStatus => {
|
23 |
+
|
24 |
+
$orderStatus.find( 'option' ).each( function ( index, option ) {
|
25 |
+
|
26 |
+
// check if option value in the allowed list or not
|
27 |
+
if ( wc_facebook_commerce_orders.allowed_commerce_statuses.indexOf( option.value ) === -1 ) {
|
28 |
+
// delete/remove option if not allowed
|
29 |
+
option.remove();
|
30 |
+
}
|
31 |
+
} );
|
32 |
+
},
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Enable or Disable order created fields.
|
37 |
+
*
|
38 |
+
* @param {Boolean} enable whether to enable date fields (true) or not (false)
|
39 |
+
*/
|
40 |
+
toggle_created_date_fields_status: enable => {
|
41 |
+
|
42 |
+
commerceOrderOperations.toggle_field( $( '#order_data' ).find( 'input[name*=order_date]' ), enable );
|
43 |
+
},
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Disable order status field
|
48 |
+
*
|
49 |
+
* @param {Object} $orderStatus Order select jQuery DOM object
|
50 |
+
*/
|
51 |
+
disable_order_status_field: ( $orderStatus ) => {
|
52 |
+
|
53 |
+
commerceOrderOperations.toggle_field( $orderStatus, false );
|
54 |
+
},
|
55 |
+
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Toggle customer field
|
59 |
+
*
|
60 |
+
* @param {Boolean} hide
|
61 |
+
*/
|
62 |
+
toggle_order_customer_field: ( hide ) => {
|
63 |
+
$( '#order_data' ).find( '.form-field.wc-customer-user' ).toggleClass( 'hidden', hide );
|
64 |
+
},
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Toggle customer field
|
69 |
+
*
|
70 |
+
* @param {Boolean} hide
|
71 |
+
*/
|
72 |
+
toggle_billing_and_shipping_fields: ( hide ) => {
|
73 |
+
$( '#order_data' ).find( 'a.edit_address' ).toggleClass( 'hidden', hide );
|
74 |
+
},
|
75 |
+
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Disable and hide related fields based on commerce order pending status
|
79 |
+
*
|
80 |
+
* @param {Object} $orderStatus Order select jQuery DOM object
|
81 |
+
*/
|
82 |
+
disable_pending_order_related_fields: ( $orderStatus ) => {
|
83 |
+
|
84 |
+
commerceOrderOperations.toggle_created_date_fields_status( false );
|
85 |
+
commerceOrderOperations.disable_order_status_field( $orderStatus );
|
86 |
+
commerceOrderOperations.toggle_order_customer_field( true );
|
87 |
+
commerceOrderOperations.toggle_billing_and_shipping_fields( true );
|
88 |
+
},
|
89 |
+
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Hide the refund UI when refunds can't be performed.
|
93 |
+
*/
|
94 |
+
maybe_disable_refunds: () => {
|
95 |
+
|
96 |
+
// only completed (fulfilled) orders can be refunded
|
97 |
+
if ( 'completed' !== wc_facebook_commerce_orders.order_status ) {
|
98 |
+
$( '.wc-order-bulk-actions .refund-items' ).hide();
|
99 |
+
}
|
100 |
+
},
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Uses CSS to enable/disable a form field.
|
105 |
+
*
|
106 |
+
* This function was copied from toggleSettingOptions() in facebook-for-woocommerce-settings-sync.js
|
107 |
+
*
|
108 |
+
* @since 2.1.0
|
109 |
+
*
|
110 |
+
* @param {jQuery} $element the form field
|
111 |
+
* @param {boolean} enable whether to enable or disable the field
|
112 |
+
*/
|
113 |
+
toggle_field: ( $element, enable ) => {
|
114 |
+
|
115 |
+
if ( $element.hasClass( 'wc-enhanced-select' ) ) {
|
116 |
+
$element = $element.next( 'span.select2-container' );
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( enable ) {
|
120 |
+
$element.css( 'pointer-events', 'all' ).css( 'opacity', '1.0' );
|
121 |
+
} else {
|
122 |
+
$element.css( 'pointer-events', 'none' ).css( 'opacity', '0.4' );
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
};
|
128 |
+
|
129 |
+
let $form = $( 'form[id="post"]' );
|
130 |
+
let $orderStatusField = $( '#order_status' );
|
131 |
+
let originalOrderStatus = $orderStatusField.val();
|
132 |
+
let shipmentTracking = wc_facebook_commerce_orders.shipment_tracking;
|
133 |
+
let existingTrackingNumber = '';
|
134 |
+
let existingCarrierCode = '';
|
135 |
+
let completeModalTrackingNumber = '';
|
136 |
+
let completeModalCarrierCode = '';
|
137 |
+
|
138 |
+
if ( Array.isArray( shipmentTracking ) && shipmentTracking[0] ) {
|
139 |
+
existingTrackingNumber = shipmentTracking[0].tracking_number;
|
140 |
+
existingCarrierCode = shipmentTracking[0].carrier_code;
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( isCommerceOrder ) {
|
144 |
+
|
145 |
+
commerceOrderOperations.restrict_order_statuses( $orderStatusField );
|
146 |
+
|
147 |
+
if ( 'pending' === wc_facebook_commerce_orders.order_status ) {
|
148 |
+
commerceOrderOperations.disable_pending_order_related_fields( $orderStatusField );
|
149 |
+
}
|
150 |
+
|
151 |
+
if ( 'cancelled' === wc_facebook_commerce_orders.order_status ) {
|
152 |
+
commerceOrderOperations.disable_order_status_field( $orderStatusField );
|
153 |
+
}
|
154 |
+
|
155 |
+
commerceOrderOperations.maybe_disable_refunds();
|
156 |
+
}
|
157 |
+
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Determines whether we need to show the Cancel Order modal.
|
161 |
+
*
|
162 |
+
* @since 2.0.1-dev.1
|
163 |
+
*
|
164 |
+
* @returns {boolean}
|
165 |
+
*/
|
166 |
+
function shouldShowCancelOrderModal() {
|
167 |
+
|
168 |
+
if ( $( '#post' ).data( 'skip-cancel-modal' ) ) {
|
169 |
+
return false;
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( 'wc-cancelled' === originalOrderStatus ) {
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( ! isCommerceOrder ) {
|
177 |
+
return false;
|
178 |
+
}
|
179 |
+
|
180 |
+
return 'wc-cancelled' === $orderStatusField.val();
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Shows and listens for events on the Cancel Order modal.
|
186 |
+
*
|
187 |
+
* @since 2.0.1-dev.1
|
188 |
+
*
|
189 |
+
* @param {jQuery.Event} event a submit event instance
|
190 |
+
*/
|
191 |
+
function showCancelOrderModal( event ) {
|
192 |
+
|
193 |
+
event.preventDefault();
|
194 |
+
|
195 |
+
// close existing modals
|
196 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
197 |
+
|
198 |
+
new $.WCBackboneModal.View( {
|
199 |
+
target: 'facebook-for-woocommerce-modal',
|
200 |
+
string: {
|
201 |
+
message: wc_facebook_commerce_orders.cancel_modal_message,
|
202 |
+
buttons: wc_facebook_commerce_orders.cancel_modal_buttons
|
203 |
+
}
|
204 |
+
} );
|
205 |
+
|
206 |
+
// handle confirm action
|
207 |
+
$( '.facebook-for-woocommerce-modal #btn-ok' )
|
208 |
+
.off( 'click.facebook_for_commerce' )
|
209 |
+
.on( 'click.facebook_for_commerce', ( event ) => {
|
210 |
+
|
211 |
+
event.preventDefault();
|
212 |
+
event.stopPropagation();
|
213 |
+
|
214 |
+
blockModal();
|
215 |
+
|
216 |
+
$.post( ajaxurl, {
|
217 |
+
action: wc_facebook_commerce_orders.cancel_order_action,
|
218 |
+
order_id: $( '#post_ID' ).val(),
|
219 |
+
reason_code: $( '.facebook-for-woocommerce-modal [name="wc_facebook_cancel_reason"]' ).val(),
|
220 |
+
security: wc_facebook_commerce_orders.cancel_order_nonce
|
221 |
+
}, ( response ) => {
|
222 |
+
|
223 |
+
if ( ! response || ! response.success ) {
|
224 |
+
showErrorInModal( response && response.data ? response.data : wc_facebook_commerce_orders.i18n.unknown_error );
|
225 |
+
return;
|
226 |
+
}
|
227 |
+
|
228 |
+
$( '#post' ).data( 'skip-cancel-modal', true ).trigger( 'submit' );
|
229 |
+
} ).fail( () => {
|
230 |
+
|
231 |
+
showErrorInModal( wc_facebook_commerce_orders.i18n.unknown_error );
|
232 |
+
} );
|
233 |
+
} );
|
234 |
+
|
235 |
+
return false;
|
236 |
+
}
|
237 |
+
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Replaces the content of the active Facebook for WooCommerce modal to show the given error.
|
241 |
+
*
|
242 |
+
* @since 2.0.1-dev.1
|
243 |
+
*
|
244 |
+
* @param {string} error
|
245 |
+
*/
|
246 |
+
function showErrorInModal( error ) {
|
247 |
+
|
248 |
+
unBlockModal();
|
249 |
+
|
250 |
+
$( '.facebook-for-woocommerce-modal .wc-backbone-modal-content article' ).html( '<p>' + error + '</p>' );
|
251 |
+
$( '.facebook-for-woocommerce-modal .wc-backbone-modal-content footer' ).remove();
|
252 |
+
}
|
253 |
+
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Displays the refund modal on form submit.
|
257 |
+
*
|
258 |
+
* @since 2.0.1-dev.1
|
259 |
+
*
|
260 |
+
* @param {Event} event
|
261 |
+
*/
|
262 |
+
function displayRefundModal( event ) {
|
263 |
+
|
264 |
+
event.preventDefault();
|
265 |
+
|
266 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
267 |
+
|
268 |
+
|
269 |
+
new $.WCBackboneModal.View( {
|
270 |
+
target: 'facebook-for-woocommerce-modal',
|
271 |
+
string: {
|
272 |
+
message: wc_facebook_commerce_orders.refund_modal_message,
|
273 |
+
buttons: wc_facebook_commerce_orders.refund_modal_buttons
|
274 |
+
}
|
275 |
+
} );
|
276 |
+
|
277 |
+
$( document.body )
|
278 |
+
.off( 'wc_backbone_modal_response.facebook_for_commerce' )
|
279 |
+
.on( 'wc_backbone_modal_response.facebook_for_commerce', function() {
|
280 |
+
// copy the value of the modal select to the WC field
|
281 |
+
$( '#refund_reason' ).val( $( '#wc_facebook_refund_reason_modal' ).val() );
|
282 |
+
// submit the form
|
283 |
+
$form.data( 'allow-submit', true ).submit();
|
284 |
+
} );
|
285 |
+
}
|
286 |
+
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Displays the order complete modal on order form submit
|
290 |
+
*/
|
291 |
+
function displayCompleteModal() {
|
292 |
+
|
293 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
294 |
+
|
295 |
+
if ( completeModalCarrierCode || completeModalTrackingNumber ) {
|
296 |
+
$( document.body )
|
297 |
+
.off( 'wc_backbone_modal_loaded' )
|
298 |
+
.on( 'wc_backbone_modal_loaded', function() {
|
299 |
+
|
300 |
+
if ( completeModalCarrierCode ) {
|
301 |
+
$( '#wc_facebook_carrier' ).val( completeModalCarrierCode );
|
302 |
+
}
|
303 |
+
|
304 |
+
if ( completeModalTrackingNumber ) {
|
305 |
+
$( '#wc_facebook_tracking_number' ).val( completeModalTrackingNumber );
|
306 |
+
}
|
307 |
+
} );
|
308 |
+
}
|
309 |
+
|
310 |
+
new $.WCBackboneModal.View( {
|
311 |
+
target: 'facebook-for-woocommerce-modal',
|
312 |
+
string: {
|
313 |
+
message: wc_facebook_commerce_orders.complete_modal_message,
|
314 |
+
buttons: wc_facebook_commerce_orders.complete_modal_buttons
|
315 |
+
}
|
316 |
+
} );
|
317 |
+
|
318 |
+
// handle confirm action
|
319 |
+
$( '.facebook-for-woocommerce-modal #btn-ok' )
|
320 |
+
.off( 'click.facebook_for_commerce' )
|
321 |
+
.on( 'click.facebook_for_commerce', ( event ) => {
|
322 |
+
|
323 |
+
event.preventDefault();
|
324 |
+
event.stopPropagation();
|
325 |
+
|
326 |
+
completeModalCarrierCode = $( '#wc_facebook_carrier' ).val();
|
327 |
+
completeModalTrackingNumber = $( '#wc_facebook_tracking_number' ).val();
|
328 |
+
|
329 |
+
makeCompleteAjaxRequest( true, completeModalTrackingNumber, completeModalCarrierCode );
|
330 |
+
} );
|
331 |
+
}
|
332 |
+
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Make complete order AJAX Request
|
336 |
+
*
|
337 |
+
* @param {Boolean} withModal
|
338 |
+
* @param {String} trackingNumber
|
339 |
+
* @param {String} carrierCode
|
340 |
+
*/
|
341 |
+
function makeCompleteAjaxRequest( withModal = false, trackingNumber = null, carrierCode = null ) {
|
342 |
+
|
343 |
+
if ( ! trackingNumber.length ) {
|
344 |
+
|
345 |
+
alert( wc_facebook_commerce_orders.i18n.missing_tracking_number_error );
|
346 |
+
|
347 |
+
return false;
|
348 |
+
}
|
349 |
+
|
350 |
+
if ( withModal ) {
|
351 |
+
blockModal();
|
352 |
+
}
|
353 |
+
|
354 |
+
$form.find( 'button[type=submit].save_order' ).prop( 'disabled', true ).append( '<span class="spinner is-active"></span>' );
|
355 |
+
|
356 |
+
$.post( ajaxurl, {
|
357 |
+
action : wc_facebook_commerce_orders.complete_order_action,
|
358 |
+
order_id : $( '#post_ID' ).val(),
|
359 |
+
tracking_number: trackingNumber,
|
360 |
+
carrier_code : carrierCode,
|
361 |
+
nonce : wc_facebook_commerce_orders.complete_order_nonce
|
362 |
+
}, ( response ) => {
|
363 |
+
|
364 |
+
if ( withModal ) {
|
365 |
+
unBlockModal();
|
366 |
+
}
|
367 |
+
|
368 |
+
if ( ! response || ! response.success ) {
|
369 |
+
|
370 |
+
let error_message = response && response.data ? response.data : wc_facebook_commerce_orders.i18n.unknown_error;
|
371 |
+
|
372 |
+
alert( error_message );
|
373 |
+
|
374 |
+
return;
|
375 |
+
}
|
376 |
+
|
377 |
+
$form.data( 'allow-submit', true ).trigger( 'submit' );
|
378 |
+
|
379 |
+
} ).fail( () => {
|
380 |
+
|
381 |
+
showErrorInModal( wc_facebook_commerce_orders.i18n.unknown_error );
|
382 |
+
|
383 |
+
} ).always( () => {
|
384 |
+
|
385 |
+
$form.find( 'button[type=submit].save_order' ).prop( 'disabled', false ).find( 'span.spinner' ).remove();
|
386 |
+
|
387 |
+
} );
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
/**
|
392 |
+
*
|
393 |
+
* Move the Facebook refund reason field if this is a Commerce order.
|
394 |
+
*
|
395 |
+
* @since 2.1.0
|
396 |
+
*/
|
397 |
+
function maybeMoveRefundReasonField() {
|
398 |
+
|
399 |
+
if ( isCommerceOrder ) {
|
400 |
+
moveRefundReasonField();
|
401 |
+
setupRefunReasonMutationObserver();
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
|
406 |
+
/**
|
407 |
+
* Moves the Facebook refund reason field above WooCommerce's refund reason field.
|
408 |
+
*
|
409 |
+
* It also updates the labels and tooltips.
|
410 |
+
*
|
411 |
+
* @since 2.0.1-dev.1
|
412 |
+
*/
|
413 |
+
function moveRefundReasonField() {
|
414 |
+
|
415 |
+
let $oldRefundReasonField = $( '#refund_reason' );
|
416 |
+
let $newRefundReasonField = $( '#wc_facebook_refund_reason' ).clone().css( 'width', $oldRefundReasonField.css( 'width' ) );
|
417 |
+
let $refundReasonRow = $oldRefundReasonField.closest( 'tr' );
|
418 |
+
let $refundDescriptionRow = $refundReasonRow.clone();
|
419 |
+
|
420 |
+
$refundReasonRow
|
421 |
+
.find( 'td.total' ).css( 'width', '16em' ).end()
|
422 |
+
.find( '#refund_reason' ).replaceWith( $newRefundReasonField.show() ).end()
|
423 |
+
.find( 'label[for="refund_reason"]' ).attr( 'for', 'wc_facebook_refund_reason' );
|
424 |
+
|
425 |
+
$refundReasonRow.after( $refundDescriptionRow );
|
426 |
+
|
427 |
+
updateOrderTotalFieldLabel(
|
428 |
+
$refundReasonRow,
|
429 |
+
'wc_facebook_refund_reason',
|
430 |
+
wc_facebook_commerce_orders.i18n.refund_reason_label,
|
431 |
+
wc_facebook_commerce_orders.i18n.refund_reason_tooltip
|
432 |
+
);
|
433 |
+
|
434 |
+
updateOrderTotalFieldLabel(
|
435 |
+
$refundDescriptionRow,
|
436 |
+
'refund_reason',
|
437 |
+
wc_facebook_commerce_orders.i18n.refund_description_label,
|
438 |
+
wc_facebook_commerce_orders.i18n.refund_description_tooltip
|
439 |
+
);
|
440 |
+
}
|
441 |
+
|
442 |
+
|
443 |
+
/**
|
444 |
+
* Setups a MutationObserver to detect when the order refund items elements are replaced.
|
445 |
+
*
|
446 |
+
* WooCommerce (meta-boxes-orders.js) does not currently trigger an event when the order items are loaded.
|
447 |
+
* We use the MutationObserver to move the Facebook refund reason field every time the order refund items are refreshed.
|
448 |
+
*
|
449 |
+
* @since 2.1.0
|
450 |
+
*/
|
451 |
+
function setupRefunReasonMutationObserver() {
|
452 |
+
|
453 |
+
if ( 'undefined' === typeof window.MutationObserver ) {
|
454 |
+
return;
|
455 |
+
}
|
456 |
+
|
457 |
+
let node = document.querySelector( '#woocommerce-order-items .inside' );
|
458 |
+
|
459 |
+
if ( ! node ) {
|
460 |
+
return;
|
461 |
+
}
|
462 |
+
|
463 |
+
let observer = new MutationObserver( ( records ) => {
|
464 |
+
|
465 |
+
records.forEach( ( record ) => {
|
466 |
+
|
467 |
+
Array.prototype.forEach.call( record.addedNodes, ( child ) => {
|
468 |
+
|
469 |
+
if ( $( child ).is( '.wc-order-refund-items' ) ) {
|
470 |
+
moveRefundReasonField();
|
471 |
+
}
|
472 |
+
} );
|
473 |
+
} );
|
474 |
+
} );
|
475 |
+
|
476 |
+
observer.observe( node, { childList: true } );
|
477 |
+
}
|
478 |
+
|
479 |
+
|
480 |
+
/**
|
481 |
+
* Changes the label and tooltip of the specified order total field.
|
482 |
+
*
|
483 |
+
* @since 2.0.1-dev.1
|
484 |
+
*
|
485 |
+
* @param {jQuery} $container an element that contains the label of the field
|
486 |
+
* @param {string} fieldId the id of the field
|
487 |
+
* @param {string} label the new label for the field
|
488 |
+
* @param {string} tooltip the new tooltip for the field
|
489 |
+
*/
|
490 |
+
function updateOrderTotalFieldLabel( $container, fieldId, label, tooltip ) {
|
491 |
+
|
492 |
+
let $label = $container.find( 'label[for="' + fieldId + '"]' );
|
493 |
+
let $tooltip = $label.find( '.woocommerce-help-tip' ).clone();
|
494 |
+
|
495 |
+
$label.text( label );
|
496 |
+
|
497 |
+
if ( tooltip && $tooltip.length ) {
|
498 |
+
|
499 |
+
$label.prepend( $tooltip );
|
500 |
+
|
501 |
+
$tooltip.attr( 'data-tip', tooltip ).tipTip( {
|
502 |
+
'attribute': 'data-tip',
|
503 |
+
'fadeIn': 50,
|
504 |
+
'fadeOut': 50,
|
505 |
+
'delay': 200
|
506 |
+
} );
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
|
511 |
+
maybeMoveRefundReasonField();
|
512 |
+
|
513 |
+
$form.on( 'submit', function( event ) {
|
514 |
+
|
515 |
+
if ( shouldShowCancelOrderModal() ) {
|
516 |
+
return showCancelOrderModal( event );
|
517 |
+
}
|
518 |
+
|
519 |
+
if ( ! isCommerceOrder || $form.data( 'allow-submit' ) ) {
|
520 |
+
return;
|
521 |
+
}
|
522 |
+
|
523 |
+
let newOrderStatusField = $orderStatusField.val();
|
524 |
+
|
525 |
+
if ( 'wc-refunded' === newOrderStatusField && originalOrderStatus !== newOrderStatusField ) {
|
526 |
+
displayRefundModal( event );
|
527 |
+
}
|
528 |
+
|
529 |
+
if ( 'wc-completed' === newOrderStatusField ) {
|
530 |
+
|
531 |
+
event.preventDefault();
|
532 |
+
|
533 |
+
if ( existingTrackingNumber || existingCarrierCode ) {
|
534 |
+
makeCompleteAjaxRequest( false, existingTrackingNumber, existingCarrierCode );
|
535 |
+
} else {
|
536 |
+
displayCompleteModal();
|
537 |
+
}
|
538 |
+
}
|
539 |
+
} );
|
540 |
+
|
541 |
+
} );
|
assets/js/admin/orders.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
"use strict";jQuery(document).ready(function(a){var c=Boolean(wc_facebook_commerce_orders.is_commerce_order),o={restrict_order_statuses:function(e){e.find("option").each(function(e,o){-1===wc_facebook_commerce_orders.allowed_commerce_statuses.indexOf(o.value)&&o.remove()})},toggle_created_date_fields_status:function(e){o.toggle_field(a("#order_data").find("input[name*=order_date]"),e)},disable_order_status_field:function(e){o.toggle_field(e,!1)},toggle_order_customer_field:function(e){a("#order_data").find(".form-field.wc-customer-user").toggleClass("hidden",e)},toggle_billing_and_shipping_fields:function(e){a("#order_data").find("a.edit_address").toggleClass("hidden",e)},disable_pending_order_related_fields:function(e){o.toggle_created_date_fields_status(!1),o.disable_order_status_field(e),o.toggle_order_customer_field(!0),o.toggle_billing_and_shipping_fields(!0)},maybe_disable_refunds:function(){"completed"!==wc_facebook_commerce_orders.order_status&&a(".wc-order-bulk-actions .refund-items").hide()},toggle_field:function(e,o){e.hasClass("wc-enhanced-select")&&(e=e.next("span.select2-container")),o?e.css("pointer-events","all").css("opacity","1.0"):e.css("pointer-events","none").css("opacity","0.4")}},n=a('form[id="post"]'),r=a("#order_status"),t=r.val(),e=wc_facebook_commerce_orders.shipment_tracking,_="",d="",s="",i="";function l(e){unBlockModal(),a(".facebook-for-woocommerce-modal .wc-backbone-modal-content article").html("<p>"+e+"</p>"),a(".facebook-for-woocommerce-modal .wc-backbone-modal-content footer").remove()}function f(e,o,c){var r=0<arguments.length&&void 0!==e&&e,o=1<arguments.length&&void 0!==o?o:null,c=2<arguments.length&&void 0!==c?c:null;o.length?(r&&blockModal(),n.find("button[type=submit].save_order").prop("disabled",!0).append('<span class="spinner is-active"></span>'),a.post(ajaxurl,{action:wc_facebook_commerce_orders.complete_order_action,order_id:a("#post_ID").val(),tracking_number:o,carrier_code:c,nonce:wc_facebook_commerce_orders.complete_order_nonce},function(e){r&&unBlockModal(),e&&e.success?n.data("allow-submit",!0).trigger("submit"):(e=e&&e.data?e.data:wc_facebook_commerce_orders.i18n.unknown_error,alert(e))}).fail(function(){l(wc_facebook_commerce_orders.i18n.unknown_error)}).always(function(){n.find("button[type=submit].save_order").prop("disabled",!1).find("span.spinner").remove()})):alert(wc_facebook_commerce_orders.i18n.missing_tracking_number_error)}function m(){var e=a("#refund_reason"),o=a("#wc_facebook_refund_reason").clone().css("width",e.css("width")),c=e.closest("tr"),e=c.clone();c.find("td.total").css("width","16em").end().find("#refund_reason").replaceWith(o.show()).end().find('label[for="refund_reason"]').attr("for","wc_facebook_refund_reason"),c.after(e),u(c,"wc_facebook_refund_reason",wc_facebook_commerce_orders.i18n.refund_reason_label,wc_facebook_commerce_orders.i18n.refund_reason_tooltip),u(e,"refund_reason",wc_facebook_commerce_orders.i18n.refund_description_label,wc_facebook_commerce_orders.i18n.refund_description_tooltip)}function u(e,o,c,r){e=e.find('label[for="'+o+'"]'),o=e.find(".woocommerce-help-tip").clone();e.text(c),r&&o.length&&(e.prepend(o),o.attr("data-tip",r).tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200}))}Array.isArray(e)&&e[0]&&(_=e[0].tracking_number,d=e[0].carrier_code),c&&(o.restrict_order_statuses(r),"pending"===wc_facebook_commerce_orders.order_status&&o.disable_pending_order_related_fields(r),"cancelled"===wc_facebook_commerce_orders.order_status&&o.disable_order_status_field(r),o.maybe_disable_refunds()),c&&(m(),function(){if(void 0===window.MutationObserver)return;var e=document.querySelector("#woocommerce-order-items .inside");if(!e)return;new MutationObserver(function(e){e.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(e){a(e).is(".wc-order-refund-items")&&m()})})}).observe(e,{childList:!0})}()),n.on("submit",function(e){return!a("#post").data("skip-cancel-modal")&&"wc-cancelled"!==t&&(c&&"wc-cancelled"===r.val())?(e.preventDefault(),a("#wc-backbone-modal-dialog .modal-close").trigger("click"),new a.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:wc_facebook_commerce_orders.cancel_modal_message,buttons:wc_facebook_commerce_orders.cancel_modal_buttons}}),a(".facebook-for-woocommerce-modal #btn-ok").off("click.facebook_for_commerce").on("click.facebook_for_commerce",function(e){e.preventDefault(),e.stopPropagation(),blockModal(),a.post(ajaxurl,{action:wc_facebook_commerce_orders.cancel_order_action,order_id:a("#post_ID").val(),reason_code:a('.facebook-for-woocommerce-modal [name="wc_facebook_cancel_reason"]').val(),security:wc_facebook_commerce_orders.cancel_order_nonce},function(e){e&&e.success?a("#post").data("skip-cancel-modal",!0).trigger("submit"):l(e&&e.data?e.data:wc_facebook_commerce_orders.i18n.unknown_error)}).fail(function(){l(wc_facebook_commerce_orders.i18n.unknown_error)})}),!1):void(c&&!n.data("allow-submit")&&("wc-refunded"===(o=r.val())&&t!==o&&(e.preventDefault(),a("#wc-backbone-modal-dialog .modal-close").trigger("click"),new a.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:wc_facebook_commerce_orders.refund_modal_message,buttons:wc_facebook_commerce_orders.refund_modal_buttons}}),a(document.body).off("wc_backbone_modal_response.facebook_for_commerce").on("wc_backbone_modal_response.facebook_for_commerce",function(){a("#refund_reason").val(a("#wc_facebook_refund_reason_modal").val()),n.data("allow-submit",!0).submit()})),"wc-completed"===o&&(e.preventDefault(),_||d?f(!1,_,d):(a("#wc-backbone-modal-dialog .modal-close").trigger("click"),(i||s)&&a(document.body).off("wc_backbone_modal_loaded").on("wc_backbone_modal_loaded",function(){i&&a("#wc_facebook_carrier").val(i),s&&a("#wc_facebook_tracking_number").val(s)}),new a.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:wc_facebook_commerce_orders.complete_modal_message,buttons:wc_facebook_commerce_orders.complete_modal_buttons}}),a(".facebook-for-woocommerce-modal #btn-ok").off("click.facebook_for_commerce").on("click.facebook_for_commerce",function(e){e.preventDefault(),e.stopPropagation(),i=a("#wc_facebook_carrier").val(),f(!0,s=a("#wc_facebook_tracking_number").val(),i)})))));var o})});
|
assets/js/admin/product-categories.js
ADDED
@@ -0,0 +1,40 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
3 |
+
*
|
4 |
+
* This source code is licensed under the license found in the
|
5 |
+
* LICENSE file in the root directory of this source tree.
|
6 |
+
*
|
7 |
+
* @package FacebookCommerce
|
8 |
+
*/
|
9 |
+
|
10 |
+
jQuery( document ).ready( ( $ ) => {
|
11 |
+
|
12 |
+
let $form = $( 'form[id="edittag"]' );
|
13 |
+
let $defaultCategoryField = $( '#wc_facebook_google_product_category_id' );
|
14 |
+
let originalDefaultCategoryId = $defaultCategoryField.val();
|
15 |
+
|
16 |
+
$form.on( 'submit', function( event ) {
|
17 |
+
|
18 |
+
if ( $form.data( 'allow-submit' ) || $defaultCategoryField.val() === originalDefaultCategoryId ) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
event.preventDefault();
|
23 |
+
|
24 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
25 |
+
|
26 |
+
new $.WCBackboneModal.View( {
|
27 |
+
target: 'facebook-for-woocommerce-modal',
|
28 |
+
string: {
|
29 |
+
message: facebook_for_woocommerce_product_categories.default_google_product_category_modal_message,
|
30 |
+
buttons: facebook_for_woocommerce_product_categories.default_google_product_category_modal_buttons
|
31 |
+
}
|
32 |
+
} );
|
33 |
+
|
34 |
+
$( document.body )
|
35 |
+
.off( 'wc_backbone_modal_response.facebook_for_commerce' )
|
36 |
+
.on( 'wc_backbone_modal_response.facebook_for_commerce', function() {
|
37 |
+
$form.data( 'allow-submit', true ).find( ':submit' ).trigger( 'click' );
|
38 |
+
} );
|
39 |
+
} );
|
40 |
+
} );
|
assets/js/admin/product-categories.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
"use strict";jQuery(document).ready(function(e){var c=e('form[id="edittag"]'),a=e("#wc_facebook_google_product_category_id"),t=a.val();c.on("submit",function(o){c.data("allow-submit")||a.val()===t||(o.preventDefault(),e("#wc-backbone-modal-dialog .modal-close").trigger("click"),new e.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:facebook_for_woocommerce_product_categories.default_google_product_category_modal_message,buttons:facebook_for_woocommerce_product_categories.default_google_product_category_modal_buttons}}),e(document.body).off("wc_backbone_modal_response.facebook_for_commerce").on("wc_backbone_modal_response.facebook_for_commerce",function(){c.data("allow-submit",!0).find(":submit").trigger("click")}))})});
|
assets/js/admin/settings-commerce.js
ADDED
@@ -0,0 +1,48 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
/**
|
2 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
3 |
+
*
|
4 |
+
* This source code is licensed under the license found in the
|
5 |
+
* LICENSE file in the root directory of this source tree.
|
6 |
+
*
|
7 |
+
* @package FacebookCommerce
|
8 |
+
*/
|
9 |
+
|
10 |
+
jQuery( document ).ready( function( $ ) {
|
11 |
+
|
12 |
+
let $form = $( 'form.wc-facebook-settings' );
|
13 |
+
let $defaultCategoryField = $( '#wc_facebook_google_product_category_id' );
|
14 |
+
let defaultCategoryId = $defaultCategoryField.val();
|
15 |
+
|
16 |
+
$form.on( 'submit', function( event ) {
|
17 |
+
|
18 |
+
if ( $form.data( 'allow-submit' ) || $defaultCategoryField.val() === defaultCategoryId ) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
event.preventDefault();
|
23 |
+
|
24 |
+
$( '#wc-backbone-modal-dialog .modal-close' ).trigger( 'click' );
|
25 |
+
|
26 |
+
new $.WCBackboneModal.View( {
|
27 |
+
target: 'facebook-for-woocommerce-modal',
|
28 |
+
string: {
|
29 |
+
message: $defaultCategoryField.val() ? facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_message : facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_message_empty,
|
30 |
+
buttons: facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_buttons
|
31 |
+
}
|
32 |
+
} );
|
33 |
+
|
34 |
+
$( document.body )
|
35 |
+
.off( 'wc_backbone_modal_response.facebook_for_commerce' )
|
36 |
+
.on( 'wc_backbone_modal_response.facebook_for_commerce', function() {
|
37 |
+
$form.data( 'allow-submit', true ).find( ':submit' ).trigger( 'click' );
|
38 |
+
} );
|
39 |
+
} );
|
40 |
+
|
41 |
+
$( '.woocommerce-help-tip' ).tipTip( {
|
42 |
+
'attribute': 'data-tip',
|
43 |
+
'fadeIn': 50,
|
44 |
+
'fadeOut': 50,
|
45 |
+
'delay': 200
|
46 |
+
} );
|
47 |
+
|
48 |
+
} );
|
assets/js/admin/settings-commerce.min.js
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
"use strict";jQuery(document).ready(function(e){var c=e("form.wc-facebook-settings"),t=e("#wc_facebook_google_product_category_id"),a=t.val();c.on("submit",function(o){c.data("allow-submit")||t.val()===a||(o.preventDefault(),e("#wc-backbone-modal-dialog .modal-close").trigger("click"),new e.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:t.val()?facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_message:facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_message_empty,buttons:facebook_for_woocommerce_settings_commerce.default_google_product_category_modal_buttons}}),e(document.body).off("wc_backbone_modal_response.facebook_for_commerce").on("wc_backbone_modal_response.facebook_for_commerce",function(){c.data("allow-submit",!0).find(":submit").trigger("click")}))}),e(".woocommerce-help-tip").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200})});
|
changelog.txt
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
Â
*** Facebook for WooCommerce Changelog ***
|
2 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
3 |
Â
2020.10.12 - version 2.0.5
|
4 |
Â
* Tweak - Update product availability when stock changes in the store
|
5 |
Â
* Fix - Don't prevent variation products from being updated when they're set to not sync with Facebook but have their categories excluded from syncing
|
1 |
Â
*** Facebook for WooCommerce Changelog ***
|
2 |
Â
|
3 |
+
2020.10.26 - version 2.1.0
|
4 |
+
* Feature - Set Google category at the shop level for the Facebook catalog sync (on the product sync tab).
|
5 |
+
* Feature - Set Google category for the Facebook catalog sync at the WooCommerce category level.
|
6 |
+
* Feature - Set Google category for the Facebook catalog sync at the product level.
|
7 |
+
* Feature - Set Enhanced Catalog category specific fields for the Facebook catalog sync at the WooCommerce category level.
|
8 |
+
* Feature - Set Enhanced Catalog category specific fields for the Facebook catalog sync at the product level.
|
9 |
+
|
10 |
Â
2020.10.12 - version 2.0.5
|
11 |
Â
* Tweak - Update product availability when stock changes in the store
|
12 |
Â
* Fix - Don't prevent variation products from being updated when they're set to not sync with Facebook but have their categories excluded from syncing
|
class-wc-facebookcommerce.php
CHANGED
@@ -22,7 +22,7 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
22 |
Â
|
23 |
Â
|
24 |
Â
/** @var string the plugin version */
|
25 |
-
const VERSION = '2.0
|
26 |
Â
|
27 |
Â
/** @var string for backwards compatibility TODO: remove this in v2.0.0 {CW 2020-02-06} */
|
28 |
Â
const PLUGIN_VERSION = self::VERSION;
|
@@ -76,6 +76,9 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
76 |
Â
/** @var \SkyVerge\WooCommerce\Facebook\Integrations\Integrations integrations handler */
|
77 |
Â
private $integrations;
|
78 |
Â
|
Â
|
|
Â
|
|
Â
|
|
79 |
Â
|
80 |
Â
/**
|
81 |
Â
* Constructs the plugin.
|
@@ -112,28 +115,32 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
112 |
Â
require_once $this->get_framework_path() . '/utilities/class-sv-wp-async-request.php';
|
113 |
Â
require_once $this->get_framework_path() . '/utilities/class-sv-wp-background-job-handler.php';
|
114 |
Â
|
Â
|
|
115 |
Â
require_once __DIR__ . '/includes/Handlers/Connection.php';
|
116 |
Â
require_once __DIR__ . '/includes/Integrations/Integrations.php';
|
Â
|
|
117 |
Â
require_once __DIR__ . '/includes/Products.php';
|
118 |
Â
require_once __DIR__ . '/includes/Products/Feed.php';
|
Â
|
|
119 |
Â
require_once __DIR__ . '/includes/Products/Stock.php';
|
120 |
Â
require_once __DIR__ . '/includes/Products/Sync.php';
|
121 |
Â
require_once __DIR__ . '/includes/Products/Sync/Background.php';
|
122 |
Â
require_once __DIR__ . '/includes/fbproductfeed.php';
|
123 |
Â
require_once __DIR__ . '/facebook-commerce-messenger-chat.php';
|
Â
|
|
124 |
Â
require_once __DIR__ . '/includes/Events/Event.php';
|
125 |
Â
require_once __DIR__ . '/includes/Events/Normalizer.php';
|
126 |
Â
require_once __DIR__ . '/includes/Events/AAMSettings.php';
|
Â
|
|
127 |
Â
|
128 |
Â
$this->product_feed = new \SkyVerge\WooCommerce\Facebook\Products\Feed();
|
129 |
Â
$this->products_stock_handler = new \SkyVerge\WooCommerce\Facebook\Products\Stock();
|
130 |
Â
$this->products_sync_handler = new \SkyVerge\WooCommerce\Facebook\Products\Sync();
|
131 |
Â
$this->sync_background_handler = new \SkyVerge\WooCommerce\Facebook\Products\Sync\Background();
|
Â
|
|
Â
|
|
132 |
Â
|
133 |
Â
if ( is_ajax() ) {
|
134 |
-
|
135 |
-
require_once __DIR__ . '/includes/AJAX.php';
|
136 |
-
|
137 |
Â
$this->ajax = new \SkyVerge\WooCommerce\Facebook\AJAX();
|
138 |
Â
}
|
139 |
Â
|
@@ -164,6 +171,8 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
164 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Connection.php';
|
165 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Product_Sync.php';
|
166 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Messenger.php';
|
Â
|
|
Â
|
|
167 |
Â
|
168 |
Â
$this->admin_settings = new \SkyVerge\WooCommerce\Facebook\Admin\Settings();
|
169 |
Â
}
|
@@ -186,6 +195,24 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
186 |
Â
}
|
187 |
Â
|
188 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
189 |
Â
/**
|
190 |
Â
* Adds the plugin admin notices.
|
191 |
Â
*
|
@@ -323,14 +350,20 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
323 |
Â
*
|
324 |
Â
* @since 2.0.0
|
325 |
Â
*
|
Â
|
|
326 |
Â
* @return \SkyVerge\WooCommerce\Facebook\API
|
327 |
Â
* @throws Framework\SV_WC_API_Exception
|
328 |
Â
*/
|
329 |
-
public function get_api() {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
330 |
Â
|
331 |
Â
if ( ! is_object( $this->api ) ) {
|
332 |
Â
|
333 |
-
if ( ! $
|
334 |
Â
throw new Framework\SV_WC_API_Exception( __( 'Cannot create the API instance because the access token is missing.', 'facebook-for-woocommerce' ) );
|
335 |
Â
}
|
336 |
Â
|
@@ -350,6 +383,10 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
350 |
Â
require_once __DIR__ . '/includes/API/Traits/Paginated_Response.php';
|
351 |
Â
}
|
352 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
353 |
Â
if ( ! class_exists( API::class ) ) {
|
354 |
Â
require_once __DIR__ . '/includes/API.php';
|
355 |
Â
}
|
@@ -458,7 +495,51 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
458 |
Â
require_once __DIR__ . '/includes/API/Exceptions/Request_Limit_Reached.php';
|
459 |
Â
}
|
460 |
Â
|
461 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
462 |
Â
}
|
463 |
Â
|
464 |
Â
return $this->api;
|
@@ -503,6 +584,16 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
503 |
Â
return $this->product_feed;
|
504 |
Â
}
|
505 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
506 |
Â
|
507 |
Â
/**
|
508 |
Â
* Gets the background handle virtual products and variations handler instance.
|
@@ -599,6 +690,18 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
599 |
Â
}
|
600 |
Â
|
601 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
602 |
Â
/**
|
603 |
Â
* Gets the settings page URL.
|
604 |
Â
*
|
@@ -758,7 +861,6 @@ if ( ! class_exists( 'WC_Facebookcommerce' ) ) :
|
|
758 |
Â
wc_deprecated_function( __METHOD__, '1.10.0' );
|
759 |
Â
}
|
760 |
Â
|
761 |
-
|
762 |
Â
}
|
763 |
Â
|
764 |
Â
|
22 |
Â
|
23 |
Â
|
24 |
Â
/** @var string the plugin version */
|
25 |
+
const VERSION = '2.1.0';
|
26 |
Â
|
27 |
Â
/** @var string for backwards compatibility TODO: remove this in v2.0.0 {CW 2020-02-06} */
|
28 |
Â
const PLUGIN_VERSION = self::VERSION;
|
76 |
Â
/** @var \SkyVerge\WooCommerce\Facebook\Integrations\Integrations integrations handler */
|
77 |
Â
private $integrations;
|
78 |
Â
|
79 |
+
/** @var \SkyVerge\WooCommerce\Facebook\Commerce commerce handler */
|
80 |
+
private $commerce_handler;
|
81 |
+
|
82 |
Â
|
83 |
Â
/**
|
84 |
Â
* Constructs the plugin.
|
115 |
Â
require_once $this->get_framework_path() . '/utilities/class-sv-wp-async-request.php';
|
116 |
Â
require_once $this->get_framework_path() . '/utilities/class-sv-wp-background-job-handler.php';
|
117 |
Â
|
118 |
+
require_once __DIR__ . '/includes/AJAX.php';
|
119 |
Â
require_once __DIR__ . '/includes/Handlers/Connection.php';
|
120 |
Â
require_once __DIR__ . '/includes/Integrations/Integrations.php';
|
121 |
+
require_once __DIR__ . '/includes/Product_Categories.php';
|
122 |
Â
require_once __DIR__ . '/includes/Products.php';
|
123 |
Â
require_once __DIR__ . '/includes/Products/Feed.php';
|
124 |
+
require_once __DIR__ . '/includes/Products/FBCategories.php';
|
125 |
Â
require_once __DIR__ . '/includes/Products/Stock.php';
|
126 |
Â
require_once __DIR__ . '/includes/Products/Sync.php';
|
127 |
Â
require_once __DIR__ . '/includes/Products/Sync/Background.php';
|
128 |
Â
require_once __DIR__ . '/includes/fbproductfeed.php';
|
129 |
Â
require_once __DIR__ . '/facebook-commerce-messenger-chat.php';
|
130 |
+
require_once __DIR__ . '/includes/Commerce.php';
|
131 |
Â
require_once __DIR__ . '/includes/Events/Event.php';
|
132 |
Â
require_once __DIR__ . '/includes/Events/Normalizer.php';
|
133 |
Â
require_once __DIR__ . '/includes/Events/AAMSettings.php';
|
134 |
+
require_once __DIR__ . '/includes/Utilities/Shipment.php';
|
135 |
Â
|
136 |
Â
$this->product_feed = new \SkyVerge\WooCommerce\Facebook\Products\Feed();
|
137 |
Â
$this->products_stock_handler = new \SkyVerge\WooCommerce\Facebook\Products\Stock();
|
138 |
Â
$this->products_sync_handler = new \SkyVerge\WooCommerce\Facebook\Products\Sync();
|
139 |
Â
$this->sync_background_handler = new \SkyVerge\WooCommerce\Facebook\Products\Sync\Background();
|
140 |
+
$this->commerce_handler = new \SkyVerge\WooCommerce\Facebook\Commerce();
|
141 |
+
$this->fb_categories = new \SkyVerge\WooCommerce\Facebook\Products\FBCategories();
|
142 |
Â
|
143 |
Â
if ( is_ajax() ) {
|
Â
|
|
Â
|
|
Â
|
|
144 |
Â
$this->ajax = new \SkyVerge\WooCommerce\Facebook\AJAX();
|
145 |
Â
}
|
146 |
Â
|
171 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Connection.php';
|
172 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Product_Sync.php';
|
173 |
Â
require_once __DIR__ . '/includes/Admin/Settings_Screens/Messenger.php';
|
174 |
+
require_once __DIR__ . '/includes/Admin/Google_Product_Category_Field.php';
|
175 |
+
require_once __DIR__ . '/includes/Admin/Enhanced_Catalog_Attribute_Fields.php';
|
176 |
Â
|
177 |
Â
$this->admin_settings = new \SkyVerge\WooCommerce\Facebook\Admin\Settings();
|
178 |
Â
}
|
195 |
Â
}
|
196 |
Â
|
197 |
Â
|
198 |
+
/**
|
199 |
+
* Gets deprecated and removed hooks.
|
200 |
+
*
|
201 |
+
* @since 2.1.0
|
202 |
+
*
|
203 |
+
* @return array
|
204 |
+
*/
|
205 |
+
protected function get_deprecated_hooks() {
|
206 |
+
|
207 |
+
return [
|
208 |
+
'wc_facebook_page_access_token' => [
|
209 |
+
'version' => '2.1.0',
|
210 |
+
'replacement' => false,
|
211 |
+
],
|
212 |
+
];
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
Â
/**
|
217 |
Â
* Adds the plugin admin notices.
|
218 |
Â
*
|
350 |
Â
*
|
351 |
Â
* @since 2.0.0
|
352 |
Â
*
|
353 |
+
* @param string $access_token access token to use for this API request
|
354 |
Â
* @return \SkyVerge\WooCommerce\Facebook\API
|
355 |
Â
* @throws Framework\SV_WC_API_Exception
|
356 |
Â
*/
|
357 |
+
public function get_api( $access_token = '' ) {
|
358 |
+
|
359 |
+
// if none provided, use the general access token
|
360 |
+
if ( ! $access_token ) {
|
361 |
+
$access_token = $this->get_connection_handler()->get_access_token();
|
362 |
+
}
|
363 |
Â
|
364 |
Â
if ( ! is_object( $this->api ) ) {
|
365 |
Â
|
366 |
+
if ( ! $access_token ) {
|
367 |
Â
throw new Framework\SV_WC_API_Exception( __( 'Cannot create the API instance because the access token is missing.', 'facebook-for-woocommerce' ) );
|
368 |
Â
}
|
369 |
Â
|
383 |
Â
require_once __DIR__ . '/includes/API/Traits/Paginated_Response.php';
|
384 |
Â
}
|
385 |
Â
|
386 |
+
if ( ! trait_exists( API\Traits\Idempotent_Request::class, false ) ) {
|
387 |
+
require_once __DIR__ . '/includes/API/Traits/Idempotent_Request.php';
|
388 |
+
}
|
389 |
+
|
390 |
Â
if ( ! class_exists( API::class ) ) {
|
391 |
Â
require_once __DIR__ . '/includes/API.php';
|
392 |
Â
}
|
495 |
Â
require_once __DIR__ . '/includes/API/Exceptions/Request_Limit_Reached.php';
|
496 |
Â
}
|
497 |
Â
|
498 |
+
if ( ! class_exists( API\Orders\Order::class ) ) {
|
499 |
+
require_once __DIR__ . '/includes/API/Orders/Order.php';
|
500 |
+
}
|
501 |
+
|
502 |
+
if ( ! class_exists( API\Orders\Abstract_Request::class ) ) {
|
503 |
+
require_once __DIR__ . '/includes/API/Orders/Abstract_Request.php';
|
504 |
+
}
|
505 |
+
|
506 |
+
if ( ! class_exists( API\Orders\Acknowledge\Request::class ) ) {
|
507 |
+
require_once __DIR__ . '/includes/API/Orders/Acknowledge/Request.php';
|
508 |
+
}
|
509 |
+
|
510 |
+
if ( ! class_exists( API\Orders\Cancel\Request::class ) ) {
|
511 |
+
require_once __DIR__ . '/includes/API/Orders/Cancel/Request.php';
|
512 |
+
}
|
513 |
+
|
514 |
+
if ( ! class_exists( API\Orders\Fulfillment\Request::class ) ) {
|
515 |
+
require_once __DIR__ . '/includes/API/Orders/Fulfillment/Request.php';
|
516 |
+
}
|
517 |
+
|
518 |
+
if ( ! class_exists( API\Orders\Read\Request::class ) ) {
|
519 |
+
require_once __DIR__ . '/includes/API/Orders/Read/Request.php';
|
520 |
+
}
|
521 |
+
|
522 |
+
if ( ! class_exists( API\Orders\Read\Response::class ) ) {
|
523 |
+
require_once __DIR__ . '/includes/API/Orders/Read/Response.php';
|
524 |
+
}
|
525 |
+
|
526 |
+
if ( ! class_exists( API\Orders\Refund\Request::class ) ) {
|
527 |
+
require_once __DIR__ . '/includes/API/Orders/Refund/Request.php';
|
528 |
+
}
|
529 |
+
|
530 |
+
if ( ! class_exists( API\Orders\Request::class ) ) {
|
531 |
+
require_once __DIR__ . '/includes/API/Orders/Request.php';
|
532 |
+
}
|
533 |
+
|
534 |
+
if ( ! class_exists( API\Orders\Response::class ) ) {
|
535 |
+
require_once __DIR__ . '/includes/API/Orders/Response.php';
|
536 |
+
}
|
537 |
+
|
538 |
+
$this->api = new SkyVerge\WooCommerce\Facebook\API( $access_token );
|
539 |
+
|
540 |
+
} else {
|
541 |
+
|
542 |
+
$this->api->set_access_token( $access_token );
|
543 |
Â
}
|
544 |
Â
|
545 |
Â
return $this->api;
|
584 |
Â
return $this->product_feed;
|
585 |
Â
}
|
586 |
Â
|
587 |
+
/**
|
588 |
+
* Gets the category handler.
|
589 |
+
*
|
590 |
+
* @since 1.11.0
|
591 |
+
*
|
592 |
+
* @return \SkyVerge\WooCommerce\Facebook\Products\FBCategories
|
593 |
+
*/
|
594 |
+
public function get_facebook_category_handler() {
|
595 |
+
return $this->fb_categories;
|
596 |
+
}
|
597 |
Â
|
598 |
Â
/**
|
599 |
Â
* Gets the background handle virtual products and variations handler instance.
|
690 |
Â
}
|
691 |
Â
|
692 |
Â
|
693 |
+
/**
|
694 |
+
* Gets the commerce handler instance.
|
695 |
+
*
|
696 |
+
* @since 2.1.0
|
697 |
+
*
|
698 |
+
* @return \SkyVerge\WooCommerce\Facebook\Commerce commerce handler instance
|
699 |
+
*/
|
700 |
+
public function get_commerce_handler() {
|
701 |
+
|
702 |
+
return $this->commerce_handler;
|
703 |
+
}
|
704 |
+
|
705 |
Â
/**
|
706 |
Â
* Gets the settings page URL.
|
707 |
Â
*
|
861 |
Â
wc_deprecated_function( __METHOD__, '1.10.0' );
|
862 |
Â
}
|
863 |
Â
|
Â
|
|
864 |
Â
}
|
865 |
Â
|
866 |
Â
|
facebook-commerce.php
CHANGED
@@ -9,10 +9,11 @@
|
|
9 |
Â
*/
|
10 |
Â
|
11 |
Â
use SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
-
use SkyVerge\WooCommerce\
|
Â
|
|
13 |
Â
use SkyVerge\WooCommerce\Facebook\Products;
|
14 |
Â
use SkyVerge\WooCommerce\Facebook\Products\Feed;
|
15 |
-
use SkyVerge\WooCommerce\
|
16 |
Â
|
17 |
Â
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
Â
exit; // Exit if accessed directly
|
@@ -25,7 +26,10 @@ require_once 'facebook-commerce-pixel-event.php';
|
|
25 |
Â
class WC_Facebookcommerce_Integration extends WC_Integration {
|
26 |
Â
|
27 |
Â
|
28 |
-
/**
|
Â
|
|
Â
|
|
Â
|
|
29 |
Â
const OPTION_PAGE_ACCESS_TOKEN = 'wc_facebook_page_access_token';
|
30 |
Â
|
31 |
Â
/** @var string the WordPress option name where the product catalog ID is stored */
|
@@ -101,9 +105,6 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
101 |
Â
const ACTION_HOOK_SCHEDULED_RESYNC = 'sync_all_fb_products_using_feed';
|
102 |
Â
|
103 |
Â
|
104 |
-
/** @var string|null the configured page access token */
|
105 |
-
private $page_access_token;
|
106 |
-
|
107 |
Â
/** @var string|null the configured product catalog ID */
|
108 |
Â
public $product_catalog_id;
|
109 |
Â
|
@@ -935,6 +936,8 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
935 |
Â
|
936 |
Â
if ( $sync_enabled ) {
|
937 |
Â
|
Â
|
|
Â
|
|
938 |
Â
switch ( $product->get_type() ) {
|
939 |
Â
|
940 |
Â
case 'simple':
|
@@ -2352,28 +2355,29 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
2352 |
Â
/**
|
2353 |
Â
* Gets the page access token.
|
2354 |
Â
*
|
Â
|
|
Â
|
|
2355 |
Â
* @since 1.10.0
|
Â
|
|
2356 |
Â
*
|
2357 |
Â
* @return string
|
2358 |
Â
*/
|
2359 |
Â
public function get_page_access_token() {
|
2360 |
Â
|
2361 |
-
|
2362 |
-
|
2363 |
-
$value = get_option( self::OPTION_PAGE_ACCESS_TOKEN, '' );
|
2364 |
Â
|
2365 |
-
|
2366 |
-
}
|
2367 |
Â
|
2368 |
Â
/**
|
2369 |
Â
* Filters the Facebook page access token.
|
2370 |
Â
*
|
2371 |
Â
* @since 1.10.0
|
Â
|
|
2372 |
Â
*
|
2373 |
Â
* @param string $page_access_token Facebook page access token
|
2374 |
Â
* @param \WC_Facebookcommerce_Integration $integration the integration instance
|
2375 |
Â
*/
|
2376 |
-
return (string) apply_filters( 'wc_facebook_page_access_token', ! $this->is_feed_migrated() ? $
|
2377 |
Â
}
|
2378 |
Â
|
2379 |
Â
|
@@ -2793,15 +2797,18 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
2793 |
Â
/**
|
2794 |
Â
* Updates the Facebook page access token.
|
2795 |
Â
*
|
Â
|
|
Â
|
|
2796 |
Â
* @since 1.10.0
|
Â
|
|
2797 |
Â
*
|
2798 |
Â
* @param string $value page access token value
|
2799 |
Â
*/
|
2800 |
Â
public function update_page_access_token( $value ) {
|
2801 |
Â
|
2802 |
-
|
2803 |
Â
|
2804 |
-
|
2805 |
Â
}
|
2806 |
Â
|
2807 |
Â
|
@@ -3628,7 +3635,6 @@ class WC_Facebookcommerce_Integration extends WC_Integration {
|
|
3628 |
Â
}
|
3629 |
Â
}
|
3630 |
Â
|
3631 |
-
|
3632 |
Â
/**
|
3633 |
Â
* Handles the schedule feed generation action, triggered by the REST API.
|
3634 |
Â
*
|
9 |
Â
*/
|
10 |
Â
|
11 |
Â
use SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
use SkyVerge\WooCommerce\Facebook\Events\AAMSettings;
|
13 |
+
use SkyVerge\WooCommerce\Facebook\Handlers\Connection;
|
14 |
Â
use SkyVerge\WooCommerce\Facebook\Products;
|
15 |
Â
use SkyVerge\WooCommerce\Facebook\Products\Feed;
|
16 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
17 |
Â
|
18 |
Â
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
Â
exit; // Exit if accessed directly
|
26 |
Â
class WC_Facebookcommerce_Integration extends WC_Integration {
|
27 |
Â
|
28 |
Â
|
29 |
+
/**
|
30 |
+
* @var string the WordPress option name where the page access token is stored
|
31 |
+
* @deprecated 2.1.0
|
32 |
+
*/
|
33 |
Â
const OPTION_PAGE_ACCESS_TOKEN = 'wc_facebook_page_access_token';
|
34 |
Â
|
35 |
Â
/** @var string the WordPress option name where the product catalog ID is stored */
|
105 |
Â
const ACTION_HOOK_SCHEDULED_RESYNC = 'sync_all_fb_products_using_feed';
|
106 |
Â
|
107 |
Â
|
Â
|
|
Â
|
|
Â
|
|
108 |
Â
/** @var string|null the configured product catalog ID */
|
109 |
Â
public $product_catalog_id;
|
110 |
Â
|
936 |
Â
|
937 |
Â
if ( $sync_enabled ) {
|
938 |
Â
|
939 |
+
Admin\Products::save_commerce_fields( $product );
|
940 |
+
|
941 |
Â
switch ( $product->get_type() ) {
|
942 |
Â
|
943 |
Â
case 'simple':
|
2355 |
Â
/**
|
2356 |
Â
* Gets the page access token.
|
2357 |
Â
*
|
2358 |
+
* TODO: remove this method by version 3.0.0 or by 2021-08-21 {WV 2020-08-21}
|
2359 |
+
*
|
2360 |
Â
* @since 1.10.0
|
2361 |
+
* @deprecated 2.1.0
|
2362 |
Â
*
|
2363 |
Â
* @return string
|
2364 |
Â
*/
|
2365 |
Â
public function get_page_access_token() {
|
2366 |
Â
|
2367 |
+
wc_deprecated_function( __METHOD__, '2.1.0', Connection::class . '::get_page_access_token()' );
|
Â
|
|
Â
|
|
2368 |
Â
|
2369 |
+
$access_token = facebook_for_woocommerce()->get_connection_handler()->get_page_access_token();
|
Â
|
|
2370 |
Â
|
2371 |
Â
/**
|
2372 |
Â
* Filters the Facebook page access token.
|
2373 |
Â
*
|
2374 |
Â
* @since 1.10.0
|
2375 |
+
* @deprecated 2.1.0
|
2376 |
Â
*
|
2377 |
Â
* @param string $page_access_token Facebook page access token
|
2378 |
Â
* @param \WC_Facebookcommerce_Integration $integration the integration instance
|
2379 |
Â
*/
|
2380 |
+
return (string) apply_filters( 'wc_facebook_page_access_token', ! $this->is_feed_migrated() ? $access_token : '', $this );
|
2381 |
Â
}
|
2382 |
Â
|
2383 |
Â
|
2797 |
Â
/**
|
2798 |
Â
* Updates the Facebook page access token.
|
2799 |
Â
*
|
2800 |
+
* TODO: remove this method by version 3.0.0 or by 2021-08-21 {WV 2020-08-21}
|
2801 |
+
*
|
2802 |
Â
* @since 1.10.0
|
2803 |
+
* @deprecated 2.1.0
|
2804 |
Â
*
|
2805 |
Â
* @param string $value page access token value
|
2806 |
Â
*/
|
2807 |
Â
public function update_page_access_token( $value ) {
|
2808 |
Â
|
2809 |
+
wc_deprecated_function( __METHOD__, '2.1.0', Connection::class . '::update_page_access_token()' );
|
2810 |
Â
|
2811 |
+
facebook_for_woocommerce()->get_connection_handler()->update_page_access_token( $value );
|
2812 |
Â
}
|
2813 |
Â
|
2814 |
Â
|
3635 |
Â
}
|
3636 |
Â
}
|
3637 |
Â
|
Â
|
|
3638 |
Â
/**
|
3639 |
Â
* Handles the schedule feed generation action, triggered by the REST API.
|
3640 |
Â
*
|
facebook-for-woocommerce.php
CHANGED
@@ -10,10 +10,10 @@
|
|
10 |
Â
* Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
|
11 |
Â
* Author: Facebook
|
12 |
Â
* Author URI: https://www.facebook.com/
|
13 |
-
* Version: 2.0
|
14 |
Â
* Text Domain: facebook-for-woocommerce
|
15 |
Â
* WC requires at least: 3.5.0
|
16 |
-
* WC tested up to: 4.
|
17 |
Â
*
|
18 |
Â
* @package FacebookCommerce
|
19 |
Â
*/
|
10 |
Â
* Description: Grow your business on Facebook! Use this official plugin to help sell more of your products using Facebook. After completing the setup, you'll be ready to create ads that promote your products and you can also create a shop section on your Page where customers can browse your products on Facebook.
|
11 |
Â
* Author: Facebook
|
12 |
Â
* Author URI: https://www.facebook.com/
|
13 |
+
* Version: 2.1.0
|
14 |
Â
* Text Domain: facebook-for-woocommerce
|
15 |
Â
* WC requires at least: 3.5.0
|
16 |
+
* WC tested up to: 4.6.1
|
17 |
Â
*
|
18 |
Â
* @package FacebookCommerce
|
19 |
Â
*/
|
i18n/languages/facebook-for-woocommerce.pot
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Â
# This file is distributed under the same license as the Facebook for WooCommerce package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
-
"Project-Id-Version: Facebook for WooCommerce 2.0
|
6 |
Â
"Report-Msgid-Bugs-To: "
|
7 |
Â
"https://woocommerce.com/my-account/marketplace-ticket-form/\n"
|
8 |
-
"POT-Creation-Date: 2020-10-
|
9 |
Â
"MIME-Version: 1.0\n"
|
10 |
Â
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
Â
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
Â
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
Â
|
16 |
-
#: class-wc-facebookcommerce.php:
|
17 |
Â
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
18 |
Â
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
19 |
Â
msgid ""
|
@@ -21,7 +21,7 @@ msgid ""
|
|
21 |
Â
"Facebook for WooCommerce connection. Please %3$sclick here%4$s to reconnect!"
|
22 |
Â
msgstr ""
|
23 |
Â
|
24 |
-
#: class-wc-facebookcommerce.php:
|
25 |
Â
#. translators: Placeholders %1$s - opening link HTML tag, %2$s - closing link
|
26 |
Â
#. HTML tag
|
27 |
Â
msgid ""
|
@@ -29,7 +29,7 @@ msgid ""
|
|
29 |
Â
"under %1$sWooCommerce > Facebook%2$s."
|
30 |
Â
msgstr ""
|
31 |
Â
|
32 |
-
#: class-wc-facebookcommerce.php:
|
33 |
Â
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
34 |
Â
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
35 |
Â
msgid ""
|
@@ -37,7 +37,7 @@ msgid ""
|
|
37 |
Â
"configuration, %3$scomplete the setup steps%4$s."
|
38 |
Â
msgstr ""
|
39 |
Â
|
40 |
-
#: class-wc-facebookcommerce.php:
|
41 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
42 |
Â
#. <a> tag, %4$s - </a> tag
|
43 |
Â
msgid ""
|
@@ -46,7 +46,7 @@ msgid ""
|
|
46 |
Â
"Connection%4$s area."
|
47 |
Â
msgstr ""
|
48 |
Â
|
49 |
-
#: class-wc-facebookcommerce.php:
|
50 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
51 |
Â
#. <a> tag, %4$s - </a> tag
|
52 |
Â
msgid ""
|
@@ -55,7 +55,7 @@ msgid ""
|
|
55 |
Â
"products."
|
56 |
Â
msgstr ""
|
57 |
Â
|
58 |
-
#: class-wc-facebookcommerce.php:
|
59 |
Â
msgid "Cannot create the API instance because the access token is missing."
|
60 |
Â
msgstr ""
|
61 |
Â
|
@@ -63,69 +63,69 @@ msgstr ""
|
|
63 |
Â
msgid "Facebook for WooCommerce"
|
64 |
Â
msgstr ""
|
65 |
Â
|
66 |
-
#: facebook-commerce.php:
|
67 |
Â
msgid "Facebook Commerce and Dynamic Ads (Pixel) Extension"
|
68 |
Â
msgstr ""
|
69 |
Â
|
70 |
-
#: facebook-commerce.php:
|
71 |
Â
msgid "Facebook ID:"
|
72 |
Â
msgstr ""
|
73 |
Â
|
74 |
-
#: facebook-commerce.php:
|
75 |
Â
msgid "Variant IDs:"
|
76 |
Â
msgstr ""
|
77 |
Â
|
78 |
-
#: facebook-commerce.php:
|
79 |
Â
msgid "Reset Facebook metadata"
|
80 |
Â
msgstr ""
|
81 |
Â
|
82 |
-
#: facebook-commerce.php:
|
83 |
Â
msgid "Delete product(s) on Facebook"
|
84 |
Â
msgstr ""
|
85 |
Â
|
86 |
-
#: facebook-commerce.php:
|
87 |
Â
msgid "This product is not yet synced to Facebook."
|
88 |
Â
msgstr ""
|
89 |
Â
|
90 |
-
#: facebook-commerce.php:
|
91 |
Â
msgid "Nothing to update for product group for %1$s"
|
92 |
Â
msgstr ""
|
93 |
Â
|
94 |
-
#: facebook-commerce.php:
|
95 |
Â
#. translators: Placeholders %1$s - original error message from Facebook API
|
96 |
Â
msgid "There was an issue connecting to the Facebook API: %1$s"
|
97 |
Â
msgstr ""
|
98 |
Â
|
99 |
-
#: facebook-commerce.php:
|
100 |
Â
msgid "Your connection has expired."
|
101 |
Â
msgstr ""
|
102 |
Â
|
103 |
-
#: facebook-commerce.php:
|
104 |
Â
msgid ""
|
105 |
Â
"Please click Manage connection > Advanced Options > Update Token to refresh "
|
106 |
Â
"your connection to Facebook."
|
107 |
Â
msgstr ""
|
108 |
Â
|
109 |
-
#: facebook-commerce.php:
|
110 |
Â
#. translators: Placeholders %s - error message
|
111 |
Â
msgid "There was an error trying to sync the products to Facebook. %s"
|
112 |
Â
msgstr ""
|
113 |
Â
|
114 |
-
#: facebook-commerce.php:
|
115 |
Â
msgid "Product sync is disabled."
|
116 |
Â
msgstr ""
|
117 |
Â
|
118 |
-
#: facebook-commerce.php:
|
119 |
Â
msgid "The plugin is not configured or the Catalog ID is missing."
|
120 |
Â
msgstr ""
|
121 |
Â
|
122 |
-
#: facebook-commerce.php:
|
123 |
Â
msgid ""
|
124 |
Â
"A product sync is in progress. Please wait until the sync finishes before "
|
125 |
Â
"starting a new one."
|
126 |
Â
msgstr ""
|
127 |
Â
|
128 |
-
#: facebook-commerce.php:
|
129 |
Â
msgid ""
|
130 |
Â
"We've detected that your Facebook Product Catalog is no longer valid. This "
|
131 |
Â
"may happen if it was deleted, but could also be a temporary error. If the "
|
@@ -133,46 +133,80 @@ msgid ""
|
|
133 |
Â
"and setup the plugin again."
|
134 |
Â
msgstr ""
|
135 |
Â
|
136 |
-
#: facebook-commerce.php:
|
137 |
Â
msgid "We couldn't create the feed or upload the product information."
|
138 |
Â
msgstr ""
|
139 |
Â
|
140 |
-
#: facebook-commerce.php:
|
141 |
Â
msgid "Hi! We're here to answer any questions you may have."
|
142 |
Â
msgstr ""
|
143 |
Â
|
144 |
-
#: facebook-commerce.php:
|
145 |
Â
msgid "Facebook for WooCommerce error:"
|
146 |
Â
msgstr ""
|
147 |
Â
|
148 |
-
#: facebook-commerce.php:
|
149 |
Â
msgid ""
|
150 |
Â
"There was an error trying to retrieve information about the Facebook page: "
|
151 |
Â
"%s"
|
152 |
Â
msgstr ""
|
153 |
Â
|
154 |
-
#: facebook-commerce.php:
|
155 |
Â
msgid "Get started with Messenger Customer Chat"
|
156 |
Â
msgstr ""
|
157 |
Â
|
158 |
-
#: facebook-commerce.php:
|
159 |
Â
msgid "Get started with Instagram Shopping"
|
160 |
Â
msgstr ""
|
161 |
Â
|
162 |
-
#: facebook-commerce.php:
|
163 |
Â
#. translators: Placeholders %1$s - original error message from Facebook API
|
164 |
Â
msgid "There was an issue connecting to the Facebook API: %s"
|
165 |
Â
msgstr ""
|
166 |
Â
|
167 |
-
#: includes/AJAX.php:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
168 |
Â
msgid "Go to Settings"
|
169 |
Â
msgstr ""
|
170 |
Â
|
171 |
-
#: includes/AJAX.php:
|
Â
|
|
Â
|
|
172 |
Â
msgid "Cancel"
|
173 |
Â
msgstr ""
|
174 |
Â
|
175 |
-
#: includes/AJAX.php:
|
176 |
Â
#. translators: Placeholder %s - <br/> tag
|
177 |
Â
msgid ""
|
178 |
Â
"This product belongs to a category or tag that is excluded from the "
|
@@ -181,7 +215,7 @@ msgid ""
|
|
181 |
Â
"or click Cancel and update the product's category / tag assignments."
|
182 |
Â
msgstr ""
|
183 |
Â
|
184 |
-
#: includes/AJAX.php:
|
185 |
Â
msgid ""
|
186 |
Â
"One or more of the selected products belongs to a category or tag that is "
|
187 |
Â
"excluded from the Facebook catalog sync. To sync these products to "
|
@@ -189,11 +223,11 @@ msgid ""
|
|
189 |
Â
"settings."
|
190 |
Â
msgstr ""
|
191 |
Â
|
192 |
-
#: includes/AJAX.php:
|
193 |
Â
msgid "Exclude Products"
|
194 |
Â
msgstr ""
|
195 |
Â
|
196 |
-
#: includes/AJAX.php:
|
197 |
Â
#. translators: Placeholder %s - <br/> tags
|
198 |
Â
msgid ""
|
199 |
Â
"The categories and/or tags that you have selected to exclude from sync "
|
@@ -206,6 +240,180 @@ msgstr ""
|
|
206 |
Â
msgid "Save changes"
|
207 |
Â
msgstr ""
|
208 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
209 |
Â
#. Author of the plugin/theme
|
210 |
Â
msgid "Facebook"
|
211 |
Â
msgstr ""
|
@@ -218,7 +426,7 @@ msgstr ""
|
|
218 |
Â
msgid "Your settings have been saved."
|
219 |
Â
msgstr ""
|
220 |
Â
|
221 |
-
#: includes/Admin/Settings.php:
|
222 |
Â
#. translators: Placeholders: %s - user-friendly error message
|
223 |
Â
msgid "Your settings could not be saved. %s"
|
224 |
Â
msgstr ""
|
@@ -358,24 +566,24 @@ msgstr ""
|
|
358 |
Â
|
359 |
Â
#: includes/Admin/Settings_Screens/Product_Sync.php:42
|
360 |
Â
#: includes/Admin/Settings_Screens/Product_Sync.php:43
|
361 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
362 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
363 |
Â
msgid "Product sync"
|
364 |
Â
msgstr ""
|
365 |
Â
|
366 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
367 |
Â
#. translators: Placeholders: {count} number of remaining items
|
368 |
Â
msgid "{count} item remaining."
|
369 |
Â
msgid_plural "{count} items remaining."
|
370 |
Â
msgstr[0] ""
|
371 |
Â
msgstr[1] ""
|
372 |
Â
|
373 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
374 |
Â
#. translators: Placeholders %s - html code for a spinner icon
|
375 |
Â
msgid "Your products will now be resynced to Facebook, this may take some time."
|
376 |
Â
msgstr ""
|
377 |
Â
|
378 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
379 |
Â
msgid ""
|
380 |
Â
"Facebook for WooCommerce automatically syncs your products on "
|
381 |
Â
"create/update. Are you sure you want to force product resync?\n"
|
@@ -385,103 +593,166 @@ msgid ""
|
|
385 |
Â
"did not sync."
|
386 |
Â
msgstr ""
|
387 |
Â
|
388 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
389 |
Â
msgid "Your products are syncing - you may safely leave this page %s"
|
390 |
Â
msgstr ""
|
391 |
Â
|
392 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
393 |
Â
msgid "There was an error trying to sync the products to Facebook."
|
394 |
Â
msgstr ""
|
395 |
Â
|
396 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
397 |
Â
msgid ""
|
398 |
Â
"Something went wrong while uploading the product information, please try "
|
399 |
Â
"again."
|
400 |
Â
msgstr ""
|
401 |
Â
|
402 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
403 |
Â
msgid "Sync products"
|
404 |
Â
msgstr ""
|
405 |
Â
|
406 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
407 |
Â
msgid "Enable product sync"
|
408 |
Â
msgstr ""
|
409 |
Â
|
410 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
411 |
Â
msgid "Exclude categories from sync"
|
412 |
Â
msgstr ""
|
413 |
Â
|
414 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
415 |
Â
msgid "Products in one or more of these categories will not sync to Facebook."
|
416 |
Â
msgstr ""
|
417 |
Â
|
418 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
419 |
Â
msgid "Search for a product category…"
|
420 |
Â
msgstr ""
|
421 |
Â
|
422 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
423 |
Â
msgid "Exclude tags from sync"
|
424 |
Â
msgstr ""
|
425 |
Â
|
426 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
427 |
Â
msgid "Products with one or more of these tags will not sync to Facebook."
|
428 |
Â
msgstr ""
|
429 |
Â
|
430 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
431 |
Â
msgid "Search for a product tag…"
|
432 |
Â
msgstr ""
|
433 |
Â
|
434 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
435 |
Â
msgid "Product description sync"
|
436 |
Â
msgstr ""
|
437 |
Â
|
438 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
439 |
Â
msgid "Choose which product description to display in the Facebook catalog."
|
440 |
Â
msgstr ""
|
441 |
Â
|
442 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
443 |
Â
msgid "Standard description"
|
444 |
Â
msgstr ""
|
445 |
Â
|
446 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
447 |
Â
msgid "Short description"
|
448 |
Â
msgstr ""
|
449 |
Â
|
450 |
-
#: includes/Admin/Settings_Screens/Product_Sync.php:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
451 |
Â
#. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
|
452 |
Â
msgid "Please %1$sconnect to Facebook%2$s to enable and manage product sync."
|
453 |
Â
msgstr ""
|
454 |
Â
|
455 |
-
#: includes/Admin.php:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
456 |
Â
msgid "Facebook sync"
|
457 |
Â
msgstr ""
|
458 |
Â
|
459 |
-
#: includes/Admin.php:
|
460 |
Â
msgid "Sync and show"
|
461 |
Â
msgstr ""
|
462 |
Â
|
463 |
-
#: includes/Admin.php:
|
464 |
Â
msgid "Sync and hide"
|
465 |
Â
msgstr ""
|
466 |
Â
|
467 |
-
#: includes/Admin.php:
|
468 |
-
#: includes/Admin.php:
|
469 |
Â
msgid "Do not sync"
|
470 |
Â
msgstr ""
|
471 |
Â
|
472 |
-
#: includes/Admin.php:
|
473 |
Â
msgid "Filter by Facebook sync setting"
|
474 |
Â
msgstr ""
|
475 |
Â
|
476 |
-
#: includes/Admin.php:
|
477 |
Â
msgid "Include in Facebook sync"
|
478 |
Â
msgstr ""
|
479 |
Â
|
480 |
-
#: includes/Admin.php:
|
481 |
Â
msgid "Exclude from Facebook sync"
|
482 |
Â
msgstr ""
|
483 |
Â
|
484 |
-
#: includes/Admin.php:
|
485 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
486 |
Â
#. <a> tag, %4$s - <a> tag
|
487 |
Â
msgid ""
|
@@ -495,11 +766,11 @@ msgid_plural ""
|
|
495 |
Â
msgstr[0] ""
|
496 |
Â
msgstr[1] ""
|
497 |
Â
|
498 |
-
#: includes/Admin.php:
|
499 |
Â
msgid "Don't show this notice again"
|
500 |
Â
msgstr ""
|
501 |
Â
|
502 |
-
#: includes/Admin.php:
|
503 |
Â
#. translators: Placeholders: %1$s - number of affected products, %2$s opening
|
504 |
Â
#. HTML <a> tag, %3$s - closing HTML </a> tag, %4$s - opening HTML <a> tag,
|
505 |
Â
#. %5$s - closing HTML </a> tag
|
@@ -516,7 +787,7 @@ msgid_plural ""
|
|
516 |
Â
msgstr[0] ""
|
517 |
Â
msgstr[1] ""
|
518 |
Â
|
519 |
-
#: includes/Admin.php:
|
520 |
Â
#. translators: Placeholders: %1$s - opening HTML <strong> tag, %2$s - closing
|
521 |
Â
#. HTML </strong> tag, %3$s - opening HTML <a> tag, %4$s - closing HTML </a>
|
522 |
Â
#. tag
|
@@ -526,88 +797,175 @@ msgid ""
|
|
526 |
Â
"your Facebook catalog. You may still advertise Virtual products on Facebook."
|
527 |
Â
msgstr ""
|
528 |
Â
|
529 |
-
#: includes/Admin.php:
|
530 |
Â
msgid "Sync and show in catalog"
|
531 |
Â
msgstr ""
|
532 |
Â
|
533 |
-
#: includes/Admin.php:
|
534 |
Â
msgid "Sync and hide in catalog"
|
535 |
Â
msgstr ""
|
536 |
Â
|
537 |
-
#: includes/Admin.php:
|
538 |
Â
msgid "Facebook Description"
|
539 |
Â
msgstr ""
|
540 |
Â
|
541 |
-
#: includes/Admin.php:
|
542 |
Â
msgid ""
|
543 |
Â
"Custom (plain-text only) description for product on Facebook. If blank, "
|
544 |
Â
"product description will be used. If product description is blank, "
|
545 |
Â
"shortname will be used."
|
546 |
Â
msgstr ""
|
547 |
Â
|
548 |
-
#: includes/Admin.php:
|
549 |
Â
msgid "Facebook Product Image"
|
550 |
Â
msgstr ""
|
551 |
Â
|
552 |
-
#: includes/Admin.php:
|
553 |
Â
msgid ""
|
554 |
Â
"Choose the product image that should be synced to the Facebook catalog for "
|
555 |
Â
"this product. If using a custom image, please enter an absolute URL (e.g. "
|
556 |
Â
"https://domain.com/image.jpg)."
|
557 |
Â
msgstr ""
|
558 |
Â
|
559 |
-
#: includes/Admin.php:
|
560 |
Â
msgid "Use WooCommerce image"
|
561 |
Â
msgstr ""
|
562 |
Â
|
563 |
-
#: includes/Admin.php:
|
564 |
Â
msgid "Use custom image"
|
565 |
Â
msgstr ""
|
566 |
Â
|
567 |
-
#: includes/Admin.php:
|
568 |
Â
msgid "Custom Image URL"
|
569 |
Â
msgstr ""
|
570 |
Â
|
571 |
-
#: includes/Admin.php:
|
572 |
Â
#. translators: Placeholders %1$s - WC currency symbol
|
573 |
Â
msgid "Facebook Price (%1$s)"
|
574 |
Â
msgstr ""
|
575 |
Â
|
576 |
-
#: includes/Admin.php:
|
577 |
Â
msgid ""
|
578 |
Â
"Custom price for product on Facebook. Please enter in monetary decimal (.) "
|
579 |
Â
"format without thousand separators and currency symbols. If blank, product "
|
580 |
Â
"price will be used."
|
581 |
Â
msgstr ""
|
582 |
Â
|
583 |
-
#: includes/Admin.php:
|
584 |
Â
msgid "Use variation image"
|
585 |
Â
msgstr ""
|
586 |
Â
|
587 |
-
#: includes/Admin.php:
|
588 |
Â
msgid "Use parent image"
|
589 |
Â
msgstr ""
|
590 |
Â
|
591 |
-
#: includes/Admin.php:
|
592 |
Â
msgid "Close modal panel"
|
593 |
Â
msgstr ""
|
594 |
Â
|
595 |
-
#: includes/
|
596 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
597 |
Â
msgstr ""
|
598 |
Â
|
599 |
Â
#: includes/Handlers/Connection.php:275
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
600 |
Â
msgid "You do not have permission to uninstall Facebook Business Extension."
|
601 |
Â
msgstr ""
|
602 |
Â
|
603 |
-
#: includes/Handlers/Connection.php:
|
604 |
Â
msgid "Uninstall successful"
|
605 |
Â
msgstr ""
|
606 |
Â
|
607 |
-
#: includes/Handlers/Connection.php:
|
608 |
Â
msgid "Uninstall unsuccessful. Please try again."
|
609 |
Â
msgstr ""
|
610 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
611 |
Â
#: includes/Products/Sync/Background.php:65
|
612 |
Â
msgid "Job data key \"%s\" not set"
|
613 |
Â
msgstr ""
|
2 |
Â
# This file is distributed under the same license as the Facebook for WooCommerce package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
5 |
+
"Project-Id-Version: Facebook for WooCommerce 2.1.0\n"
|
6 |
Â
"Report-Msgid-Bugs-To: "
|
7 |
Â
"https://woocommerce.com/my-account/marketplace-ticket-form/\n"
|
8 |
+
"POT-Creation-Date: 2020-10-27 01:41:17+00:00\n"
|
9 |
Â
"MIME-Version: 1.0\n"
|
10 |
Â
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
Â
"Content-Transfer-Encoding: 8bit\n"
|
13 |
Â
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14 |
Â
"Language-Team: LANGUAGE <LL@li.org>\n"
|
15 |
Â
|
16 |
+
#: class-wc-facebookcommerce.php:233
|
17 |
Â
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
18 |
Â
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
19 |
Â
msgid ""
|
21 |
Â
"Facebook for WooCommerce connection. Please %3$sclick here%4$s to reconnect!"
|
22 |
Â
msgstr ""
|
23 |
Â
|
24 |
+
#: class-wc-facebookcommerce.php:248
|
25 |
Â
#. translators: Placeholders %1$s - opening link HTML tag, %2$s - closing link
|
26 |
Â
#. HTML tag
|
27 |
Â
msgid ""
|
29 |
Â
"under %1$sWooCommerce > Facebook%2$s."
|
30 |
Â
msgstr ""
|
31 |
Â
|
32 |
+
#: class-wc-facebookcommerce.php:263
|
33 |
Â
#. translators: Placeholders %1$s - opening strong HTML tag, %2$s - closing
|
34 |
Â
#. strong HTML tag, %3$s - opening link HTML tag, %4$s - closing link HTML tag
|
35 |
Â
msgid ""
|
37 |
Â
"configuration, %3$scomplete the setup steps%4$s."
|
38 |
Â
msgstr ""
|
39 |
Â
|
40 |
+
#: class-wc-facebookcommerce.php:291
|
41 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
42 |
Â
#. <a> tag, %4$s - </a> tag
|
43 |
Â
msgid ""
|
46 |
Â
"Connection%4$s area."
|
47 |
Â
msgstr ""
|
48 |
Â
|
49 |
+
#: class-wc-facebookcommerce.php:308
|
50 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
51 |
Â
#. <a> tag, %4$s - </a> tag
|
52 |
Â
msgid ""
|
55 |
Â
"products."
|
56 |
Â
msgstr ""
|
57 |
Â
|
58 |
+
#: class-wc-facebookcommerce.php:367
|
59 |
Â
msgid "Cannot create the API instance because the access token is missing."
|
60 |
Â
msgstr ""
|
61 |
Â
|
63 |
Â
msgid "Facebook for WooCommerce"
|
64 |
Â
msgstr ""
|
65 |
Â
|
66 |
+
#: facebook-commerce.php:217
|
67 |
Â
msgid "Facebook Commerce and Dynamic Ads (Pixel) Extension"
|
68 |
Â
msgstr ""
|
69 |
Â
|
70 |
+
#: facebook-commerce.php:634
|
71 |
Â
msgid "Facebook ID:"
|
72 |
Â
msgstr ""
|
73 |
Â
|
74 |
+
#: facebook-commerce.php:642
|
75 |
Â
msgid "Variant IDs:"
|
76 |
Â
msgstr ""
|
77 |
Â
|
78 |
+
#: facebook-commerce.php:660
|
79 |
Â
msgid "Reset Facebook metadata"
|
80 |
Â
msgstr ""
|
81 |
Â
|
82 |
+
#: facebook-commerce.php:665
|
83 |
Â
msgid "Delete product(s) on Facebook"
|
84 |
Â
msgstr ""
|
85 |
Â
|
86 |
+
#: facebook-commerce.php:673
|
87 |
Â
msgid "This product is not yet synced to Facebook."
|
88 |
Â
msgstr ""
|
89 |
Â
|
90 |
+
#: facebook-commerce.php:1421
|
91 |
Â
msgid "Nothing to update for product group for %1$s"
|
92 |
Â
msgstr ""
|
93 |
Â
|
94 |
+
#: facebook-commerce.php:1687
|
95 |
Â
#. translators: Placeholders %1$s - original error message from Facebook API
|
96 |
Â
msgid "There was an issue connecting to the Facebook API: %1$s"
|
97 |
Â
msgstr ""
|
98 |
Â
|
99 |
+
#: facebook-commerce.php:2024
|
100 |
Â
msgid "Your connection has expired."
|
101 |
Â
msgstr ""
|
102 |
Â
|
103 |
+
#: facebook-commerce.php:2024
|
104 |
Â
msgid ""
|
105 |
Â
"Please click Manage connection > Advanced Options > Update Token to refresh "
|
106 |
Â
"your connection to Facebook."
|
107 |
Â
msgstr ""
|
108 |
Â
|
109 |
+
#: facebook-commerce.php:2031
|
110 |
Â
#. translators: Placeholders %s - error message
|
111 |
Â
msgid "There was an error trying to sync the products to Facebook. %s"
|
112 |
Â
msgstr ""
|
113 |
Â
|
114 |
+
#: facebook-commerce.php:2054 facebook-commerce.php:2227
|
115 |
Â
msgid "Product sync is disabled."
|
116 |
Â
msgstr ""
|
117 |
Â
|
118 |
+
#: facebook-commerce.php:2061 facebook-commerce.php:2234
|
119 |
Â
msgid "The plugin is not configured or the Catalog ID is missing."
|
120 |
Â
msgstr ""
|
121 |
Â
|
122 |
+
#: facebook-commerce.php:2084
|
123 |
Â
msgid ""
|
124 |
Â
"A product sync is in progress. Please wait until the sync finishes before "
|
125 |
Â
"starting a new one."
|
126 |
Â
msgstr ""
|
127 |
Â
|
128 |
+
#: facebook-commerce.php:2096 facebook-commerce.php:2248
|
129 |
Â
msgid ""
|
130 |
Â
"We've detected that your Facebook Product Catalog is no longer valid. This "
|
131 |
Â
"may happen if it was deleted, but could also be a temporary error. If the "
|
133 |
Â
"and setup the plugin again."
|
134 |
Â
msgstr ""
|
135 |
Â
|
136 |
+
#: facebook-commerce.php:2272
|
137 |
Â
msgid "We couldn't create the feed or upload the product information."
|
138 |
Â
msgstr ""
|
139 |
Â
|
140 |
+
#: facebook-commerce.php:2740
|
141 |
Â
msgid "Hi! We're here to answer any questions you may have."
|
142 |
Â
msgstr ""
|
143 |
Â
|
144 |
+
#: facebook-commerce.php:3087
|
145 |
Â
msgid "Facebook for WooCommerce error:"
|
146 |
Â
msgstr ""
|
147 |
Â
|
148 |
+
#: facebook-commerce.php:3169
|
149 |
Â
msgid ""
|
150 |
Â
"There was an error trying to retrieve information about the Facebook page: "
|
151 |
Â
"%s"
|
152 |
Â
msgstr ""
|
153 |
Â
|
154 |
+
#: facebook-commerce.php:3220
|
155 |
Â
msgid "Get started with Messenger Customer Chat"
|
156 |
Â
msgstr ""
|
157 |
Â
|
158 |
+
#: facebook-commerce.php:3221
|
159 |
Â
msgid "Get started with Instagram Shopping"
|
160 |
Â
msgstr ""
|
161 |
Â
|
162 |
+
#: facebook-commerce.php:3456
|
163 |
Â
#. translators: Placeholders %1$s - original error message from Facebook API
|
164 |
Â
msgid "There was an issue connecting to the Facebook API: %s"
|
165 |
Â
msgstr ""
|
166 |
Â
|
167 |
+
#: includes/AJAX.php:81
|
168 |
+
msgid "Invalid nonce."
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: includes/AJAX.php:88
|
172 |
+
msgid "Order ID is required."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: includes/AJAX.php:92
|
176 |
+
msgid "Cancel reason is required."
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: includes/AJAX.php:98
|
180 |
+
msgid "A valid Order ID is required."
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: includes/AJAX.php:177
|
184 |
+
msgid "Order ID is required"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: includes/AJAX.php:181
|
188 |
+
msgid "Tracking number is required"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: includes/AJAX.php:185
|
192 |
+
msgid "Carrier code is required"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: includes/AJAX.php:191
|
196 |
+
msgid "Order not found"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: includes/AJAX.php:332 includes/AJAX.php:401
|
200 |
Â
msgid "Go to Settings"
|
201 |
Â
msgstr ""
|
202 |
Â
|
203 |
+
#: includes/AJAX.php:337 includes/AJAX.php:406 includes/AJAX.php:470
|
204 |
+
#: includes/Admin/Orders.php:260 includes/Admin/Product_Categories.php:118
|
205 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:144
|
206 |
Â
msgid "Cancel"
|
207 |
Â
msgstr ""
|
208 |
Â
|
209 |
+
#: includes/AJAX.php:345
|
210 |
Â
#. translators: Placeholder %s - <br/> tag
|
211 |
Â
msgid ""
|
212 |
Â
"This product belongs to a category or tag that is excluded from the "
|
215 |
Â
"or click Cancel and update the product's category / tag assignments."
|
216 |
Â
msgstr ""
|
217 |
Â
|
218 |
+
#: includes/AJAX.php:412
|
219 |
Â
msgid ""
|
220 |
Â
"One or more of the selected products belongs to a category or tag that is "
|
221 |
Â
"excluded from the Facebook catalog sync. To sync these products to "
|
223 |
Â
"settings."
|
224 |
Â
msgstr ""
|
225 |
Â
|
226 |
+
#: includes/AJAX.php:464
|
227 |
Â
msgid "Exclude Products"
|
228 |
Â
msgstr ""
|
229 |
Â
|
230 |
+
#: includes/AJAX.php:478
|
231 |
Â
#. translators: Placeholder %s - <br/> tags
|
232 |
Â
msgid ""
|
233 |
Â
"The categories and/or tags that you have selected to exclude from sync "
|
240 |
Â
msgid "Save changes"
|
241 |
Â
msgstr ""
|
242 |
Â
|
243 |
+
#: includes/Admin/Enhanced_Catalog_Attribute_Fields.php:103
|
244 |
+
msgid "Show advanced options"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: includes/Admin/Orders.php:150
|
248 |
+
msgid "An unknown error occurred."
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: includes/Admin/Orders.php:151
|
252 |
+
msgid "Tracking Number is missing."
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: includes/Admin/Orders.php:152
|
256 |
+
msgid "Refund reason:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/Admin/Orders.php:153
|
260 |
+
msgid "Choose the reason for refunding this order."
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: includes/Admin/Orders.php:154
|
264 |
+
msgid "Refund description (optional):"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: includes/Admin/Orders.php:155
|
268 |
+
msgid "Note: the refund description will be visible by the customer."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: includes/Admin/Orders.php:182
|
272 |
+
#. translators: Placeholders: %1$s - HTML <strong> tag, %2$s - HTML </strong>
|
273 |
+
#. tag
|
274 |
+
msgid ""
|
275 |
+
"This order is currently being held by Instagram and cannot be edited. Once "
|
276 |
+
"released by Instagram, it will move to %1$sProcessing%2$s or "
|
277 |
+
"%1$sCancelled%2$s status."
|
278 |
+
msgstr ""
|
279 |
+
|
280 |
+
#: includes/Admin/Orders.php:281
|
281 |
+
msgid "Select the carrier and tracking number for this order:"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: includes/Admin/Orders.php:285
|
285 |
+
msgid "Carrier"
|
286 |
+
msgstr ""
|
287 |
+
|
288 |
+
#: includes/Admin/Orders.php:291
|
289 |
+
msgid "Tracking number"
|
290 |
+
msgstr ""
|
291 |
+
|
292 |
+
#: includes/Admin/Orders.php:309
|
293 |
+
msgid "Submit order"
|
294 |
+
msgstr ""
|
295 |
+
|
296 |
+
#: includes/Admin/Orders.php:325
|
297 |
+
msgid "Select a reason for refunding this order:"
|
298 |
+
msgstr ""
|
299 |
+
|
300 |
+
#: includes/Admin/Orders.php:343
|
301 |
+
msgid "Submit refund"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
#: includes/Admin/Orders.php:359
|
305 |
+
msgid "Select a reason for cancelling this order:"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: includes/Admin/Orders.php:381
|
309 |
+
msgid "Submit cancellation"
|
310 |
+
msgstr ""
|
311 |
+
|
312 |
+
#: includes/Admin/Orders.php:400
|
313 |
+
msgid "Customer request"
|
314 |
+
msgstr ""
|
315 |
+
|
316 |
+
#: includes/Admin/Orders.php:401
|
317 |
+
msgid "Damaged product"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: includes/Admin/Orders.php:402
|
321 |
+
msgid "Product not as described"
|
322 |
+
msgstr ""
|
323 |
+
|
324 |
+
#: includes/Admin/Orders.php:403
|
325 |
+
msgid "Quality issue"
|
326 |
+
msgstr ""
|
327 |
+
|
328 |
+
#: includes/Admin/Orders.php:404
|
329 |
+
msgid "Wrong item"
|
330 |
+
msgstr ""
|
331 |
+
|
332 |
+
#: includes/Admin/Orders.php:405 includes/Commerce/Orders.php:843
|
333 |
+
msgid "Other"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: includes/Admin/Product_Categories.php:99
|
337 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:108
|
338 |
+
msgid ""
|
339 |
+
"Products and categories that inherit this global setting (i.e. they do not "
|
340 |
+
"have a specific Google product category set) will use the new default "
|
341 |
+
"immediately. Are you sure you want to proceed?"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: includes/Admin/Product_Categories.php:122
|
345 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:148
|
346 |
+
msgid "Update default Google product category"
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: includes/Admin/Product_Categories.php:163
|
350 |
+
msgid ""
|
351 |
+
"Facebook catalogs now support category specific fields, to make best use of "
|
352 |
+
"them you need to select a category. WooCommerce uses the google taxonomy as "
|
353 |
+
"it is the most widely accepted form of categorisation."
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/Admin/Product_Categories.php:214
|
357 |
+
msgid ""
|
358 |
+
"Choose a default Google product category for products in this category. "
|
359 |
+
"Products need at least two category levels defined for tax to be correctly "
|
360 |
+
"applied."
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: includes/Admin/Product_Categories.php:232
|
364 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:318
|
365 |
+
msgid "Default Google product category"
|
366 |
+
msgstr ""
|
367 |
+
|
368 |
+
#: includes/Admin/Product_Categories.php:349
|
369 |
+
msgid "Select default values for enhanced attributes within this category"
|
370 |
+
msgstr ""
|
371 |
+
|
372 |
+
#: includes/Admin/Product_Categories.php:367 includes/Admin/Products.php:114
|
373 |
+
msgid "Category Specific Attributes"
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: includes/Admin/Products.php:96
|
377 |
+
msgid "Select values for enhanced attributes for this product"
|
378 |
+
msgstr ""
|
379 |
+
|
380 |
+
#: includes/Admin/Products.php:135
|
381 |
+
msgid "Google product category"
|
382 |
+
msgstr ""
|
383 |
+
|
384 |
+
#: includes/Admin/Products.php:136
|
385 |
+
msgid ""
|
386 |
+
"Choose the Google product category and (optionally) sub-categories "
|
387 |
+
"associated with this product."
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: includes/Admin/Products.php:209
|
391 |
+
msgid "Sell on Instagram"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: includes/Admin/Products.php:211
|
395 |
+
msgid ""
|
396 |
+
"Enable to sell this product on Instagram. Products that are hidden in the "
|
397 |
+
"Facebook catalog can be synced, but won’t be available for purchase."
|
398 |
+
msgstr ""
|
399 |
+
|
400 |
+
#: includes/Admin/Products.php:221
|
401 |
+
msgid "This product does not meet the requirements to sell on Instagram."
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: includes/Admin/Products.php:222
|
405 |
+
msgid "Click here to learn more."
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: includes/Admin/Products.php:231
|
409 |
+
#. translators: Placeholders %1$s - strong opening tag, %2$s - strong closing
|
410 |
+
#. tag
|
411 |
+
msgid ""
|
412 |
+
"To sell this product on Instagram, at least one variation must be synced to "
|
413 |
+
"Facebook. You can control variation sync on the %1$sVariations%2$s tab with "
|
414 |
+
"the %1$sFacebook Sync%2$s setting."
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
Â
#. Author of the plugin/theme
|
418 |
Â
msgid "Facebook"
|
419 |
Â
msgstr ""
|
426 |
Â
msgid "Your settings have been saved."
|
427 |
Â
msgstr ""
|
428 |
Â
|
429 |
+
#: includes/Admin/Settings.php:147
|
430 |
Â
#. translators: Placeholders: %s - user-friendly error message
|
431 |
Â
msgid "Your settings could not be saved. %s"
|
432 |
Â
msgstr ""
|
566 |
Â
|
567 |
Â
#: includes/Admin/Settings_Screens/Product_Sync.php:42
|
568 |
Â
#: includes/Admin/Settings_Screens/Product_Sync.php:43
|
569 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:169
|
570 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:264
|
571 |
Â
msgid "Product sync"
|
572 |
Â
msgstr ""
|
573 |
Â
|
574 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:73
|
575 |
Â
#. translators: Placeholders: {count} number of remaining items
|
576 |
Â
msgid "{count} item remaining."
|
577 |
Â
msgid_plural "{count} items remaining."
|
578 |
Â
msgstr[0] ""
|
579 |
Â
msgstr[1] ""
|
580 |
Â
|
581 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:85
|
582 |
Â
#. translators: Placeholders %s - html code for a spinner icon
|
583 |
Â
msgid "Your products will now be resynced to Facebook, this may take some time."
|
584 |
Â
msgstr ""
|
585 |
Â
|
586 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:86
|
587 |
Â
msgid ""
|
588 |
Â
"Facebook for WooCommerce automatically syncs your products on "
|
589 |
Â
"create/update. Are you sure you want to force product resync?\n"
|
593 |
Â
"did not sync."
|
594 |
Â
msgstr ""
|
595 |
Â
|
596 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:87
|
597 |
Â
msgid "Your products are syncing - you may safely leave this page %s"
|
598 |
Â
msgstr ""
|
599 |
Â
|
600 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:90
|
601 |
Â
msgid "There was an error trying to sync the products to Facebook."
|
602 |
Â
msgstr ""
|
603 |
Â
|
604 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:91
|
605 |
Â
msgid ""
|
606 |
Â
"Something went wrong while uploading the product information, please try "
|
607 |
Â
"again."
|
608 |
Â
msgstr ""
|
609 |
Â
|
610 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:123
|
611 |
+
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag
|
612 |
+
msgid ""
|
613 |
+
"Products and categories that inherit this global setting (they do not have "
|
614 |
+
"a specific Google product category set) will use the new default "
|
615 |
+
"immediately. %1$sIf you have cleared the Google Product Category%2$s, "
|
616 |
+
"items inheriting the default will not be available for Instagram checkout. "
|
617 |
+
"Are you sure you want to proceed?"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:177
|
621 |
Â
msgid "Sync products"
|
622 |
Â
msgstr ""
|
623 |
Â
|
624 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:269
|
625 |
Â
msgid "Enable product sync"
|
626 |
Â
msgstr ""
|
627 |
Â
|
628 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:277
|
629 |
Â
msgid "Exclude categories from sync"
|
630 |
Â
msgstr ""
|
631 |
Â
|
632 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:281
|
633 |
Â
msgid "Products in one or more of these categories will not sync to Facebook."
|
634 |
Â
msgstr ""
|
635 |
Â
|
636 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:285
|
637 |
Â
msgid "Search for a product category…"
|
638 |
Â
msgstr ""
|
639 |
Â
|
640 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:291
|
641 |
Â
msgid "Exclude tags from sync"
|
642 |
Â
msgstr ""
|
643 |
Â
|
644 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:295
|
645 |
Â
msgid "Products with one or more of these tags will not sync to Facebook."
|
646 |
Â
msgstr ""
|
647 |
Â
|
648 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:299
|
649 |
Â
msgid "Search for a product tag…"
|
650 |
Â
msgstr ""
|
651 |
Â
|
652 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:305
|
653 |
Â
msgid "Product description sync"
|
654 |
Â
msgstr ""
|
655 |
Â
|
656 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:308
|
657 |
Â
msgid "Choose which product description to display in the Facebook catalog."
|
658 |
Â
msgstr ""
|
659 |
Â
|
660 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:311
|
661 |
Â
msgid "Standard description"
|
662 |
Â
msgstr ""
|
663 |
Â
|
664 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:312
|
665 |
Â
msgid "Short description"
|
666 |
Â
msgstr ""
|
667 |
Â
|
668 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:319
|
669 |
+
msgid ""
|
670 |
+
"Choose a default Google product category for your products. Defaults can "
|
671 |
+
"also be set for product categories. Products need at least two category "
|
672 |
+
"levels defined for tax to be correctly applied."
|
673 |
+
msgstr ""
|
674 |
+
|
675 |
+
#: includes/Admin/Settings_Screens/Product_Sync.php:365
|
676 |
Â
#. translators: Placeholders: %1$s - <a> tag, %2$s - </a> tag
|
677 |
Â
msgid "Please %1$sconnect to Facebook%2$s to enable and manage product sync."
|
678 |
Â
msgstr ""
|
679 |
Â
|
680 |
+
#: includes/Admin.php:150
|
681 |
+
msgid ""
|
682 |
+
"Please enter a Google product category and at least one sub-category to "
|
683 |
+
"sell this product on Instagram."
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: includes/Admin.php:172
|
687 |
+
msgid "Search main categories..."
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: includes/Admin.php:173
|
691 |
+
msgid "Choose a main category"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: includes/Admin.php:174
|
695 |
+
msgid "Choose a category"
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: includes/Admin.php:213
|
699 |
+
msgid ""
|
700 |
+
"To sell this product on Instagram, please ensure it meets the following "
|
701 |
+
"requirements:"
|
702 |
+
msgstr ""
|
703 |
+
|
704 |
+
#: includes/Admin.php:216
|
705 |
+
msgid "Has a price defined"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: includes/Admin.php:219
|
709 |
+
#. translators: Placeholders: %1$s - <strong> opening HTML tag, %2$s -
|
710 |
+
#. </strong> closing HTML tag
|
711 |
+
msgid "Has %1$sManage Stock%2$s enabled on the %1$sInventory%2$s tab"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: includes/Admin.php:225
|
715 |
+
#. translators: Placeholders: %1$s - <strong> opening HTML tag, %2$s -
|
716 |
+
#. </strong> closing HTML tag
|
717 |
+
msgid ""
|
718 |
+
"Has the %1$sFacebook Sync%2$s setting set to \"Sync and show\" or \"Sync "
|
719 |
+
"and hide\""
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: includes/Admin.php:251
|
723 |
+
msgid "Close"
|
724 |
+
msgstr ""
|
725 |
+
|
726 |
+
#: includes/Admin.php:296 includes/Admin.php:1140 includes/Admin.php:1275
|
727 |
Â
msgid "Facebook sync"
|
728 |
Â
msgstr ""
|
729 |
Â
|
730 |
+
#: includes/Admin.php:323 includes/Admin.php:355
|
731 |
Â
msgid "Sync and show"
|
732 |
Â
msgstr ""
|
733 |
Â
|
734 |
+
#: includes/Admin.php:325 includes/Admin.php:356
|
735 |
Â
msgid "Sync and hide"
|
736 |
Â
msgstr ""
|
737 |
Â
|
738 |
+
#: includes/Admin.php:330 includes/Admin.php:357 includes/Admin.php:1144
|
739 |
+
#: includes/Admin.php:1279
|
740 |
Â
msgid "Do not sync"
|
741 |
Â
msgstr ""
|
742 |
Â
|
743 |
+
#: includes/Admin.php:354
|
744 |
Â
msgid "Filter by Facebook sync setting"
|
745 |
Â
msgstr ""
|
746 |
Â
|
747 |
+
#: includes/Admin.php:767
|
748 |
Â
msgid "Include in Facebook sync"
|
749 |
Â
msgstr ""
|
750 |
Â
|
751 |
+
#: includes/Admin.php:768
|
752 |
Â
msgid "Exclude from Facebook sync"
|
753 |
Â
msgstr ""
|
754 |
Â
|
755 |
+
#: includes/Admin.php:961
|
756 |
Â
#. translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s -
|
757 |
Â
#. <a> tag, %4$s - <a> tag
|
758 |
Â
msgid ""
|
766 |
Â
msgstr[0] ""
|
767 |
Â
msgstr[1] ""
|
768 |
Â
|
769 |
+
#: includes/Admin.php:968
|
770 |
Â
msgid "Don't show this notice again"
|
771 |
Â
msgstr ""
|
772 |
Â
|
773 |
+
#: includes/Admin.php:1002
|
774 |
Â
#. translators: Placeholders: %1$s - number of affected products, %2$s opening
|
775 |
Â
#. HTML <a> tag, %3$s - closing HTML </a> tag, %4$s - opening HTML <a> tag,
|
776 |
Â
#. %5$s - closing HTML </a> tag
|
787 |
Â
msgstr[0] ""
|
788 |
Â
msgstr[1] ""
|
789 |
Â
|
790 |
+
#: includes/Admin.php:1068
|
791 |
Â
#. translators: Placeholders: %1$s - opening HTML <strong> tag, %2$s - closing
|
792 |
Â
#. HTML </strong> tag, %3$s - opening HTML <a> tag, %4$s - closing HTML </a>
|
793 |
Â
#. tag
|
797 |
Â
"your Facebook catalog. You may still advertise Virtual products on Facebook."
|
798 |
Â
msgstr ""
|
799 |
Â
|
800 |
+
#: includes/Admin.php:1142 includes/Admin.php:1277
|
801 |
Â
msgid "Sync and show in catalog"
|
802 |
Â
msgstr ""
|
803 |
Â
|
804 |
+
#: includes/Admin.php:1143 includes/Admin.php:1278
|
805 |
Â
msgid "Sync and hide in catalog"
|
806 |
Â
msgstr ""
|
807 |
Â
|
808 |
+
#: includes/Admin.php:1153 includes/Admin.php:1291
|
809 |
Â
msgid "Facebook Description"
|
810 |
Â
msgstr ""
|
811 |
Â
|
812 |
+
#: includes/Admin.php:1155 includes/Admin.php:1293
|
813 |
Â
msgid ""
|
814 |
Â
"Custom (plain-text only) description for product on Facebook. If blank, "
|
815 |
Â
"product description will be used. If product description is blank, "
|
816 |
Â
"shortname will be used."
|
817 |
Â
msgstr ""
|
818 |
Â
|
819 |
+
#: includes/Admin.php:1166 includes/Admin.php:1306
|
820 |
Â
msgid "Facebook Product Image"
|
821 |
Â
msgstr ""
|
822 |
Â
|
823 |
+
#: includes/Admin.php:1168 includes/Admin.php:1308
|
824 |
Â
msgid ""
|
825 |
Â
"Choose the product image that should be synced to the Facebook catalog for "
|
826 |
Â
"this product. If using a custom image, please enter an absolute URL (e.g. "
|
827 |
Â
"https://domain.com/image.jpg)."
|
828 |
Â
msgstr ""
|
829 |
Â
|
830 |
+
#: includes/Admin.php:1170
|
831 |
Â
msgid "Use WooCommerce image"
|
832 |
Â
msgstr ""
|
833 |
Â
|
834 |
+
#: includes/Admin.php:1171 includes/Admin.php:1312
|
835 |
Â
msgid "Use custom image"
|
836 |
Â
msgstr ""
|
837 |
Â
|
838 |
+
#: includes/Admin.php:1182 includes/Admin.php:1324
|
839 |
Â
msgid "Custom Image URL"
|
840 |
Â
msgstr ""
|
841 |
Â
|
842 |
+
#: includes/Admin.php:1193 includes/Admin.php:1337
|
843 |
Â
#. translators: Placeholders %1$s - WC currency symbol
|
844 |
Â
msgid "Facebook Price (%1$s)"
|
845 |
Â
msgstr ""
|
846 |
Â
|
847 |
+
#: includes/Admin.php:1197 includes/Admin.php:1341
|
848 |
Â
msgid ""
|
849 |
Â
"Custom price for product on Facebook. Please enter in monetary decimal (.) "
|
850 |
Â
"format without thousand separators and currency symbols. If blank, product "
|
851 |
Â
"price will be used."
|
852 |
Â
msgstr ""
|
853 |
Â
|
854 |
+
#: includes/Admin.php:1310
|
855 |
Â
msgid "Use variation image"
|
856 |
Â
msgstr ""
|
857 |
Â
|
858 |
+
#: includes/Admin.php:1311
|
859 |
Â
msgid "Use parent image"
|
860 |
Â
msgstr ""
|
861 |
Â
|
862 |
+
#: includes/Admin.php:1464
|
863 |
Â
msgid "Close modal panel"
|
864 |
Â
msgstr ""
|
865 |
Â
|
866 |
+
#: includes/Commerce/Orders.php:425
|
867 |
+
#. translators: Placeholders: %1$s - order remote id, %2$s - order created by
|
868 |
+
msgid "Order %1$s paid in %2$s"
|
869 |
+
msgstr ""
|
870 |
+
|
871 |
+
#: includes/Commerce/Orders.php:576 includes/Commerce/Orders.php:803
|
872 |
+
msgid "Remote ID not found."
|
873 |
+
msgstr ""
|
874 |
+
|
875 |
+
#: includes/Commerce/Orders.php:583
|
876 |
+
msgid "%s is not a valid shipping carrier code."
|
877 |
+
msgstr ""
|
878 |
+
|
879 |
+
#: includes/Commerce/Orders.php:601 includes/Commerce/Orders.php:770
|
880 |
+
msgid "No valid Facebook products were found."
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: includes/Commerce/Orders.php:618
|
884 |
+
#. translators: Placeholder: %s - sales channel name, like Facebook or
|
885 |
+
#. Instagram
|
886 |
+
msgid "%s order fulfilled."
|
887 |
+
msgstr ""
|
888 |
+
|
889 |
+
#: includes/Commerce/Orders.php:626
|
890 |
+
#. translators: Placeholders: %1$s - sales channel name, like Facebook or
|
891 |
+
#. Instagram, %2$s - error message
|
892 |
+
msgid "%1$s order could not be fulfilled. %2$s"
|
893 |
+
msgstr ""
|
894 |
+
|
895 |
+
#: includes/Commerce/Orders.php:669
|
896 |
+
msgid "Parent order not found."
|
897 |
+
msgstr ""
|
898 |
+
|
899 |
+
#: includes/Commerce/Orders.php:675
|
900 |
+
msgid "Remote ID for parent order not found."
|
901 |
+
msgstr ""
|
902 |
+
|
903 |
+
#: includes/Commerce/Orders.php:705
|
904 |
+
#. translators: Placeholder: %s - sales channel name, like Facebook or
|
905 |
+
#. Instagram
|
906 |
+
msgid "Order refunded on %s."
|
907 |
+
msgstr ""
|
908 |
+
|
909 |
+
#: includes/Commerce/Orders.php:715
|
910 |
+
#. translators: Placeholders: %1$s - sales channel name, like Facebook or
|
911 |
+
#. Instagram, %2$s - error message
|
912 |
+
msgid "Could not refund %1$s order: %2$s"
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: includes/Commerce/Orders.php:810
|
916 |
+
#. translators: Placeholder: %s - sales channel name, like Facebook or
|
917 |
+
#. Instagram
|
918 |
+
msgid "%s order cancelled."
|
919 |
+
msgstr ""
|
920 |
+
|
921 |
+
#: includes/Commerce/Orders.php:818
|
922 |
+
#. translators: Placeholders: %1$s - sales channel name, like Facebook or
|
923 |
+
#. Instagram, %2$s - error message
|
924 |
+
msgid "%1$s order could not be cancelled. %2$s"
|
925 |
+
msgstr ""
|
926 |
+
|
927 |
+
#: includes/Commerce/Orders.php:839
|
928 |
+
msgid "Customer requested cancellation"
|
929 |
+
msgstr ""
|
930 |
+
|
931 |
+
#: includes/Commerce/Orders.php:840
|
932 |
+
msgid "Product(s) are out of stock"
|
933 |
+
msgstr ""
|
934 |
+
|
935 |
+
#: includes/Commerce/Orders.php:841
|
936 |
+
msgid "Customer address is invalid"
|
937 |
+
msgstr ""
|
938 |
+
|
939 |
+
#: includes/Commerce/Orders.php:842
|
940 |
+
msgid "Suspicious order"
|
941 |
Â
msgstr ""
|
942 |
Â
|
943 |
Â
#: includes/Handlers/Connection.php:275
|
944 |
+
msgid "Connection complete! Thanks for using Facebook for WooCommerce."
|
945 |
+
msgstr ""
|
946 |
+
|
947 |
+
#: includes/Handlers/Connection.php:301
|
948 |
Â
msgid "You do not have permission to uninstall Facebook Business Extension."
|
949 |
Â
msgstr ""
|
950 |
Â
|
951 |
+
#: includes/Handlers/Connection.php:311
|
952 |
Â
msgid "Uninstall successful"
|
953 |
Â
msgstr ""
|
954 |
Â
|
955 |
+
#: includes/Handlers/Connection.php:317
|
956 |
Â
msgid "Uninstall unsuccessful. Please try again."
|
957 |
Â
msgstr ""
|
958 |
Â
|
959 |
+
#: includes/Handlers/Connection.php:372
|
960 |
+
#. translators: Placeholders: %s - API error message
|
961 |
+
msgid "Could not retrieve page access data. %s"
|
962 |
+
msgstr ""
|
963 |
+
|
964 |
+
#: includes/Handlers/Connection.php:384
|
965 |
+
#. translators: Placeholders: %s - Facebook page ID
|
966 |
+
msgid "Page %s not authorized."
|
967 |
+
msgstr ""
|
968 |
+
|
969 |
Â
#: includes/Products/Sync/Background.php:65
|
970 |
Â
msgid "Job data key \"%s\" not set"
|
971 |
Â
msgstr ""
|
includes/AJAX.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
Â
|
13 |
Â
use SkyVerge\WooCommerce\Facebook\Admin\Settings_Screens\Product_Sync;
|
Â
|
|
14 |
Â
|
15 |
Â
defined( 'ABSPATH' ) or exit;
|
16 |
Â
|
@@ -22,6 +23,16 @@ defined( 'ABSPATH' ) or exit;
|
|
22 |
Â
class AJAX {
|
23 |
Â
|
24 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
25 |
Â
/**
|
26 |
Â
* AJAX handler constructor.
|
27 |
Â
*
|
@@ -41,6 +52,153 @@ class AJAX {
|
|
41 |
Â
|
42 |
Â
// get the current sync status
|
43 |
Â
add_action( 'wp_ajax_wc_facebook_get_sync_status', [ $this, 'get_sync_status' ] );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
44 |
Â
}
|
45 |
Â
|
46 |
Â
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
Â
|
13 |
Â
use SkyVerge\WooCommerce\Facebook\Admin\Settings_Screens\Product_Sync;
|
14 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
15 |
Â
|
16 |
Â
defined( 'ABSPATH' ) or exit;
|
17 |
Â
|
23 |
Â
class AJAX {
|
24 |
Â
|
25 |
Â
|
26 |
+
/** @var string the product attribute search AJAX action */
|
27 |
+
const ACTION_SEARCH_PRODUCT_ATTRIBUTES = 'wc_facebook_search_product_attributes';
|
28 |
+
|
29 |
+
/** @var string facebook order cancel AJAX action */
|
30 |
+
const ACTION_CANCEL_ORDER = 'wc_facebook_cancel_order';
|
31 |
+
|
32 |
+
/** @var string the complete order AJAX action */
|
33 |
+
const ACTION_COMPLETE_ORDER = 'wc_facebook_complete_order';
|
34 |
+
|
35 |
+
|
36 |
Â
/**
|
37 |
Â
* AJAX handler constructor.
|
38 |
Â
*
|
52 |
Â
|
53 |
Â
// get the current sync status
|
54 |
Â
add_action( 'wp_ajax_wc_facebook_get_sync_status', [ $this, 'get_sync_status' ] );
|
55 |
+
|
56 |
+
// search a product's attributes for the given term
|
57 |
+
add_action( 'wp_ajax_' . self::ACTION_SEARCH_PRODUCT_ATTRIBUTES, [ $this, 'admin_search_product_attributes' ] );
|
58 |
+
|
59 |
+
// complete a Facebook order for the given order ID
|
60 |
+
add_action( 'wp_ajax_' . self::ACTION_COMPLETE_ORDER, [ $this, 'admin_complete_order' ] );
|
61 |
+
|
62 |
+
// cancel facebook order by the given order ID
|
63 |
+
add_action( 'wp_ajax_' . self::ACTION_CANCEL_ORDER, [ $this, 'admin_cancel_order' ] );
|
64 |
+
}
|
65 |
+
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Cancels a Facebook order by the given order ID.
|
69 |
+
*
|
70 |
+
* @internal
|
71 |
+
*
|
72 |
+
* @since 2.1.0
|
73 |
+
*/
|
74 |
+
public function admin_cancel_order() {
|
75 |
+
|
76 |
+
$order = null;
|
77 |
+
|
78 |
+
try {
|
79 |
+
|
80 |
+
if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'security' ), self::ACTION_CANCEL_ORDER ) ) {
|
81 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Invalid nonce.', 'facebook-for-woocommerce' ) );
|
82 |
+
}
|
83 |
+
|
84 |
+
$order_id = Framework\SV_WC_Helper::get_posted_value( 'order_id' );
|
85 |
+
$reason_code = Framework\SV_WC_Helper::get_posted_value( 'reason_code' );
|
86 |
+
|
87 |
+
if ( empty( $order_id ) ) {
|
88 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Order ID is required.', 'facebook-for-woocommerce' ) );
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( empty( $reason_code ) ) {
|
92 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Cancel reason is required.', 'facebook-for-woocommerce' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
$order = wc_get_order( absint( $order_id ) );
|
96 |
+
|
97 |
+
if ( false === $order ) {
|
98 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'A valid Order ID is required.', 'facebook-for-woocommerce' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
facebook_for_woocommerce()->get_commerce_handler()->get_orders_handler()->cancel_order( $order, $reason_code );
|
102 |
+
|
103 |
+
wp_send_json_success();
|
104 |
+
|
105 |
+
} catch ( Framework\SV_WC_Plugin_Exception $exception ) {
|
106 |
+
|
107 |
+
wp_send_json_error( $exception->getMessage() );
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Searches a product's attributes for the given term.
|
114 |
+
*
|
115 |
+
* @internal
|
116 |
+
*
|
117 |
+
* @since 2.1.0
|
118 |
+
*/
|
119 |
+
public function admin_search_product_attributes() {
|
120 |
+
|
121 |
+
try {
|
122 |
+
|
123 |
+
if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_requested_value( 'security' ), self::ACTION_SEARCH_PRODUCT_ATTRIBUTES ) ) {
|
124 |
+
throw new Framework\SV_WC_Plugin_Exception( 'Invalid nonce' );
|
125 |
+
}
|
126 |
+
|
127 |
+
$term = Framework\SV_WC_Helper::get_requested_value( 'term' );
|
128 |
+
|
129 |
+
if ( ! $term ) {
|
130 |
+
throw new Framework\SV_WC_Plugin_Exception( 'A search term is required' );
|
131 |
+
}
|
132 |
+
|
133 |
+
$product = wc_get_product( (int) Framework\SV_WC_Helper::get_requested_value( 'request_data' ) );
|
134 |
+
|
135 |
+
if ( ! $product instanceof \WC_Product ) {
|
136 |
+
throw new Framework\SV_WC_Plugin_Exception( 'A valid product ID is required' );
|
137 |
+
}
|
138 |
+
|
139 |
+
$attributes = Admin\Products::get_available_product_attribute_names( $product );
|
140 |
+
|
141 |
+
// filter out any attributes whose slug or proper name don't at least partially match the search term
|
142 |
+
$results = array_filter( $attributes, function( $name, $slug ) use ( $term ) {
|
143 |
+
|
144 |
+
return false !== stripos( $name, $term ) || false !== stripos( $slug, $term );
|
145 |
+
|
146 |
+
}, ARRAY_FILTER_USE_BOTH );
|
147 |
+
|
148 |
+
wp_send_json( $results );
|
149 |
+
|
150 |
+
} catch ( Framework\SV_WC_Plugin_Exception $exception ) {
|
151 |
+
|
152 |
+
die();
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Completes a Facebook order for the given order ID.
|
159 |
+
*
|
160 |
+
* @internal
|
161 |
+
*
|
162 |
+
* @since 2.1.0
|
163 |
+
*/
|
164 |
+
public function admin_complete_order() {
|
165 |
+
|
166 |
+
try {
|
167 |
+
|
168 |
+
if ( ! wp_verify_nonce( Framework\SV_WC_Helper::get_posted_value( 'nonce' ), self::ACTION_COMPLETE_ORDER ) ) {
|
169 |
+
throw new Framework\SV_WC_Plugin_Exception( 'Invalid nonce', 403 );
|
170 |
+
}
|
171 |
+
|
172 |
+
$order_id = (int) Framework\SV_WC_Helper::get_posted_value( 'order_id' );
|
173 |
+
$tracking_number = wc_clean( Framework\SV_WC_Helper::get_posted_value( 'tracking_number' ) );
|
174 |
+
$carrier_code = wc_clean( Framework\SV_WC_Helper::get_posted_value( 'carrier_code' ) );
|
175 |
+
|
176 |
+
if ( empty( $order_id ) ) {
|
177 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Order ID is required', 'facebook-for-woocommerce' ) );
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( empty( $tracking_number ) ) {
|
181 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Tracking number is required', 'facebook-for-woocommerce' ) );
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( empty( $carrier_code ) ) {
|
185 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Carrier code is required', 'facebook-for-woocommerce' ) );
|
186 |
+
}
|
187 |
+
|
188 |
+
$order = wc_get_order( $order_id );
|
189 |
+
|
190 |
+
if ( ! $order instanceof \WC_Order ) {
|
191 |
+
throw new Framework\SV_WC_Plugin_Exception( __( 'Order not found', 'facebook-for-woocommerce' ) );
|
192 |
+
}
|
193 |
+
|
194 |
+
facebook_for_woocommerce()->get_commerce_handler()->get_orders_handler()->fulfill_order( $order, $tracking_number, $carrier_code );
|
195 |
+
|
196 |
+
wp_send_json_success();
|
197 |
+
|
198 |
+
} catch ( Framework\SV_WC_Plugin_Exception $exception ) {
|
199 |
+
|
200 |
+
wp_send_json_error( $exception->getMessage(), $exception->getCode() );
|
201 |
+
}
|
202 |
Â
}
|
203 |
Â
|
204 |
Â
|
includes/API.php
CHANGED
@@ -12,6 +12,7 @@ namespace SkyVerge\WooCommerce\Facebook;
|
|
12 |
Â
|
13 |
Â
defined( 'ABSPATH' ) or exit;
|
14 |
Â
|
Â
|
|
15 |
Â
use SkyVerge\WooCommerce\Facebook\API\Request;
|
16 |
Â
use SkyVerge\WooCommerce\Facebook\API\Response;
|
17 |
Â
use SkyVerge\WooCommerce\Facebook\Events\Event;
|
@@ -22,7 +23,7 @@ use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
|
22 |
Â
*
|
23 |
Â
* @since 2.0.0
|
24 |
Â
*
|
25 |
-
* @method
|
26 |
Â
*/
|
27 |
Â
class API extends Framework\SV_WC_API_Base {
|
28 |
Â
|
@@ -41,6 +42,8 @@ class API extends Framework\SV_WC_API_Base {
|
|
41 |
Â
* Constructor.
|
42 |
Â
*
|
43 |
Â
* @since 2.0.0
|
Â
|
|
Â
|
|
44 |
Â
*/
|
45 |
Â
public function __construct( $access_token ) {
|
46 |
Â
|
@@ -55,6 +58,60 @@ class API extends Framework\SV_WC_API_Base {
|
|
55 |
Â
}
|
56 |
Â
|
57 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
58 |
Â
/**
|
59 |
Â
* Validates a response after it has been parsed and instantiated.
|
60 |
Â
*
|
@@ -68,11 +125,12 @@ class API extends Framework\SV_WC_API_Base {
|
|
68 |
Â
|
69 |
Â
/** @var API\Response $response */
|
70 |
Â
$response = $this->get_response();
|
Â
|
|
71 |
Â
|
72 |
Â
if ( $response && $response->has_api_error() ) {
|
73 |
Â
|
74 |
Â
$code = $response->get_api_error_code();
|
75 |
-
$message = sprintf( '%s: %s', $response->get_api_error_type(), $response->get_api_error_message() );
|
76 |
Â
|
77 |
Â
/**
|
78 |
Â
* Graph API
|
@@ -90,8 +148,23 @@ class API extends Framework\SV_WC_API_Base {
|
|
90 |
Â
* @link https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling#rate-limiting-error-codes
|
91 |
Â
* @link https://developers.facebook.com/docs/marketing-api/reference/product-catalog/batch/#validation-rules
|
92 |
Â
*/
|
93 |
-
if ( in_array( $code, [ 4, 17, 32, 613, 80004 ], true ) ) {
|
94 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
95 |
Â
}
|
96 |
Â
|
97 |
Â
/**
|
@@ -106,6 +179,16 @@ class API extends Framework\SV_WC_API_Base {
|
|
106 |
Â
delete_transient( 'wc_facebook_connection_invalid' );
|
107 |
Â
}
|
108 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
109 |
Â
throw new Framework\SV_WC_API_Exception( $message, $code );
|
110 |
Â
}
|
111 |
Â
|
@@ -114,6 +197,32 @@ class API extends Framework\SV_WC_API_Base {
|
|
114 |
Â
}
|
115 |
Â
|
116 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
117 |
Â
/**
|
118 |
Â
* Gets the FBE installation IDs.
|
119 |
Â
*
|
@@ -539,6 +648,163 @@ class API extends Framework\SV_WC_API_Base {
|
|
539 |
Â
}
|
540 |
Â
|
541 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
542 |
Â
/**
|
543 |
Â
* Returns a new request object.
|
544 |
Â
*
|
12 |
Â
|
13 |
Â
defined( 'ABSPATH' ) or exit;
|
14 |
Â
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API\Orders\Order;
|
16 |
Â
use SkyVerge\WooCommerce\Facebook\API\Request;
|
17 |
Â
use SkyVerge\WooCommerce\Facebook\API\Response;
|
18 |
Â
use SkyVerge\WooCommerce\Facebook\Events\Event;
|
23 |
Â
*
|
24 |
Â
* @since 2.0.0
|
25 |
Â
*
|
26 |
+
* @method API\Request get_request()
|
27 |
Â
*/
|
28 |
Â
class API extends Framework\SV_WC_API_Base {
|
29 |
Â
|
42 |
Â
* Constructor.
|
43 |
Â
*
|
44 |
Â
* @since 2.0.0
|
45 |
+
*
|
46 |
+
* @param string $access_token access token to use for API requests
|
47 |
Â
*/
|
48 |
Â
public function __construct( $access_token ) {
|
49 |
Â
|
58 |
Â
}
|
59 |
Â
|
60 |
Â
|
61 |
+
/**
|
62 |
+
* Gets the access token being used for API requests.
|
63 |
+
*
|
64 |
+
* @since 2.1.0
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public function get_access_token() {
|
69 |
+
|
70 |
+
return $this->access_token;
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Sets the access token to use for API requests.
|
76 |
+
*
|
77 |
+
* @since 2.1.0
|
78 |
+
*
|
79 |
+
* @param string $access_token access token to set
|
80 |
+
*/
|
81 |
+
public function set_access_token( $access_token ) {
|
82 |
+
|
83 |
+
$this->access_token = $access_token;
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Performs an API request.
|
89 |
+
*
|
90 |
+
* @since 2.1.0
|
91 |
+
*
|
92 |
+
* @param API\Request $request request object
|
93 |
+
* @return API\Response
|
94 |
+
* @throws API\Exceptions\Request_Limit_Reached|Framework\SV_WC_API_Exception
|
95 |
+
*/
|
96 |
+
public function perform_request( $request ) {
|
97 |
+
|
98 |
+
$rate_limit_id = $request::get_rate_limit_id();
|
99 |
+
$delay_timestamp = $this->get_rate_limit_delay( $rate_limit_id );
|
100 |
+
|
101 |
+
// if there is a delayed timestamp in the future, throw an exception
|
102 |
+
if ( $delay_timestamp >= time() ) {
|
103 |
+
|
104 |
+
$this->handle_throttled_request( $rate_limit_id, $delay_timestamp );
|
105 |
+
|
106 |
+
} else {
|
107 |
+
|
108 |
+
$this->set_rate_limit_delay( $rate_limit_id, 0 );
|
109 |
+
}
|
110 |
+
|
111 |
+
return parent::perform_request( $request );
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
Â
/**
|
116 |
Â
* Validates a response after it has been parsed and instantiated.
|
117 |
Â
*
|
125 |
Â
|
126 |
Â
/** @var API\Response $response */
|
127 |
Â
$response = $this->get_response();
|
128 |
+
$request = $this->get_request();
|
129 |
Â
|
130 |
Â
if ( $response && $response->has_api_error() ) {
|
131 |
Â
|
132 |
Â
$code = $response->get_api_error_code();
|
133 |
+
$message = sprintf( '%s: %s', $response->get_api_error_type(), $response->get_user_error_message() ?: $response->get_api_error_message() );
|
134 |
Â
|
135 |
Â
/**
|
136 |
Â
* Graph API
|
148 |
Â
* @link https://developers.facebook.com/docs/graph-api/using-graph-api/error-handling#rate-limiting-error-codes
|
149 |
Â
* @link https://developers.facebook.com/docs/marketing-api/reference/product-catalog/batch/#validation-rules
|
150 |
Â
*/
|
151 |
+
if ( in_array( $code, [ 4, 17, 32, 613, 80001, 80004 ], true ) ) {
|
152 |
+
|
153 |
+
$delay_in_seconds = $this->calculate_rate_limit_delay( $response, $this->get_response_headers() );
|
154 |
+
|
155 |
+
if ( $delay_in_seconds > 0 ) {
|
156 |
+
|
157 |
+
$rate_limit_id = $request::get_rate_limit_id();
|
158 |
+
$timestamp = time() + $delay_in_seconds;
|
159 |
+
|
160 |
+
$this->set_rate_limit_delay( $rate_limit_id, $timestamp );
|
161 |
+
|
162 |
+
$this->handle_throttled_request( $rate_limit_id, $timestamp );
|
163 |
+
|
164 |
+
} else {
|
165 |
+
|
166 |
+
throw new API\Exceptions\Request_Limit_Reached( $message, $code );
|
167 |
+
}
|
168 |
Â
}
|
169 |
Â
|
170 |
Â
/**
|
179 |
Â
delete_transient( 'wc_facebook_connection_invalid' );
|
180 |
Â
}
|
181 |
Â
|
182 |
+
// if the code indicates a retry and we've not hit the retry limit, perform the request again
|
183 |
+
if ( in_array( $code, $request->get_retry_codes(), false ) && $request->get_retry_count() < $request->get_retry_limit() ) {
|
184 |
+
|
185 |
+
$request->mark_retry();
|
186 |
+
|
187 |
+
$this->response = $this->perform_request( $request );
|
188 |
+
|
189 |
+
return;
|
190 |
+
}
|
191 |
+
|
192 |
Â
throw new Framework\SV_WC_API_Exception( $message, $code );
|
193 |
Â
}
|
194 |
Â
|
197 |
Â
}
|
198 |
Â
|
199 |
Â
|
200 |
+
/**
|
201 |
+
* Handles a throttled API request.
|
202 |
+
*
|
203 |
+
* @since 2.1.0
|
204 |
+
*
|
205 |
+
* @param string $rate_limit_id ID for the API request
|
206 |
+
* @param int $timestamp timestamp until the delay is over
|
207 |
+
* @throws API\Exceptions\Request_Limit_Reached
|
208 |
+
*/
|
209 |
+
private function handle_throttled_request( $rate_limit_id, $timestamp ) {
|
210 |
+
|
211 |
+
if ( time() > $timestamp ) {
|
212 |
+
return;
|
213 |
+
}
|
214 |
+
|
215 |
+
$exception = new API\Exceptions\Request_Limit_Reached( "{$rate_limit_id} requests are currently throttled.", 401 );
|
216 |
+
|
217 |
+
$date_time = new \DateTime();
|
218 |
+
$date_time->setTimestamp( $timestamp );
|
219 |
+
|
220 |
+
$exception->set_throttle_end( $date_time );
|
221 |
+
|
222 |
+
throw $exception;
|
223 |
+
}
|
224 |
+
|
225 |
+
|
226 |
Â
/**
|
227 |
Â
* Gets the FBE installation IDs.
|
228 |
Â
*
|
648 |
Â
}
|
649 |
Â
|
650 |
Â
|
651 |
+
/**
|
652 |
+
* Gets all new orders.
|
653 |
+
*
|
654 |
+
* @since 2.1.0
|
655 |
+
*
|
656 |
+
* @param string $page_id page ID
|
657 |
+
* @return API\Orders\Response
|
658 |
+
* @throws Framework\SV_WC_API_Exception
|
659 |
+
*/
|
660 |
+
public function get_new_orders( $page_id ) {
|
661 |
+
|
662 |
+
$request_args = [
|
663 |
+
'state' => [
|
664 |
+
Order::STATUS_PROCESSING,
|
665 |
+
Order::STATUS_CREATED,
|
666 |
+
]
|
667 |
+
];
|
668 |
+
|
669 |
+
$request = new API\Orders\Request( $page_id, $request_args );
|
670 |
+
|
671 |
+
$this->set_response_handler( API\Orders\Response::class );
|
672 |
+
|
673 |
+
return $this->perform_request( $request );
|
674 |
+
}
|
675 |
+
|
676 |
+
|
677 |
+
/**
|
678 |
+
* Gets the latest cancelled orders.
|
679 |
+
*
|
680 |
+
* @since 2.1.0
|
681 |
+
*
|
682 |
+
* @param string $page_id page ID
|
683 |
+
* @return API\Orders\Response
|
684 |
+
* @throws Framework\SV_WC_API_Exception
|
685 |
+
*/
|
686 |
+
public function get_cancelled_orders( $page_id ) {
|
687 |
+
|
688 |
+
$request_args = [
|
689 |
+
'state' => [
|
690 |
+
Order::STATUS_COMPLETED,
|
691 |
+
],
|
692 |
+
'updated_after' => time() - facebook_for_woocommerce()->get_commerce_handler()->get_orders_handler()->get_order_update_interval(),
|
693 |
+
'filters' => 'has_cancellations',
|
694 |
+
];
|
695 |
+
|
696 |
+
$request = new API\Orders\Request( $page_id, $request_args );
|
697 |
+
|
698 |
+
$this->set_response_handler( API\Orders\Response::class );
|
699 |
+
|
700 |
+
return $this->perform_request( $request );
|
701 |
+
}
|
702 |
+
|
703 |
+
|
704 |
+
/**
|
705 |
+
* Gets a single order based on its remote ID.
|
706 |
+
*
|
707 |
+
* @since 2.1.0
|
708 |
+
*
|
709 |
+
* @param string $remote_id remote order ID
|
710 |
+
* @return API\Orders\Read\Response
|
711 |
+
* @throws Framework\SV_WC_API_Exception
|
712 |
+
*/
|
713 |
+
public function get_order( $remote_id ) {
|
714 |
+
|
715 |
+
$request = new API\Orders\Read\Request( $remote_id );
|
716 |
+
|
717 |
+
$this->set_response_handler( API\Orders\Read\Response::class );
|
718 |
+
|
719 |
+
return $this->perform_request( $request );
|
720 |
+
}
|
721 |
+
|
722 |
+
|
723 |
+
/**
|
724 |
+
* Acknowledges the given order.
|
725 |
+
*
|
726 |
+
* @since 2.1.0
|
727 |
+
*
|
728 |
+
* @param string $remote_id remote order ID
|
729 |
+
* @param string $merchant_order_reference WC order ID
|
730 |
+
* @return API\Response
|
731 |
+
* @throws Framework\SV_WC_API_Exception
|
732 |
+
*/
|
733 |
+
public function acknowledge_order( $remote_id, $merchant_order_reference ) {
|
734 |
+
|
735 |
+
$request = new API\Orders\Acknowledge\Request( $remote_id, $merchant_order_reference );
|
736 |
+
|
737 |
+
$this->set_response_handler( API\Response::class );
|
738 |
+
|
739 |
+
return $this->perform_request( $request );
|
740 |
+
}
|
741 |
+
|
742 |
+
|
743 |
+
/**
|
744 |
+
* Issues a fulfillment request for the given order.
|
745 |
+
*
|
746 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/fulfillment-api#attach_shipment
|
747 |
+
*
|
748 |
+
* @since 2.1.0
|
749 |
+
*
|
750 |
+
* @param string $remote_id remote order ID
|
751 |
+
* @param array $fulfillment_data fulfillment data to be sent on the request
|
752 |
+
* @return API\Response
|
753 |
+
* @throws Framework\SV_WC_API_Exception
|
754 |
+
*/
|
755 |
+
public function fulfill_order( $remote_id, $fulfillment_data ) {
|
756 |
+
|
757 |
+
$request = new API\Orders\Fulfillment\Request( $remote_id, $fulfillment_data );
|
758 |
+
|
759 |
+
$this->set_response_handler( API\Response::class );
|
760 |
+
|
761 |
+
return $this->perform_request( $request );
|
762 |
+
}
|
763 |
+
|
764 |
+
|
765 |
+
/**
|
766 |
+
* Cancels the given order.
|
767 |
+
*
|
768 |
+
* @since 2.1.0
|
769 |
+
*
|
770 |
+
* @param string $remote_id remote order ID
|
771 |
+
* @param string $reason cancellation reason
|
772 |
+
* @param bool $restock_items whether to restock items remotely
|
773 |
+
* @return API\Response
|
774 |
+
* @throws Framework\SV_WC_API_Exception
|
775 |
+
*/
|
776 |
+
public function cancel_order( $remote_id, $reason, $restock_items = true ) {
|
777 |
+
|
778 |
+
$request = new API\Orders\Cancel\Request( $remote_id, $reason, $restock_items );
|
779 |
+
|
780 |
+
$this->set_response_handler( API\Response::class );
|
781 |
+
|
782 |
+
return $this->perform_request( $request );
|
783 |
+
}
|
784 |
+
|
785 |
+
|
786 |
+
/**
|
787 |
+
* Issues a refund request for the given order.
|
788 |
+
*
|
789 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/cancellation-refund-api#refund_order
|
790 |
+
*
|
791 |
+
* @since 2.1.0
|
792 |
+
*
|
793 |
+
* @param string $remote_id remote order ID
|
794 |
+
* @param array $refund_data refund data to be sent on the request
|
795 |
+
* @return API\Response
|
796 |
+
* @throws Framework\SV_WC_API_Exception
|
797 |
+
*/
|
798 |
+
public function add_order_refund( $remote_id, $refund_data ) {
|
799 |
+
|
800 |
+
$request = new API\Orders\Refund\Request( $remote_id, $refund_data );
|
801 |
+
|
802 |
+
$this->set_response_handler( API\Response::class );
|
803 |
+
|
804 |
+
return $this->perform_request( $request );
|
805 |
+
}
|
806 |
+
|
807 |
+
|
808 |
Â
/**
|
809 |
Â
* Returns a new request object.
|
810 |
Â
*
|
includes/API/Catalog/Product_Group/Products/Read/Request.php
CHANGED
@@ -41,4 +41,17 @@ class Request extends API\Request {
|
|
41 |
Â
}
|
42 |
Â
|
43 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
44 |
Â
}
|
41 |
Â
}
|
42 |
Â
|
43 |
Â
|
44 |
+
/**
|
45 |
+
* Gets the rate limit ID.
|
46 |
+
*
|
47 |
+
* @since 2.1.0
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public static function get_rate_limit_id() {
|
52 |
+
|
53 |
+
return 'ads_management';
|
54 |
+
}
|
55 |
+
|
56 |
+
|
57 |
Â
}
|
includes/API/Catalog/Product_Item/Find/Request.php
CHANGED
@@ -23,7 +23,7 @@ class Request extends API\Request {
|
|
23 |
Â
|
24 |
Â
|
25 |
Â
/**
|
26 |
-
* Gets the
|
27 |
Â
*
|
28 |
Â
* @since 2.0.0
|
29 |
Â
*
|
@@ -31,7 +31,7 @@ class Request extends API\Request {
|
|
31 |
Â
*/
|
32 |
Â
public static function get_rate_limit_id() {
|
33 |
Â
|
34 |
-
return '
|
35 |
Â
}
|
36 |
Â
|
37 |
Â
|
23 |
Â
|
24 |
Â
|
25 |
Â
/**
|
26 |
+
* Gets the rate limit ID.
|
27 |
Â
*
|
28 |
Â
* @since 2.0.0
|
29 |
Â
*
|
31 |
Â
*/
|
32 |
Â
public static function get_rate_limit_id() {
|
33 |
Â
|
34 |
+
return 'ads_management';
|
35 |
Â
}
|
36 |
Â
|
37 |
Â
|
includes/API/Catalog/Request.php
CHANGED
@@ -22,6 +22,19 @@ use SkyVerge\WooCommerce\Facebook\API;
|
|
22 |
Â
class Request extends API\Request {
|
23 |
Â
|
24 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
25 |
Â
/**
|
26 |
Â
* API request constructor.
|
27 |
Â
*
|
22 |
Â
class Request extends API\Request {
|
23 |
Â
|
24 |
Â
|
25 |
+
/**
|
26 |
+
* Gets the rate limit ID.
|
27 |
+
*
|
28 |
+
* @since 2.1.0
|
29 |
+
*
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
public static function get_rate_limit_id() {
|
33 |
+
|
34 |
+
return 'ads_management';
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
Â
/**
|
39 |
Â
* API request constructor.
|
40 |
Â
*
|
includes/API/Catalog/Send_Item_Updates/Request.php
CHANGED
@@ -30,7 +30,7 @@ class Request extends API\Request {
|
|
30 |
Â
|
31 |
Â
|
32 |
Â
/**
|
33 |
-
* Gets the
|
34 |
Â
*
|
35 |
Â
* @since 2.0.0
|
36 |
Â
*
|
@@ -38,7 +38,7 @@ class Request extends API\Request {
|
|
38 |
Â
*/
|
39 |
Â
public static function get_rate_limit_id() {
|
40 |
Â
|
41 |
-
return '
|
42 |
Â
}
|
43 |
Â
|
44 |
Â
|
@@ -51,7 +51,9 @@ class Request extends API\Request {
|
|
51 |
Â
*/
|
52 |
Â
public function __construct( $catalog_id ) {
|
53 |
Â
|
54 |
-
|
Â
|
|
Â
|
|
55 |
Â
}
|
56 |
Â
|
57 |
Â
|
@@ -113,10 +115,12 @@ class Request extends API\Request {
|
|
113 |
Â
* @since 2.0.0
|
114 |
Â
*/
|
115 |
Â
public function get_data() {
|
Â
|
|
116 |
Â
|
117 |
Â
return [
|
118 |
Â
'allow_upsert' => $this->get_allow_upsert(),
|
119 |
Â
'requests' => $this->get_requests(),
|
Â
|
|
120 |
Â
];
|
121 |
Â
}
|
122 |
Â
|
30 |
Â
|
31 |
Â
|
32 |
Â
/**
|
33 |
+
* Gets the rate limit ID.
|
34 |
Â
*
|
35 |
Â
* @since 2.0.0
|
36 |
Â
*
|
38 |
Â
*/
|
39 |
Â
public static function get_rate_limit_id() {
|
40 |
Â
|
41 |
+
return 'ads_management';
|
42 |
Â
}
|
43 |
Â
|
44 |
Â
|
51 |
Â
*/
|
52 |
Â
public function __construct( $catalog_id ) {
|
53 |
Â
|
54 |
+
// Switching this out to make sure everything continues to work
|
55 |
+
// parent::__construct( "/{$catalog_id}/batch", 'POST' );
|
56 |
+
parent::__construct( "/{$catalog_id}/items_batch", 'POST' );
|
57 |
Â
}
|
58 |
Â
|
59 |
Â
|
115 |
Â
* @since 2.0.0
|
116 |
Â
*/
|
117 |
Â
public function get_data() {
|
118 |
+
# TODO: Make it so the item type is based on the actual item type
|
119 |
Â
|
120 |
Â
return [
|
121 |
Â
'allow_upsert' => $this->get_allow_upsert(),
|
122 |
Â
'requests' => $this->get_requests(),
|
123 |
+
'item_type' => 'PRODUCT_ITEM',
|
124 |
Â
];
|
125 |
Â
}
|
126 |
Â
|
includes/API/Exceptions/Request_Limit_Reached.php
CHANGED
@@ -22,4 +22,34 @@ use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
|
22 |
Â
class Request_Limit_Reached extends Framework\SV_WC_API_Exception {
|
23 |
Â
|
24 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
25 |
Â
}
|
22 |
Â
class Request_Limit_Reached extends Framework\SV_WC_API_Exception {
|
23 |
Â
|
24 |
Â
|
25 |
+
/** @var \DateTime date & time representing when the request limit will be lifted */
|
26 |
+
protected $throttle_end;
|
27 |
+
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Gets the estimated throttle end.
|
31 |
+
*
|
32 |
+
* @since 2.1.0
|
33 |
+
*
|
34 |
+
* @return \DateTime|null
|
35 |
+
*/
|
36 |
+
public function get_throttle_end() {
|
37 |
+
|
38 |
+
return $this->throttle_end;
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Sets the estimated throttle end.
|
44 |
+
*
|
45 |
+
* @since 2.1.0
|
46 |
+
*
|
47 |
+
* @param \DateTime $date_time date time object representing when the throttle will end
|
48 |
+
*/
|
49 |
+
public function set_throttle_end( \DateTime $date_time ) {
|
50 |
+
|
51 |
+
$this->throttle_end = $date_time;
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
Â
}
|
includes/API/Orders/Abstract_Request.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
abstract class Abstract_Request extends API\Request {
|
18 |
+
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Abstract_Request constructor.
|
22 |
+
*
|
23 |
+
* @param string $path request path
|
24 |
+
* @param string $method request method
|
25 |
+
*/
|
26 |
+
public function __construct( $path, $method ) {
|
27 |
+
|
28 |
+
parent::__construct( $path, $method );
|
29 |
+
|
30 |
+
/** @link https://developers.facebook.com/docs/commerce-platform/order-management/error-codes */
|
31 |
+
$this->retry_codes[] = 2361081;
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
}
|
includes/API/Orders/Acknowledge/Request.php
ADDED
@@ -0,0 +1,62 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Acknowledge;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API acknowledge request object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Request extends API\Orders\Abstract_Request {
|
23 |
+
|
24 |
+
|
25 |
+
use API\Traits\Idempotent_Request;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* API request constructor.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*
|
33 |
+
* @param string $remote_id remote order ID
|
34 |
+
* @param string $merchant_order_reference WC order ID
|
35 |
+
*/
|
36 |
+
public function __construct( $remote_id, $merchant_order_reference ) {
|
37 |
+
|
38 |
+
parent::__construct( "/{$remote_id}/acknowledge_order", 'POST' );
|
39 |
+
|
40 |
+
$this->set_data( [
|
41 |
+
'merchant_order_reference' => $merchant_order_reference,
|
42 |
+
'idempotency_key' => $this->get_idempotency_key(),
|
43 |
+
] );
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Gets the rate limit ID.
|
49 |
+
*
|
50 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
51 |
+
*
|
52 |
+
* @since 2.1.0
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public static function get_rate_limit_id() {
|
57 |
+
|
58 |
+
return 'pages';
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
}
|
includes/API/Orders/Cancel/Request.php
ADDED
@@ -0,0 +1,66 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Cancel;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API cancel request object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Request extends API\Orders\Abstract_Request {
|
23 |
+
|
24 |
+
|
25 |
+
use API\Traits\Idempotent_Request;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* API request constructor.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*
|
33 |
+
* @param string $remote_id remote order ID
|
34 |
+
* @param string $reason cancellation reason code
|
35 |
+
* @param bool $restock_items whether or not the items were restocked
|
36 |
+
*/
|
37 |
+
public function __construct( $remote_id, $reason, $restock_items = true ) {
|
38 |
+
|
39 |
+
parent::__construct( "/{$remote_id}/cancellations", 'POST' );
|
40 |
+
|
41 |
+
$this->set_data( [
|
42 |
+
'cancel_reason' => [
|
43 |
+
'reason_code' => $reason,
|
44 |
+
],
|
45 |
+
'restock_items' => $restock_items,
|
46 |
+
'idempotency_key' => $this->get_idempotency_key(),
|
47 |
+
] );
|
48 |
+
}
|
49 |
+
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Gets the rate limit ID.
|
53 |
+
*
|
54 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
55 |
+
*
|
56 |
+
* @since 2.1.0
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function get_rate_limit_id() {
|
61 |
+
|
62 |
+
return 'pages';
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
}
|
includes/API/Orders/Fulfillment/Request.php
ADDED
@@ -0,0 +1,61 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Fulfillment;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API fulfillment request object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Request extends API\Orders\Abstract_Request {
|
23 |
+
|
24 |
+
|
25 |
+
use API\Traits\Idempotent_Request;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* API request constructor.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*
|
33 |
+
* @param string $remote_id remote order ID
|
34 |
+
* @param array $fulfillment_data fulfillment data
|
35 |
+
*/
|
36 |
+
public function __construct( $remote_id, $fulfillment_data ) {
|
37 |
+
|
38 |
+
parent::__construct( "/{$remote_id}/shipments", 'POST' );
|
39 |
+
|
40 |
+
$fulfillment_data['idempotency_key'] = $this->get_idempotency_key();
|
41 |
+
|
42 |
+
$this->set_data( $fulfillment_data );
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Gets the rate limit ID.
|
48 |
+
*
|
49 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
50 |
+
*
|
51 |
+
* @since 2.1.0
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public static function get_rate_limit_id() {
|
56 |
+
|
57 |
+
return 'pages';
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
}
|
includes/API/Orders/Order.php
ADDED
@@ -0,0 +1,167 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Orders API order handler.
|
17 |
+
*
|
18 |
+
* @since 2.1.0
|
19 |
+
*/
|
20 |
+
class Order {
|
21 |
+
|
22 |
+
|
23 |
+
/** @var string API state meaning Facebook is still processing the order and no action is possible */
|
24 |
+
const STATUS_PROCESSING = 'FB_PROCESSING';
|
25 |
+
|
26 |
+
/** @var string API state meaning Facebook has processed the orders and the seller needs to acknowledge it */
|
27 |
+
const STATUS_CREATED = 'CREATED';
|
28 |
+
|
29 |
+
/** @var string API state meaning the order was acknowledged and is now being processed in WC */
|
30 |
+
const STATUS_IN_PROGRESS = 'IN_PROGRESS';
|
31 |
+
|
32 |
+
/** @var string API state meaning all items in the order are shipped and/or cancelled */
|
33 |
+
const STATUS_COMPLETED = 'COMPLETED';
|
34 |
+
|
35 |
+
|
36 |
+
/** @var array order data */
|
37 |
+
protected $data;
|
38 |
+
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Orders API order handler constructor.
|
42 |
+
*
|
43 |
+
* @since 2.1.0
|
44 |
+
*
|
45 |
+
* @param array $response_data response data from the API
|
46 |
+
*/
|
47 |
+
public function __construct( $response_data ) {
|
48 |
+
|
49 |
+
$this->data = $response_data;
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Gets the order’s ID.
|
55 |
+
*
|
56 |
+
* @since 2.1.0
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public function get_id() {
|
61 |
+
|
62 |
+
return ! empty( $this->data['id'] ) ? $this->data['id'] : '';
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Gets the order’s status.
|
68 |
+
*
|
69 |
+
* @since 2.1.0
|
70 |
+
*
|
71 |
+
* @return string
|
72 |
+
*/
|
73 |
+
public function get_status() {
|
74 |
+
|
75 |
+
return ! empty( $this->data['order_status'] ) && ! empty( $this->data['order_status']['state'] ) ? $this->data['order_status']['state'] : '';
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Gets the items' data.
|
81 |
+
*
|
82 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#item
|
83 |
+
*
|
84 |
+
* @since 2.1.0
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
public function get_items() {
|
89 |
+
|
90 |
+
return ! empty( $this->data['items']['data'] ) ? $this->data['items']['data'] : [];
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Gets the channel name.
|
96 |
+
*
|
97 |
+
* @since 2.1.0
|
98 |
+
*
|
99 |
+
* @return string
|
100 |
+
*/
|
101 |
+
public function get_channel() {
|
102 |
+
|
103 |
+
return ! empty( $this->data['channel'] ) ? $this->data['channel'] : '';
|
104 |
+
}
|
105 |
+
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Gets the shipping details.
|
109 |
+
*
|
110 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#selected_shipping_option
|
111 |
+
*
|
112 |
+
* @since 2.1.0
|
113 |
+
*
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public function get_selected_shipping_option() {
|
117 |
+
|
118 |
+
return isset( $this->data['selected_shipping_option'] ) ? $this->data['selected_shipping_option'] : [];
|
119 |
+
}
|
120 |
+
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Gets the shipping address.
|
124 |
+
*
|
125 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#shipping_address
|
126 |
+
*
|
127 |
+
* @since 2.1.0
|
128 |
+
*
|
129 |
+
* @return array
|
130 |
+
*/
|
131 |
+
public function get_shipping_address() {
|
132 |
+
|
133 |
+
return isset( $this->data['shipping_address'] ) ? $this->data['shipping_address'] : [];
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Gets the payment details.
|
139 |
+
*
|
140 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#estimated_payment_details
|
141 |
+
*
|
142 |
+
* @since 2.1.0
|
143 |
+
*
|
144 |
+
* @return array
|
145 |
+
*/
|
146 |
+
public function get_estimated_payment_details() {
|
147 |
+
|
148 |
+
return isset( $this->data['estimated_payment_details'] ) ? $this->data['estimated_payment_details'] : [];
|
149 |
+
}
|
150 |
+
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Gets the buyer details.
|
154 |
+
*
|
155 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#buyer_details
|
156 |
+
*
|
157 |
+
* @since 2.1.0
|
158 |
+
*
|
159 |
+
* @return array
|
160 |
+
*/
|
161 |
+
public function get_buyer_details() {
|
162 |
+
|
163 |
+
return isset( $this->data['buyer_details'] ) ? $this->data['buyer_details'] : [];
|
164 |
+
}
|
165 |
+
|
166 |
+
|
167 |
+
}
|
includes/API/Orders/Read/Request.php
ADDED
@@ -0,0 +1,79 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Read;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API read request object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Request extends API\Orders\Abstract_Request {
|
23 |
+
|
24 |
+
|
25 |
+
/**
|
26 |
+
* API request constructor.
|
27 |
+
*
|
28 |
+
* @since 2.1.0
|
29 |
+
*
|
30 |
+
* @param string $remote_id remote order ID
|
31 |
+
* @param array $fields fields to be returned
|
32 |
+
*/
|
33 |
+
public function __construct( $remote_id, $fields = [] ) {
|
34 |
+
|
35 |
+
parent::__construct( "/{$remote_id}", 'GET' );
|
36 |
+
|
37 |
+
if ( empty( $fields ) ) {
|
38 |
+
|
39 |
+
// request all top-level fields
|
40 |
+
$fields = implode( ',', [
|
41 |
+
'id',
|
42 |
+
'order_status',
|
43 |
+
'created',
|
44 |
+
'last_updated',
|
45 |
+
'items{id,retailer_id,product_id,quantity,price_per_unit,tax_details}',
|
46 |
+
'ship_by_date',
|
47 |
+
'merchant_order_id',
|
48 |
+
'channel',
|
49 |
+
'selected_shipping_option',
|
50 |
+
'shipping_address',
|
51 |
+
'estimated_payment_details',
|
52 |
+
'buyer_details',
|
53 |
+
] );
|
54 |
+
|
55 |
+
} elseif ( is_array( $fields ) ) {
|
56 |
+
|
57 |
+
$fields = implode( ',', $fields );
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->set_params( [ 'fields' => $fields ] );
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Gets the rate limit ID.
|
66 |
+
*
|
67 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
68 |
+
*
|
69 |
+
* @since 2.1.0
|
70 |
+
*
|
71 |
+
* @return string
|
72 |
+
*/
|
73 |
+
public static function get_rate_limit_id() {
|
74 |
+
|
75 |
+
return 'pages';
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
}
|
includes/API/Orders/Read/Response.php
ADDED
@@ -0,0 +1,39 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Read;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
use SkyVerge\WooCommerce\Facebook\API\Orders\Order;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Orders API read response object.
|
20 |
+
*
|
21 |
+
* @since 2.1.0
|
22 |
+
*/
|
23 |
+
class Response extends API\Response {
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Gets an order object from the response data.
|
28 |
+
*
|
29 |
+
* @since 2.1.0
|
30 |
+
*
|
31 |
+
* @return \SkyVerge\WooCommerce\Facebook\API\Orders\Order
|
32 |
+
*/
|
33 |
+
public function get_order() {
|
34 |
+
|
35 |
+
return new Order( json_decode( json_encode( $this->response_data ), true ) );
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
}
|
includes/API/Orders/Refund/Request.php
ADDED
@@ -0,0 +1,61 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders\Refund;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API refund request object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Request extends API\Orders\Abstract_Request {
|
23 |
+
|
24 |
+
|
25 |
+
use API\Traits\Idempotent_Request;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* API request constructor.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*
|
33 |
+
* @param string $remote_id remote order ID
|
34 |
+
* @param array $refund_data refund data
|
35 |
+
*/
|
36 |
+
public function __construct( $remote_id, $refund_data ) {
|
37 |
+
|
38 |
+
parent::__construct( "/{$remote_id}/refunds", 'POST' );
|
39 |
+
|
40 |
+
$refund_data['idempotency_key'] = $this->get_idempotency_key();
|
41 |
+
|
42 |
+
$this->set_data( $refund_data );
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Gets the rate limit ID.
|
48 |
+
*
|
49 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
50 |
+
*
|
51 |
+
* @since 2.1.0
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public static function get_rate_limit_id() {
|
56 |
+
|
57 |
+
return 'pages';
|
58 |
+
}
|
59 |
+
|
60 |
+
|
61 |
+
}
|
includes/API/Orders/Request.php
ADDED
@@ -0,0 +1,101 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Orders API list request object.
|
17 |
+
*
|
18 |
+
* @since 2.1.0
|
19 |
+
*/
|
20 |
+
class Request extends Abstract_Request {
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Gets the rate limit ID.
|
25 |
+
*
|
26 |
+
* While this is the Orders API, orders belong to pages so this is where the rate limit comes from.
|
27 |
+
*
|
28 |
+
* @since 2.1.0
|
29 |
+
*
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
public static function get_rate_limit_id() {
|
33 |
+
|
34 |
+
return 'pages';
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
/**
|
39 |
+
* API request constructor.
|
40 |
+
*
|
41 |
+
* @see https://developers.facebook.com/docs/commerce-platform/order-management/order-api#get_orders
|
42 |
+
*
|
43 |
+
* @since 2.1.0
|
44 |
+
*
|
45 |
+
* @param string $page_id page ID
|
46 |
+
* @param array $args optional additional arguments
|
47 |
+
*/
|
48 |
+
public function __construct( $page_id, $args = [] ) {
|
49 |
+
|
50 |
+
parent::__construct( "/{$page_id}/commerce_orders", 'GET' );
|
51 |
+
|
52 |
+
$params = [];
|
53 |
+
|
54 |
+
if ( isset( $args['updated_before'] ) ) {
|
55 |
+
|
56 |
+
$params['updated_before'] = $args['updated_before'];
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( isset( $args['updated_after'] ) ) {
|
60 |
+
|
61 |
+
$params['updated_after'] = $args['updated_after'];
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( isset( $args['state'] ) ) {
|
65 |
+
|
66 |
+
$params['state'] = is_array( $args['state'] ) ? implode( ',', $args['state'] ) : $args['state'];
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( isset( $args['filters'] ) ) {
|
70 |
+
|
71 |
+
$params['filters'] = is_array( $args['filters'] ) ? implode( ',', $args['filters'] ) : $args['filters'];
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! empty( $args['fields'] ) ) {
|
75 |
+
|
76 |
+
$params['fields'] = is_array( $args['fields'] ) ? implode( ',', $args['fields'] ) : $args['fields'];
|
77 |
+
|
78 |
+
} else {
|
79 |
+
|
80 |
+
// request all top-level fields
|
81 |
+
$params['fields'] = implode( ',', [
|
82 |
+
'id',
|
83 |
+
'order_status',
|
84 |
+
'created',
|
85 |
+
'last_updated',
|
86 |
+
'items{id,retailer_id,product_id,quantity,price_per_unit,tax_details}',
|
87 |
+
'ship_by_date',
|
88 |
+
'merchant_order_id',
|
89 |
+
'channel',
|
90 |
+
'selected_shipping_option',
|
91 |
+
'shipping_address',
|
92 |
+
'estimated_payment_details',
|
93 |
+
'buyer_details',
|
94 |
+
] );
|
95 |
+
}
|
96 |
+
|
97 |
+
$this->set_params( $params );
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
}
|
includes/API/Orders/Response.php
ADDED
@@ -0,0 +1,47 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Orders;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\API;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Orders API list response object.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Response extends API\Response {
|
23 |
+
|
24 |
+
|
25 |
+
use API\Traits\Paginated_Response;
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Gets an array of order objects from the response data.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*
|
33 |
+
* @return \SkyVerge\WooCommerce\Facebook\API\Orders\Order[]
|
34 |
+
*/
|
35 |
+
public function get_orders() {
|
36 |
+
|
37 |
+
$orders = [];
|
38 |
+
|
39 |
+
foreach ( $this->get_data() as $order_data ) {
|
40 |
+
$orders[] = new Order( json_decode( json_encode( $order_data ), true ) );
|
41 |
+
}
|
42 |
+
|
43 |
+
return $orders;
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
}
|
includes/API/Request.php
CHANGED
@@ -25,6 +25,16 @@ class Request extends Framework\SV_WC_API_JSON_Request {
|
|
25 |
Â
use Traits\Rate_Limited_Request;
|
26 |
Â
|
27 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
28 |
Â
/**
|
29 |
Â
* API request constructor.
|
30 |
Â
*
|
@@ -66,4 +76,62 @@ class Request extends Framework\SV_WC_API_JSON_Request {
|
|
66 |
Â
}
|
67 |
Â
|
68 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
69 |
Â
}
|
25 |
Â
use Traits\Rate_Limited_Request;
|
26 |
Â
|
27 |
Â
|
28 |
+
/** @var int maximum number of retries to attempt if told to do so by Facebook */
|
29 |
+
protected $retry_limit = 5;
|
30 |
+
|
31 |
+
/** @var int number of times this request has been retried */
|
32 |
+
protected $retry_count = 0;
|
33 |
+
|
34 |
+
/** @var int[] the response codes that should trigger a retry */
|
35 |
+
protected $retry_codes = [];
|
36 |
+
|
37 |
+
|
38 |
Â
/**
|
39 |
Â
* API request constructor.
|
40 |
Â
*
|
76 |
Â
}
|
77 |
Â
|
78 |
Â
|
79 |
+
/**
|
80 |
+
* Gets the number of times this request has been retried.
|
81 |
+
*
|
82 |
+
* @since 2.1.0
|
83 |
+
*
|
84 |
+
* @return int
|
85 |
+
*/
|
86 |
+
public function get_retry_count() {
|
87 |
+
|
88 |
+
return $this->retry_count;
|
89 |
+
}
|
90 |
+
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Marks the request as having been retried.
|
94 |
+
*
|
95 |
+
* @since 2.1.0
|
96 |
+
*/
|
97 |
+
public function mark_retry() {
|
98 |
+
|
99 |
+
$this->retry_count++;
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets the maximum number of retries to attempt if told to do so by Facebook.
|
105 |
+
*
|
106 |
+
* @since 2.1.0
|
107 |
+
*
|
108 |
+
* @return int
|
109 |
+
*/
|
110 |
+
public function get_retry_limit() {
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Filters the maximum number of retries allowed for the request.
|
114 |
+
*
|
115 |
+
* @since 2.1.0
|
116 |
+
*
|
117 |
+
* @param int $retry_limit maximum number of retries
|
118 |
+
* @param Request $request request object
|
119 |
+
*/
|
120 |
+
return (int) apply_filters( 'wc_facebook_api_request_retry_limit', $this->retry_limit, $this );
|
121 |
+
}
|
122 |
+
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Response codes that should trigger a retry for this request.
|
126 |
+
*
|
127 |
+
* @since 2.1.0
|
128 |
+
*
|
129 |
+
* @return int[]
|
130 |
+
*/
|
131 |
+
public function get_retry_codes() {
|
132 |
+
|
133 |
+
return $this->retry_codes;
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
Â
}
|
includes/API/Response.php
CHANGED
@@ -92,4 +92,17 @@ class Response extends Framework\SV_WC_API_JSON_Response {
|
|
92 |
Â
}
|
93 |
Â
|
94 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
95 |
Â
}
|
92 |
Â
}
|
93 |
Â
|
94 |
Â
|
95 |
+
/**
|
96 |
+
* Gets the user error message.
|
97 |
+
*
|
98 |
+
* @since 2.1.0
|
99 |
+
*
|
100 |
+
* @return string|null
|
101 |
+
*/
|
102 |
+
public function get_user_error_message() {
|
103 |
+
|
104 |
+
return isset( $this->error->error_user_msg ) ? $this->error->error_user_msg : null;
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
Â
}
|
includes/API/Traits/Idempotent_Request.php
ADDED
@@ -0,0 +1,45 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\API\Traits;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Idempotent request trait.
|
17 |
+
*
|
18 |
+
* @since 2.1.0
|
19 |
+
*/
|
20 |
+
trait Idempotent_Request {
|
21 |
+
|
22 |
+
|
23 |
+
/** @var string holds the request's idempotency key */
|
24 |
+
protected $idempotency_key;
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Gets the value of idempotency key.
|
29 |
+
*
|
30 |
+
* @since 2.1.0
|
31 |
+
*
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
public function get_idempotency_key() {
|
35 |
+
|
36 |
+
if ( empty( $this->idempotency_key ) ) {
|
37 |
+
|
38 |
+
$this->idempotency_key = wp_generate_uuid4();
|
39 |
+
}
|
40 |
+
|
41 |
+
return $this->idempotency_key;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
}
|
includes/API/Traits/Rate_Limited_API.php
CHANGED
@@ -25,6 +25,8 @@ trait Rate_Limited_API {
|
|
25 |
Â
/**
|
26 |
Â
* Stores the delay, in seconds, for requests with the given rate limit ID.
|
27 |
Â
*
|
Â
|
|
Â
|
|
28 |
Â
* @since 2.0.0
|
29 |
Â
*
|
30 |
Â
* @param string $rate_limit_id request ID for rate limiting
|
@@ -32,7 +34,16 @@ trait Rate_Limited_API {
|
|
32 |
Â
*/
|
33 |
Â
public function set_rate_limit_delay( $rate_limit_id, $delay ) {
|
34 |
Â
|
35 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
36 |
Â
}
|
37 |
Â
|
38 |
Â
|
@@ -46,7 +57,7 @@ trait Rate_Limited_API {
|
|
46 |
Â
*/
|
47 |
Â
public function get_rate_limit_delay( $rate_limit_id ) {
|
48 |
Â
|
49 |
-
return (int)
|
50 |
Â
}
|
51 |
Â
|
52 |
Â
|
@@ -58,12 +69,11 @@ trait Rate_Limited_API {
|
|
58 |
Â
*
|
59 |
Â
* @param Rate_Limited_Response $response API response object
|
60 |
Â
* @param array $headers API response headers
|
61 |
-
* @return int
|
62 |
Â
*/
|
63 |
Â
protected function calculate_rate_limit_delay( $response, $headers ) {
|
64 |
Â
|
65 |
-
|
66 |
-
return $response->get_rate_limit_estimated_time_to_regain_access( $headers );
|
67 |
Â
}
|
68 |
Â
|
69 |
Â
|
25 |
Â
/**
|
26 |
Â
* Stores the delay, in seconds, for requests with the given rate limit ID.
|
27 |
Â
*
|
28 |
+
* This uses a transient, set to expire after the delay duration or after 24 hours, whichever is sooner.
|
29 |
+
*
|
30 |
Â
* @since 2.0.0
|
31 |
Â
*
|
32 |
Â
* @param string $rate_limit_id request ID for rate limiting
|
34 |
Â
*/
|
35 |
Â
public function set_rate_limit_delay( $rate_limit_id, $delay ) {
|
36 |
Â
|
37 |
+
if ( ! empty( $delay ) ) {
|
38 |
+
|
39 |
+
$expiration = min( $delay, 24 * HOUR_IN_SECONDS );
|
40 |
+
|
41 |
+
set_transient( "wc_facebook_rate_limit_${rate_limit_id}", $delay, $expiration );
|
42 |
+
|
43 |
+
} else {
|
44 |
+
|
45 |
+
delete_transient( "wc_facebook_rate_limit_${rate_limit_id}" );
|
46 |
+
}
|
47 |
Â
}
|
48 |
Â
|
49 |
Â
|
57 |
Â
*/
|
58 |
Â
public function get_rate_limit_delay( $rate_limit_id ) {
|
59 |
Â
|
60 |
+
return (int) get_transient( "wc_facebook_rate_limit_${rate_limit_id}" );
|
61 |
Â
}
|
62 |
Â
|
63 |
Â
|
69 |
Â
*
|
70 |
Â
* @param Rate_Limited_Response $response API response object
|
71 |
Â
* @param array $headers API response headers
|
72 |
+
* @return int delay in seconds
|
73 |
Â
*/
|
74 |
Â
protected function calculate_rate_limit_delay( $response, $headers ) {
|
75 |
Â
|
76 |
+
return $response->get_rate_limit_estimated_time_to_regain_access( $headers ) * MINUTE_IN_SECONDS;
|
Â
|
|
77 |
Â
}
|
78 |
Â
|
79 |
Â
|
includes/Admin.php
CHANGED
@@ -32,6 +32,13 @@ class Admin {
|
|
32 |
Â
const SYNC_MODE_SYNC_DISABLED = 'sync_disabled';
|
33 |
Â
|
34 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
35 |
Â
/**
|
36 |
Â
* Admin constructor.
|
37 |
Â
*
|
@@ -49,40 +56,47 @@ class Admin {
|
|
49 |
Â
return;
|
50 |
Â
}
|
51 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
52 |
Â
// add a modal in admin product pages
|
53 |
-
add_action( 'admin_footer',
|
54 |
Â
// may trigger the modal to open to warn the merchant about a conflict with the current product terms
|
55 |
-
add_action( 'admin_footer',
|
56 |
Â
|
57 |
Â
// add admin notice to inform that disabled products may need to be deleted manually
|
58 |
-
add_action( 'admin_notices',
|
59 |
Â
|
60 |
Â
// add admin notice if the user is enabling sync for virtual products using the bulk action
|
61 |
-
add_action( 'admin_notices',
|
62 |
-
add_filter( 'request',
|
63 |
Â
|
64 |
Â
// add admin notice to inform sync mode has been automatically set to Sync and hide for virtual products and variations
|
65 |
-
add_action( 'admin_notices',
|
66 |
Â
|
67 |
Â
// add columns for displaying Facebook sync enabled/disabled and catalog visibility status
|
68 |
-
add_filter( 'manage_product_posts_columns',
|
69 |
-
add_action( 'manage_product_posts_custom_column',
|
70 |
Â
|
71 |
Â
// add input to filter products by Facebook sync enabled
|
72 |
-
add_action( 'restrict_manage_posts',
|
73 |
-
add_filter( 'request',
|
74 |
Â
|
75 |
Â
// add bulk actions to manage products sync
|
76 |
-
add_filter( 'bulk_actions-edit-product',
|
77 |
-
add_action( 'handle_bulk_actions-edit-product',
|
78 |
Â
|
79 |
Â
// add Product data tab
|
80 |
-
add_filter( 'woocommerce_product_data_tabs',
|
81 |
-
add_action( 'woocommerce_product_data_panels',
|
82 |
Â
|
83 |
Â
// add Variation edit fields
|
84 |
-
add_action( 'woocommerce_product_after_variable_attributes',
|
85 |
-
add_action( 'woocommerce_save_product_variation',
|
86 |
Â
}
|
87 |
Â
|
88 |
Â
|
@@ -96,40 +110,174 @@ class Admin {
|
|
96 |
Â
public function enqueue_scripts() {
|
97 |
Â
global $current_screen;
|
98 |
Â
|
99 |
-
$modal_screens =
|
100 |
Â
'product',
|
101 |
Â
'edit-product',
|
102 |
-
|
Â
|
|
Â
|
|
103 |
Â
|
104 |
Â
if ( isset( $current_screen->id ) ) {
|
105 |
Â
|
106 |
Â
if ( in_array( $current_screen->id, $modal_screens, true ) || facebook_for_woocommerce()->is_plugin_settings() ) {
|
107 |
Â
|
108 |
Â
// enqueue modal functions
|
109 |
-
wp_enqueue_script( 'facebook-for-woocommerce-modal',
|
110 |
Â
}
|
111 |
Â
|
112 |
Â
if ( 'product' === $current_screen->id || 'edit-product' === $current_screen->id ) {
|
113 |
Â
|
114 |
-
wp_enqueue_style( 'facebook-for-woocommerce-products-admin',
|
115 |
-
|
116 |
-
wp_enqueue_script( 'facebook-for-woocommerce-products-admin',
|
117 |
-
|
118 |
-
wp_localize_script(
|
119 |
-
'
|
120 |
-
'
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
126 |
Â
|
127 |
Â
if ( facebook_for_woocommerce()->is_plugin_settings() ) {
|
128 |
Â
|
129 |
Â
wp_enqueue_style( 'woocommerce_admin_styles' );
|
130 |
Â
wp_enqueue_script( 'wc-enhanced-select' );
|
131 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
132 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
133 |
Â
}
|
134 |
Â
|
135 |
Â
|
@@ -224,17 +372,17 @@ class Admin {
|
|
224 |
Â
*/
|
225 |
Â
public function filter_products_by_sync_enabled( $query_vars ) {
|
226 |
Â
|
227 |
-
$valid_values =
|
228 |
Â
self::SYNC_MODE_SYNC_AND_SHOW,
|
229 |
Â
self::SYNC_MODE_SYNC_AND_HIDE,
|
230 |
Â
self::SYNC_MODE_SYNC_DISABLED,
|
231 |
-
|
232 |
Â
|
233 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
234 |
Â
if ( isset( $_REQUEST['fb_sync_enabled'] ) && in_array( $_REQUEST['fb_sync_enabled'], $valid_values, true ) ) {
|
235 |
Â
|
236 |
Â
// store original meta query
|
237 |
-
$original_meta_query = ! empty( $query_vars['meta_query'] ) ? $query_vars['meta_query'] :
|
238 |
Â
|
239 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
240 |
Â
$filter_value = $_REQUEST['fb_sync_enabled'];
|
@@ -243,7 +391,7 @@ class Admin {
|
|
243 |
Â
if ( ! empty( $query_vars['meta_query'] ) ) {
|
244 |
Â
$query_vars['meta_query']['relation'] = 'AND';
|
245 |
Â
} else {
|
246 |
-
$query_vars['meta_query'] =
|
247 |
Â
}
|
248 |
Â
|
249 |
Â
if ( self::SYNC_MODE_SYNC_AND_SHOW === $filter_value ) {
|
@@ -255,19 +403,21 @@ class Admin {
|
|
255 |
Â
$query_vars = $this->add_query_vars_to_find_visible_products( $query_vars );
|
256 |
Â
|
257 |
Â
// since we record enabled status and visibility on child variations, we need to query variable products found for their children to exclude them from query results
|
258 |
-
$exclude_products =
|
259 |
-
$found_ids = get_posts( array_merge( $query_vars,
|
260 |
-
$found_products = empty( $found_ids ) ?
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
Â
|
|
Â
|
|
265 |
Â
|
266 |
Â
/** @var \WC_Product[] $found_products */
|
267 |
Â
foreach ( $found_products as $product ) {
|
268 |
Â
|
269 |
Â
if ( ! Products::is_sync_enabled_for_product( $product )
|
270 |
-
|
271 |
Â
|
272 |
Â
$exclude_products[] = $product->get_id();
|
273 |
Â
}
|
@@ -280,7 +430,6 @@ class Admin {
|
|
280 |
Â
$query_vars['post__not_in'] = $exclude_products;
|
281 |
Â
}
|
282 |
Â
}
|
283 |
-
|
284 |
Â
} elseif ( self::SYNC_MODE_SYNC_AND_HIDE === $filter_value ) {
|
285 |
Â
|
286 |
Â
// when checking for products with sync enabled we need to check both "yes" and meta not set, this requires adding an "OR" clause
|
@@ -290,19 +439,21 @@ class Admin {
|
|
290 |
Â
$query_vars = $this->add_query_vars_to_find_hidden_products( $query_vars );
|
291 |
Â
|
292 |
Â
// since we record enabled status and visibility on child variations, we need to query variable products found for their children to exclude them from query results
|
293 |
-
$exclude_products =
|
294 |
-
$found_ids = get_posts( array_merge( $query_vars,
|
295 |
-
$found_products = empty( $found_ids ) ?
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
Â
|
|
Â
|
|
300 |
Â
|
301 |
Â
/** @var \WC_Product[] $found_products */
|
302 |
Â
foreach ( $found_products as $product ) {
|
303 |
Â
|
304 |
Â
if ( ! Products::is_sync_enabled_for_product( $product )
|
305 |
-
|
306 |
Â
|
307 |
Â
$exclude_products[] = $product->get_id();
|
308 |
Â
}
|
@@ -317,15 +468,17 @@ class Admin {
|
|
317 |
Â
}
|
318 |
Â
|
319 |
Â
// for the same reason, we also need to include variable products with hidden children
|
320 |
-
$include_products =
|
321 |
-
$hidden_variations = get_posts(
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
'
|
326 |
-
|
327 |
-
|
328 |
-
|
Â
|
|
Â
|
|
329 |
Â
|
330 |
Â
/** @var \WP_Post[] $hidden_variations */
|
331 |
Â
foreach ( $hidden_variations as $variation_post ) {
|
@@ -334,53 +487,60 @@ class Admin {
|
|
334 |
Â
|
335 |
Â
// we need this check because we only want products with ALL variations hidden
|
336 |
Â
if ( $variable_product instanceof \WC_Product && Products::is_sync_enabled_for_product( $variable_product )
|
337 |
-
|
338 |
Â
|
339 |
Â
$include_products[] = $variable_product->get_id();
|
340 |
Â
}
|
341 |
Â
}
|
342 |
-
|
343 |
Â
} else {
|
344 |
Â
|
345 |
Â
// self::SYNC_MODE_SYNC_DISABLED
|
346 |
Â
|
347 |
Â
// products to be included in the QUERY, not in the sync
|
348 |
-
$include_products =
|
349 |
-
$found_ids =
|
350 |
Â
|
351 |
Â
$integration = facebook_for_woocommerce()->get_integration();
|
352 |
-
$excluded_categories_ids = $integration ? $integration->get_excluded_product_category_ids() :
|
353 |
-
$excluded_tags_ids = $integration ? $integration->get_excluded_product_tag_ids() :
|
354 |
Â
|
355 |
Â
// get the product IDs from all products in excluded taxonomies
|
356 |
Â
if ( $excluded_categories_ids || $excluded_tags_ids ) {
|
357 |
Â
|
358 |
Â
$tax_query_vars = $this->maybe_add_tax_query_for_excluded_taxonomies( $query_vars, true );
|
359 |
-
$include_products = array_merge( $include_products, get_posts( array_merge( $tax_query_vars,
|
360 |
Â
}
|
361 |
Â
|
362 |
-
$excluded_products = get_posts(
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
'
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
373 |
Â
|
374 |
Â
// since we record enabled status and visibility on child variations,
|
375 |
Â
// we need to include variable products with excluded children
|
376 |
-
$excluded_variations = get_posts(
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
'
|
381 |
-
|
382 |
-
|
383 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
384 |
Â
|
385 |
Â
/** @var \WP_Post[] $excluded_variations */
|
386 |
Â
foreach ( $excluded_variations as $variation_post ) {
|
@@ -393,7 +553,7 @@ class Admin {
|
|
393 |
Â
$include_products[] = $variable_product->get_id();
|
394 |
Â
}
|
395 |
Â
}
|
396 |
-
}
|
397 |
Â
|
398 |
Â
if ( ! empty( $include_products ) ) {
|
399 |
Â
|
@@ -413,7 +573,7 @@ class Admin {
|
|
413 |
Â
unset( $query_vars['meta_query'] );
|
414 |
Â
}
|
415 |
Â
}
|
416 |
-
}
|
417 |
Â
|
418 |
Â
if ( isset( $query_vars['meta_query'] ) && empty( $query_vars['meta_query'] ) ) {
|
419 |
Â
unset( $query_vars['meta_query'] );
|
@@ -433,17 +593,17 @@ class Admin {
|
|
433 |
Â
*/
|
434 |
Â
private function add_query_vars_to_find_products_with_sync_enabled( array $query_vars ) {
|
435 |
Â
|
436 |
-
$meta_query =
|
437 |
Â
'relation' => 'OR',
|
438 |
-
|
439 |
Â
'key' => Products::SYNC_ENABLED_META_KEY,
|
440 |
Â
'value' => 'yes',
|
441 |
-
|
442 |
-
|
443 |
Â
'key' => Products::SYNC_ENABLED_META_KEY,
|
444 |
Â
'compare' => 'NOT EXISTS',
|
445 |
-
|
446 |
-
|
447 |
Â
|
448 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
449 |
Â
|
@@ -452,11 +612,11 @@ class Admin {
|
|
452 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
453 |
Â
|
454 |
Â
$original_meta_query = $query_vars['meta_query'];
|
455 |
-
$query_vars['meta_query'] =
|
456 |
Â
'relation' => 'AND',
|
457 |
Â
$original_meta_query,
|
458 |
Â
$meta_query,
|
459 |
-
|
460 |
Â
}
|
461 |
Â
|
462 |
Â
// check whether the product belongs to an excluded product category or tag
|
@@ -472,36 +632,36 @@ class Admin {
|
|
472 |
Â
* @since 1.10.0
|
473 |
Â
*
|
474 |
Â
* @param array $query_vars product query vars for the edit screen
|
475 |
-
* @param bool
|
476 |
Â
* @return array
|
477 |
Â
*/
|
478 |
-
private function maybe_add_tax_query_for_excluded_taxonomies( $query_vars, $in
|
479 |
Â
|
480 |
Â
$integration = facebook_for_woocommerce()->get_integration();
|
481 |
Â
|
482 |
Â
if ( $integration ) {
|
483 |
Â
|
484 |
-
$tax_query =
|
485 |
Â
$excluded_categories_ids = $integration->get_excluded_product_category_ids();
|
486 |
Â
|
487 |
Â
if ( $excluded_categories_ids ) {
|
488 |
-
$tax_query[] =
|
489 |
Â
'taxonomy' => 'product_cat',
|
490 |
Â
'terms' => $excluded_categories_ids,
|
491 |
Â
'field' => 'term_id',
|
492 |
Â
'operator' => $in ? 'IN' : 'NOT IN',
|
493 |
-
|
494 |
Â
}
|
495 |
Â
|
496 |
Â
$excluded_tags_ids = $integration->get_excluded_product_tag_ids();
|
497 |
Â
|
498 |
Â
if ( $excluded_tags_ids ) {
|
499 |
-
$tax_query[] =
|
500 |
Â
'taxonomy' => 'product_tag',
|
501 |
Â
'terms' => $excluded_tags_ids,
|
502 |
Â
'field' => 'term_id',
|
503 |
Â
'operator' => $in ? 'IN' : 'NOT IN',
|
504 |
-
|
505 |
Â
}
|
506 |
Â
|
507 |
Â
if ( count( $tax_query ) > 1 ) {
|
@@ -513,7 +673,7 @@ class Admin {
|
|
513 |
Â
} elseif ( $tax_query && is_array( $query_vars ) ) {
|
514 |
Â
$query_vars['tax_query'][] = $tax_query;
|
515 |
Â
}
|
516 |
-
}
|
517 |
Â
|
518 |
Â
return $query_vars;
|
519 |
Â
}
|
@@ -529,17 +689,17 @@ class Admin {
|
|
529 |
Â
*/
|
530 |
Â
private function add_query_vars_to_find_visible_products( array $query_vars ) {
|
531 |
Â
|
532 |
-
$visibility_meta_query =
|
533 |
Â
'relation' => 'OR',
|
534 |
-
|
535 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
536 |
Â
'value' => 'yes',
|
537 |
-
|
538 |
-
|
539 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
540 |
Â
'compare' => 'NOT EXISTS',
|
541 |
-
|
542 |
-
|
543 |
Â
|
544 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
545 |
Â
|
@@ -547,12 +707,12 @@ class Admin {
|
|
547 |
Â
|
548 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
549 |
Â
|
550 |
-
$enabled_meta_query
|
551 |
-
$query_vars['meta_query'] =
|
552 |
Â
'relation' => 'AND',
|
553 |
Â
$enabled_meta_query,
|
554 |
Â
$visibility_meta_query,
|
555 |
-
|
556 |
Â
}
|
557 |
Â
|
558 |
Â
return $query_vars;
|
@@ -569,10 +729,10 @@ class Admin {
|
|
569 |
Â
*/
|
570 |
Â
private function add_query_vars_to_find_hidden_products( array $query_vars ) {
|
571 |
Â
|
572 |
-
$visibility_meta_query =
|
573 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
574 |
Â
'value' => 'no',
|
575 |
-
|
576 |
Â
|
577 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
578 |
Â
|
@@ -580,12 +740,12 @@ class Admin {
|
|
580 |
Â
|
581 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
582 |
Â
|
583 |
-
$enabled_meta_query
|
584 |
-
$query_vars['meta_query'] =
|
585 |
Â
'relation' => 'AND',
|
586 |
Â
$enabled_meta_query,
|
587 |
Â
$visibility_meta_query,
|
588 |
-
|
589 |
Â
}
|
590 |
Â
|
591 |
Â
return $query_vars;
|
@@ -633,19 +793,19 @@ class Admin {
|
|
633 |
Â
$action = isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ? sanitize_text_field( wp_unslash( $_REQUEST['action2'] ) ) : null;
|
634 |
Â
}
|
635 |
Â
|
636 |
-
if ( $action && in_array( $action,
|
637 |
Â
|
638 |
-
$products =
|
639 |
Â
|
640 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
641 |
-
$product_ids = isset( $_REQUEST['post'] ) && is_array( $_REQUEST['post'] ) ? array_map( 'absint', $_REQUEST['post'] ) :
|
642 |
Â
|
643 |
Â
if ( ! empty( $product_ids ) ) {
|
644 |
Â
|
645 |
Â
/** @var \WC_Product[] $enabling_sync_virtual_products virtual products that are being included */
|
646 |
-
$enabling_sync_virtual_products =
|
647 |
Â
/** @var \WC_Product_Variation[] $enabling_sync_virtual_variations virtual variations that are being included */
|
648 |
-
$enabling_sync_virtual_variations =
|
649 |
Â
|
650 |
Â
foreach ( $product_ids as $product_id ) {
|
651 |
Â
|
@@ -675,10 +835,10 @@ class Admin {
|
|
675 |
Â
}
|
676 |
Â
}
|
677 |
Â
}
|
678 |
-
}
|
679 |
-
}
|
680 |
-
}
|
681 |
-
}
|
682 |
Â
|
683 |
Â
if ( ! empty( $enabling_sync_virtual_products ) || ! empty( $enabling_sync_virtual_variations ) ) {
|
684 |
Â
|
@@ -700,7 +860,7 @@ class Admin {
|
|
700 |
Â
|
701 |
Â
Products::set_product_visibility( $variation, false );
|
702 |
Â
}
|
703 |
-
}
|
704 |
Â
|
705 |
Â
if ( 'facebook_include' === $action ) {
|
706 |
Â
|
@@ -714,8 +874,8 @@ class Admin {
|
|
714 |
Â
|
715 |
Â
self::add_product_disabled_sync_notice( count( $products ) );
|
716 |
Â
}
|
717 |
-
}
|
718 |
-
}
|
719 |
Â
|
720 |
Â
return $redirect;
|
721 |
Â
}
|
@@ -744,9 +904,9 @@ class Admin {
|
|
744 |
Â
|
745 |
Â
// schedule simple products to be updated or deleted from the catalog in the background
|
746 |
Â
if ( Products::product_should_be_deleted( $product ) ) {
|
747 |
-
facebook_for_woocommerce()->get_products_sync_handler()->delete_products(
|
748 |
Â
} else {
|
749 |
-
facebook_for_woocommerce()->get_products_sync_handler()->create_or_update_products(
|
750 |
Â
}
|
751 |
Â
}
|
752 |
Â
}
|
@@ -799,8 +959,10 @@ class Admin {
|
|
799 |
Â
$message = sprintf(
|
800 |
Â
/* translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s - <a> tag, %4$s - <a> tag */
|
801 |
Â
_n( '%1$sHeads up!%2$s If this product was previously visible in Facebook, you may need to delete it from the %3$sFacebook catalog%4$s to completely hide it from customer view.', '%1$sHeads up!%2$s If these products were previously visible in Facebook, you may need to delete them from the %3$sFacebook catalog%4$s to completely hide them from customer view.', $count, 'facebook-for-woocommerce' ),
|
802 |
-
'<strong>',
|
803 |
-
'
|
Â
|
|
Â
|
|
804 |
Â
);
|
805 |
Â
|
806 |
Â
$message .= '<a class="button js-wc-plugin-framework-notice-dismiss">' . esc_html__( "Don't show this notice again", 'facebook-for-woocommerce' ) . '</a>';
|
@@ -808,14 +970,15 @@ class Admin {
|
|
808 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
809 |
Â
$message,
|
810 |
Â
$message_id,
|
811 |
-
|
812 |
-
'dismissible'
|
813 |
-
|
814 |
-
|
Â
|
|
815 |
Â
);
|
816 |
Â
|
817 |
Â
delete_transient( $transient_name );
|
818 |
-
}
|
819 |
Â
}
|
820 |
Â
|
821 |
Â
|
@@ -833,14 +996,18 @@ class Admin {
|
|
833 |
Â
|
834 |
Â
if ( SV_WC_Helper::is_current_screen( 'edit-product' ) && get_transient( $show_notice_transient_name ) && ( $affected_products = get_transient( $affected_products_transient_name ) ) ) {
|
835 |
Â
|
836 |
-
$message = sprintf(
|
Â
|
|
837 |
Â
/* translators: Placeholders: %1$s - number of affected products, %2$s opening HTML <a> tag, %3$s - closing HTML </a> tag, %4$s - opening HTML <a> tag, %5$s - closing HTML </a> tag */
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
Â
|
|
Â
|
|
Â
|
|
842 |
Â
count( $affected_products ),
|
843 |
-
'<a href="' . add_query_arg(
|
844 |
Â
'</a>',
|
845 |
Â
'<a href="https://www.facebook.com/policies/commerce/prohibited_content/subscriptions_and_digital_products" target="_blank">',
|
846 |
Â
'</a>'
|
@@ -849,14 +1016,14 @@ class Admin {
|
|
849 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
850 |
Â
$message,
|
851 |
Â
'wc-' . facebook_for_woocommerce()->get_id_dasherized() . '-enabling-virtual-products-sync',
|
852 |
-
|
853 |
Â
'dismissible' => false,
|
854 |
Â
'notice_class' => 'notice-info',
|
855 |
-
|
856 |
Â
);
|
857 |
Â
|
858 |
Â
delete_transient( $show_notice_transient_name );
|
859 |
-
}
|
860 |
Â
}
|
861 |
Â
|
862 |
Â
|
@@ -893,7 +1060,7 @@ class Admin {
|
|
893 |
Â
public function add_handled_virtual_products_variations_notice() {
|
894 |
Â
|
895 |
Â
if ( 'yes' === get_option( 'wc_facebook_background_handle_virtual_products_variations_complete', 'no' ) &&
|
896 |
-
|
897 |
Â
|
898 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
899 |
Â
sprintf(
|
@@ -905,10 +1072,10 @@ class Admin {
|
|
905 |
Â
'</a>'
|
906 |
Â
),
|
907 |
Â
'wc-' . facebook_for_woocommerce()->get_id_dasherized() . '-updated-virtual-products-sync',
|
908 |
-
|
909 |
Â
'notice_class' => 'notice-info',
|
910 |
Â
'always_show_on_settings' => false,
|
911 |
-
|
912 |
Â
);
|
913 |
Â
}
|
914 |
Â
}
|
@@ -926,11 +1093,11 @@ class Admin {
|
|
926 |
Â
*/
|
927 |
Â
public function add_product_settings_tab( $tabs ) {
|
928 |
Â
|
929 |
-
$tabs['fb_commerce_tab'] =
|
930 |
Â
'label' => __( 'Facebook', 'facebook-for-woocommerce' ),
|
931 |
Â
'target' => 'facebook_options',
|
932 |
-
'class' =>
|
933 |
-
|
934 |
Â
|
935 |
Â
return $tabs;
|
936 |
Â
}
|
@@ -948,7 +1115,7 @@ class Admin {
|
|
948 |
Â
|
949 |
Â
// all products have sync enabled unless explicitly disabled
|
950 |
Â
$sync_enabled = 'no' !== get_post_meta( $post->ID, Products::SYNC_ENABLED_META_KEY, true );
|
951 |
-
$is_visible
|
952 |
Â
|
953 |
Â
$description = get_post_meta( $post->ID, \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION, true );
|
954 |
Â
$price = get_post_meta( $post->ID, \WC_Facebook_Product::FB_PRODUCT_PRICE, true );
|
@@ -964,69 +1131,99 @@ class Admin {
|
|
964 |
Â
// 'id' attribute needs to match the 'target' parameter set above
|
965 |
Â
?>
|
966 |
Â
<div id='facebook_options' class='panel woocommerce_options_panel'>
|
967 |
-
<div class='options_group'>
|
968 |
Â
<?php
|
969 |
Â
|
970 |
-
woocommerce_wp_select(
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1027 |
Â
|
1028 |
Â
?>
|
1029 |
Â
</div>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1030 |
Â
</div>
|
1031 |
Â
<?php
|
1032 |
Â
}
|
@@ -1039,8 +1236,8 @@ class Admin {
|
|
1039 |
Â
*
|
1040 |
Â
* @since 1.10.0
|
1041 |
Â
*
|
1042 |
-
* @param int
|
1043 |
-
* @param array
|
1044 |
Â
* @param \WC_Post $post the post type for the current variation
|
1045 |
Â
*/
|
1046 |
Â
public function add_product_variation_edit_fields( $index, $variation_data, $post ) {
|
@@ -1058,7 +1255,7 @@ class Admin {
|
|
1058 |
Â
}
|
1059 |
Â
|
1060 |
Â
$sync_enabled = 'no' !== $this->get_product_variation_meta( $variation, Products::SYNC_ENABLED_META_KEY, $parent );
|
1061 |
-
$is_visible
|
1062 |
Â
|
1063 |
Â
$description = $this->get_product_variation_meta( $variation, \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION, $parent );
|
1064 |
Â
$price = $this->get_product_variation_meta( $variation, \WC_Facebook_Product::FB_PRODUCT_PRICE, $parent );
|
@@ -1071,72 +1268,82 @@ class Admin {
|
|
1071 |
Â
$sync_mode = self::SYNC_MODE_SYNC_DISABLED;
|
1072 |
Â
}
|
1073 |
Â
|
1074 |
-
woocommerce_wp_select(
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1140 |
Â
}
|
1141 |
Â
|
1142 |
Â
|
@@ -1148,8 +1355,8 @@ class Admin {
|
|
1148 |
Â
* @since 1.10.0
|
1149 |
Â
*
|
1150 |
Â
* @param \WC_Product_Variation $variation the product variation
|
1151 |
-
* @param string
|
1152 |
-
* @param \WC_Product
|
1153 |
Â
* @return mixed
|
1154 |
Â
*/
|
1155 |
Â
private function get_product_variation_meta( $variation, $key, $parent ) {
|
@@ -1193,7 +1400,7 @@ class Admin {
|
|
1193 |
Â
// phpcs:disable WordPress.Security.NonceVerification.Missing
|
1194 |
Â
if ( $sync_enabled ) {
|
1195 |
Â
|
1196 |
-
Products::enable_sync_for_products(
|
1197 |
Â
Products::set_product_visibility( $variation, self::SYNC_MODE_SYNC_AND_HIDE !== $sync_mode );
|
1198 |
Â
|
1199 |
Â
$posted_param = 'variable_' . \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION;
|
@@ -1216,9 +1423,9 @@ class Admin {
|
|
1216 |
Â
|
1217 |
Â
} else {
|
1218 |
Â
|
1219 |
-
Products::disable_sync_for_products(
|
1220 |
Â
|
1221 |
-
}
|
1222 |
Â
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
1223 |
Â
}
|
1224 |
Â
|
@@ -1233,8 +1440,16 @@ class Admin {
|
|
1233 |
Â
public function render_modal_template() {
|
1234 |
Â
global $current_screen;
|
1235 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1236 |
Â
// bail if not on the products, product edit, or settings screen
|
1237 |
-
if ( ! $current_screen || ! in_array( $current_screen->id,
|
1238 |
Â
return;
|
1239 |
Â
}
|
1240 |
Â
|
@@ -1279,8 +1494,8 @@ class Admin {
|
|
1279 |
Â
$product = wc_get_product( $post );
|
1280 |
Â
|
1281 |
Â
if ( $product instanceof \WC_Product
|
1282 |
-
|
1283 |
-
|
1284 |
Â
) :
|
1285 |
Â
|
1286 |
Â
?>
|
@@ -1316,7 +1531,7 @@ class Admin {
|
|
1316 |
Â
} );
|
1317 |
Â
} );
|
1318 |
Â
</script>
|
1319 |
-
|
1320 |
Â
|
1321 |
Â
endif;
|
1322 |
Â
|
@@ -1350,7 +1565,7 @@ class Admin {
|
|
1350 |
Â
* @deprecated 2.0.0
|
1351 |
Â
*
|
1352 |
Â
* @param string $message_id the dismissed notice ID
|
1353 |
-
* @param int
|
1354 |
Â
*/
|
1355 |
Â
public function handle_dismiss_notice( $message_id, $user_id = null ) {
|
1356 |
Â
|
@@ -1372,24 +1587,4 @@ class Admin {
|
|
1372 |
Â
}
|
1373 |
Â
|
1374 |
Â
|
1375 |
-
/**
|
1376 |
-
* Determines whether sync is enabled for the current product.
|
1377 |
-
*
|
1378 |
-
* @since 2.0.5
|
1379 |
-
*
|
1380 |
-
* @return bool
|
1381 |
-
*/
|
1382 |
-
private function is_sync_enabled_for_current_product() {
|
1383 |
-
global $post;
|
1384 |
-
|
1385 |
-
$product = wc_get_product( $post );
|
1386 |
-
|
1387 |
-
if ( ! $product instanceof \WC_Product ) {
|
1388 |
-
return false;
|
1389 |
-
}
|
1390 |
-
|
1391 |
-
return Products::is_sync_enabled_for_product( $product );
|
1392 |
-
}
|
1393 |
-
|
1394 |
-
|
1395 |
Â
}
|
32 |
Â
const SYNC_MODE_SYNC_DISABLED = 'sync_disabled';
|
33 |
Â
|
34 |
Â
|
35 |
+
/** @var \Admin\Orders the orders admin handler */
|
36 |
+
protected $orders;
|
37 |
+
|
38 |
+
/** @var \Admin\Product_Categories the product category admin handler */
|
39 |
+
protected $product_categories;
|
40 |
+
|
41 |
+
|
42 |
Â
/**
|
43 |
Â
* Admin constructor.
|
44 |
Â
*
|
56 |
Â
return;
|
57 |
Â
}
|
58 |
Â
|
59 |
+
require_once __DIR__ . '/Admin/Orders.php';
|
60 |
+
require_once __DIR__ . '/Admin/Products.php';
|
61 |
+
require_once __DIR__ . '/Admin/Product_Categories.php';
|
62 |
+
|
63 |
+
$this->orders = new Admin\Orders();
|
64 |
+
$this->product_categories = new Admin\Product_Categories();
|
65 |
+
|
66 |
Â
// add a modal in admin product pages
|
67 |
+
add_action( 'admin_footer', array( $this, 'render_modal_template' ) );
|
68 |
Â
// may trigger the modal to open to warn the merchant about a conflict with the current product terms
|
69 |
+
add_action( 'admin_footer', array( $this, 'validate_product_excluded_terms' ) );
|
70 |
Â
|
71 |
Â
// add admin notice to inform that disabled products may need to be deleted manually
|
72 |
+
add_action( 'admin_notices', array( $this, 'maybe_show_product_disabled_sync_notice' ) );
|
73 |
Â
|
74 |
Â
// add admin notice if the user is enabling sync for virtual products using the bulk action
|
75 |
+
add_action( 'admin_notices', array( $this, 'maybe_add_enabling_virtual_products_sync_notice' ) );
|
76 |
+
add_filter( 'request', array( $this, 'filter_virtual_products_affected_enabling_sync' ) );
|
77 |
Â
|
78 |
Â
// add admin notice to inform sync mode has been automatically set to Sync and hide for virtual products and variations
|
79 |
+
add_action( 'admin_notices', array( $this, 'add_handled_virtual_products_variations_notice' ) );
|
80 |
Â
|
81 |
Â
// add columns for displaying Facebook sync enabled/disabled and catalog visibility status
|
82 |
+
add_filter( 'manage_product_posts_columns', array( $this, 'add_product_list_table_columns' ) );
|
83 |
+
add_action( 'manage_product_posts_custom_column', array( $this, 'add_product_list_table_columns_content' ) );
|
84 |
Â
|
85 |
Â
// add input to filter products by Facebook sync enabled
|
86 |
+
add_action( 'restrict_manage_posts', array( $this, 'add_products_by_sync_enabled_input_filter' ), 40 );
|
87 |
+
add_filter( 'request', array( $this, 'filter_products_by_sync_enabled' ) );
|
88 |
Â
|
89 |
Â
// add bulk actions to manage products sync
|
90 |
+
add_filter( 'bulk_actions-edit-product', array( $this, 'add_products_sync_bulk_actions' ), 40 );
|
91 |
+
add_action( 'handle_bulk_actions-edit-product', array( $this, 'handle_products_sync_bulk_actions' ) );
|
92 |
Â
|
93 |
Â
// add Product data tab
|
94 |
+
add_filter( 'woocommerce_product_data_tabs', array( $this, 'add_product_settings_tab' ) );
|
95 |
+
add_action( 'woocommerce_product_data_panels', array( $this, 'add_product_settings_tab_content' ) );
|
96 |
Â
|
97 |
Â
// add Variation edit fields
|
98 |
+
add_action( 'woocommerce_product_after_variable_attributes', array( $this, 'add_product_variation_edit_fields' ), 10, 3 );
|
99 |
+
add_action( 'woocommerce_save_product_variation', array( $this, 'save_product_variation_edit_fields' ), 10, 2 );
|
100 |
Â
}
|
101 |
Â
|
102 |
Â
|
110 |
Â
public function enqueue_scripts() {
|
111 |
Â
global $current_screen;
|
112 |
Â
|
113 |
+
$modal_screens = array(
|
114 |
Â
'product',
|
115 |
Â
'edit-product',
|
116 |
+
'edit-product_cat',
|
117 |
+
'shop_order',
|
118 |
+
);
|
119 |
Â
|
120 |
Â
if ( isset( $current_screen->id ) ) {
|
121 |
Â
|
122 |
Â
if ( in_array( $current_screen->id, $modal_screens, true ) || facebook_for_woocommerce()->is_plugin_settings() ) {
|
123 |
Â
|
124 |
Â
// enqueue modal functions
|
125 |
+
wp_enqueue_script( 'facebook-for-woocommerce-modal', facebook_for_woocommerce()->get_plugin_url() . '/assets/js/facebook-for-woocommerce-modal.min.js', array( 'jquery', 'wc-backbone-modal', 'jquery-blockui' ), \WC_Facebookcommerce::PLUGIN_VERSION );
|
126 |
Â
}
|
127 |
Â
|
128 |
Â
if ( 'product' === $current_screen->id || 'edit-product' === $current_screen->id ) {
|
129 |
Â
|
130 |
+
wp_enqueue_style( 'facebook-for-woocommerce-products-admin', facebook_for_woocommerce()->get_plugin_url() . '/assets/css/admin/facebook-for-woocommerce-products-admin.css', array(), \WC_Facebookcommerce::PLUGIN_VERSION );
|
131 |
+
|
132 |
+
wp_enqueue_script( 'facebook-for-woocommerce-products-admin', facebook_for_woocommerce()->get_plugin_url() . '/assets/js/admin/facebook-for-woocommerce-products-admin.min.js', [ 'jquery', 'wc-backbone-modal', 'jquery-blockui', 'facebook-for-woocommerce-modal' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
133 |
+
|
134 |
+
wp_localize_script(
|
135 |
+
'facebook-for-woocommerce-products-admin',
|
136 |
+
'facebook_for_woocommerce_products_admin',
|
137 |
+
array(
|
138 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
139 |
+
'enhanced_attribute_optional_selector' => \SkyVerge\WooCommerce\Facebook\Admin\Enhanced_Catalog_Attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX . \SkyVerge\WooCommerce\Facebook\Admin\Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY,
|
140 |
+
'enhanced_attribute_page_type_edit_category' => \SkyVerge\WooCommerce\Facebook\Admin\Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_CATEGORY,
|
141 |
+
'enhanced_attribute_page_type_add_category' => \SkyVerge\WooCommerce\Facebook\Admin\Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_ADD_CATEGORY,
|
142 |
+
'enhanced_attribute_page_type_edit_product' => \SkyVerge\WooCommerce\Facebook\Admin\Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_PRODUCT,
|
143 |
+
'is_sync_enabled_for_product' => $this->is_sync_enabled_for_current_product(),
|
144 |
+
'set_product_visibility_nonce' => wp_create_nonce( 'set-products-visibility' ),
|
145 |
+
'set_product_sync_prompt_nonce' => wp_create_nonce( 'set-product-sync-prompt' ),
|
146 |
+
'set_product_sync_bulk_action_prompt_nonce' => wp_create_nonce( 'set-product-sync-bulk-action-prompt' ),
|
147 |
+
'product_not_ready_modal_message' => $this->get_product_not_ready_modal_message(),
|
148 |
+
'product_not_ready_modal_buttons' => $this->get_product_not_ready_modal_buttons(),
|
149 |
+
'i18n' => array(
|
150 |
+
'missing_google_product_category_message' => __( 'Please enter a Google product category and at least one sub-category to sell this product on Instagram.', 'facebook-for-woocommerce' ),
|
151 |
+
),
|
152 |
+
)
|
153 |
+
);
|
154 |
+
|
155 |
+
}//end if
|
156 |
Â
|
157 |
Â
if ( facebook_for_woocommerce()->is_plugin_settings() ) {
|
158 |
Â
|
159 |
Â
wp_enqueue_style( 'woocommerce_admin_styles' );
|
160 |
Â
wp_enqueue_script( 'wc-enhanced-select' );
|
161 |
Â
}
|
162 |
+
}//end if
|
163 |
+
|
164 |
+
// wp_enqueue_script( 'wc-facebook-google-product-category-fields', facebook_for_woocommerce()->get_plugin_url() . '/assets/js/admin/google-product-category-fields.min.js', [ 'jquery' ], \WC_Facebookcommerce::PLUGIN_VERSION );
|
165 |
+
wp_enqueue_script( 'wc-facebook-google-product-category-fields', facebook_for_woocommerce()->get_plugin_url() . '/assets/js/admin/google-product-category-fields.js', array( 'jquery' ), \WC_Facebookcommerce::PLUGIN_VERSION );
|
166 |
+
|
167 |
+
wp_localize_script(
|
168 |
+
'wc-facebook-google-product-category-fields',
|
169 |
+
'facebook_for_woocommerce_google_product_category',
|
170 |
+
array(
|
171 |
+
'i18n' => array(
|
172 |
+
'top_level_dropdown_placeholder' => __( 'Search main categories...', 'facebook-for-woocommerce' ),
|
173 |
+
'second_level_empty_dropdown_placeholder' => __( 'Choose a main category', 'facebook-for-woocommerce' ),
|
174 |
+
'general_dropdown_placeholder' => __( 'Choose a category', 'facebook-for-woocommerce' ),
|
175 |
+
),
|
176 |
+
)
|
177 |
+
);
|
178 |
+
}
|
179 |
+
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Determines whether sync is enabled for the current product.
|
183 |
+
*
|
184 |
+
* @since 2.0.5
|
185 |
+
*
|
186 |
+
* @return bool
|
187 |
+
*/
|
188 |
+
private function is_sync_enabled_for_current_product() {
|
189 |
+
global $post;
|
190 |
+
|
191 |
+
$product = wc_get_product( $post );
|
192 |
+
|
193 |
+
if ( ! $product instanceof \WC_Product ) {
|
194 |
+
return false;
|
195 |
Â
}
|
196 |
+
|
197 |
+
return Products::is_sync_enabled_for_product( $product );
|
198 |
+
}
|
199 |
+
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Gets the markup for the message used in the product not ready modal.
|
203 |
+
*
|
204 |
+
* @since 2.1.0
|
205 |
+
*
|
206 |
+
* @return string
|
207 |
+
*/
|
208 |
+
private function get_product_not_ready_modal_message() {
|
209 |
+
|
210 |
+
ob_start();
|
211 |
+
|
212 |
+
?>
|
213 |
+
<p><?php esc_html_e( 'To sell this product on Instagram, please ensure it meets the following requirements:', 'facebook-for-woocommerce' ); ?></p>
|
214 |
+
|
215 |
+
<ul class="ul-disc">
|
216 |
+
<li><?php esc_html_e( 'Has a price defined', 'facebook-for-woocommerce' ); ?></li>
|
217 |
+
<li><?php echo esc_html( sprintf(
|
218 |
+
/* translators: Placeholders: %1$s - <strong> opening HTML tag, %2$s - </strong> closing HTML tag */
|
219 |
+
__( 'Has %1$sManage Stock%2$s enabled on the %1$sInventory%2$s tab', 'facebook-for-woocommerce' ),
|
220 |
+
'<strong>',
|
221 |
+
'</strong>'
|
222 |
+
) ); ?></li>
|
223 |
+
<li><?php echo esc_html( sprintf(
|
224 |
+
/* translators: Placeholders: %1$s - <strong> opening HTML tag, %2$s - </strong> closing HTML tag */
|
225 |
+
__( 'Has the %1$sFacebook Sync%2$s setting set to "Sync and show" or "Sync and hide"', 'facebook-for-woocommerce' ),
|
226 |
+
'<strong>',
|
227 |
+
'</strong>'
|
228 |
+
) ); ?></li>
|
229 |
+
</ul>
|
230 |
+
<?php
|
231 |
+
|
232 |
+
return ob_get_clean();
|
233 |
+
}
|
234 |
+
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Gets the markup for the buttons used in the product not ready modal.
|
238 |
+
*
|
239 |
+
* @since 2.1.0
|
240 |
+
*
|
241 |
+
* @return string
|
242 |
+
*/
|
243 |
+
private function get_product_not_ready_modal_buttons() {
|
244 |
+
|
245 |
+
ob_start();
|
246 |
+
|
247 |
+
?>
|
248 |
+
<button
|
249 |
+
id="btn-ok"
|
250 |
+
class="button button-large button-primary"
|
251 |
+
><?php esc_html_e( 'Close', 'facebook-for-woocomerce' ); ?></button>
|
252 |
+
<?php
|
253 |
+
|
254 |
+
return ob_get_clean();
|
255 |
+
}
|
256 |
+
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Gets the orders admin handler instance.
|
260 |
+
*
|
261 |
+
* @since 2.1.0
|
262 |
+
*
|
263 |
+
* @return \SkyVerge\WooCommerce\Facebook\Admin\Orders
|
264 |
+
*/
|
265 |
+
public function get_orders_handler() {
|
266 |
+
|
267 |
+
return $this->orders;
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Gets the product category admin handler instance.
|
273 |
+
*
|
274 |
+
* @since 2.1.0
|
275 |
+
*
|
276 |
+
* @return \SkyVerge\WooCommerce\Facebook\Admin\Product_Categories
|
277 |
+
*/
|
278 |
+
public function get_product_categories_handler() {
|
279 |
+
|
280 |
+
return $this->product_categories;
|
281 |
Â
}
|
282 |
Â
|
283 |
Â
|
372 |
Â
*/
|
373 |
Â
public function filter_products_by_sync_enabled( $query_vars ) {
|
374 |
Â
|
375 |
+
$valid_values = array(
|
376 |
Â
self::SYNC_MODE_SYNC_AND_SHOW,
|
377 |
Â
self::SYNC_MODE_SYNC_AND_HIDE,
|
378 |
Â
self::SYNC_MODE_SYNC_DISABLED,
|
379 |
+
);
|
380 |
Â
|
381 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
382 |
Â
if ( isset( $_REQUEST['fb_sync_enabled'] ) && in_array( $_REQUEST['fb_sync_enabled'], $valid_values, true ) ) {
|
383 |
Â
|
384 |
Â
// store original meta query
|
385 |
+
$original_meta_query = ! empty( $query_vars['meta_query'] ) ? $query_vars['meta_query'] : array();
|
386 |
Â
|
387 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
388 |
Â
$filter_value = $_REQUEST['fb_sync_enabled'];
|
391 |
Â
if ( ! empty( $query_vars['meta_query'] ) ) {
|
392 |
Â
$query_vars['meta_query']['relation'] = 'AND';
|
393 |
Â
} else {
|
394 |
+
$query_vars['meta_query'] = array();
|
395 |
Â
}
|
396 |
Â
|
397 |
Â
if ( self::SYNC_MODE_SYNC_AND_SHOW === $filter_value ) {
|
403 |
Â
$query_vars = $this->add_query_vars_to_find_visible_products( $query_vars );
|
404 |
Â
|
405 |
Â
// since we record enabled status and visibility on child variations, we need to query variable products found for their children to exclude them from query results
|
406 |
+
$exclude_products = array();
|
407 |
+
$found_ids = get_posts( array_merge( $query_vars, array( 'fields' => 'ids' ) ) );
|
408 |
+
$found_products = empty( $found_ids ) ? array() : wc_get_products(
|
409 |
+
array(
|
410 |
+
'limit' => -1,
|
411 |
+
'type' => 'variable',
|
412 |
+
'include' => $found_ids,
|
413 |
+
)
|
414 |
+
);
|
415 |
Â
|
416 |
Â
/** @var \WC_Product[] $found_products */
|
417 |
Â
foreach ( $found_products as $product ) {
|
418 |
Â
|
419 |
Â
if ( ! Products::is_sync_enabled_for_product( $product )
|
420 |
+
|| ! Products::is_product_visible( $product ) ) {
|
421 |
Â
|
422 |
Â
$exclude_products[] = $product->get_id();
|
423 |
Â
}
|
430 |
Â
$query_vars['post__not_in'] = $exclude_products;
|
431 |
Â
}
|
432 |
Â
}
|
Â
|
|
433 |
Â
} elseif ( self::SYNC_MODE_SYNC_AND_HIDE === $filter_value ) {
|
434 |
Â
|
435 |
Â
// when checking for products with sync enabled we need to check both "yes" and meta not set, this requires adding an "OR" clause
|
439 |
Â
$query_vars = $this->add_query_vars_to_find_hidden_products( $query_vars );
|
440 |
Â
|
441 |
Â
// since we record enabled status and visibility on child variations, we need to query variable products found for their children to exclude them from query results
|
442 |
+
$exclude_products = array();
|
443 |
+
$found_ids = get_posts( array_merge( $query_vars, array( 'fields' => 'ids' ) ) );
|
444 |
+
$found_products = empty( $found_ids ) ? array() : wc_get_products(
|
445 |
+
array(
|
446 |
+
'limit' => -1,
|
447 |
+
'type' => 'variable',
|
448 |
+
'include' => $found_ids,
|
449 |
+
)
|
450 |
+
);
|
451 |
Â
|
452 |
Â
/** @var \WC_Product[] $found_products */
|
453 |
Â
foreach ( $found_products as $product ) {
|
454 |
Â
|
455 |
Â
if ( ! Products::is_sync_enabled_for_product( $product )
|
456 |
+
|| Products::is_product_visible( $product ) ) {
|
457 |
Â
|
458 |
Â
$exclude_products[] = $product->get_id();
|
459 |
Â
}
|
468 |
Â
}
|
469 |
Â
|
470 |
Â
// for the same reason, we also need to include variable products with hidden children
|
471 |
+
$include_products = array();
|
472 |
+
$hidden_variations = get_posts(
|
473 |
+
array(
|
474 |
+
'limit' => -1,
|
475 |
+
'post_type' => 'product_variation',
|
476 |
+
'meta_query' => array(
|
477 |
+
'key' => Products::VISIBILITY_META_KEY,
|
478 |
+
'value' => 'no',
|
479 |
+
),
|
480 |
+
)
|
481 |
+
);
|
482 |
Â
|
483 |
Â
/** @var \WP_Post[] $hidden_variations */
|
484 |
Â
foreach ( $hidden_variations as $variation_post ) {
|
487 |
Â
|
488 |
Â
// we need this check because we only want products with ALL variations hidden
|
489 |
Â
if ( $variable_product instanceof \WC_Product && Products::is_sync_enabled_for_product( $variable_product )
|
490 |
+
&& ! Products::is_product_visible( $variable_product ) ) {
|
491 |
Â
|
492 |
Â
$include_products[] = $variable_product->get_id();
|
493 |
Â
}
|
494 |
Â
}
|
Â
|
|
495 |
Â
} else {
|
496 |
Â
|
497 |
Â
// self::SYNC_MODE_SYNC_DISABLED
|
498 |
Â
|
499 |
Â
// products to be included in the QUERY, not in the sync
|
500 |
+
$include_products = array();
|
501 |
+
$found_ids = array();
|
502 |
Â
|
503 |
Â
$integration = facebook_for_woocommerce()->get_integration();
|
504 |
+
$excluded_categories_ids = $integration ? $integration->get_excluded_product_category_ids() : array();
|
505 |
+
$excluded_tags_ids = $integration ? $integration->get_excluded_product_tag_ids() : array();
|
506 |
Â
|
507 |
Â
// get the product IDs from all products in excluded taxonomies
|
508 |
Â
if ( $excluded_categories_ids || $excluded_tags_ids ) {
|
509 |
Â
|
510 |
Â
$tax_query_vars = $this->maybe_add_tax_query_for_excluded_taxonomies( $query_vars, true );
|
511 |
+
$include_products = array_merge( $include_products, get_posts( array_merge( $tax_query_vars, array( 'fields' => 'ids' ) ) ) );
|
512 |
Â
}
|
513 |
Â
|
514 |
+
$excluded_products = get_posts(
|
515 |
+
array(
|
516 |
+
'fields' => 'ids',
|
517 |
+
'limit' => -1,
|
518 |
+
'post_type' => 'product',
|
519 |
+
'meta_query' => array(
|
520 |
+
array(
|
521 |
+
'key' => Products::SYNC_ENABLED_META_KEY,
|
522 |
+
'value' => 'no',
|
523 |
+
),
|
524 |
+
),
|
525 |
+
)
|
526 |
+
);
|
527 |
+
|
528 |
+
$include_products = array_unique( array_merge( $include_products, $excluded_products ) );
|
529 |
Â
|
530 |
Â
// since we record enabled status and visibility on child variations,
|
531 |
Â
// we need to include variable products with excluded children
|
532 |
+
$excluded_variations = get_posts(
|
533 |
+
array(
|
534 |
+
'limit' => -1,
|
535 |
+
'post_type' => 'product_variation',
|
536 |
+
'meta_query' => array(
|
537 |
+
array(
|
538 |
+
'key' => Products::SYNC_ENABLED_META_KEY,
|
539 |
+
'value' => 'no',
|
540 |
+
),
|
541 |
+
),
|
542 |
+
)
|
543 |
+
);
|
544 |
Â
|
545 |
Â
/** @var \WP_Post[] $excluded_variations */
|
546 |
Â
foreach ( $excluded_variations as $variation_post ) {
|
553 |
Â
$include_products[] = $variable_product->get_id();
|
554 |
Â
}
|
555 |
Â
}
|
556 |
+
}//end if
|
557 |
Â
|
558 |
Â
if ( ! empty( $include_products ) ) {
|
559 |
Â
|
573 |
Â
unset( $query_vars['meta_query'] );
|
574 |
Â
}
|
575 |
Â
}
|
576 |
+
}//end if
|
577 |
Â
|
578 |
Â
if ( isset( $query_vars['meta_query'] ) && empty( $query_vars['meta_query'] ) ) {
|
579 |
Â
unset( $query_vars['meta_query'] );
|
593 |
Â
*/
|
594 |
Â
private function add_query_vars_to_find_products_with_sync_enabled( array $query_vars ) {
|
595 |
Â
|
596 |
+
$meta_query = array(
|
597 |
Â
'relation' => 'OR',
|
598 |
+
array(
|
599 |
Â
'key' => Products::SYNC_ENABLED_META_KEY,
|
600 |
Â
'value' => 'yes',
|
601 |
+
),
|
602 |
+
array(
|
603 |
Â
'key' => Products::SYNC_ENABLED_META_KEY,
|
604 |
Â
'compare' => 'NOT EXISTS',
|
605 |
+
),
|
606 |
+
);
|
607 |
Â
|
608 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
609 |
Â
|
612 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
613 |
Â
|
614 |
Â
$original_meta_query = $query_vars['meta_query'];
|
615 |
+
$query_vars['meta_query'] = array(
|
616 |
Â
'relation' => 'AND',
|
617 |
Â
$original_meta_query,
|
618 |
Â
$meta_query,
|
619 |
+
);
|
620 |
Â
}
|
621 |
Â
|
622 |
Â
// check whether the product belongs to an excluded product category or tag
|
632 |
Â
* @since 1.10.0
|
633 |
Â
*
|
634 |
Â
* @param array $query_vars product query vars for the edit screen
|
635 |
+
* @param bool $in whether we want to return products in excluded categories and tags or not
|
636 |
Â
* @return array
|
637 |
Â
*/
|
638 |
+
private function maybe_add_tax_query_for_excluded_taxonomies( $query_vars, $in = false ) {
|
639 |
Â
|
640 |
Â
$integration = facebook_for_woocommerce()->get_integration();
|
641 |
Â
|
642 |
Â
if ( $integration ) {
|
643 |
Â
|
644 |
+
$tax_query = array();
|
645 |
Â
$excluded_categories_ids = $integration->get_excluded_product_category_ids();
|
646 |
Â
|
647 |
Â
if ( $excluded_categories_ids ) {
|
648 |
+
$tax_query[] = array(
|
649 |
Â
'taxonomy' => 'product_cat',
|
650 |
Â
'terms' => $excluded_categories_ids,
|
651 |
Â
'field' => 'term_id',
|
652 |
Â
'operator' => $in ? 'IN' : 'NOT IN',
|
653 |
+
);
|
654 |
Â
}
|
655 |
Â
|
656 |
Â
$excluded_tags_ids = $integration->get_excluded_product_tag_ids();
|
657 |
Â
|
658 |
Â
if ( $excluded_tags_ids ) {
|
659 |
+
$tax_query[] = array(
|
660 |
Â
'taxonomy' => 'product_tag',
|
661 |
Â
'terms' => $excluded_tags_ids,
|
662 |
Â
'field' => 'term_id',
|
663 |
Â
'operator' => $in ? 'IN' : 'NOT IN',
|
664 |
+
);
|
665 |
Â
}
|
666 |
Â
|
667 |
Â
if ( count( $tax_query ) > 1 ) {
|
673 |
Â
} elseif ( $tax_query && is_array( $query_vars ) ) {
|
674 |
Â
$query_vars['tax_query'][] = $tax_query;
|
675 |
Â
}
|
676 |
+
}//end if
|
677 |
Â
|
678 |
Â
return $query_vars;
|
679 |
Â
}
|
689 |
Â
*/
|
690 |
Â
private function add_query_vars_to_find_visible_products( array $query_vars ) {
|
691 |
Â
|
692 |
+
$visibility_meta_query = array(
|
693 |
Â
'relation' => 'OR',
|
694 |
+
array(
|
695 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
696 |
Â
'value' => 'yes',
|
697 |
+
),
|
698 |
+
array(
|
699 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
700 |
Â
'compare' => 'NOT EXISTS',
|
701 |
+
),
|
702 |
+
);
|
703 |
Â
|
704 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
705 |
Â
|
707 |
Â
|
708 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
709 |
Â
|
710 |
+
$enabled_meta_query = $query_vars['meta_query'];
|
711 |
+
$query_vars['meta_query'] = array(
|
712 |
Â
'relation' => 'AND',
|
713 |
Â
$enabled_meta_query,
|
714 |
Â
$visibility_meta_query,
|
715 |
+
);
|
716 |
Â
}
|
717 |
Â
|
718 |
Â
return $query_vars;
|
729 |
Â
*/
|
730 |
Â
private function add_query_vars_to_find_hidden_products( array $query_vars ) {
|
731 |
Â
|
732 |
+
$visibility_meta_query = array(
|
733 |
Â
'key' => Products::VISIBILITY_META_KEY,
|
734 |
Â
'value' => 'no',
|
735 |
+
);
|
736 |
Â
|
737 |
Â
if ( empty( $query_vars['meta_query'] ) ) {
|
738 |
Â
|
740 |
Â
|
741 |
Â
} elseif ( is_array( $query_vars['meta_query'] ) ) {
|
742 |
Â
|
743 |
+
$enabled_meta_query = $query_vars['meta_query'];
|
744 |
+
$query_vars['meta_query'] = array(
|
745 |
Â
'relation' => 'AND',
|
746 |
Â
$enabled_meta_query,
|
747 |
Â
$visibility_meta_query,
|
748 |
+
);
|
749 |
Â
}
|
750 |
Â
|
751 |
Â
return $query_vars;
|
793 |
Â
$action = isset( $_REQUEST['action2'] ) && -1 !== (int) $_REQUEST['action2'] ? sanitize_text_field( wp_unslash( $_REQUEST['action2'] ) ) : null;
|
794 |
Â
}
|
795 |
Â
|
796 |
+
if ( $action && in_array( $action, array( 'facebook_include', 'facebook_exclude' ), true ) ) {
|
797 |
Â
|
798 |
+
$products = array();
|
799 |
Â
|
800 |
Â
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
801 |
+
$product_ids = isset( $_REQUEST['post'] ) && is_array( $_REQUEST['post'] ) ? array_map( 'absint', $_REQUEST['post'] ) : array();
|
802 |
Â
|
803 |
Â
if ( ! empty( $product_ids ) ) {
|
804 |
Â
|
805 |
Â
/** @var \WC_Product[] $enabling_sync_virtual_products virtual products that are being included */
|
806 |
+
$enabling_sync_virtual_products = array();
|
807 |
Â
/** @var \WC_Product_Variation[] $enabling_sync_virtual_variations virtual variations that are being included */
|
808 |
+
$enabling_sync_virtual_variations = array();
|
809 |
Â
|
810 |
Â
foreach ( $product_ids as $product_id ) {
|
811 |
Â
|
835 |
Â
}
|
836 |
Â
}
|
837 |
Â
}
|
838 |
+
}//end if
|
839 |
+
}//end if
|
840 |
+
}//end if
|
841 |
+
}//end foreach
|
842 |
Â
|
843 |
Â
if ( ! empty( $enabling_sync_virtual_products ) || ! empty( $enabling_sync_virtual_variations ) ) {
|
844 |
Â
|
860 |
Â
|
861 |
Â
Products::set_product_visibility( $variation, false );
|
862 |
Â
}
|
863 |
+
}//end if
|
864 |
Â
|
865 |
Â
if ( 'facebook_include' === $action ) {
|
866 |
Â
|
874 |
Â
|
875 |
Â
self::add_product_disabled_sync_notice( count( $products ) );
|
876 |
Â
}
|
877 |
+
}//end if
|
878 |
+
}//end if
|
879 |
Â
|
880 |
Â
return $redirect;
|
881 |
Â
}
|
904 |
Â
|
905 |
Â
// schedule simple products to be updated or deleted from the catalog in the background
|
906 |
Â
if ( Products::product_should_be_deleted( $product ) ) {
|
907 |
+
facebook_for_woocommerce()->get_products_sync_handler()->delete_products( array( $product->get_id() ) );
|
908 |
Â
} else {
|
909 |
+
facebook_for_woocommerce()->get_products_sync_handler()->create_or_update_products( array( $product->get_id() ) );
|
910 |
Â
}
|
911 |
Â
}
|
912 |
Â
}
|
959 |
Â
$message = sprintf(
|
960 |
Â
/* translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag, %3$s - <a> tag, %4$s - <a> tag */
|
961 |
Â
_n( '%1$sHeads up!%2$s If this product was previously visible in Facebook, you may need to delete it from the %3$sFacebook catalog%4$s to completely hide it from customer view.', '%1$sHeads up!%2$s If these products were previously visible in Facebook, you may need to delete them from the %3$sFacebook catalog%4$s to completely hide them from customer view.', $count, 'facebook-for-woocommerce' ),
|
962 |
+
'<strong>',
|
963 |
+
'</strong>',
|
964 |
+
'<a href="https://facebook.com/products" target="_blank">',
|
965 |
+
'</a>'
|
966 |
Â
);
|
967 |
Â
|
968 |
Â
$message .= '<a class="button js-wc-plugin-framework-notice-dismiss">' . esc_html__( "Don't show this notice again", 'facebook-for-woocommerce' ) . '</a>';
|
970 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
971 |
Â
$message,
|
972 |
Â
$message_id,
|
973 |
+
array(
|
974 |
+
'dismissible' => false,
|
975 |
+
// we add our own dismiss button
|
976 |
+
'notice_class' => 'notice-info',
|
977 |
+
)
|
978 |
Â
);
|
979 |
Â
|
980 |
Â
delete_transient( $transient_name );
|
981 |
+
}//end if
|
982 |
Â
}
|
983 |
Â
|
984 |
Â
|
996 |
Â
|
997 |
Â
if ( SV_WC_Helper::is_current_screen( 'edit-product' ) && get_transient( $show_notice_transient_name ) && ( $affected_products = get_transient( $affected_products_transient_name ) ) ) {
|
998 |
Â
|
999 |
+
$message = sprintf(
|
1000 |
+
esc_html(
|
1001 |
Â
/* translators: Placeholders: %1$s - number of affected products, %2$s opening HTML <a> tag, %3$s - closing HTML </a> tag, %4$s - opening HTML <a> tag, %5$s - closing HTML </a> tag */
|
1002 |
+
_n(
|
1003 |
+
'%2$s%1$s product%3$s or some of its variations could not be updated to show in the Facebook catalog — %4$sFacebook Commerce Policies%5$s prohibit selling some product types (like virtual products). You may still advertise Virtual products on Facebook.',
|
1004 |
+
'%2$s%1$s products%3$s or some of their variations could not be updated to show in the Facebook catalog — %4$sFacebook Commerce Policies%5$s prohibit selling some product types (like virtual products). You may still advertise Virtual products on Facebook.',
|
1005 |
+
count( $affected_products ),
|
1006 |
+
'facebook-for-woocommerce'
|
1007 |
+
)
|
1008 |
+
),
|
1009 |
Â
count( $affected_products ),
|
1010 |
+
'<a href="' . add_query_arg( array( 'facebook_show_affected_products' => 1 ) ) . '">',
|
1011 |
Â
'</a>',
|
1012 |
Â
'<a href="https://www.facebook.com/policies/commerce/prohibited_content/subscriptions_and_digital_products" target="_blank">',
|
1013 |
Â
'</a>'
|
1016 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
1017 |
Â
$message,
|
1018 |
Â
'wc-' . facebook_for_woocommerce()->get_id_dasherized() . '-enabling-virtual-products-sync',
|
1019 |
+
array(
|
1020 |
Â
'dismissible' => false,
|
1021 |
Â
'notice_class' => 'notice-info',
|
1022 |
+
)
|
1023 |
Â
);
|
1024 |
Â
|
1025 |
Â
delete_transient( $show_notice_transient_name );
|
1026 |
+
}//end if
|
1027 |
Â
}
|
1028 |
Â
|
1029 |
Â
|
1060 |
Â
public function add_handled_virtual_products_variations_notice() {
|
1061 |
Â
|
1062 |
Â
if ( 'yes' === get_option( 'wc_facebook_background_handle_virtual_products_variations_complete', 'no' ) &&
|
1063 |
+
'yes' !== get_option( 'wc_facebook_background_handle_virtual_products_variations_skipped', 'no' ) ) {
|
1064 |
Â
|
1065 |
Â
facebook_for_woocommerce()->get_admin_notice_handler()->add_admin_notice(
|
1066 |
Â
sprintf(
|
1072 |
Â
'</a>'
|
1073 |
Â
),
|
1074 |
Â
'wc-' . facebook_for_woocommerce()->get_id_dasherized() . '-updated-virtual-products-sync',
|
1075 |
+
array(
|
1076 |
Â
'notice_class' => 'notice-info',
|
1077 |
Â
'always_show_on_settings' => false,
|
1078 |
+
)
|
1079 |
Â
);
|
1080 |
Â
}
|
1081 |
Â
}
|
1093 |
Â
*/
|
1094 |
Â
public function add_product_settings_tab( $tabs ) {
|
1095 |
Â
|
1096 |
+
$tabs['fb_commerce_tab'] = array(
|
1097 |
Â
'label' => __( 'Facebook', 'facebook-for-woocommerce' ),
|
1098 |
Â
'target' => 'facebook_options',
|
1099 |
+
'class' => array( 'show_if_simple', 'show_if_variable' ),
|
1100 |
+
);
|
1101 |
Â
|
1102 |
Â
return $tabs;
|
1103 |
Â
}
|
1115 |
Â
|
1116 |
Â
// all products have sync enabled unless explicitly disabled
|
1117 |
Â
$sync_enabled = 'no' !== get_post_meta( $post->ID, Products::SYNC_ENABLED_META_KEY, true );
|
1118 |
+
$is_visible = ( $visibility = get_post_meta( $post->ID, Products::VISIBILITY_META_KEY, true ) ) ? wc_string_to_bool( $visibility ) : true;
|
1119 |
Â
|
1120 |
Â
$description = get_post_meta( $post->ID, \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION, true );
|
1121 |
Â
$price = get_post_meta( $post->ID, \WC_Facebook_Product::FB_PRODUCT_PRICE, true );
|
1131 |
Â
// 'id' attribute needs to match the 'target' parameter set above
|
1132 |
Â
?>
|
1133 |
Â
<div id='facebook_options' class='panel woocommerce_options_panel'>
|
1134 |
+
<div class='options_group show_if_simple'>
|
1135 |
Â
<?php
|
1136 |
Â
|
1137 |
+
woocommerce_wp_select(
|
1138 |
+
array(
|
1139 |
+
'id' => 'wc_facebook_sync_mode',
|
1140 |
+
'label' => __( 'Facebook sync', 'facebook-for-woocommerce' ),
|
1141 |
+
'options' => array(
|
1142 |
+
self::SYNC_MODE_SYNC_AND_SHOW => __( 'Sync and show in catalog', 'facebook-for-woocommerce' ),
|
1143 |
+
self::SYNC_MODE_SYNC_AND_HIDE => __( 'Sync and hide in catalog', 'facebook-for-woocommerce' ),
|
1144 |
+
self::SYNC_MODE_SYNC_DISABLED => __( 'Do not sync', 'facebook-for-woocommerce' ),
|
1145 |
+
),
|
1146 |
+
'value' => $sync_mode,
|
1147 |
+
)
|
1148 |
+
);
|
1149 |
+
|
1150 |
+
woocommerce_wp_textarea_input(
|
1151 |
+
array(
|
1152 |
+
'id' => \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION,
|
1153 |
+
'label' => __( 'Facebook Description', 'facebook-for-woocommerce' ),
|
1154 |
+
'desc_tip' => true,
|
1155 |
+
'description' => __( 'Custom (plain-text only) description for product on Facebook. If blank, product description will be used. If product description is blank, shortname will be used.', 'facebook-for-woocommerce' ),
|
1156 |
+
'cols' => 40,
|
1157 |
+
'rows' => 20,
|
1158 |
+
'value' => $description,
|
1159 |
+
'class' => 'short enable-if-sync-enabled',
|
1160 |
+
)
|
1161 |
+
);
|
1162 |
+
|
1163 |
+
woocommerce_wp_radio(
|
1164 |
+
array(
|
1165 |
+
'id' => 'fb_product_image_source',
|
1166 |
+
'label' => __( 'Facebook Product Image', 'facebook-for-woocommerce' ),
|
1167 |
+
'desc_tip' => true,
|
1168 |
+
'description' => __( 'Choose the product image that should be synced to the Facebook catalog for this product. If using a custom image, please enter an absolute URL (e.g. https://domain.com/image.jpg).', 'facebook-for-woocommerce' ),
|
1169 |
+
'options' => array(
|
1170 |
+
Products::PRODUCT_IMAGE_SOURCE_PRODUCT => __( 'Use WooCommerce image', 'facebook-for-woocommerce' ),
|
1171 |
+
Products::PRODUCT_IMAGE_SOURCE_CUSTOM => __( 'Use custom image', 'facebook-for-woocommerce' ),
|
1172 |
+
),
|
1173 |
+
'value' => $image_source ?: Products::PRODUCT_IMAGE_SOURCE_PRODUCT,
|
1174 |
+
'class' => 'short enable-if-sync-enabled js-fb-product-image-source',
|
1175 |
+
'wrapper_class' => 'fb-product-image-source-field',
|
1176 |
+
)
|
1177 |
+
);
|
1178 |
+
|
1179 |
+
woocommerce_wp_text_input(
|
1180 |
+
array(
|
1181 |
+
'id' => \WC_Facebook_Product::FB_PRODUCT_IMAGE,
|
1182 |
+
'label' => __( 'Custom Image URL', 'facebook-for-woocommerce' ),
|
1183 |
+
'value' => $image,
|
1184 |
+
'class' => sprintf( 'enable-if-sync-enabled product-image-source-field show-if-product-image-source-%s', Products::PRODUCT_IMAGE_SOURCE_CUSTOM ),
|
1185 |
+
)
|
1186 |
+
);
|
1187 |
+
|
1188 |
+
woocommerce_wp_text_input(
|
1189 |
+
array(
|
1190 |
+
'id' => \WC_Facebook_Product::FB_PRODUCT_PRICE,
|
1191 |
+
'label' => sprintf(
|
1192 |
+
/* translators: Placeholders %1$s - WC currency symbol */
|
1193 |
+
__( 'Facebook Price (%1$s)', 'facebook-for-woocommerce' ),
|
1194 |
+
get_woocommerce_currency_symbol()
|
1195 |
+
),
|
1196 |
+
'desc_tip' => true,
|
1197 |
+
'description' => __( 'Custom price for product on Facebook. Please enter in monetary decimal (.) format without thousand separators and currency symbols. If blank, product price will be used.', 'facebook-for-woocommerce' ),
|
1198 |
+
'cols' => 40,
|
1199 |
+
'rows' => 60,
|
1200 |
+
'value' => $price,
|
1201 |
+
'class' => 'enable-if-sync-enabled',
|
1202 |
+
)
|
1203 |
+
);
|
1204 |
Â
|
1205 |
Â
?>
|
1206 |
Â
</div>
|
1207 |
+
|
1208 |
+
<?php
|
1209 |
+
$product = wc_get_product( $post );
|
1210 |
+
$commerce_handler = facebook_for_woocommerce()->get_commerce_handler();
|
1211 |
+
?>
|
1212 |
+
|
1213 |
+
<?php if ( $commerce_handler->is_connected() && $commerce_handler->is_available() ) : ?>
|
1214 |
+
<div class='wc-facebook-commerce-options-group options_group'>
|
1215 |
+
<?php
|
1216 |
+
if ( $product instanceof \WC_Product ) {
|
1217 |
+
\SkyVerge\WooCommerce\Facebook\Admin\Products::render_commerce_fields( $product );
|
1218 |
+
}
|
1219 |
+
?>
|
1220 |
+
</div>
|
1221 |
+
<?php endif; ?>
|
1222 |
+
|
1223 |
+
<div class='wc-facebook-commerce-options-group options_group'>
|
1224 |
+
<?php \SkyVerge\WooCommerce\Facebook\Admin\Products::render_google_product_category_fields_and_enhanced_attributes( $product ); ?>
|
1225 |
+
</div>
|
1226 |
+
|
1227 |
Â
</div>
|
1228 |
Â
<?php
|
1229 |
Â
}
|
1236 |
Â
*
|
1237 |
Â
* @since 1.10.0
|
1238 |
Â
*
|
1239 |
+
* @param int $index the index of the current variation
|
1240 |
+
* @param array $variation_data unused
|
1241 |
Â
* @param \WC_Post $post the post type for the current variation
|
1242 |
Â
*/
|
1243 |
Â
public function add_product_variation_edit_fields( $index, $variation_data, $post ) {
|
1255 |
Â
}
|
1256 |
Â
|
1257 |
Â
$sync_enabled = 'no' !== $this->get_product_variation_meta( $variation, Products::SYNC_ENABLED_META_KEY, $parent );
|
1258 |
+
$is_visible = ( $visibility = $this->get_product_variation_meta( $variation, Products::VISIBILITY_META_KEY, $parent ) ) ? wc_string_to_bool( $visibility ) : true;
|
1259 |
Â
|
1260 |
Â
$description = $this->get_product_variation_meta( $variation, \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION, $parent );
|
1261 |
Â
$price = $this->get_product_variation_meta( $variation, \WC_Facebook_Product::FB_PRODUCT_PRICE, $parent );
|
1268 |
Â
$sync_mode = self::SYNC_MODE_SYNC_DISABLED;
|
1269 |
Â
}
|
1270 |
Â
|
1271 |
+
woocommerce_wp_select(
|
1272 |
+
array(
|
1273 |
+
'id' => "variable_facebook_sync_mode$index",
|
1274 |
+
'name' => "variable_facebook_sync_mode[$index]",
|
1275 |
+
'label' => __( 'Facebook sync', 'facebook-for-woocommerce' ),
|
1276 |
+
'options' => array(
|
1277 |
+
self::SYNC_MODE_SYNC_AND_SHOW => __( 'Sync and show in catalog', 'facebook-for-woocommerce' ),
|
1278 |
+
self::SYNC_MODE_SYNC_AND_HIDE => __( 'Sync and hide in catalog', 'facebook-for-woocommerce' ),
|
1279 |
+
self::SYNC_MODE_SYNC_DISABLED => __( 'Do not sync', 'facebook-for-woocommerce' ),
|
1280 |
+
),
|
1281 |
+
'value' => $sync_mode,
|
1282 |
+
'class' => 'js-variable-fb-sync-toggle',
|
1283 |
+
'wrapper_class' => 'form-row form-row-full',
|
1284 |
+
)
|
1285 |
+
);
|
1286 |
+
|
1287 |
+
woocommerce_wp_textarea_input(
|
1288 |
+
array(
|
1289 |
+
'id' => sprintf( 'variable_%s%s', \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION, $index ),
|
1290 |
+
'name' => sprintf( "variable_%s[$index]", \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION ),
|
1291 |
+
'label' => __( 'Facebook Description', 'facebook-for-woocommerce' ),
|
1292 |
+
'desc_tip' => true,
|
1293 |
+
'description' => __( 'Custom (plain-text only) description for product on Facebook. If blank, product description will be used. If product description is blank, shortname will be used.', 'facebook-for-woocommerce' ),
|
1294 |
+
'cols' => 40,
|
1295 |
+
'rows' => 5,
|
1296 |
+
'value' => $description,
|
1297 |
+
'class' => 'enable-if-sync-enabled',
|
1298 |
+
'wrapper_class' => 'form-row form-row-full',
|
1299 |
+
)
|
1300 |
+
);
|
1301 |
+
|
1302 |
+
woocommerce_wp_radio(
|
1303 |
+
array(
|
1304 |
+
'id' => "variable_fb_product_image_source$index",
|
1305 |
+
'name' => "variable_fb_product_image_source[$index]",
|
1306 |
+
'label' => __( 'Facebook Product Image', 'facebook-for-woocommerce' ),
|
1307 |
+
'desc_tip' => true,
|
1308 |
+
'description' => __( 'Choose the product image that should be synced to the Facebook catalog for this product. If using a custom image, please enter an absolute URL (e.g. https://domain.com/image.jpg).', 'facebook-for-woocommerce' ),
|
1309 |
+
'options' => array(
|
1310 |
+
Products::PRODUCT_IMAGE_SOURCE_PRODUCT => __( 'Use variation image', 'facebook-for-woocommerce' ),
|
1311 |
+
Products::PRODUCT_IMAGE_SOURCE_PARENT_PRODUCT => __( 'Use parent image', 'facebook-for-woocommerce' ),
|
1312 |
+
Products::PRODUCT_IMAGE_SOURCE_CUSTOM => __( 'Use custom image', 'facebook-for-woocommerce' ),
|
1313 |
+
),
|
1314 |
+
'value' => $image_source ?: Products::PRODUCT_IMAGE_SOURCE_PRODUCT,
|
1315 |
+
'class' => 'enable-if-sync-enabled js-fb-product-image-source',
|
1316 |
+
'wrapper_class' => 'fb-product-image-source-field',
|
1317 |
+
)
|
1318 |
+
);
|
1319 |
+
|
1320 |
+
woocommerce_wp_text_input(
|
1321 |
+
array(
|
1322 |
+
'id' => sprintf( 'variable_%s%s', \WC_Facebook_Product::FB_PRODUCT_IMAGE, $index ),
|
1323 |
+
'name' => sprintf( "variable_%s[$index]", \WC_Facebook_Product::FB_PRODUCT_IMAGE ),
|
1324 |
+
'label' => __( 'Custom Image URL', 'facebook-for-woocommerce' ),
|
1325 |
+
'value' => $image_url,
|
1326 |
+
'class' => sprintf( 'enable-if-sync-enabled product-image-source-field show-if-product-image-source-%s', Products::PRODUCT_IMAGE_SOURCE_CUSTOM ),
|
1327 |
+
'wrapper_class' => 'form-row form-row-full',
|
1328 |
+
)
|
1329 |
+
);
|
1330 |
+
|
1331 |
+
woocommerce_wp_text_input(
|
1332 |
+
array(
|
1333 |
+
'id' => sprintf( 'variable_%s%s', \WC_Facebook_Product::FB_PRODUCT_PRICE, $index ),
|
1334 |
+
'name' => sprintf( "variable_%s[$index]", \WC_Facebook_Product::FB_PRODUCT_PRICE ),
|
1335 |
+
'label' => sprintf(
|
1336 |
+
/* translators: Placeholders %1$s - WC currency symbol */
|
1337 |
+
__( 'Facebook Price (%1$s)', 'facebook-for-woocommerce' ),
|
1338 |
+
get_woocommerce_currency_symbol()
|
1339 |
+
),
|
1340 |
+
'desc_tip' => true,
|
1341 |
+
'description' => __( 'Custom price for product on Facebook. Please enter in monetary decimal (.) format without thousand separators and currency symbols. If blank, product price will be used.', 'facebook-for-woocommerce' ),
|
1342 |
+
'value' => wc_format_decimal( $price ),
|
1343 |
+
'class' => 'enable-if-sync-enabled',
|
1344 |
+
'wrapper_class' => 'form-row form-full',
|
1345 |
+
)
|
1346 |
+
);
|
1347 |
Â
}
|
1348 |
Â
|
1349 |
Â
|
1355 |
Â
* @since 1.10.0
|
1356 |
Â
*
|
1357 |
Â
* @param \WC_Product_Variation $variation the product variation
|
1358 |
+
* @param string $key the name of the meta to retrieve
|
1359 |
+
* @param \WC_Product $parent the parent product
|
1360 |
Â
* @return mixed
|
1361 |
Â
*/
|
1362 |
Â
private function get_product_variation_meta( $variation, $key, $parent ) {
|
1400 |
Â
// phpcs:disable WordPress.Security.NonceVerification.Missing
|
1401 |
Â
if ( $sync_enabled ) {
|
1402 |
Â
|
1403 |
+
Products::enable_sync_for_products( array( $variation ) );
|
1404 |
Â
Products::set_product_visibility( $variation, self::SYNC_MODE_SYNC_AND_HIDE !== $sync_mode );
|
1405 |
Â
|
1406 |
Â
$posted_param = 'variable_' . \WC_Facebookcommerce_Integration::FB_PRODUCT_DESCRIPTION;
|
1423 |
Â
|
1424 |
Â
} else {
|
1425 |
Â
|
1426 |
+
Products::disable_sync_for_products( array( $variation ) );
|
1427 |
Â
|
1428 |
+
}//end if
|
1429 |
Â
// phpcs:enable WordPress.Security.NonceVerification.Missing
|
1430 |
Â
}
|
1431 |
Â
|
1440 |
Â
public function render_modal_template() {
|
1441 |
Â
global $current_screen;
|
1442 |
Â
|
1443 |
+
$modal_screens = array(
|
1444 |
+
'product',
|
1445 |
+
'edit-product',
|
1446 |
+
'woocommerce_page_wc-facebook',
|
1447 |
+
'edit-product_cat',
|
1448 |
+
'shop_order',
|
1449 |
+
);
|
1450 |
+
|
1451 |
Â
// bail if not on the products, product edit, or settings screen
|
1452 |
+
if ( ! $current_screen || ! in_array( $current_screen->id, $modal_screens, true ) ) {
|
1453 |
Â
return;
|
1454 |
Â
}
|
1455 |
Â
|
1494 |
Â
$product = wc_get_product( $post );
|
1495 |
Â
|
1496 |
Â
if ( $product instanceof \WC_Product
|
1497 |
+
&& Products::is_sync_enabled_for_product( $product )
|
1498 |
+
&& Products::is_sync_excluded_for_product_terms( $product )
|
1499 |
Â
) :
|
1500 |
Â
|
1501 |
Â
?>
|
1531 |
Â
} );
|
1532 |
Â
} );
|
1533 |
Â
</script>
|
1534 |
+
<?php
|
1535 |
Â
|
1536 |
Â
endif;
|
1537 |
Â
|
1565 |
Â
* @deprecated 2.0.0
|
1566 |
Â
*
|
1567 |
Â
* @param string $message_id the dismissed notice ID
|
1568 |
+
* @param int $user_id the ID of the user the noticed was dismissed for
|
1569 |
Â
*/
|
1570 |
Â
public function handle_dismiss_notice( $message_id, $user_id = null ) {
|
1571 |
Â
|
1587 |
Â
}
|
1588 |
Â
|
1589 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1590 |
Â
}
|
includes/Admin/Enhanced_Catalog_Attribute_Fields.php
ADDED
@@ -0,0 +1,236 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\Products as Products_Handler;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Enhanced Catalog attribute fields.
|
19 |
+
*/
|
20 |
+
class Enhanced_Catalog_Attribute_Fields {
|
21 |
+
const FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX = 'wc_facebook_enhanced_catalog_attribute_';
|
22 |
+
const OPTIONAL_SELECTOR_KEY = '__optional_selector';
|
23 |
+
const FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID = 'wc_facebook_enhanced_catalog_attributes_id';
|
24 |
+
const FIELD_CAN_SHOW_ENHANCED_ATTRIBUTES_ID = 'wc_facebook_can_show_enhanced_catalog_attributes_id';
|
25 |
+
|
26 |
+
const PAGE_TYPE_EDIT_CATEGORY = 'edit_category';
|
27 |
+
const PAGE_TYPE_ADD_CATEGORY = 'add_category';
|
28 |
+
const PAGE_TYPE_EDIT_PRODUCT = 'edit_product';
|
29 |
+
|
30 |
+
public function __construct( $page_type, \WP_Term $term = null, \WC_Product $product = null ) {
|
31 |
+
$this->page_type = $page_type;
|
32 |
+
$this->term = $term;
|
33 |
+
$this->product = $product;
|
34 |
+
$this->category_handler = facebook_for_woocommerce()->get_facebook_category_handler();
|
35 |
+
}
|
36 |
+
|
37 |
+
public static function render_hidden_input_can_show_attributes() {
|
38 |
+
?>
|
39 |
+
<input type="hidden" id="<?php echo esc_attr( self::FIELD_CAN_SHOW_ENHANCED_ATTRIBUTES_ID ); ?>"
|
40 |
+
name="<?php echo esc_attr( self::FIELD_CAN_SHOW_ENHANCED_ATTRIBUTES_ID ); ?>"
|
41 |
+
value="true"/>
|
42 |
+
<?php
|
43 |
+
}
|
44 |
+
|
45 |
+
private function extract_attribute( &$attributes, $key ) {
|
46 |
+
$index = array_search($key, array_column( $attributes, 'key' ));
|
47 |
+
$extracted = false === $index ? array() : array_splice( $attributes, $index, 1 );
|
48 |
+
return empty( $extracted ) ? null : array_shift( $extracted );
|
49 |
+
}
|
50 |
+
|
51 |
+
public function render( $category_id ) {
|
52 |
+
$category = $this->category_handler->get_category_with_attrs( $category_id );
|
53 |
+
$all_attributes = $category['attributes'];
|
54 |
+
$all_attributes_with_values = array_map(
|
55 |
+
function( $attribute ) use ( $category_id ) {
|
56 |
+
return array_merge( $attribute, array( 'value' => $this->get_value( $attribute['key'], $category_id ) ) );
|
57 |
+
},
|
58 |
+
$all_attributes
|
59 |
+
);
|
60 |
+
$recommended_attributes = array_filter(
|
61 |
+
$all_attributes_with_values,
|
62 |
+
function( $attr ) {
|
63 |
+
return $attr['recommended'];
|
64 |
+
}
|
65 |
+
);
|
66 |
+
$optional_attributes = array_filter(
|
67 |
+
$all_attributes_with_values,
|
68 |
+
function( $attr ) {
|
69 |
+
return ! $attr['recommended'];
|
70 |
+
}
|
71 |
+
);
|
72 |
+
|
73 |
+
// Some google mappings don't have any recommendations
|
74 |
+
// to avoid there being no attributes to see we extract color, gender
|
75 |
+
// and size from optional.
|
76 |
+
if ( empty( $recommended_attributes ) ) {
|
77 |
+
$recommended_attributes = array_filter(
|
78 |
+
array(
|
79 |
+
$this->extract_attribute( $optional_attributes, 'color' ),
|
80 |
+
$this->extract_attribute( $optional_attributes, 'size' ),
|
81 |
+
$this->extract_attribute( $optional_attributes, 'gender' ),
|
82 |
+
),
|
83 |
+
function( $attr ) {
|
84 |
+
return ! is_null( $attr ); },
|
85 |
+
);
|
86 |
+
}
|
87 |
+
|
88 |
+
foreach ( $recommended_attributes as $attribute ) {
|
89 |
+
$this->render_attribute( $attribute );
|
90 |
+
}
|
91 |
+
|
92 |
+
$selector_value = $this->get_value( self::OPTIONAL_SELECTOR_KEY, $category_id );
|
93 |
+
$is_showing_optional = 'on' === $selector_value;
|
94 |
+
$this->render_selector_checkbox( $is_showing_optional );
|
95 |
+
|
96 |
+
foreach ( $optional_attributes as $attribute ) {
|
97 |
+
$this->render_attribute( $attribute, true, $is_showing_optional );
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
private function render_selector_checkbox( $is_showing_optional ) {
|
102 |
+
$selector_id = self::FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX . self::OPTIONAL_SELECTOR_KEY;
|
103 |
+
$selector_label = __( 'Show advanced options', 'facebook-for-woocommerce' );
|
104 |
+
$checked_attr = $is_showing_optional ? 'checked="checked"' : '';
|
105 |
+
|
106 |
+
if ( self::PAGE_TYPE_EDIT_PRODUCT === $this->page_type ) {
|
107 |
+
?>
|
108 |
+
<p class="form-field wc-facebook-enhanced-catalog-attribute-row term-<?php echo esc_attr( $selector_id ); ?>-wrap">
|
109 |
+
<label for="<?php echo esc_attr( $selector_id ); ?>">
|
110 |
+
<?php echo esc_html( $selector_label ); ?>
|
111 |
+
</label>
|
112 |
+
<input type="checkbox" name="<?php echo esc_attr( $selector_id ); ?>" id="<?php echo esc_attr( $selector_id ); ?>" <?php echo esc_attr( $checked_attr ); ?>/>
|
113 |
+
</p>
|
114 |
+
<?php
|
115 |
+
} else {
|
116 |
+
?>
|
117 |
+
<tr class="form-field wc-facebook-enhanced-catalog-attribute-row term-<?php echo esc_attr( $selector_id ); ?>-wrap">
|
118 |
+
<th colspan="2" scope="row">
|
119 |
+
<label for="<?php echo esc_attr( $selector_id ); ?>">
|
120 |
+
<?php echo esc_html( $selector_label ); ?>
|
121 |
+
<input type="checkbox" name="<?php echo esc_attr( $selector_id ); ?>" id="<?php echo esc_attr( $selector_id ); ?>" <?php echo esc_attr( $checked_attr ); ?>/>
|
122 |
+
</label>
|
123 |
+
</th>
|
124 |
+
</tr>
|
125 |
+
<?php
|
126 |
+
}//end if
|
127 |
+
}
|
128 |
+
|
129 |
+
private function get_value( $attribute_key, $category_id ) {
|
130 |
+
$value = null;
|
131 |
+
if ( ! is_null( $this->product ) ) {
|
132 |
+
$value = Products_Handler::get_enhanced_catalog_attribute( $attribute_key, $this->product );
|
133 |
+
} elseif ( ! is_null( $this->term ) ) {
|
134 |
+
$meta_key = \SkyVerge\WooCommerce\Facebook\Products::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . $attribute_key;
|
135 |
+
$value = get_term_meta( $this->term->term_id, $meta_key, true );
|
136 |
+
}
|
137 |
+
|
138 |
+
// Check if it's valid
|
139 |
+
if ( self::OPTIONAL_SELECTOR_KEY !== $attribute_key && ! empty( $value ) ) {
|
140 |
+
$is_valid = $this->category_handler->is_valid_value_for_attribute( $category_id, $attribute_key, $value );
|
141 |
+
$value = $is_valid ? $value : null;
|
142 |
+
}
|
143 |
+
return $value;
|
144 |
+
}
|
145 |
+
|
146 |
+
private function render_attribute( $attribute, $optional = false, $is_showing_optional = false ) {
|
147 |
+
$attr_id = self::FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX . $attribute['key'];
|
148 |
+
$classes = array(
|
149 |
+
'form-field',
|
150 |
+
'wc-facebook-enhanced-catalog-attribute-row',
|
151 |
+
'term-' . esc_attr( $attr_id ) . '-wrap',
|
152 |
+
);
|
153 |
+
if ( $optional ) {
|
154 |
+
$classes[] = 'wc-facebook-enhanced-catalog-attribute-optional-row';
|
155 |
+
if ( ! $is_showing_optional ) {
|
156 |
+
$classes[] = 'hidden';
|
157 |
+
}
|
158 |
+
}
|
159 |
+
// style="display: <?php echo $optional && ! $is_showing_optional ? 'none' : 'table-row'; ? >"
|
160 |
+
if ( self::PAGE_TYPE_EDIT_PRODUCT === $this->page_type ) {
|
161 |
+
?>
|
162 |
+
<p
|
163 |
+
class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
164 |
+
<?php $this->render_label( $attr_id, $attribute ); ?>
|
165 |
+
<?php $this->render_field( $attr_id, $attribute ); ?>
|
166 |
+
</p>
|
167 |
+
<?php
|
168 |
+
} else {
|
169 |
+
?>
|
170 |
+
<tr
|
171 |
+
class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
|
172 |
+
<th scope="row">
|
173 |
+
<?php $this->render_label( $attr_id, $attribute ); ?>
|
174 |
+
</th>
|
175 |
+
<td>
|
176 |
+
<?php $this->render_field( $attr_id, $attribute ); ?>
|
177 |
+
</td>
|
178 |
+
</tr>
|
179 |
+
<?php
|
180 |
+
}//end if
|
181 |
+
}
|
182 |
+
|
183 |
+
private function render_label( $attr_id, $attribute ) {
|
184 |
+
$label = ucwords( str_replace( '_', ' ', $attribute['key'] ) );
|
185 |
+
?>
|
186 |
+
<label for="<?php echo $attr_id; ?>">
|
187 |
+
<?php echo esc_html( $label ); ?>
|
188 |
+
<span class="woocommerce-help-tip" data-tip="<?php echo esc_attr( $attribute['description'] ); ?>"></span>
|
189 |
+
</label>
|
190 |
+
<?php
|
191 |
+
}
|
192 |
+
|
193 |
+
private function render_field( $attr_id, $attribute ) {
|
194 |
+
$placeholder = isset( $attribute['example'] ) ? $attribute['example'] : '';
|
195 |
+
$can_have_multiple_values = isset( $attribute['can_have_multiple_values'] ) && $attribute['can_have_multiple_values'];
|
196 |
+
switch ( $attribute['type'] ) {
|
197 |
+
case 'boolean':
|
198 |
+
case 'enum':
|
199 |
+
if ( $can_have_multiple_values ) {
|
200 |
+
$this->render_text_field( $attr_id, $attribute, $placeholder );
|
201 |
+
} else {
|
202 |
+
$this->render_select_field( $attr_id, $attribute );
|
203 |
+
}
|
204 |
+
break;
|
205 |
+
|
206 |
+
default:
|
207 |
+
// string
|
208 |
+
$this->render_text_field( $attr_id, $attribute, $placeholder );
|
209 |
+
}
|
210 |
+
|
211 |
+
}
|
212 |
+
|
213 |
+
private function render_select_field( $attr_id, $attribute ) {
|
214 |
+
?>
|
215 |
+
<select name="<?php echo esc_attr( $attr_id ); ?>" id="<?php echo esc_attr( $attr_id ); ?>">
|
216 |
+
<option value="">--</option>
|
217 |
+
<?php
|
218 |
+
foreach ( $attribute['enum_values'] as $opt ) {
|
219 |
+
$is_selected = $attribute['value'] === $opt;
|
220 |
+
$selected_attr = $is_selected ? 'selected="selected"' : '';
|
221 |
+
?>
|
222 |
+
<option value="<?php echo esc_attr( $opt ); ?>" <?php echo esc_attr( $selected_attr ); ?>> <?php echo esc_html( $opt ); ?></option>
|
223 |
+
<?php } ?>
|
224 |
+
</select/>
|
225 |
+
<?php
|
226 |
+
}
|
227 |
+
|
228 |
+
private function render_text_field( $attr_id, $attribute, $placeholder ) {
|
229 |
+
if ( is_array( $placeholder ) ) {
|
230 |
+
$placeholder = implode( ', ', $placeholder );
|
231 |
+
}
|
232 |
+
?>
|
233 |
+
<input type="text" value="<?php echo esc_attr( $attribute['value'] ); ?>" name="<?php echo esc_attr( $attr_id ); ?>" id="<?php echo esc_attr( $attr_id ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>"/>
|
234 |
+
<?php
|
235 |
+
}
|
236 |
+
}
|
includes/Admin/Google_Product_Category_Field.php
ADDED
@@ -0,0 +1,165 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Google product category field.
|
17 |
+
*
|
18 |
+
* @since 2.1.0
|
19 |
+
*/
|
20 |
+
class Google_Product_Category_Field {
|
21 |
+
|
22 |
+
|
23 |
+
/** @var string the WordPress option name where the full categories list is stored */
|
24 |
+
const OPTION_GOOGLE_PRODUCT_CATEGORIES = 'wc_facebook_google_product_categories';
|
25 |
+
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Instantiates the JS handler for the Google product category field.
|
29 |
+
*
|
30 |
+
* @since 2.1.0
|
31 |
+
*
|
32 |
+
* @param string $input_id element that should receive the latest concrete category ID value
|
33 |
+
*/
|
34 |
+
public function render( $input_id ) {
|
35 |
+
|
36 |
+
$js = sprintf(
|
37 |
+
"window.wc_facebook_google_product_category_fields = new WC_Facebook_Google_Product_Category_Fields( %s, '%s' );",
|
38 |
+
json_encode( $this->get_categories() ),
|
39 |
+
esc_js( $input_id )
|
40 |
+
);
|
41 |
+
|
42 |
+
wc_enqueue_js( $js );
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Gets the full categories list from Google and stores it.
|
49 |
+
*
|
50 |
+
* @since 2.1.0
|
51 |
+
*/
|
52 |
+
public function get_categories() {
|
53 |
+
|
54 |
+
// only fetch again if not fetched less than one hour ago
|
55 |
+
$categories = get_transient( self::OPTION_GOOGLE_PRODUCT_CATEGORIES );
|
56 |
+
|
57 |
+
if ( empty ( $categories ) ) {
|
58 |
+
|
59 |
+
// fetch from the URL
|
60 |
+
$categories_response = wp_remote_get( 'https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt' );
|
61 |
+
|
62 |
+
$categories = $this->parse_categories_response( $categories_response );
|
63 |
+
|
64 |
+
if ( ! empty( $categories ) ) {
|
65 |
+
|
66 |
+
set_transient( self::OPTION_GOOGLE_PRODUCT_CATEGORIES, $categories, WEEK_IN_SECONDS );
|
67 |
+
update_option( self::OPTION_GOOGLE_PRODUCT_CATEGORIES, $categories );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
if ( empty( $categories ) ) {
|
72 |
+
|
73 |
+
// get the categories from the saved option
|
74 |
+
$categories = get_option( self::OPTION_GOOGLE_PRODUCT_CATEGORIES, [] );
|
75 |
+
}
|
76 |
+
|
77 |
+
return $categories;
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Parses the categories response from Google.
|
83 |
+
*
|
84 |
+
* @since 2.1.0
|
85 |
+
*
|
86 |
+
* @param array|\WP_Error $categories_response categories response from Google
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
protected function parse_categories_response( $categories_response ) {
|
90 |
+
|
91 |
+
$categories = [];
|
92 |
+
|
93 |
+
if ( is_array( $categories_response ) && isset( $categories_response['body'] ) ) {
|
94 |
+
|
95 |
+
$categories_body = $categories_response['body'];
|
96 |
+
$categories_body = explode( "\n", $categories_body );
|
97 |
+
|
98 |
+
// format: ID - Top level category > ... > Parent category > Category label
|
99 |
+
// example: 7385 - Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Cage Accessories
|
100 |
+
foreach ( $categories_body as $category_line ) {
|
101 |
+
|
102 |
+
if ( strpos( $category_line, ' - ' ) === false ) {
|
103 |
+
|
104 |
+
// not a category, skip it
|
105 |
+
continue;
|
106 |
+
}
|
107 |
+
|
108 |
+
list( $category_id, $category_tree ) = explode( ' - ', $category_line );
|
109 |
+
|
110 |
+
$category_id = (string) trim( $category_id );
|
111 |
+
$category_tree = explode( ' > ', $category_tree );
|
112 |
+
$category_label = end( $category_tree );
|
113 |
+
|
114 |
+
$category = [
|
115 |
+
'label' => $category_label,
|
116 |
+
'options' => [],
|
117 |
+
];
|
118 |
+
|
119 |
+
if ( $category_label === $category_tree[0] ) {
|
120 |
+
|
121 |
+
// top-level category
|
122 |
+
$category['parent'] = '';
|
123 |
+
|
124 |
+
} else {
|
125 |
+
|
126 |
+
$parent_label = $category_tree[ count( $category_tree ) - 2 ];
|
127 |
+
|
128 |
+
$parent_category = array_search( $parent_label, array_map( function ( $item ) {
|
129 |
+
|
130 |
+
return $item['label'];
|
131 |
+
}, $categories ) );
|
132 |
+
|
133 |
+
$category['parent'] = (string) $parent_category;
|
134 |
+
|
135 |
+
// add category label to the parent's list of options
|
136 |
+
$categories[ $parent_category ]['options'][ $category_id ] = $category_label;
|
137 |
+
}
|
138 |
+
|
139 |
+
$categories[ (string) $category_id ] = $category;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
return $categories;
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Gets the category options (children) for a given category.
|
149 |
+
*
|
150 |
+
* @since 2.1.0
|
151 |
+
*
|
152 |
+
* @param string $category_id category ID
|
153 |
+
* @param array $categories full category list
|
154 |
+
* @return array
|
155 |
+
*/
|
156 |
+
public function get_category_options( $category_id, $categories ) {
|
157 |
+
|
158 |
+
return array_filter( array_map( function ( $category ) use ( $category_id ) {
|
159 |
+
|
160 |
+
return $category['parent'] === $category_id ? $category['label'] : false;
|
161 |
+
}, $categories ) );
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
}
|
includes/Admin/Orders.php
ADDED
@@ -0,0 +1,637 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\AJAX;
|
16 |
+
use SkyVerge\WooCommerce\Facebook\Commerce;
|
17 |
+
use SkyVerge\WooCommerce\Facebook\Utilities\Shipment;
|
18 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* General handler for order admin functionality.
|
22 |
+
*
|
23 |
+
* @since 2.1.0
|
24 |
+
*/
|
25 |
+
class Orders {
|
26 |
+
|
27 |
+
|
28 |
+
/** @var string key used for setting a transient in the event of bulk actions fired on Commerce orders */
|
29 |
+
private $bulk_order_update_transient = 'wc_facebook_bulk_order_update';
|
30 |
+
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Handler constructor.
|
34 |
+
*
|
35 |
+
* @since 2.1.0
|
36 |
+
*/
|
37 |
+
public function __construct() {
|
38 |
+
|
39 |
+
$this->add_hooks();
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Adds the necessary action & filter hooks.
|
45 |
+
*
|
46 |
+
* @since 2.1.0
|
47 |
+
*/
|
48 |
+
public function add_hooks() {
|
49 |
+
|
50 |
+
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
51 |
+
|
52 |
+
add_action( 'admin_notices', [ $this, 'add_notices' ] );
|
53 |
+
|
54 |
+
add_filter( 'handle_bulk_actions-edit-shop_order', [ $this, 'handle_bulk_update' ], -1, 3 );
|
55 |
+
|
56 |
+
add_filter( 'woocommerce_admin_order_actions', [ $this, 'remove_list_table_actions' ], 10, 2 );
|
57 |
+
add_filter( 'woocommerce_admin_order_preview_actions', [ $this, 'remove_order_preview_actions' ], 10, 2 );
|
58 |
+
|
59 |
+
add_filter( 'wc_order_is_editable', [ $this, 'is_order_editable' ], 10, 2 );
|
60 |
+
|
61 |
+
add_action( 'admin_footer', [ $this, 'render_refund_reason_field' ] );
|
62 |
+
|
63 |
+
add_action( 'woocommerce_refund_created', [ $this, 'handle_refund' ] );
|
64 |
+
|
65 |
+
add_action( 'add_meta_boxes', [ $this, 'maybe_remove_order_metaboxes' ], 999 );
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Enqueue the assets.
|
71 |
+
*
|
72 |
+
* @internal
|
73 |
+
*
|
74 |
+
* @since 2.1.0
|
75 |
+
*/
|
76 |
+
public function enqueue_assets() {
|
77 |
+
global $post;
|
78 |
+
|
79 |
+
if ( ! $this->is_edit_order_screen() ) {
|
80 |
+
return;
|
81 |
+
}
|
82 |
+
|
83 |
+
$order = wc_get_order( $post );
|
84 |
+
|
85 |
+
if ( ! $order instanceof \WC_Order ) {
|
86 |
+
return;
|
87 |
+
}
|
88 |
+
|
89 |
+
wp_enqueue_script( 'wc-facebook-commerce-orders', facebook_for_woocommerce()->get_plugin_url() . '/assets/js/admin/orders.min.js', [
|
90 |
+
'jquery',
|
91 |
+
'wc-backbone-modal',
|
92 |
+
'facebook-for-woocommerce-modal',
|
93 |
+
], \WC_Facebookcommerce::VERSION );
|
94 |
+
|
95 |
+
$shipment_utilities = new Shipment();
|
96 |
+
$shipment_tracking = array_filter( (array) $order->get_meta( '_wc_shipment_tracking_items', true ) );
|
97 |
+
|
98 |
+
if ( ! empty( $shipment_tracking ) ) {
|
99 |
+
|
100 |
+
$shipment_tracking = array_map( function ( $shipment ) use ( $shipment_utilities ) {
|
101 |
+
|
102 |
+
$shipment['carrier_code'] = $shipment_utilities->convert_shipment_tracking_carrier_code( $shipment['tracking_provider'] );
|
103 |
+
|
104 |
+
return $shipment;
|
105 |
+
|
106 |
+
}, $shipment_tracking );
|
107 |
+
}
|
108 |
+
|
109 |
+
// limit the order status field to statuses that can be handled by Facebook
|
110 |
+
switch ( $order->get_status() ) {
|
111 |
+
|
112 |
+
case 'processing':
|
113 |
+
$allowed_statuses = [ 'wc-processing', 'wc-completed', 'wc-cancelled' ];
|
114 |
+
break;
|
115 |
+
|
116 |
+
case 'completed':
|
117 |
+
$allowed_statuses = [ 'wc-completed', 'wc-refunded' ];
|
118 |
+
break;
|
119 |
+
|
120 |
+
case 'refunded':
|
121 |
+
$allowed_statuses = [ 'wc-refunded' ];
|
122 |
+
break;
|
123 |
+
|
124 |
+
case 'cancelled':
|
125 |
+
$allowed_statuses = [ 'wc-cancelled' ];
|
126 |
+
break;
|
127 |
+
|
128 |
+
default:
|
129 |
+
$allowed_statuses = [ 'wc-pending' ];
|
130 |
+
break;
|
131 |
+
}
|
132 |
+
|
133 |
+
wp_localize_script( 'wc-facebook-commerce-orders', 'wc_facebook_commerce_orders', [
|
134 |
+
'order_id' => $order->get_id(),
|
135 |
+
'order_status' => $order->get_status(),
|
136 |
+
'is_commerce_order' => Commerce\Orders::is_commerce_order( $order ),
|
137 |
+
'shipment_tracking' => $shipment_tracking,
|
138 |
+
'allowed_commerce_statuses' => $allowed_statuses,
|
139 |
+
'complete_order_action' => AJAX::ACTION_COMPLETE_ORDER,
|
140 |
+
'complete_order_nonce' => wp_create_nonce( AJAX::ACTION_COMPLETE_ORDER ),
|
141 |
+
'cancel_order_action' => AJAX::ACTION_CANCEL_ORDER,
|
142 |
+
'cancel_order_nonce' => wp_create_nonce( AJAX::ACTION_CANCEL_ORDER ),
|
143 |
+
'complete_modal_message' => $this->get_complete_modal_message(),
|
144 |
+
'complete_modal_buttons' => $this->get_complete_modal_buttons(),
|
145 |
+
'refund_modal_message' => $this->get_refund_modal_message(),
|
146 |
+
'refund_modal_buttons' => $this->get_refund_modal_buttons(),
|
147 |
+
'cancel_modal_message' => $this->get_cancel_modal_message(),
|
148 |
+
'cancel_modal_buttons' => $this->get_cancel_modal_buttons(),
|
149 |
+
'i18n' => [
|
150 |
+
'unknown_error' => __( 'An unknown error occurred.', 'facebook-for-woocommerce' ),
|
151 |
+
'missing_tracking_number_error' => __( 'Tracking Number is missing.', 'facebook-for-woocommerce' ),
|
152 |
+
'refund_reason_label' => __( 'Refund reason:', 'facebook-for-woocommerce' ),
|
153 |
+
'refund_reason_tooltip' => __( 'Choose the reason for refunding this order.', 'facebook-for-woocommerce' ),
|
154 |
+
'refund_description_label' => __( 'Refund description (optional):', 'facebook-for-woocommerce' ),
|
155 |
+
'refund_description_tooltip' => __( 'Note: the refund description will be visible by the customer.', 'facebook-for-woocommerce' ),
|
156 |
+
],
|
157 |
+
] );
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Adds admin notices.
|
163 |
+
*
|
164 |
+
* @internal
|
165 |
+
*
|
166 |
+
* @since 2.1.0
|
167 |
+
*/
|
168 |
+
public function add_notices() {
|
169 |
+
global $post;
|
170 |
+
|
171 |
+
if ( ! $this->is_edit_order_screen() ) {
|
172 |
+
return;
|
173 |
+
}
|
174 |
+
|
175 |
+
$order = wc_get_order( $post );
|
176 |
+
$plugin = facebook_for_woocommerce();
|
177 |
+
|
178 |
+
if ( Commerce\Orders::is_order_pending( $order ) ) {
|
179 |
+
|
180 |
+
$message = sprintf(
|
181 |
+
/* translators: Placeholders: %1$s - HTML <strong> tag, %2$s - HTML </strong> tag */
|
182 |
+
__( 'This order is currently being held by Instagram and cannot be edited. Once released by Instagram, it will move to %1$sProcessing%2$s or %1$sCancelled%2$s status.', 'facebook-for-woocommerce' ),
|
183 |
+
'<strong>', '</strong>'
|
184 |
+
);
|
185 |
+
|
186 |
+
$plugin->get_admin_notice_handler()->add_admin_notice( $message, $plugin::PLUGIN_ID . '_commerce_order_pending_' . $order->get_id(), [
|
187 |
+
'dismissible' => true,
|
188 |
+
'notice_class' => 'notice-info',
|
189 |
+
] );
|
190 |
+
}
|
191 |
+
|
192 |
+
$commerce_orders = get_transient( $this->bulk_order_update_transient );
|
193 |
+
|
194 |
+
if ( ! empty( $commerce_orders ) ) {
|
195 |
+
|
196 |
+
// if there were orders managed by Instagram updated in bulk, we need to warn the merchant that it wasn't updated
|
197 |
+
facebook_for_woocommerce()->get_message_handler()->add_error( sprintf(
|
198 |
+
_n(
|
199 |
+
/* translators: Placeholder: %s - order ID */
|
200 |
+
'Heads up! Instagram order statuses can’t be updated in bulk. Please update Instagram order %s so you can provide order details required by Instagram.',
|
201 |
+
/* translators: Placeholder: %s - order IDs list */
|
202 |
+
'Heads up! Instagram order statuses can’t be updated in bulk. Please update Instagram orders %s individually so you can provide order details required by Instagram.',
|
203 |
+
count( $commerce_orders ),
|
204 |
+
'facebook-for-woocommerce'
|
205 |
+
),
|
206 |
+
implode( ', ', $commerce_orders )
|
207 |
+
) );
|
208 |
+
|
209 |
+
delete_transient( $this->bulk_order_update_transient );
|
210 |
+
|
211 |
+
facebook_for_woocommerce()->get_message_handler()->show_messages();
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Removes order metaboxes if the order is a Commerce pending order.
|
218 |
+
*
|
219 |
+
* @internal
|
220 |
+
*
|
221 |
+
* @since 2.1.0
|
222 |
+
*/
|
223 |
+
public function maybe_remove_order_metaboxes() {
|
224 |
+
global $post;
|
225 |
+
|
226 |
+
if ( ! $post instanceof \WP_Post || ! $this->is_edit_order_screen() ) {
|
227 |
+
return;
|
228 |
+
}
|
229 |
+
|
230 |
+
$order = wc_get_order( $post );
|
231 |
+
|
232 |
+
if ( ! $order || ! $order->has_status( 'pending' ) || ! Commerce\Orders::is_commerce_order( $order ) ) {
|
233 |
+
return;
|
234 |
+
}
|
235 |
+
|
236 |
+
remove_meta_box( 'woocommerce-order-actions', get_current_screen(), 'side' );
|
237 |
+
}
|
238 |
+
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Gets the markup for the buttons used in a modal.
|
242 |
+
*
|
243 |
+
* @since 2.1.0
|
244 |
+
*
|
245 |
+
* @param string $submit_label label for the submit button
|
246 |
+
* @return string
|
247 |
+
*/
|
248 |
+
private function get_modal_buttons( $submit_label ) {
|
249 |
+
|
250 |
+
ob_start();
|
251 |
+
|
252 |
+
?>
|
253 |
+
<button
|
254 |
+
id="btn-ok"
|
255 |
+
class="button button-large button-primary"
|
256 |
+
><?php esc_html_e( $submit_label ); ?></button>
|
257 |
+
<button
|
258 |
+
class="wc-facebook-modal-cancel-button button button-large"
|
259 |
+
onclick="jQuery( '.modal-close' ).trigger( 'click' )"
|
260 |
+
><?php esc_html_e( 'Cancel', 'facebook-for-woocommerce' ); ?></button>
|
261 |
+
<?php
|
262 |
+
|
263 |
+
return ob_get_clean();
|
264 |
+
}
|
265 |
+
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Gets the markup for the message used in the Complete modal.
|
269 |
+
*
|
270 |
+
* @since 2.1.0
|
271 |
+
*
|
272 |
+
* @return string
|
273 |
+
*/
|
274 |
+
private function get_complete_modal_message() {
|
275 |
+
|
276 |
+
ob_start();
|
277 |
+
|
278 |
+
$shipment_utilities = new Shipment();
|
279 |
+
|
280 |
+
echo '<div class="woocommerce_options_panel">',
|
281 |
+
'<p>', esc_html__( 'Select the carrier and tracking number for this order:', 'facebook-for-woocommerce' ), '</p>';
|
282 |
+
|
283 |
+
woocommerce_wp_select( [
|
284 |
+
'id' => 'wc_facebook_carrier',
|
285 |
+
'label' => __( 'Carrier', 'facebook-for-woocommerce' ),
|
286 |
+
'options' => $shipment_utilities->get_carrier_options(),
|
287 |
+
] );
|
288 |
+
|
289 |
+
woocommerce_wp_text_input( [
|
290 |
+
'id' => 'wc_facebook_tracking_number',
|
291 |
+
'label' => __( 'Tracking number', 'facebook-for-woocommerce' ),
|
292 |
+
] );
|
293 |
+
|
294 |
+
echo '</div>';
|
295 |
+
|
296 |
+
return ob_get_clean();
|
297 |
+
}
|
298 |
+
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Gets the markup for the buttons used in the Complete modal.
|
302 |
+
*
|
303 |
+
* @since 2.1.0
|
304 |
+
*
|
305 |
+
* @return string
|
306 |
+
*/
|
307 |
+
private function get_complete_modal_buttons() {
|
308 |
+
|
309 |
+
return $this->get_modal_buttons( __( 'Submit order', 'facebook-for-woocommerce' ) );
|
310 |
+
}
|
311 |
+
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Gets the markup for the message used in the Refund modal.
|
315 |
+
*
|
316 |
+
* @since 2.1.0
|
317 |
+
*
|
318 |
+
* @return string
|
319 |
+
*/
|
320 |
+
private function get_refund_modal_message() {
|
321 |
+
|
322 |
+
ob_start();
|
323 |
+
|
324 |
+
?>
|
325 |
+
<p><?php esc_html_e( 'Select a reason for refunding this order:', 'facebook-for-woocommerce' ); ?></p>
|
326 |
+
<?php
|
327 |
+
|
328 |
+
$this->render_refund_reason_field( 'wc_facebook_refund_reason_modal', false );
|
329 |
+
|
330 |
+
return ob_get_clean();
|
331 |
+
}
|
332 |
+
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Gets the markup for the buttons used in the Refund modal.
|
336 |
+
*
|
337 |
+
* @since 2.1.0
|
338 |
+
*
|
339 |
+
* @return string
|
340 |
+
*/
|
341 |
+
private function get_refund_modal_buttons() {
|
342 |
+
|
343 |
+
return $this->get_modal_buttons( __( 'Submit refund', 'facebook-for-woocommerce' ) );
|
344 |
+
}
|
345 |
+
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Gets the markup for the message used in the Cancel modal.
|
349 |
+
*
|
350 |
+
* @since 2.1.0
|
351 |
+
*
|
352 |
+
* @return string
|
353 |
+
*/
|
354 |
+
private function get_cancel_modal_message() {
|
355 |
+
|
356 |
+
ob_start();
|
357 |
+
|
358 |
+
?>
|
359 |
+
<p><?php esc_html_e( 'Select a reason for cancelling this order:', 'facebook-for-woocommerce' ); ?></p>
|
360 |
+
<?php
|
361 |
+
|
362 |
+
woocommerce_wp_select( [
|
363 |
+
'id' => 'wc_facebook_cancel_reason',
|
364 |
+
'label' => '',
|
365 |
+
'options' => facebook_for_woocommerce()->get_commerce_handler()->get_orders_handler()->get_cancellation_reasons(),
|
366 |
+
] );
|
367 |
+
|
368 |
+
return ob_get_clean();
|
369 |
+
}
|
370 |
+
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Gets the markup for the buttons used in the Cancel modal.
|
374 |
+
*
|
375 |
+
* @since 2.1.0
|
376 |
+
*
|
377 |
+
* @return string
|
378 |
+
*/
|
379 |
+
private function get_cancel_modal_buttons() {
|
380 |
+
|
381 |
+
return $this->get_modal_buttons( __( 'Submit cancellation', 'facebook-for-woocommerce' ) );
|
382 |
+
}
|
383 |
+
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Renders the refund reason field.
|
387 |
+
*
|
388 |
+
* @internal
|
389 |
+
*
|
390 |
+
* @since 2.1.0
|
391 |
+
*/
|
392 |
+
public function render_refund_reason_field( $select_id = '', $hidden = true ) {
|
393 |
+
|
394 |
+
if ( ! $this->is_edit_order_screen() ) {
|
395 |
+
return;
|
396 |
+
}
|
397 |
+
|
398 |
+
?>
|
399 |
+
<select id="<?php echo esc_attr( $select_id ?: 'wc_facebook_refund_reason' ); ?>" <?php echo $hidden ? 'style="display: none;"' : ''; ?>>
|
400 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_BUYERS_REMORSE ); ?>"><?php esc_html_e( 'Customer request', 'facebook-for-woocommerce' ); ?></option>
|
401 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_DAMAGED_GOODS ); ?>"><?php esc_html_e( 'Damaged product', 'facebook-for-woocommerce' ); ?></option>
|
402 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_NOT_AS_DESCRIBED ); ?>"><?php esc_html_e( 'Product not as described', 'facebook-for-woocommerce' ); ?></option>
|
403 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_QUALITY_ISSUE ); ?>"><?php esc_html_e( 'Quality issue', 'facebook-for-woocommerce' ); ?></option>
|
404 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_WRONG_ITEM ); ?>"><?php esc_html_e( 'Wrong item', 'facebook-for-woocommerce' ); ?></option>
|
405 |
+
<option value="<?php echo esc_attr( Commerce\Orders::REFUND_REASON_OTHER ); ?>"><?php esc_html_e( 'Other', 'facebook-for-woocommerce' ); ?></option>
|
406 |
+
</select>
|
407 |
+
<?php
|
408 |
+
}
|
409 |
+
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Sends a refund request to the Commerce API when a WC refund is created.
|
413 |
+
*
|
414 |
+
* @internal
|
415 |
+
*
|
416 |
+
* @since 2.1.0
|
417 |
+
*
|
418 |
+
* @param int $refund_id refund ID
|
419 |
+
* @throws Framework\SV_WC_Plugin_Exception
|
420 |
+
*/
|
421 |
+
public function handle_refund( $refund_id ) {
|
422 |
+
|
423 |
+
$order_refund = wc_get_order( $refund_id );
|
424 |
+
|
425 |
+
if ( $order_refund instanceof \WC_Order_Refund ) {
|
426 |
+
|
427 |
+
$reason_code = isset( $_POST['wc_facebook_refund_reason'] ) ? $_POST['wc_facebook_refund_reason'] : null;
|
428 |
+
|
429 |
+
facebook_for_woocommerce()->get_commerce_handler()->get_orders_handler()->add_order_refund( $order_refund, $reason_code );
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
|
434 |
+
/**
|
435 |
+
* Sets a transient to display a notice regarding bulk updates for Commerce orders' statuses.
|
436 |
+
*
|
437 |
+
* @internal
|
438 |
+
*
|
439 |
+
* @since 2.1.0
|
440 |
+
*
|
441 |
+
* @param string $redirect_url redirect URL carrying results
|
442 |
+
* @param string $action bulk action
|
443 |
+
* @param int[] $order_ids IDs of orders affected by the bulk action
|
444 |
+
* @return string
|
445 |
+
*/
|
446 |
+
public function handle_bulk_update( $redirect_url, $action, $order_ids ) {
|
447 |
+
|
448 |
+
// listen for order status change actions
|
449 |
+
if ( empty( $action ) || empty( $order_ids ) || ! Framework\SV_WC_Helper::str_starts_with( $action, 'mark_' ) ) {
|
450 |
+
return $redirect_url;
|
451 |
+
}
|
452 |
+
|
453 |
+
$commerce_orders = [];
|
454 |
+
|
455 |
+
foreach ( $order_ids as $index => $order_id ) {
|
456 |
+
|
457 |
+
$order = wc_get_order( $order_id );
|
458 |
+
|
459 |
+
if ( ! $order ) {
|
460 |
+
continue;
|
461 |
+
}
|
462 |
+
|
463 |
+
if ( Commerce\Orders::is_commerce_order( $order ) ) {
|
464 |
+
|
465 |
+
unset( $order_ids[ $index ] );
|
466 |
+
|
467 |
+
$commerce_orders[] = $order->get_order_number();
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
if ( ! empty( $commerce_orders ) ) {
|
472 |
+
|
473 |
+
// set the orders that are not going to be updated in the transient for reference
|
474 |
+
set_transient( $this->bulk_order_update_transient, $commerce_orders, MINUTE_IN_SECONDS );
|
475 |
+
|
476 |
+
// this will prevent WooCommerce to keep processing the orders we don't want to be changed in bulk
|
477 |
+
add_filter( 'woocommerce_bulk_action_ids', static function( $ids ) use ( $order_ids ) {
|
478 |
+
return $order_ids;
|
479 |
+
} );
|
480 |
+
|
481 |
+
// finally, parse the URL (main filter callback param)
|
482 |
+
if ( empty( $order_ids ) ) {
|
483 |
+
|
484 |
+
$redirect_url = admin_url( 'edit.php?post_type=shop_order' );
|
485 |
+
|
486 |
+
} else {
|
487 |
+
|
488 |
+
$redirect_url = add_query_arg(
|
489 |
+
[
|
490 |
+
'post_type' => 'shop_order',
|
491 |
+
'bulk_action' => $action,
|
492 |
+
'changed' => count( $order_ids ),
|
493 |
+
'ids' => implode( ',', $order_ids ),
|
494 |
+
],
|
495 |
+
$redirect_url
|
496 |
+
);
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
500 |
+
return $redirect_url;
|
501 |
+
}
|
502 |
+
|
503 |
+
|
504 |
+
/**
|
505 |
+
* Removes the status actions from the order list table rows.
|
506 |
+
*
|
507 |
+
* @internal
|
508 |
+
*
|
509 |
+
* @since 2.1.0
|
510 |
+
*
|
511 |
+
* @param array $actions existing actions
|
512 |
+
* @param \WC_Order $order order object
|
513 |
+
* @return array
|
514 |
+
*/
|
515 |
+
public function remove_list_table_actions( $actions, $order ) {
|
516 |
+
|
517 |
+
if ( $order instanceof \WC_Order && Commerce\Orders::is_commerce_order( $order ) ) {
|
518 |
+
unset( $actions['processing'], $actions['complete'] );
|
519 |
+
}
|
520 |
+
|
521 |
+
return $actions;
|
522 |
+
}
|
523 |
+
|
524 |
+
|
525 |
+
/**
|
526 |
+
* Removes the status actions from the list table order preview modal.
|
527 |
+
*
|
528 |
+
* @internal
|
529 |
+
*
|
530 |
+
* @since 2.1.0
|
531 |
+
*
|
532 |
+
* @param array $actions existing actions
|
533 |
+
* @param \WC_Order $order order object
|
534 |
+
* @return array
|
535 |
+
*/
|
536 |
+
public function remove_order_preview_actions( $actions, $order ) {
|
537 |
+
|
538 |
+
if ( $order instanceof \WC_Order && Commerce\Orders::is_commerce_order( $order ) ) {
|
539 |
+
unset( $actions['status'] );
|
540 |
+
}
|
541 |
+
|
542 |
+
return $actions;
|
543 |
+
}
|
544 |
+
|
545 |
+
|
546 |
+
/**
|
547 |
+
* Prevents sending emails for Commerce orders.
|
548 |
+
*
|
549 |
+
* @internal
|
550 |
+
*
|
551 |
+
* @since 2.1.0
|
552 |
+
*
|
553 |
+
* @param bool $is_enabled whether the email is enabled in the first place
|
554 |
+
* @param \WC_Order $order order object
|
555 |
+
* @return bool
|
556 |
+
*/
|
557 |
+
public function maybe_stop_order_email( $is_enabled, $order ) {
|
558 |
+
|
559 |
+
// will decide whether to allow $is_enabled to be filtered
|
560 |
+
$is_previously_enabled = $is_enabled;
|
561 |
+
|
562 |
+
// checks whether or not the order is a Commerce order
|
563 |
+
$is_commerce_order = $order instanceof \WC_Order && \SkyVerge\WooCommerce\Facebook\Commerce\Orders::is_commerce_order( $order );
|
564 |
+
|
565 |
+
// decides whether to disable or to keep emails enabled
|
566 |
+
$is_enabled = $is_enabled && ! $is_commerce_order;
|
567 |
+
|
568 |
+
if ( $is_previously_enabled && $is_commerce_order ) {
|
569 |
+
|
570 |
+
/**
|
571 |
+
* Filters the flag used to determine whether the email is enabled.
|
572 |
+
*
|
573 |
+
* @param bool $is_enabled whether the email is enabled
|
574 |
+
* @param \WC_Order $order order object
|
575 |
+
* @param Orders $this admin orders instance
|
576 |
+
* @since 2.1.0
|
577 |
+
*
|
578 |
+
*/
|
579 |
+
$is_enabled = (bool) apply_filters( 'wc_facebook_commerce_send_woocommerce_emails', $is_enabled, $order, $this );
|
580 |
+
}
|
581 |
+
|
582 |
+
return $is_enabled;
|
583 |
+
}
|
584 |
+
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Determines whether or not the order is editable.
|
588 |
+
*
|
589 |
+
* @internal
|
590 |
+
*
|
591 |
+
* @since 2.1.0
|
592 |
+
*
|
593 |
+
* @param bool $maybe_editable whether the order is editable in the first place
|
594 |
+
* @param \WC_Order $order order object
|
595 |
+
* @return bool
|
596 |
+
*/
|
597 |
+
public function is_order_editable( $maybe_editable, $order ) {
|
598 |
+
|
599 |
+
// if the order is a WC_Order, determines whether it is pending or not
|
600 |
+
$is_order_pending = $order instanceof \WC_Order && Commerce\Orders::is_order_pending( $order );
|
601 |
+
|
602 |
+
return $maybe_editable && ! $is_order_pending;
|
603 |
+
}
|
604 |
+
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Determines whether or not the current screen is an orders screen.
|
608 |
+
*
|
609 |
+
* @internal
|
610 |
+
*
|
611 |
+
* @since 2.1.0
|
612 |
+
*
|
613 |
+
* @return bool
|
614 |
+
*/
|
615 |
+
public function is_orders_screen() {
|
616 |
+
|
617 |
+
return Framework\SV_WC_Helper::is_current_screen( 'edit-shop_order' ) ||
|
618 |
+
Framework\SV_WC_Helper::is_current_screen( 'shop_order' );
|
619 |
+
}
|
620 |
+
|
621 |
+
|
622 |
+
/**
|
623 |
+
* Determines whether or not the current screen is an order edit screen.
|
624 |
+
*
|
625 |
+
* @internal
|
626 |
+
*
|
627 |
+
* @since 2.1.0
|
628 |
+
*
|
629 |
+
* @return bool
|
630 |
+
*/
|
631 |
+
public function is_edit_order_screen() {
|
632 |
+
|
633 |
+
return Framework\SV_WC_Helper::is_current_screen( 'shop_order' );
|
634 |
+
}
|
635 |
+
|
636 |
+
|
637 |
+
}
|
includes/Admin/Product_Categories.php
ADDED
@@ -0,0 +1,468 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* General handler for the product category admin functionality.
|
19 |
+
*
|
20 |
+
* @since 2.1.0
|
21 |
+
*/
|
22 |
+
class Product_Categories {
|
23 |
+
|
24 |
+
|
25 |
+
/** @var string ID for the HTML field */
|
26 |
+
const FIELD_GOOGLE_PRODUCT_CATEGORY_ID = 'wc_facebook_google_product_category_id';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Handler constructor.
|
30 |
+
*
|
31 |
+
* @since 2.1.0
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
|
35 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
|
36 |
+
|
37 |
+
add_action( 'product_cat_add_form_fields', array( $this, 'render_add_google_product_category_field' ) );
|
38 |
+
add_action( 'product_cat_edit_form_fields', array( $this, 'render_edit_google_product_category_field' ) );
|
39 |
+
add_action( 'product_cat_edit_form_fields', array( $this, 'render_edit_enhanced_catalog_attributes_field' ) );
|
40 |
+
|
41 |
+
add_action( 'created_term', array( $this, 'save_google_product_category_and_enhanced_attributes' ), 10, 3 );
|
42 |
+
add_action( 'edit_term', array( $this, 'save_google_product_category_and_enhanced_attributes' ), 10, 3 );
|
43 |
+
|
44 |
+
add_action( 'wp_ajax_wc_facebook_enhanced_catalog_attributes', array( $this, 'ajax_render_enhanced_catalog_attributes_field' ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Enqueues the assets.
|
49 |
+
*
|
50 |
+
* @internal
|
51 |
+
*
|
52 |
+
* @since 2.1.0
|
53 |
+
*/
|
54 |
+
public function enqueue_assets() {
|
55 |
+
|
56 |
+
if ( $this->is_categories_screen() ) {
|
57 |
+
|
58 |
+
wp_enqueue_style( 'wc-facebook-product-categories', facebook_for_woocommerce()->get_plugin_url() . '/assets/css/admin/products-categories.css', array(), \WC_Facebookcommerce::PLUGIN_VERSION );
|
59 |
+
|
60 |
+
wp_enqueue_script(
|
61 |
+
'wc-facebook-product-categories',
|
62 |
+
facebook_for_woocommerce()->get_plugin_url() . '/assets/js/admin/product-categories.min.js',
|
63 |
+
array(
|
64 |
+
'jquery',
|
65 |
+
'wc-backbone-modal',
|
66 |
+
'jquery-blockui',
|
67 |
+
'jquery-tiptip',
|
68 |
+
'facebook-for-woocommerce-modal',
|
69 |
+
),
|
70 |
+
\WC_Facebookcommerce::PLUGIN_VERSION
|
71 |
+
);
|
72 |
+
|
73 |
+
wp_localize_script(
|
74 |
+
'wc-facebook-product-categories',
|
75 |
+
'facebook_for_woocommerce_product_categories',
|
76 |
+
array(
|
77 |
+
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
78 |
+
'enhanced_attribute_optional_selector' => Enhanced_Catalog_Attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX . Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY,
|
79 |
+
'enhanced_attribute_page_type_edit_category' => Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_CATEGORY,
|
80 |
+
'enhanced_attribute_page_type_add_category' => Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_ADD_CATEGORY,
|
81 |
+
'enhanced_attribute_page_type_edit_product' => Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_PRODUCT,
|
82 |
+
'default_google_product_category_modal_message' => $this->get_default_google_product_category_modal_message(),
|
83 |
+
'default_google_product_category_modal_buttons' => $this->get_default_google_product_category_modal_buttons(),
|
84 |
+
)
|
85 |
+
);
|
86 |
+
}//end if
|
87 |
+
}
|
88 |
+
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Gets the message for Default Google Product Category modal.
|
92 |
+
*
|
93 |
+
* @since 2.1.0
|
94 |
+
*
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
private function get_default_google_product_category_modal_message() {
|
98 |
+
|
99 |
+
return wp_kses_post( __( 'Products and categories that inherit this global setting (i.e. they do not have a specific Google product category set) will use the new default immediately. Are you sure you want to proceed?', 'facebook-for-woocommerce' ) );
|
100 |
+
}
|
101 |
+
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets the markup for the buttons used in the Default Google Product Category modal.
|
105 |
+
*
|
106 |
+
* @since 2.1.0
|
107 |
+
*
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
private function get_default_google_product_category_modal_buttons() {
|
111 |
+
|
112 |
+
ob_start();
|
113 |
+
|
114 |
+
?>
|
115 |
+
<button
|
116 |
+
class="button button-large"
|
117 |
+
onclick="jQuery( '.modal-close' ).trigger( 'click' )"
|
118 |
+
><?php esc_html_e( 'Cancel', 'facebook-for-woocommerce' ); ?></button>
|
119 |
+
<button
|
120 |
+
id="btn-ok"
|
121 |
+
class="button button-large button-primary"
|
122 |
+
><?php esc_html_e( 'Update default Google product category', 'facebook-for-woocommerce' ); ?></button>
|
123 |
+
<?php
|
124 |
+
|
125 |
+
return ob_get_clean();
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Renders the Google product category field markup for the add form.
|
131 |
+
*
|
132 |
+
* @internal
|
133 |
+
*
|
134 |
+
* @since 2.1.0
|
135 |
+
*/
|
136 |
+
public function render_add_google_product_category_field() {
|
137 |
+
|
138 |
+
$category_field = new Google_Product_Category_Field();
|
139 |
+
|
140 |
+
?>
|
141 |
+
<div class="form-field term-<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>-wrap">
|
142 |
+
<span><?php echo esc_html( self::get_enhanced_catalog_explanation_text() ); ?></span>
|
143 |
+
<br/>
|
144 |
+
<br/>
|
145 |
+
<?php Enhanced_Catalog_Attribute_Fields::render_hidden_input_can_show_attributes(); ?>
|
146 |
+
<label for="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>">
|
147 |
+
<?php echo esc_html( $this->get_google_product_category_field_title() ); ?>
|
148 |
+
<?php $this->render_google_product_category_tooltip(); ?>
|
149 |
+
</label>
|
150 |
+
<input type="hidden" id="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"
|
151 |
+
name="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"/>
|
152 |
+
<?php $category_field->render( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>
|
153 |
+
</div>
|
154 |
+
<?php
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Returns the text that explains why the categories are being displayed
|
159 |
+
*
|
160 |
+
* @return string the explanation text
|
161 |
+
*/
|
162 |
+
public static function get_enhanced_catalog_explanation_text() {
|
163 |
+
return __( 'Facebook catalogs now support category specific fields, to make best use of them you need to select a category. WooCommerce uses the google taxonomy as it is the most widely accepted form of categorisation.', 'facebook-for-woocommerce' );
|
164 |
+
}
|
165 |
+
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Renders the Google product category field markup for the edit form.
|
169 |
+
*
|
170 |
+
* @internal
|
171 |
+
*
|
172 |
+
* @since 2.1.0
|
173 |
+
*
|
174 |
+
* @param \WP_Term $term current taxonomy term object.
|
175 |
+
*/
|
176 |
+
public function render_edit_google_product_category_field( \WP_Term $term ) {
|
177 |
+
|
178 |
+
$category_field = new Google_Product_Category_Field();
|
179 |
+
$value = get_term_meta( $term->term_id, \SkyVerge\WooCommerce\Facebook\Products::GOOGLE_PRODUCT_CATEGORY_META_KEY, true );
|
180 |
+
|
181 |
+
?>
|
182 |
+
<tr class="form-field">
|
183 |
+
<td colspan="2">
|
184 |
+
<span><?php echo esc_html( self::get_enhanced_catalog_explanation_text() ); ?></span>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
<tr class="form-field term-<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>-wrap">
|
188 |
+
<th scope="row">
|
189 |
+
<label for="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>">
|
190 |
+
<?php echo esc_html( $this->get_google_product_category_field_title() ); ?>
|
191 |
+
<?php $this->render_google_product_category_tooltip(); ?>
|
192 |
+
</label>
|
193 |
+
</th>
|
194 |
+
<td>
|
195 |
+
<?php Enhanced_Catalog_Attribute_Fields::render_hidden_input_can_show_attributes(); ?>
|
196 |
+
<input type="hidden" id="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"
|
197 |
+
name="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"
|
198 |
+
value="<?php echo esc_attr( $value ); ?>"/>
|
199 |
+
<?php $category_field->render( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>
|
200 |
+
</td>
|
201 |
+
</tr>
|
202 |
+
<?php
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Renders the common tooltip markup.
|
207 |
+
*
|
208 |
+
* @internal
|
209 |
+
*
|
210 |
+
* @since 2.1.0
|
211 |
+
*/
|
212 |
+
public function render_google_product_category_tooltip() {
|
213 |
+
|
214 |
+
$tooltip_text = __( 'Choose a default Google product category for products in this category. Products need at least two category levels defined for tax to be correctly applied.', 'facebook-for-woocommerce' );
|
215 |
+
|
216 |
+
?>
|
217 |
+
<span class="woocommerce-help-tip" data-tip="<?php echo esc_attr( $tooltip_text ); ?>"></span>
|
218 |
+
<?php
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Gets the common field title.
|
223 |
+
*
|
224 |
+
* @internal
|
225 |
+
*
|
226 |
+
* @since 2.1.0
|
227 |
+
*
|
228 |
+
* @return string
|
229 |
+
*/
|
230 |
+
public function get_google_product_category_field_title() {
|
231 |
+
|
232 |
+
return __( 'Default Google product category', 'facebook-for-woocommerce' );
|
233 |
+
}
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Renders the enhanced catalog attributes field markup for the edit form.
|
237 |
+
*
|
238 |
+
* @internal
|
239 |
+
*
|
240 |
+
* @since 2.1.0
|
241 |
+
*/
|
242 |
+
public function ajax_render_enhanced_catalog_attributes_field() {
|
243 |
+
$category_id = wc_clean( Framework\SV_WC_Helper::get_requested_value( 'selected_category' ) );
|
244 |
+
$page_type = wc_clean( Framework\SV_WC_Helper::get_requested_value( 'page_type' ) );
|
245 |
+
|
246 |
+
switch ( $page_type ) {
|
247 |
+
case Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_CATEGORY:
|
248 |
+
$tag_id = intval( wc_clean( Framework\SV_WC_Helper::get_requested_value( 'tag_id' ) ) );
|
249 |
+
$taxonomy = wc_clean( Framework\SV_WC_Helper::get_requested_value( 'taxonomy' ) );
|
250 |
+
$term = get_term( $tag_id, $taxonomy );
|
251 |
+
$this->render_edit_enhanced_catalog_attributes_field( $term, $category_id );
|
252 |
+
break;
|
253 |
+
case Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_ADD_CATEGORY:
|
254 |
+
$this->render_add_enhanced_catalog_attributes_field( $category_id );
|
255 |
+
break;
|
256 |
+
case Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_PRODUCT:
|
257 |
+
$item_id = intval( wc_clean( Framework\SV_WC_Helper::get_requested_value( 'item_id' ) ) );
|
258 |
+
$product = new \WC_Product( $item_id );
|
259 |
+
\SkyVerge\WooCommerce\Facebook\Admin\Products::render_enhanced_catalog_attributes_fields( $category_id, $product );
|
260 |
+
break;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Renders the enhanced catalog attributes field markup for the edit form.
|
266 |
+
*
|
267 |
+
* @internal
|
268 |
+
*
|
269 |
+
* @since 2.1.0
|
270 |
+
*
|
271 |
+
* @param \WP_Term $term current taxonomy term object.
|
272 |
+
* @param string $category_id passed in category id
|
273 |
+
*/
|
274 |
+
public function render_edit_enhanced_catalog_attributes_field( \WP_Term $term, $category_id = null ) {
|
275 |
+
if ( empty( $category_id ) ) {
|
276 |
+
$category_id = get_term_meta( $term->term_id, \SkyVerge\WooCommerce\Facebook\Products::GOOGLE_PRODUCT_CATEGORY_META_KEY, true );
|
277 |
+
}
|
278 |
+
|
279 |
+
$enhanced_attribute_fields = new Enhanced_Catalog_Attribute_Fields( Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_CATEGORY, $term );
|
280 |
+
$category_handler = facebook_for_woocommerce()->get_facebook_category_handler();
|
281 |
+
|
282 |
+
if ( $category_handler->get_category_depth( $category_id ) < 2 ) {
|
283 |
+
// show nothing
|
284 |
+
?>
|
285 |
+
<tr class='form-field'>
|
286 |
+
<td colspan="2">
|
287 |
+
<span>HELLO<?php echo $category_id; ?></span>
|
288 |
+
</td>
|
289 |
+
</tr>
|
290 |
+
<?php
|
291 |
+
return;
|
292 |
+
}
|
293 |
+
|
294 |
+
?>
|
295 |
+
<tr class="form-field wc-facebook-enhanced-catalog-attribute-row term-<?php echo esc_attr( Enhanced_Catalog_attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID ); ?>-title-wrap">
|
296 |
+
<th colspan="2" scope="row">
|
297 |
+
<label for="<?php echo esc_attr( Enhanced_Catalog_attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID ); ?>">
|
298 |
+
<?php echo esc_html( $this->render_enhanced_catalog_attributes_title() ); ?>
|
299 |
+
<?php $this->render_enhanced_catalog_attributes_tooltip(); ?>
|
300 |
+
</label>
|
301 |
+
</th>
|
302 |
+
</tr>
|
303 |
+
<?php
|
304 |
+
$enhanced_attribute_fields->render( $category_id );
|
305 |
+
}
|
306 |
+
|
307 |
+
|
308 |
+
/**
|
309 |
+
* Renders the enhanced catalog attributes field markup for the edit form.
|
310 |
+
*
|
311 |
+
* @internal
|
312 |
+
*
|
313 |
+
* @since 2.1.0
|
314 |
+
*
|
315 |
+
* @param mixed $category_id the selected category to render attributes for.
|
316 |
+
* @param \WP_Term $term current taxonomy term object.
|
317 |
+
*/
|
318 |
+
public function render_add_enhanced_catalog_attributes_field( $category_id ) {
|
319 |
+
$enhanced_attribute_fields = new Enhanced_Catalog_Attribute_Fields( Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_ADD_CATEGORY );
|
320 |
+
$category_handler = facebook_for_woocommerce()->get_facebook_category_handler();
|
321 |
+
|
322 |
+
if ( $category_handler->get_category_depth( $category_id ) < 2 ) {
|
323 |
+
// show nothing
|
324 |
+
return;
|
325 |
+
}
|
326 |
+
|
327 |
+
?>
|
328 |
+
<div class="form-field wc-facebook-enhanced-catalog-attribute-row term-<?php echo esc_attr( Enhanced_Catalog_attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID ); ?>-title-wrap">
|
329 |
+
<label for="<?php echo esc_attr( Enhanced_Catalog_attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID ); ?>">
|
330 |
+
<?php echo esc_html( $this->render_enhanced_catalog_attributes_title() ); ?>
|
331 |
+
<?php $this->render_enhanced_catalog_attributes_tooltip(); ?>
|
332 |
+
</label>
|
333 |
+
</div>
|
334 |
+
<table>
|
335 |
+
<?php $enhanced_attribute_fields->render( $category_id ); ?>
|
336 |
+
</table>
|
337 |
+
<?php
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Renders the common tooltip markup.
|
342 |
+
*
|
343 |
+
* @internal
|
344 |
+
*
|
345 |
+
* @since 2.1.0
|
346 |
+
*/
|
347 |
+
public function render_enhanced_catalog_attributes_tooltip() {
|
348 |
+
|
349 |
+
$tooltip_text = __( 'Select default values for enhanced attributes within this category', 'facebook-for-woocommerce' );
|
350 |
+
|
351 |
+
?>
|
352 |
+
<span class="woocommerce-help-tip" data-tip="<?php echo esc_attr( $tooltip_text ); ?>"></span>
|
353 |
+
<?php
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Gets the common field title.
|
358 |
+
*
|
359 |
+
* @internal
|
360 |
+
*
|
361 |
+
* @since 2.1.0
|
362 |
+
*
|
363 |
+
* @return string
|
364 |
+
*/
|
365 |
+
public function render_enhanced_catalog_attributes_title() {
|
366 |
+
|
367 |
+
return __( 'Category Specific Attributes', 'facebook-for-woocommerce' );
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Saves the POSTed Google product category ID and triggers a sync for the affected products.
|
372 |
+
*
|
373 |
+
* @internal
|
374 |
+
*
|
375 |
+
* @since 2.1.0
|
376 |
+
*
|
377 |
+
* @param int $term_id term ID.
|
378 |
+
* @param int $tt_id term taxonomy ID.
|
379 |
+
* @param string $taxonomy Taxonomy slug.
|
380 |
+
*/
|
381 |
+
public function save_google_product_category_and_enhanced_attributes( $term_id, $tt_id, $taxonomy ) {
|
382 |
+
|
383 |
+
$google_product_category_id = wc_clean( Framework\SV_WC_Helper::get_posted_value( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ) );
|
384 |
+
|
385 |
+
\SkyVerge\WooCommerce\Facebook\Product_Categories::update_google_product_category_id( $term_id, $google_product_category_id );
|
386 |
+
$this->save_enhanced_catalog_attributes( $term_id, $tt_id, $taxonomy );
|
387 |
+
|
388 |
+
$term = get_term( $term_id, $taxonomy );
|
389 |
+
|
390 |
+
if ( $term instanceof \WP_Term ) {
|
391 |
+
|
392 |
+
// get the products in the category being saved
|
393 |
+
$products = wc_get_products(
|
394 |
+
array(
|
395 |
+
'category' => array( $term->slug ),
|
396 |
+
)
|
397 |
+
);
|
398 |
+
|
399 |
+
if ( ! empty( $products ) ) {
|
400 |
+
|
401 |
+
$sync_product_ids = array();
|
402 |
+
|
403 |
+
/**
|
404 |
+
* @var int $product_id
|
405 |
+
* @var \WC_Product $product
|
406 |
+
*/
|
407 |
+
foreach ( $products as $product_id => $product ) {
|
408 |
+
|
409 |
+
if ( $product instanceof \WC_Product_Variable ) {
|
410 |
+
|
411 |
+
// should sync the variations, not the variable product
|
412 |
+
$sync_product_ids = array_merge( $sync_product_ids, $product->get_children() );
|
413 |
+
|
414 |
+
} else {
|
415 |
+
|
416 |
+
$sync_product_ids[] = $product_id;
|
417 |
+
}
|
418 |
+
}
|
419 |
+
|
420 |
+
facebook_for_woocommerce()->get_products_sync_handler()->create_or_update_products( $sync_product_ids );
|
421 |
+
}//end if
|
422 |
+
}//end if
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Saves the POSTed enhanced catalog attributes and triggers a sync for the affected products.
|
427 |
+
*
|
428 |
+
* @internal
|
429 |
+
*
|
430 |
+
* @since 2.1.0
|
431 |
+
*
|
432 |
+
* @param int $term_id term ID.
|
433 |
+
* @param int $tt_id term taxonomy ID.
|
434 |
+
* @param string $taxonomy Taxonomy slug.
|
435 |
+
*/
|
436 |
+
public function save_enhanced_catalog_attributes( $term_id, $tt_id, $taxonomy ) {
|
437 |
+
$enhanced_catalog_attributes = \SkyVerge\WooCommerce\Facebook\Products::get_enhanced_catalog_attributes_from_request();
|
438 |
+
|
439 |
+
foreach ( $enhanced_catalog_attributes as $key => $value ) {
|
440 |
+
$meta_key = \SkyVerge\WooCommerce\Facebook\Products::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . $key;
|
441 |
+
update_term_meta( $term_id, $meta_key, $value );
|
442 |
+
}
|
443 |
+
|
444 |
+
if ( ! isset( $enhanced_catalog_attributes[ Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY ] ) ) {
|
445 |
+
// This is a checkbox so won't show in the post data if it's been unchecked,
|
446 |
+
// hence if it's unset we should clear the term meta for it.
|
447 |
+
$meta_key = \SkyVerge\WooCommerce\Facebook\Products::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY;
|
448 |
+
update_term_meta( $term_id, $meta_key, null );
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
|
453 |
+
/**
|
454 |
+
* Determines whether or not the current screen is a categories screen.
|
455 |
+
*
|
456 |
+
* @internal
|
457 |
+
*
|
458 |
+
* @since 2.1.0
|
459 |
+
*
|
460 |
+
* @return bool
|
461 |
+
*/
|
462 |
+
public function is_categories_screen() {
|
463 |
+
|
464 |
+
return Framework\SV_WC_Helper::is_current_screen( 'edit-product_cat' );
|
465 |
+
}
|
466 |
+
|
467 |
+
|
468 |
+
}
|
includes/Admin/Products.php
ADDED
@@ -0,0 +1,278 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Admin;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\Facebook\AJAX;
|
16 |
+
use SkyVerge\WooCommerce\Facebook\Products as Products_Handler;
|
17 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* General handler for product admin functionality.
|
21 |
+
*
|
22 |
+
* @since 2.1.0
|
23 |
+
*/
|
24 |
+
class Products {
|
25 |
+
|
26 |
+
|
27 |
+
/** @var string Commerce enabled field */
|
28 |
+
const FIELD_COMMERCE_ENABLED = 'wc_facebook_commerce_enabled';
|
29 |
+
|
30 |
+
/** @var string Google Product category ID field */
|
31 |
+
const FIELD_GOOGLE_PRODUCT_CATEGORY_ID = 'wc_facebook_google_product_category_id';
|
32 |
+
|
33 |
+
/** @var string gender field */
|
34 |
+
const FIELD_GENDER = 'wc_facebook_gender';
|
35 |
+
|
36 |
+
/** @var string color field */
|
37 |
+
const FIELD_COLOR = 'wc_facebook_color';
|
38 |
+
|
39 |
+
/** @var string size field */
|
40 |
+
const FIELD_SIZE = 'wc_facebook_size';
|
41 |
+
|
42 |
+
/** @var string pattern field */
|
43 |
+
const FIELD_PATTERN = 'wc_facebook_pattern';
|
44 |
+
|
45 |
+
public static function render_google_product_category_fields_and_enhanced_attributes( \WC_Product $product ) {
|
46 |
+
?>
|
47 |
+
<div class='wc_facebook_commerce_fields'>
|
48 |
+
<p class="form-field">
|
49 |
+
<span><?php echo esc_html( Product_Categories::get_enhanced_catalog_explanation_text() ); ?></span>
|
50 |
+
</p>
|
51 |
+
<?php Enhanced_Catalog_Attribute_Fields::render_hidden_input_can_show_attributes(); ?>
|
52 |
+
<?php self::render_google_product_category_fields( $product ); ?>
|
53 |
+
<?php
|
54 |
+
self::render_enhanced_catalog_attributes_fields(
|
55 |
+
Products_Handler::get_google_product_category_id( $product ),
|
56 |
+
$product
|
57 |
+
);
|
58 |
+
?>
|
59 |
+
</div>
|
60 |
+
<?php
|
61 |
+
}
|
62 |
+
|
63 |
+
public static function render_enhanced_catalog_attributes_fields( $category_id, \WC_Product $product ) {
|
64 |
+
$category_handler = facebook_for_woocommerce()->get_facebook_category_handler();
|
65 |
+
$enhanced_attribute_fields = new Enhanced_Catalog_Attribute_Fields(
|
66 |
+
Enhanced_Catalog_Attribute_Fields::PAGE_TYPE_EDIT_PRODUCT,
|
67 |
+
null,
|
68 |
+
$product
|
69 |
+
);
|
70 |
+
|
71 |
+
if ( $category_handler->get_category_depth( $category_id ) < 2 ) {
|
72 |
+
// show nothing
|
73 |
+
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
?>
|
77 |
+
<p class="form-field wc-facebook-enhanced-catalog-attribute-row">
|
78 |
+
<label for="<?php echo esc_attr( Enhanced_Catalog_Attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTES_ID ); ?>">
|
79 |
+
<?php echo esc_html( self::render_enhanced_catalog_attributes_title() ); ?>
|
80 |
+
<?php self::render_enhanced_catalog_attributes_tooltip(); ?>
|
81 |
+
</label>
|
82 |
+
</p>
|
83 |
+
<?php $enhanced_attribute_fields->render( $category_id ); ?>
|
84 |
+
<?php
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Renders the common tooltip markup.
|
89 |
+
*
|
90 |
+
* @internal
|
91 |
+
*
|
92 |
+
* @since 2.1.0
|
93 |
+
*/
|
94 |
+
public static function render_enhanced_catalog_attributes_tooltip() {
|
95 |
+
|
96 |
+
$tooltip_text = __( 'Select values for enhanced attributes for this product', 'facebook-for-woocommerce' );
|
97 |
+
|
98 |
+
?>
|
99 |
+
<span class="woocommerce-help-tip" data-tip="<?php echo esc_attr( $tooltip_text ); ?>"></span>
|
100 |
+
<?php
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Gets the common field title.
|
105 |
+
*
|
106 |
+
* @internal
|
107 |
+
*
|
108 |
+
* @since 2.1.0
|
109 |
+
*
|
110 |
+
* @return string
|
111 |
+
*/
|
112 |
+
public static function render_enhanced_catalog_attributes_title() {
|
113 |
+
|
114 |
+
return __( 'Category Specific Attributes', 'facebook-for-woocommerce' );
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Renders the Google product category fields.
|
119 |
+
*
|
120 |
+
* @internal
|
121 |
+
*
|
122 |
+
* @since 2.1.0
|
123 |
+
*
|
124 |
+
* @param \WC_Product $product product object
|
125 |
+
*/
|
126 |
+
public static function render_google_product_category_fields( \WC_Product $product ) {
|
127 |
+
|
128 |
+
$field = new Google_Product_Category_Field();
|
129 |
+
|
130 |
+
$field->render( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID );
|
131 |
+
|
132 |
+
?>
|
133 |
+
<p class="form-field">
|
134 |
+
<label for="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>">
|
135 |
+
<?php esc_html_e( 'Google product category', 'facebook-for-woocommerce' ); ?>
|
136 |
+
<?php echo wc_help_tip( __( 'Choose the Google product category and (optionally) sub-categories associated with this product.', 'facebook-for-woocommerce' ) ); ?>
|
137 |
+
</label>
|
138 |
+
<input
|
139 |
+
id="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"
|
140 |
+
type="hidden"
|
141 |
+
name="<?php echo esc_attr( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ); ?>"
|
142 |
+
value="<?php echo esc_attr( Products_Handler::get_google_product_category_id( $product ) ); ?>"
|
143 |
+
/>
|
144 |
+
</p>
|
145 |
+
<?php
|
146 |
+
}
|
147 |
+
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Gets a list of attribute names and labels that match any of the given words.
|
151 |
+
*
|
152 |
+
* @since 2.1.0
|
153 |
+
*
|
154 |
+
* @param \WC_Product $product the product object
|
155 |
+
* @param array $words a list of words used to filter attributes
|
156 |
+
* @return array
|
157 |
+
*/
|
158 |
+
private static function filter_available_product_attribute_names( \WC_Product $product, $words ) {
|
159 |
+
|
160 |
+
$attributes = array();
|
161 |
+
|
162 |
+
foreach ( self::get_available_product_attribute_names( $product ) as $name => $label ) {
|
163 |
+
|
164 |
+
foreach ( $words as $word ) {
|
165 |
+
|
166 |
+
if ( Framework\SV_WC_Helper::str_exists( wc_strtolower( $label ), $word ) || Framework\SV_WC_Helper::str_exists( wc_strtolower( $name ), $word ) ) {
|
167 |
+
$attributes[ $name ] = $label;
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
return $attributes;
|
173 |
+
}
|
174 |
+
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Gets a indexed list of available product attributes with the name of the attribute as key and the label as the value.
|
178 |
+
*
|
179 |
+
* @since 2.1.0
|
180 |
+
*
|
181 |
+
* @param \WC_Product $product the product object
|
182 |
+
* @return array
|
183 |
+
*/
|
184 |
+
public static function get_available_product_attribute_names( \WC_Product $product ) {
|
185 |
+
|
186 |
+
return array_map(
|
187 |
+
function( $attribute ) use ( $product ) {
|
188 |
+
return wc_attribute_label( $attribute->get_name(), $product );
|
189 |
+
},
|
190 |
+
Products_Handler::get_available_product_attributes( $product )
|
191 |
+
);
|
192 |
+
}
|
193 |
+
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Renders the Commerce settings fields.
|
197 |
+
*
|
198 |
+
* @internal
|
199 |
+
*
|
200 |
+
* @since 2.1.0
|
201 |
+
*
|
202 |
+
* @param \WC_Product $product product object
|
203 |
+
*/
|
204 |
+
public static function render_commerce_fields( \WC_Product $product ) {
|
205 |
+
|
206 |
+
?>
|
207 |
+
<p class="form-field <?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>_field">
|
208 |
+
<label for="<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>">
|
209 |
+
<?php echo esc_html_e( 'Sell on Instagram', 'facebook-for-woocommerce' ); ?>
|
210 |
+
<span class="woocommerce-help-tip"
|
211 |
+
data-tip="<?php echo esc_attr_e( 'Enable to sell this product on Instagram. Products that are hidden in the Facebook catalog can be synced, but won’t be available for purchase.', 'facebook-for-woocommerce' ); ?>"></span>
|
212 |
+
</label>
|
213 |
+
<input type="checkbox" class="enable-if-sync-enabled"
|
214 |
+
name="<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>"
|
215 |
+
id="<?php echo esc_attr( self::FIELD_COMMERCE_ENABLED ); ?>" value="yes"
|
216 |
+
checked="<?php echo Products_Handler::is_commerce_enabled_for_product( $product ) ? 'checked' : ''; ?>">
|
217 |
+
</p>
|
218 |
+
|
219 |
+
<div id="product-not-ready-notice" style="display:none;">
|
220 |
+
<p>
|
221 |
+
<?php esc_html_e( 'This product does not meet the requirements to sell on Instagram.', 'facebook-for-woocommerce' ); ?>
|
222 |
+
<a href="#" id="product-not-ready-notice-open-modal"><?php esc_html_e( 'Click here to learn more.', 'facebook-for-woocommerce' ); ?></a>
|
223 |
+
</p>
|
224 |
+
</div>
|
225 |
+
|
226 |
+
<div id="variable-product-not-ready-notice" style="display:none;">
|
227 |
+
<p>
|
228 |
+
<?php
|
229 |
+
echo sprintf(
|
230 |
+
/* translators: Placeholders %1$s - strong opening tag, %2$s - strong closing tag */
|
231 |
+
esc_html__( 'To sell this product on Instagram, at least one variation must be synced to Facebook. You can control variation sync on the %1$sVariations%2$s tab with the %1$sFacebook Sync%2$s setting.', 'facebook-for-woocommerce' ),
|
232 |
+
'<strong>',
|
233 |
+
'</strong>'
|
234 |
+
);
|
235 |
+
?>
|
236 |
+
</p>
|
237 |
+
</div>
|
238 |
+
|
239 |
+
<?php
|
240 |
+
}
|
241 |
+
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Saves the Commerce settings.
|
245 |
+
*
|
246 |
+
* @internal
|
247 |
+
*
|
248 |
+
* @since 2.1.0
|
249 |
+
*
|
250 |
+
* @param \WC_Product $product product object
|
251 |
+
*/
|
252 |
+
public static function save_commerce_fields( \WC_Product $product ) {
|
253 |
+
|
254 |
+
$commerce_enabled = wc_string_to_bool( Framework\SV_WC_Helper::get_posted_value( self::FIELD_COMMERCE_ENABLED ) );
|
255 |
+
$google_product_category_id = wc_clean( Framework\SV_WC_Helper::get_posted_value( self::FIELD_GOOGLE_PRODUCT_CATEGORY_ID ) );
|
256 |
+
$enhanced_catalog_attributes = Products_Handler::get_enhanced_catalog_attributes_from_request();
|
257 |
+
|
258 |
+
foreach ( $enhanced_catalog_attributes as $key => $value ) {
|
259 |
+
Products_Handler::update_product_enhanced_catalog_attribute( $product, $key, $value );
|
260 |
+
}
|
261 |
+
|
262 |
+
if ( ! isset( $enhanced_catalog_attributes[ Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY ] ) ) {
|
263 |
+
// This is a checkbox so won't show in the post data if it's been unchecked,
|
264 |
+
// hence if it's unset we should clear the term meta for it.
|
265 |
+
Products_Handler::update_product_enhanced_catalog_attribute( $product, Enhanced_Catalog_Attribute_Fields::OPTIONAL_SELECTOR_KEY, null );
|
266 |
+
}
|
267 |
+
|
268 |
+
Products_Handler::update_commerce_enabled_for_product( $product, $commerce_enabled );
|
269 |
+
|
270 |
+
if ( $google_product_category_id !== Products_Handler::get_google_product_category_id( $product ) ) {
|
271 |
+
|
272 |
+
Products_Handler::update_google_product_category_id( $product, $google_product_category_id );
|
273 |
+
}
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
|
278 |
+
}
|
includes/Admin/Settings.php
CHANGED
@@ -38,15 +38,15 @@ class Settings {
|
|
38 |
Â
*/
|
39 |
Â
public function __construct() {
|
40 |
Â
|
41 |
-
$this->screens =
|
42 |
-
Settings_Screens\Connection::ID
|
43 |
Â
Settings_Screens\Product_Sync::ID => new Settings_Screens\Product_Sync(),
|
44 |
-
Settings_Screens\Messenger::ID
|
45 |
-
|
46 |
Â
|
47 |
-
add_action( 'admin_menu',
|
48 |
Â
|
49 |
-
add_action( 'wp_loaded',
|
50 |
Â
}
|
51 |
Â
|
52 |
Â
|
@@ -57,7 +57,7 @@ class Settings {
|
|
57 |
Â
*/
|
58 |
Â
public function add_menu_item() {
|
59 |
Â
|
60 |
-
add_submenu_page( 'woocommerce', __( 'Facebook for WooCommerce', 'facebook-for-woocommerce' ), __( 'Facebook', 'facebook-for-woocommerce' ), 'manage_woocommerce', self::PAGE_ID,
|
61 |
Â
}
|
62 |
Â
|
63 |
Â
|
@@ -141,11 +141,13 @@ class Settings {
|
|
141 |
Â
|
142 |
Â
} catch ( SV_WC_Plugin_Exception $exception ) {
|
143 |
Â
|
144 |
-
facebook_for_woocommerce()->get_message_handler()->add_error(
|
Â
|
|
145 |
Â
/* translators: Placeholders: %s - user-friendly error message */
|
146 |
-
|
147 |
-
|
148 |
-
|
Â
|
|
149 |
Â
}
|
150 |
Â
}
|
151 |
Â
|
@@ -185,11 +187,14 @@ class Settings {
|
|
185 |
Â
$screens = (array) apply_filters( 'wc_facebook_admin_settings_screens', $this->screens, $this );
|
186 |
Â
|
187 |
Â
// ensure no bogus values are added via filter
|
188 |
-
$screens = array_filter(
|
Â
|
|
Â
|
|
189 |
Â
|
190 |
-
|
191 |
Â
|
192 |
-
|
Â
|
|
193 |
Â
|
194 |
Â
return $screens;
|
195 |
Â
}
|
@@ -204,7 +209,7 @@ class Settings {
|
|
204 |
Â
*/
|
205 |
Â
public function get_tabs() {
|
206 |
Â
|
207 |
-
$tabs =
|
208 |
Â
|
209 |
Â
foreach ( $this->get_screens() as $screen_id => $screen ) {
|
210 |
Â
$tabs[ $screen_id ] = $screen->get_label();
|
38 |
Â
*/
|
39 |
Â
public function __construct() {
|
40 |
Â
|
41 |
+
$this->screens = array(
|
42 |
+
Settings_Screens\Connection::ID => new Settings_Screens\Connection(),
|
43 |
Â
Settings_Screens\Product_Sync::ID => new Settings_Screens\Product_Sync(),
|
44 |
+
Settings_Screens\Messenger::ID => new Settings_Screens\Messenger(),
|
45 |
+
);
|
46 |
Â
|
47 |
+
add_action( 'admin_menu', array( $this, 'add_menu_item' ) );
|
48 |
Â
|
49 |
+
add_action( 'wp_loaded', array( $this, 'save' ) );
|
50 |
Â
}
|
51 |
Â
|
52 |
Â
|
57 |
Â
*/
|
58 |
Â
public function add_menu_item() {
|
59 |
Â
|
60 |
+
add_submenu_page( 'woocommerce', __( 'Facebook for WooCommerce', 'facebook-for-woocommerce' ), __( 'Facebook', 'facebook-for-woocommerce' ), 'manage_woocommerce', self::PAGE_ID, array( $this, 'render' ), 5 );
|
61 |
Â
}
|
62 |
Â
|
63 |
Â
|
141 |
Â
|
142 |
Â
} catch ( SV_WC_Plugin_Exception $exception ) {
|
143 |
Â
|
144 |
+
facebook_for_woocommerce()->get_message_handler()->add_error(
|
145 |
+
sprintf(
|
146 |
Â
/* translators: Placeholders: %s - user-friendly error message */
|
147 |
+
__( 'Your settings could not be saved. %s', 'facebook-for-woocommerce' ),
|
148 |
+
$exception->getMessage()
|
149 |
+
)
|
150 |
+
);
|
151 |
Â
}
|
152 |
Â
}
|
153 |
Â
|
187 |
Â
$screens = (array) apply_filters( 'wc_facebook_admin_settings_screens', $this->screens, $this );
|
188 |
Â
|
189 |
Â
// ensure no bogus values are added via filter
|
190 |
+
$screens = array_filter(
|
191 |
+
$screens,
|
192 |
+
function( $value ) {
|
193 |
Â
|
194 |
+
return $value instanceof Abstract_Settings_Screen;
|
195 |
Â
|
196 |
+
}
|
197 |
+
);
|
198 |
Â
|
199 |
Â
return $screens;
|
200 |
Â
}
|
209 |
Â
*/
|
210 |
Â
public function get_tabs() {
|
211 |
Â
|
212 |
+
$tabs = array();
|
213 |
Â
|
214 |
Â
foreach ( $this->get_screens() as $screen_id => $screen ) {
|
215 |
Â
$tabs[ $screen_id ] = $screen->get_label();
|
includes/Admin/Settings_Screens/Product_Sync.php
CHANGED
@@ -45,6 +45,8 @@ class Product_Sync extends Admin\Abstract_Settings_Screen {
|
|
45 |
Â
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
46 |
Â
|
47 |
Â
add_action( 'woocommerce_admin_field_product_sync_title', [ $this, 'render_title' ] );
|
Â
|
|
Â
|
|
48 |
Â
}
|
49 |
Â
|
50 |
Â
|
@@ -88,9 +90,66 @@ class Product_Sync extends Admin\Abstract_Settings_Screen {
|
|
88 |
Â
'general_error' => esc_html__( 'There was an error trying to sync the products to Facebook.', 'facebook-for-woocommerce' ),
|
89 |
Â
'feed_upload_error' => esc_html__( 'Something went wrong while uploading the product information, please try again.', 'facebook-for-woocommerce' ),
|
90 |
Â
],
|
Â
|
|
Â
|
|
Â
|
|
91 |
Â
] );
|
92 |
Â
}
|
93 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
94 |
Â
|
95 |
Â
/**
|
96 |
Â
* Renders the custom title.
|
@@ -253,12 +312,44 @@ class Product_Sync extends Admin\Abstract_Settings_Screen {
|
|
253 |
Â
\WC_Facebookcommerce_Integration::PRODUCT_DESCRIPTION_MODE_SHORT => __( 'Short description', 'facebook-for-woocommerce' ),
|
254 |
Â
],
|
255 |
Â
],
|
256 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
257 |
Â
[ 'type' => 'sectionend' ],
|
258 |
Â
|
259 |
Â
];
|
260 |
Â
}
|
261 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
262 |
Â
|
263 |
Â
/**
|
264 |
Â
* Gets the "disconnected" message.
|
45 |
Â
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
46 |
Â
|
47 |
Â
add_action( 'woocommerce_admin_field_product_sync_title', [ $this, 'render_title' ] );
|
48 |
+
|
49 |
+
add_action( 'woocommerce_admin_field_product_sync_google_product_categories', [ $this, 'render_google_product_category_field' ] );
|
50 |
Â
}
|
51 |
Â
|
52 |
Â
|
90 |
Â
'general_error' => esc_html__( 'There was an error trying to sync the products to Facebook.', 'facebook-for-woocommerce' ),
|
91 |
Â
'feed_upload_error' => esc_html__( 'Something went wrong while uploading the product information, please try again.', 'facebook-for-woocommerce' ),
|
92 |
Â
],
|
93 |
+
'default_google_product_category_modal_message' => $this->get_default_google_product_category_modal_message(),
|
94 |
+
'default_google_product_category_modal_message_empty' => $this->get_default_google_product_category_modal_message_empty(),
|
95 |
+
'default_google_product_category_modal_buttons' => $this->get_default_google_product_category_modal_buttons(),
|
96 |
Â
] );
|
97 |
Â
}
|
98 |
Â
|
99 |
+
/**
|
100 |
+
* Gets the message for Default Google Product Category modal.
|
101 |
+
*
|
102 |
+
* @since 2.1.0
|
103 |
+
*
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
private function get_default_google_product_category_modal_message() {
|
107 |
+
|
108 |
+
return wp_kses_post( __( 'Products and categories that inherit this global setting (i.e. they do not have a specific Google product category set) will use the new default immediately. Are you sure you want to proceed?', 'facebook-for-woocommerce' ) );
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Gets the message for Default Google Product Category modal when the selection is empty.
|
114 |
+
*
|
115 |
+
* @since 2.1.0
|
116 |
+
*
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
private function get_default_google_product_category_modal_message_empty() {
|
120 |
+
|
121 |
+
return sprintf(
|
122 |
+
/* translators: Placeholders: %1$s - <strong> tag, %2$s - </strong> tag */
|
123 |
+
esc_html__( 'Products and categories that inherit this global setting (they do not have a specific Google product category set) will use the new default immediately. %1$sIf you have cleared the Google Product Category%2$s, items inheriting the default will not be available for Instagram checkout. Are you sure you want to proceed?', 'facebook-for-woocommerce' ),
|
124 |
+
'<strong>', '</strong>'
|
125 |
+
);
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Gets the markup for the buttons used in the Default Google Product Category modal.
|
131 |
+
*
|
132 |
+
* @since 2.1.0
|
133 |
+
*
|
134 |
+
* @return string
|
135 |
+
*/
|
136 |
+
private function get_default_google_product_category_modal_buttons() {
|
137 |
+
|
138 |
+
ob_start();
|
139 |
+
|
140 |
+
?>
|
141 |
+
<button
|
142 |
+
class="button button-large"
|
143 |
+
onclick="jQuery( '.modal-close' ).trigger( 'click' )"
|
144 |
+
><?php esc_html_e( 'Cancel', 'facebook-for-woocommerce' ); ?></button>
|
145 |
+
<button
|
146 |
+
id="btn-ok"
|
147 |
+
class="button button-large button-primary"
|
148 |
+
><?php esc_html_e( 'Update default Google product category', 'facebook-for-woocommerce' ); ?></button>
|
149 |
+
<?php
|
150 |
+
|
151 |
+
return ob_get_clean();
|
152 |
+
}
|
153 |
Â
|
154 |
Â
/**
|
155 |
Â
* Renders the custom title.
|
312 |
Â
\WC_Facebookcommerce_Integration::PRODUCT_DESCRIPTION_MODE_SHORT => __( 'Short description', 'facebook-for-woocommerce' ),
|
313 |
Â
],
|
314 |
Â
],
|
315 |
+
[
|
316 |
+
'id' => \SkyVerge\WooCommerce\Facebook\Commerce::OPTION_GOOGLE_PRODUCT_CATEGORY_ID,
|
317 |
+
'type' => 'product_sync_google_product_categories',
|
318 |
+
'title' => __( 'Default Google product category', 'facebook-for-woocommerce' ),
|
319 |
+
'desc_tip' => __( 'Choose a default Google product category for your products. Defaults can also be set for product categories. Products need at least two category levels defined for tax to be correctly applied.', 'facebook-for-woocommerce' ),
|
320 |
+
],
|
321 |
Â
[ 'type' => 'sectionend' ],
|
322 |
Â
|
323 |
Â
];
|
324 |
Â
}
|
325 |
Â
|
326 |
+
/**
|
327 |
+
* Renders the Google category field markup.
|
328 |
+
*
|
329 |
+
* @internal
|
330 |
+
|
331 |
+
* @since 2.1.0
|
332 |
+
*
|
333 |
+
* @param array $field field data
|
334 |
+
*/
|
335 |
+
public function render_google_product_category_field( $field ) {
|
336 |
+
|
337 |
+
$category_field = new Admin\Google_Product_Category_Field();
|
338 |
+
|
339 |
+
?>
|
340 |
+
<tr valign="top">
|
341 |
+
<th scope="row" class="titledesc">
|
342 |
+
<label for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['title'] ); ?>
|
343 |
+
<span class="woocommerce-help-tip" data-tip="<?php echo esc_attr( $field['desc_tip'] ); ?>"></span>
|
344 |
+
</label>
|
345 |
+
</th>
|
346 |
+
<td class="forminp forminp-<?php echo esc_attr( sanitize_title( $field['type'] ) ); ?>">
|
347 |
+
<?php $category_field->render( $field['id'] ); ?>
|
348 |
+
<input id="<?php echo esc_attr( $field['id'] ); ?>" type="hidden" name="<?php echo esc_attr( $field['id'] ); ?>" value="<?php echo esc_attr( $field['value'] ); ?>" />
|
349 |
+
</td>
|
350 |
+
</tr>
|
351 |
+
<?php
|
352 |
+
}
|
353 |
Â
|
354 |
Â
/**
|
355 |
Â
* Gets the "disconnected" message.
|
includes/Commerce.php
ADDED
@@ -0,0 +1,144 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Base handler for Commerce-specific functionality.
|
17 |
+
*
|
18 |
+
* @since 2.1.0
|
19 |
+
*/
|
20 |
+
class Commerce {
|
21 |
+
|
22 |
+
|
23 |
+
/** @var string option that stores the plugin-level fallback Google product category ID */
|
24 |
+
const OPTION_GOOGLE_PRODUCT_CATEGORY_ID = 'wc_facebook_google_product_category_id';
|
25 |
+
|
26 |
+
|
27 |
+
/** @var Commerce\Orders the orders handler */
|
28 |
+
protected $orders;
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Commerce handler constructor.
|
33 |
+
*
|
34 |
+
* @since 2.1.0
|
35 |
+
*/
|
36 |
+
public function __construct() {
|
37 |
+
|
38 |
+
require_once __DIR__ . '/Commerce/Orders.php';
|
39 |
+
|
40 |
+
$this->orders = new Commerce\Orders();
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Gets the plugin-level fallback Google product category ID.
|
46 |
+
*
|
47 |
+
* This will be used when the category or product-level settings don’t override it.
|
48 |
+
*
|
49 |
+
* @since 2.1.0
|
50 |
+
*
|
51 |
+
* @return string
|
52 |
+
*/
|
53 |
+
public function get_default_google_product_category_id() {
|
54 |
+
|
55 |
+
$category_id = get_option( self::OPTION_GOOGLE_PRODUCT_CATEGORY_ID, '' );
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Filters the plugin-level fallback Google product category ID.
|
59 |
+
*
|
60 |
+
* @since 2.1.0
|
61 |
+
*
|
62 |
+
* @param string $category_id default Google product category ID
|
63 |
+
* @param Commerce $commerce commerce handler instance
|
64 |
+
*/
|
65 |
+
return (string) apply_filters( 'wc_facebook_commerce_default_google_product_category_id', $category_id, $this );
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Updates the plugin-level fallback Google product category ID.
|
71 |
+
*
|
72 |
+
* @since 2.1.0
|
73 |
+
*
|
74 |
+
* @param string $id category ID
|
75 |
+
*/
|
76 |
+
public function update_default_google_product_category_id( $id ) {
|
77 |
+
|
78 |
+
update_option( self::OPTION_GOOGLE_PRODUCT_CATEGORY_ID, is_string( $id ) ? $id : '' );
|
79 |
+
}
|
80 |
+
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Determines whether Commerce features should be available.
|
84 |
+
*
|
85 |
+
* @since 2.1.0
|
86 |
+
*
|
87 |
+
* @return bool whether Commerce features should be available
|
88 |
+
*/
|
89 |
+
public function is_available() {
|
90 |
+
|
91 |
+
list( $country ) = explode( ':', get_option( 'woocommerce_default_country' ) );
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Filters whether Commerce features should be available.
|
95 |
+
*
|
96 |
+
* @since 2.1.0
|
97 |
+
*
|
98 |
+
* @param bool $available whether commerce features should be available
|
99 |
+
* @param string $country country code
|
100 |
+
* @param Commerce $commerce commerce handler instance
|
101 |
+
*/
|
102 |
+
return (bool) apply_filters( 'wc_facebook_commerce_is_available', 'US' === $country, $country, $this );
|
103 |
+
}
|
104 |
+
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Determines whether the site is connected.
|
108 |
+
*
|
109 |
+
* @since 2.1.0
|
110 |
+
*
|
111 |
+
* @return bool whether the site is connected
|
112 |
+
*/
|
113 |
+
public function is_connected() {
|
114 |
+
|
115 |
+
$connection_handler = facebook_for_woocommerce()->get_connection_handler();
|
116 |
+
|
117 |
+
$connected = (bool) strlen( $connection_handler->get_page_access_token() ) && ! empty( $connection_handler->get_commerce_manager_id() );
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Filters whether the site is connected.
|
121 |
+
*
|
122 |
+
* @since 2.1.0
|
123 |
+
*
|
124 |
+
* @param bool $connected whether the site is connected
|
125 |
+
* @param Commerce $commerce commerce handler instance
|
126 |
+
*/
|
127 |
+
return (bool) apply_filters( 'wc_facebook_commerce_is_connected', $connected, $this );
|
128 |
+
}
|
129 |
+
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Gets the orders handler instance.
|
133 |
+
*
|
134 |
+
* @since 2.1.0
|
135 |
+
*
|
136 |
+
* @return \SkyVerge\WooCommerce\Facebook\Commerce\Orders
|
137 |
+
*/
|
138 |
+
public function get_orders_handler() {
|
139 |
+
|
140 |
+
return $this->orders;
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
}
|
includes/Commerce/Orders.php
ADDED
@@ -0,0 +1,889 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Commerce;
|
12 |
+
|
13 |
+
use SkyVerge\WooCommerce\Facebook\API\Orders\Cancel\Request as Cancellation_Request;
|
14 |
+
use SkyVerge\WooCommerce\Facebook\API\Orders\Order;
|
15 |
+
use SkyVerge\WooCommerce\Facebook\Products;
|
16 |
+
use SkyVerge\WooCommerce\Facebook\API\Orders\Refund\Request as Refund_Request;
|
17 |
+
use SkyVerge\WooCommerce\Facebook\Utilities;
|
18 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_API_Exception;
|
19 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_Plugin_Exception;
|
20 |
+
|
21 |
+
defined( 'ABSPATH' ) or exit;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* General Commerce orders handler.
|
25 |
+
*
|
26 |
+
* @since 2.1.0
|
27 |
+
*/
|
28 |
+
class Orders {
|
29 |
+
|
30 |
+
|
31 |
+
/** @var string the fetch orders action */
|
32 |
+
const ACTION_FETCH_ORDERS = 'wc_facebook_commerce_fetch_orders';
|
33 |
+
|
34 |
+
/** @var string the meta key used to store the remote order ID */
|
35 |
+
const REMOTE_ID_META_KEY = '_wc_facebook_commerce_remote_id';
|
36 |
+
|
37 |
+
/** @var string the meta key used to store the email remarketing option */
|
38 |
+
const EMAIL_REMARKETING_META_KEY = '_wc_facebook_commerce_email_remarketing';
|
39 |
+
|
40 |
+
/** @var string buyer's remorse refund reason */
|
41 |
+
const REFUND_REASON_BUYERS_REMORSE = 'BUYERS_REMORSE';
|
42 |
+
|
43 |
+
/** @var string damaged goods refund reason */
|
44 |
+
const REFUND_REASON_DAMAGED_GOODS = 'DAMAGED_GOODS';
|
45 |
+
|
46 |
+
/** @var string not as described refund reason */
|
47 |
+
const REFUND_REASON_NOT_AS_DESCRIBED = 'NOT_AS_DESCRIBED';
|
48 |
+
|
49 |
+
/** @var string quality issue refund reason */
|
50 |
+
const REFUND_REASON_QUALITY_ISSUE = 'QUALITY_ISSUE';
|
51 |
+
|
52 |
+
/** @var string wrong item refund reason */
|
53 |
+
const REFUND_REASON_WRONG_ITEM = 'WRONG_ITEM';
|
54 |
+
|
55 |
+
/** @var string other refund reason */
|
56 |
+
const REFUND_REASON_OTHER = 'REFUND_REASON_OTHER';
|
57 |
+
|
58 |
+
/** @var string customer requested cancellation */
|
59 |
+
const CANCEL_REASON_CUSTOMER_REQUESTED = 'CUSTOMER_REQUESTED';
|
60 |
+
|
61 |
+
/** @var string out of stock cancellation */
|
62 |
+
const CANCEL_REASON_OUT_OF_STOCK = 'OUT_OF_STOCK';
|
63 |
+
|
64 |
+
/** @var string invalid address cancellation */
|
65 |
+
const CANCEL_REASON_INVALID_ADDRESS = 'INVALID_ADDRESS';
|
66 |
+
|
67 |
+
/** @var string suspicious order cancellation */
|
68 |
+
const CANCEL_REASON_SUSPICIOUS_ORDER = 'SUSPICIOUS_ORDER';
|
69 |
+
|
70 |
+
/** @var string other reason cancellation */
|
71 |
+
const CANCEL_REASON_OTHER = 'CANCEL_REASON_OTHER';
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Orders constructor.
|
76 |
+
*
|
77 |
+
* @since 2.1.0
|
78 |
+
*/
|
79 |
+
public function __construct() {
|
80 |
+
|
81 |
+
$this->add_hooks();
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Returns whether or not the order is a pending Commerce order.
|
87 |
+
*
|
88 |
+
* @since 2.1.0
|
89 |
+
*
|
90 |
+
* @param \WC_Order $order order object
|
91 |
+
* @return bool
|
92 |
+
*/
|
93 |
+
public static function is_order_pending( \WC_Order $order ) {
|
94 |
+
|
95 |
+
return self::is_commerce_order( $order ) && 'pending' === $order->get_status();
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Returns whether or not the order is a Commerce order.
|
101 |
+
*
|
102 |
+
* @since 2.1.0
|
103 |
+
*
|
104 |
+
* @param \WC_Order $order order object
|
105 |
+
* @return bool
|
106 |
+
*/
|
107 |
+
public static function is_commerce_order( \WC_Order $order ) {
|
108 |
+
|
109 |
+
return in_array( $order->get_created_via(), [ 'instagram', 'facebook' ], true );
|
110 |
+
}
|
111 |
+
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Finds a local order based on the Commerce ID stored in REMOTE_ID_META_KEY.
|
115 |
+
*
|
116 |
+
* @since 2.1.0
|
117 |
+
*
|
118 |
+
* @param string $remote_id Commerce order ID
|
119 |
+
* @return \WC_Order|null
|
120 |
+
*/
|
121 |
+
public function find_local_order( $remote_id ) {
|
122 |
+
|
123 |
+
$orders = wc_get_orders( [
|
124 |
+
'limit' => 1,
|
125 |
+
'status' => 'any',
|
126 |
+
'meta_key' => self::REMOTE_ID_META_KEY,
|
127 |
+
'meta_value' => $remote_id,
|
128 |
+
] );
|
129 |
+
|
130 |
+
return ! empty( $orders ) ? current( $orders ) : null;
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Creates a local WooCommerce order based on an Orders API order object.
|
136 |
+
*
|
137 |
+
* @since 2.1.0
|
138 |
+
*
|
139 |
+
* @param Order $remote_order Orders API order object
|
140 |
+
* @return \WC_Order
|
141 |
+
* @throws SV_WC_Plugin_Exception|\WC_Data_Exception
|
142 |
+
*/
|
143 |
+
public function create_local_order( Order $remote_order ) {
|
144 |
+
|
145 |
+
$local_order = new \WC_Order();
|
146 |
+
$local_order->set_created_via( $remote_order->get_channel() );
|
147 |
+
$local_order->set_status( 'pending' );
|
148 |
+
$local_order->save();
|
149 |
+
|
150 |
+
$local_order = $this->update_local_order( $remote_order, $local_order );
|
151 |
+
|
152 |
+
return $local_order;
|
153 |
+
}
|
154 |
+
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Updates a local WooCommerce order based on an Orders API order object.
|
158 |
+
*
|
159 |
+
* @since 2.1.0
|
160 |
+
*
|
161 |
+
* @param Order $remote_order Orders API order object
|
162 |
+
* @param \WC_Order $local_order local order object
|
163 |
+
* @return \WC_Order
|
164 |
+
* @throws SV_WC_Plugin_Exception|\WC_Data_Exception
|
165 |
+
*/
|
166 |
+
public function update_local_order( Order $remote_order, \WC_Order $local_order ) {
|
167 |
+
|
168 |
+
$total_items_tax = 0;
|
169 |
+
|
170 |
+
// add/update items
|
171 |
+
foreach ( $remote_order->get_items() as $item ) {
|
172 |
+
|
173 |
+
$product = Products::get_product_by_fb_product_id( $item['product_id'] );
|
174 |
+
|
175 |
+
if ( empty( $product ) ) {
|
176 |
+
$product = Products::get_product_by_fb_retailer_id( $item['retailer_id'] );
|
177 |
+
}
|
178 |
+
|
179 |
+
if ( ! $product instanceof \WC_Product ) {
|
180 |
+
|
181 |
+
// add a note and skip this item
|
182 |
+
$local_order->add_order_note( "Product with retailer ID {$item['retailer_id']} not found" );
|
183 |
+
continue;
|
184 |
+
}
|
185 |
+
|
186 |
+
$matching_wc_order_item = false;
|
187 |
+
|
188 |
+
// check if the local order already has this item
|
189 |
+
foreach ( $local_order->get_items() as $wc_order_item ) {
|
190 |
+
|
191 |
+
if ( ! $wc_order_item instanceof \WC_Order_Item_Product ) {
|
192 |
+
continue;
|
193 |
+
}
|
194 |
+
|
195 |
+
$order_item_product_id = $wc_order_item->get_variation_id() ?: $wc_order_item->get_product_id();
|
196 |
+
|
197 |
+
if ( $product->get_id() === $order_item_product_id ) {
|
198 |
+
$matching_wc_order_item = $wc_order_item;
|
199 |
+
break;
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
if ( empty( $matching_wc_order_item ) ) {
|
204 |
+
|
205 |
+
$matching_wc_order_item = new \WC_Order_Item_Product();
|
206 |
+
$matching_wc_order_item->set_product( $product );
|
207 |
+
|
208 |
+
$local_order->add_item( $matching_wc_order_item );
|
209 |
+
}
|
210 |
+
|
211 |
+
$matching_wc_order_item->set_quantity( $item['quantity'] );
|
212 |
+
$matching_wc_order_item->set_subtotal( $item['quantity'] * $item['price_per_unit']['amount'] );
|
213 |
+
$matching_wc_order_item->set_total( $item['quantity'] * $item['price_per_unit']['amount'] );
|
214 |
+
// we use the estimated_tax because the captured_tax represents the tax after the order/item has been shipped and we don't fulfill order at the line-item level
|
215 |
+
$matching_wc_order_item->set_taxes( [
|
216 |
+
'subtotal' => [ $item['tax_details']['estimated_tax']['amount'] ],
|
217 |
+
'total' => [ $item['tax_details']['estimated_tax']['amount'] ],
|
218 |
+
] );
|
219 |
+
$matching_wc_order_item->save();
|
220 |
+
|
221 |
+
if ( ! empty( $item['tax_details']['estimated_tax']['amount'] ) ) {
|
222 |
+
|
223 |
+
$total_items_tax += $item['tax_details']['estimated_tax']['amount'];
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
// update information from selected_shipping_option
|
228 |
+
$selected_shipping_option = $remote_order->get_selected_shipping_option();
|
229 |
+
|
230 |
+
$matching_shipping_order_item = false;
|
231 |
+
|
232 |
+
// check if the local order already has this item
|
233 |
+
if ( ! empty( $shipping_order_items = $local_order->get_items( 'shipping' ) ) ) {
|
234 |
+
|
235 |
+
/** @var \WC_Order_Item_Shipping $shipping_order_item */
|
236 |
+
foreach ( $shipping_order_items as $shipping_order_item ) {
|
237 |
+
|
238 |
+
if ( $selected_shipping_option['name'] === $shipping_order_item->get_method_title() ) {
|
239 |
+
$matching_shipping_order_item = $shipping_order_item;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
if ( empty( $matching_shipping_order_item ) ) {
|
245 |
+
|
246 |
+
$matching_shipping_order_item = new \WC_Order_Item_Shipping();
|
247 |
+
$matching_shipping_order_item->set_method_title( $selected_shipping_option['name'] );
|
248 |
+
|
249 |
+
$local_order->add_item( $matching_shipping_order_item );
|
250 |
+
}
|
251 |
+
|
252 |
+
$matching_shipping_order_item->set_total( $selected_shipping_option['price']['amount'] );
|
253 |
+
$matching_shipping_order_item->set_taxes( [
|
254 |
+
'total' => [ $selected_shipping_option['calculated_tax']['amount'] ],
|
255 |
+
] );
|
256 |
+
$matching_shipping_order_item->save();
|
257 |
+
|
258 |
+
// add tax item
|
259 |
+
$matching_tax_order_item = false;
|
260 |
+
|
261 |
+
// check if the local order already has a tax item item
|
262 |
+
if ( ! empty( $tax_order_items = $local_order->get_items( 'tax' ) ) ) {
|
263 |
+
$matching_tax_order_item = current( $tax_order_items );
|
264 |
+
}
|
265 |
+
|
266 |
+
if ( empty( $matching_tax_order_item ) ) {
|
267 |
+
|
268 |
+
$matching_tax_order_item = new \WC_Order_Item_Tax();
|
269 |
+
$local_order->add_item( $matching_tax_order_item );
|
270 |
+
}
|
271 |
+
|
272 |
+
$matching_tax_order_item->set_tax_total( $total_items_tax );
|
273 |
+
$matching_tax_order_item->set_shipping_tax_total( $selected_shipping_option['calculated_tax']['amount'] );
|
274 |
+
$matching_tax_order_item->save();
|
275 |
+
|
276 |
+
$local_order->set_shipping_total( $selected_shipping_option['price']['amount'] );
|
277 |
+
$local_order->set_shipping_tax( $selected_shipping_option['calculated_tax']['amount'] );
|
278 |
+
|
279 |
+
// update information from shipping_address
|
280 |
+
$shipping_address = $remote_order->get_shipping_address();
|
281 |
+
|
282 |
+
if ( ! empty( $shipping_address['name'] ) ) {
|
283 |
+
|
284 |
+
if ( strpos( $shipping_address['name'], ' ' ) !== false ) {
|
285 |
+
|
286 |
+
list( $first_name, $last_name ) = explode( ' ', $shipping_address['name'], 2 );
|
287 |
+
$local_order->set_shipping_first_name( $first_name );
|
288 |
+
$local_order->set_shipping_last_name( $last_name );
|
289 |
+
|
290 |
+
} else {
|
291 |
+
|
292 |
+
$local_order->set_shipping_last_name( $shipping_address['name'] );
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
if ( ! empty( $shipping_address['street1'] ) ) {
|
297 |
+
$local_order->set_shipping_address_1( $shipping_address['street1'] );
|
298 |
+
}
|
299 |
+
|
300 |
+
if ( ! empty( $shipping_address['street2'] ) ) {
|
301 |
+
$local_order->set_shipping_address_2( $shipping_address['street2'] );
|
302 |
+
}
|
303 |
+
|
304 |
+
if ( ! empty( $shipping_address['city'] ) ) {
|
305 |
+
$local_order->set_shipping_city( $shipping_address['city'] );
|
306 |
+
}
|
307 |
+
|
308 |
+
if ( ! empty( $shipping_address['state'] ) ) {
|
309 |
+
$local_order->set_shipping_state( $shipping_address['state'] );
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( ! empty( $shipping_address['postal_code'] ) ) {
|
313 |
+
$local_order->set_shipping_postcode( $shipping_address['postal_code'] );
|
314 |
+
}
|
315 |
+
|
316 |
+
if ( ! empty( $shipping_address['country'] ) ) {
|
317 |
+
$local_order->set_shipping_country( $shipping_address['country'] );
|
318 |
+
}
|
319 |
+
|
320 |
+
// update information from estimated_payment_details
|
321 |
+
$estimated_payment_details = $remote_order->get_estimated_payment_details();
|
322 |
+
|
323 |
+
// we do not use subtotal values from the API because WC calculates them on the fly based on the items
|
324 |
+
$local_order->set_total( $estimated_payment_details['total_amount']['amount'] );
|
325 |
+
$local_order->set_currency( $estimated_payment_details['total_amount']['currency'] );
|
326 |
+
|
327 |
+
// update information from buyer_details
|
328 |
+
$buyer_details = $remote_order->get_buyer_details();
|
329 |
+
|
330 |
+
if ( ! empty( $buyer_details ) ) {
|
331 |
+
|
332 |
+
if ( ! empty( $buyer_details['name'] ) ) {
|
333 |
+
|
334 |
+
if ( strpos( $buyer_details['name'], ' ' ) !== false ) {
|
335 |
+
|
336 |
+
list( $first_name, $last_name ) = explode( ' ', $buyer_details['name'], 2 );
|
337 |
+
$local_order->set_billing_first_name( $first_name );
|
338 |
+
$local_order->set_billing_last_name( $last_name );
|
339 |
+
|
340 |
+
} else {
|
341 |
+
|
342 |
+
$local_order->set_billing_last_name( $buyer_details['name'] );
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
if ( ! empty( $buyer_details['email'] ) ) {
|
347 |
+
$local_order->set_billing_email( $buyer_details['email'] );
|
348 |
+
}
|
349 |
+
|
350 |
+
$local_order->update_meta_data( self::EMAIL_REMARKETING_META_KEY, wc_bool_to_string( $buyer_details['email_remarketing_option'] ) );
|
351 |
+
}
|
352 |
+
|
353 |
+
// set remote ID
|
354 |
+
$local_order->update_meta_data( self::REMOTE_ID_META_KEY, $remote_order->get_id() );
|
355 |
+
|
356 |
+
// always reduce stock levels
|
357 |
+
wc_reduce_stock_levels( $local_order );
|
358 |
+
|
359 |
+
$local_order->save();
|
360 |
+
|
361 |
+
return $local_order;
|
362 |
+
}
|
363 |
+
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Updates WooCommerce’s Orders by fetching orders from the API and either creating or updating local orders.
|
367 |
+
*
|
368 |
+
* @since 2.1.0
|
369 |
+
*/
|
370 |
+
public function update_local_orders() {
|
371 |
+
// sanity check for connection status
|
372 |
+
if ( ! facebook_for_woocommerce()->get_commerce_handler()->is_connected() ) {
|
373 |
+
return;
|
374 |
+
}
|
375 |
+
|
376 |
+
$page_id = facebook_for_woocommerce()->get_integration()->get_facebook_page_id();
|
377 |
+
|
378 |
+
try {
|
379 |
+
|
380 |
+
$response = facebook_for_woocommerce()->get_api( facebook_for_woocommerce()->get_connection_handler()->get_page_access_token() )->get_new_orders( $page_id );
|
381 |
+
|
382 |
+
} catch ( SV_WC_API_Exception $exception ) {
|
383 |
+
|
384 |
+
facebook_for_woocommerce()->log( 'Error fetching Commerce orders from the Orders API: ' . $exception->getMessage() );
|
385 |
+
|
386 |
+
return;
|
387 |
+
}
|
388 |
+
|
389 |
+
$remote_orders = $response->get_orders();
|
390 |
+
|
391 |
+
foreach ( $remote_orders as $remote_order ) {
|
392 |
+
|
393 |
+
$local_order = $this->find_local_order( $remote_order->get_id() );
|
394 |
+
|
395 |
+
try {
|
396 |
+
|
397 |
+
if ( empty( $local_order ) ) {
|
398 |
+
$local_order = $this->create_local_order( $remote_order );
|
399 |
+
} else {
|
400 |
+
$local_order = $this->update_local_order( $remote_order, $local_order );
|
401 |
+
}
|
402 |
+
|
403 |
+
} catch ( \Exception $exception ) {
|
404 |
+
|
405 |
+
if ( ! empty( $local_order ) ) {
|
406 |
+
// add note to order
|
407 |
+
$local_order->add_order_note( 'Error updating local order from Commerce order from the Orders API: ' . $exception->getMessage() );
|
408 |
+
} else {
|
409 |
+
facebook_for_woocommerce()->log( 'Error creating local order from Commerce order from the Orders API: ' . $exception->getMessage() );
|
410 |
+
}
|
411 |
+
|
412 |
+
continue;
|
413 |
+
}
|
414 |
+
|
415 |
+
if ( ! empty( $local_order ) && Order::STATUS_CREATED === $remote_order->get_status() ) {
|
416 |
+
|
417 |
+
// acknowledge the order
|
418 |
+
try {
|
419 |
+
|
420 |
+
facebook_for_woocommerce()->get_api( facebook_for_woocommerce()->get_connection_handler()->get_page_access_token() )->acknowledge_order( $remote_order->get_id(), $local_order->get_id() );
|
421 |
+
|
422 |
+
$local_order->set_status( 'processing' );
|
423 |
+
|
424 |
+
/* translators: Placeholders: %1$s - order remote id, %2$s - order created by */
|
425 |
+
$local_order->add_order_note( sprintf( __( 'Order %1$s paid in %2$s', 'facebook-for-woocommerce' ),
|
426 |
+
$remote_order->get_id(),
|
427 |
+
ucfirst( $remote_order->get_channel() )
|
428 |
+
) );
|
429 |
+
|
430 |
+
} catch ( SV_WC_API_Exception $exception ) {
|
431 |
+
|
432 |
+
$local_order->add_order_note( 'Error acknowledging the order: ' . $exception->getMessage() );
|
433 |
+
|
434 |
+
// if we have a clear indication that the order was not found, cancel it locally
|
435 |
+
if ( 803 === (int) $exception->getCode() ) {
|
436 |
+
$local_order->set_status( 'cancelled' );
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
$local_order->save();
|
441 |
+
}
|
442 |
+
}
|
443 |
+
|
444 |
+
// update any local orders that have since been cancelled on Facebook
|
445 |
+
$this->update_cancelled_orders();
|
446 |
+
}
|
447 |
+
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Updates any local orders that have since been cancelled on Facebook.
|
451 |
+
*
|
452 |
+
* @since 2.1.0
|
453 |
+
*/
|
454 |
+
public function update_cancelled_orders() {
|
455 |
+
|
456 |
+
$page_id = facebook_for_woocommerce()->get_integration()->get_facebook_page_id();
|
457 |
+
|
458 |
+
try {
|
459 |
+
|
460 |
+
$response = facebook_for_woocommerce()->get_api( facebook_for_woocommerce()->get_connection_handler()->get_page_access_token() )->get_cancelled_orders( $page_id );
|
461 |
+
|
462 |
+
} catch ( SV_WC_API_Exception $exception ) {
|
463 |
+
|
464 |
+
facebook_for_woocommerce()->log( 'Error fetching Commerce orders from the Orders API: ' . $exception->getMessage() );
|
465 |
+
|
466 |
+
return;
|
467 |
+
}
|
468 |
+
|
469 |
+
foreach ( $response->get_orders() as $remote_order ) {
|
470 |
+
|
471 |
+
$local_order = $this->find_local_order( $remote_order->get_id() );
|
472 |
+
|
473 |
+
if ( ! $local_order instanceof \WC_Order || 'cancelled' === $local_order->get_status() ) {
|
474 |
+
continue;
|
475 |
+
}
|
476 |
+
|
477 |
+
$local_order->set_status( 'cancelled' );
|
478 |
+
$local_order->save();
|
479 |
+
|
480 |
+
wc_increase_stock_levels( $local_order );
|
481 |
+
}
|
482 |
+
}
|
483 |
+
|
484 |
+
|
485 |
+
/**
|
486 |
+
* Frequency in seconds that orders are updated.
|
487 |
+
*
|
488 |
+
* @since 2.1.0
|
489 |
+
*
|
490 |
+
* @return int
|
491 |
+
*/
|
492 |
+
public function get_order_update_interval() {
|
493 |
+
|
494 |
+
$default_interval = 5 * MINUTE_IN_SECONDS;
|
495 |
+
|
496 |
+
/**
|
497 |
+
* Filters the interval between querying Facebook for new or updated orders.
|
498 |
+
*
|
499 |
+
* @since 2.1.0
|
500 |
+
*
|
501 |
+
* @param int $interval interval in seconds. Defaults to 5 minutes, and the minimum interval is 120 seconds.
|
502 |
+
*/
|
503 |
+
$interval = apply_filters( 'wc_facebook_commerce_order_update_interval', $default_interval );
|
504 |
+
|
505 |
+
// if given a valid number, ensure it's 120 seconds at a minimum
|
506 |
+
if ( is_numeric( $interval ) ) {
|
507 |
+
$interval = max( 2 * MINUTE_IN_SECONDS, $interval );
|
508 |
+
} else {
|
509 |
+
$interval = $default_interval; // invalid values should get the default
|
510 |
+
}
|
511 |
+
|
512 |
+
return $interval;
|
513 |
+
}
|
514 |
+
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Schedules a recurring ACTION_FETCH_ORDERS action, if not already scheduled.
|
518 |
+
*
|
519 |
+
* @internal
|
520 |
+
*
|
521 |
+
* @since 2.1.0
|
522 |
+
*/
|
523 |
+
public function schedule_local_orders_update() {
|
524 |
+
if ( facebook_for_woocommerce()->get_commerce_handler()->is_connected() && false === as_next_scheduled_action( self::ACTION_FETCH_ORDERS, [], \WC_Facebookcommerce::PLUGIN_ID ) ) {
|
525 |
+
|
526 |
+
$interval = $this->get_order_update_interval();
|
527 |
+
|
528 |
+
as_schedule_recurring_action( time() + $interval, $interval, self::ACTION_FETCH_ORDERS, [], \WC_Facebookcommerce::PLUGIN_ID );
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Adds the necessary action & filter hooks.
|
535 |
+
*
|
536 |
+
* @since 2.1.0
|
537 |
+
*/
|
538 |
+
public function add_hooks() {
|
539 |
+
|
540 |
+
// schedule a recurring ACTION_FETCH_ORDERS action, if not already scheduled
|
541 |
+
add_action( 'init', [ $this, 'schedule_local_orders_update' ] );
|
542 |
+
|
543 |
+
add_action( self::ACTION_FETCH_ORDERS, [ $this, 'update_local_orders' ] );
|
544 |
+
|
545 |
+
// prevent sending emails for Commerce orders
|
546 |
+
add_action( 'woocommerce_email_enabled_customer_completed_order', [ $this, 'maybe_stop_order_email' ], 10, 2 );
|
547 |
+
add_action( 'woocommerce_email_enabled_customer_processing_order', [ $this, 'maybe_stop_order_email' ], 10, 2 );
|
548 |
+
add_action( 'woocommerce_email_enabled_customer_refunded_order', [ $this, 'maybe_stop_order_email' ], 10, 2 );
|
549 |
+
add_action( 'woocommerce_email_enabled_customer_partially_refunded_order', [ $this, 'maybe_stop_order_email' ], 10, 2 );
|
550 |
+
}
|
551 |
+
|
552 |
+
|
553 |
+
/**
|
554 |
+
* Fulfills an order via API.
|
555 |
+
*
|
556 |
+
* In addition to the exceptions we throw for missing data, the API request will also fail if:
|
557 |
+
* - The stored remote ID is invalid
|
558 |
+
* - The order has an item with a retailer ID that was not originally part of the order
|
559 |
+
* - An item has a different quantity than what was originally ordered
|
560 |
+
* - The remote order was already fulfilled
|
561 |
+
*
|
562 |
+
* @since 2.1.0
|
563 |
+
*
|
564 |
+
* @param \WC_Order $order order object
|
565 |
+
* @param string $tracking_number shipping tracking number
|
566 |
+
* @param string $carrier shipping carrier
|
567 |
+
* @throws SV_WC_Plugin_Exception
|
568 |
+
*/
|
569 |
+
public function fulfill_order( \WC_Order $order, $tracking_number, $carrier ) {
|
570 |
+
|
571 |
+
try {
|
572 |
+
|
573 |
+
$remote_id = $order->get_meta( self::REMOTE_ID_META_KEY );
|
574 |
+
|
575 |
+
if ( ! $remote_id ) {
|
576 |
+
throw new SV_WC_Plugin_Exception( __( 'Remote ID not found.', 'facebook-for-woocommerce' ) );
|
577 |
+
}
|
578 |
+
|
579 |
+
$shipment_utilities = new Utilities\Shipment();
|
580 |
+
|
581 |
+
if ( ! $shipment_utilities->is_valid_carrier( $carrier ) ) {
|
582 |
+
/** translators: Placeholders: %s - shipping carrier code */
|
583 |
+
throw new SV_WC_Plugin_Exception( sprintf( __( '%s is not a valid shipping carrier code.', 'facebook-for-woocommerce' ), $carrier ) );
|
584 |
+
}
|
585 |
+
|
586 |
+
$items = [];
|
587 |
+
|
588 |
+
/** @var \WC_Order_Item_Product $item */
|
589 |
+
foreach ( $order->get_items() as $item ) {
|
590 |
+
|
591 |
+
if ( $product = $item->get_product() ) {
|
592 |
+
|
593 |
+
$items[] = [
|
594 |
+
'retailer_id' => \WC_Facebookcommerce_Utils::get_fb_retailer_id( $product ),
|
595 |
+
'quantity' => $item->get_quantity(),
|
596 |
+
];
|
597 |
+
}
|
598 |
+
}
|
599 |
+
|
600 |
+
if ( empty( $items ) ) {
|
601 |
+
throw new SV_WC_Plugin_Exception( __( 'No valid Facebook products were found.', 'facebook-for-woocommerce' ) );
|
602 |
+
}
|
603 |
+
|
604 |
+
$fulfillment_data = [
|
605 |
+
'items' => $items,
|
606 |
+
'tracking_info' => [
|
607 |
+
'carrier' => $carrier,
|
608 |
+
'tracking_number' => $tracking_number,
|
609 |
+
],
|
610 |
+
];
|
611 |
+
|
612 |
+
$plugin = facebook_for_woocommerce();
|
613 |
+
|
614 |
+
$plugin->get_api( $plugin->get_connection_handler()->get_page_access_token() )->fulfill_order( $remote_id, $fulfillment_data );
|
615 |
+
|
616 |
+
$order->add_order_note( sprintf(
|
617 |
+
/* translators: Placeholder: %s - sales channel name, like Facebook or Instagram */
|
618 |
+
__( '%s order fulfilled.', 'facebook-for-woocommerce' ),
|
619 |
+
ucfirst( $order->get_created_via() )
|
620 |
+
) );
|
621 |
+
|
622 |
+
} catch ( SV_WC_Plugin_Exception $exception ) {
|
623 |
+
|
624 |
+
$order->add_order_note( sprintf(
|
625 |
+
/* translators: Placeholders: %1$s - sales channel name, like Facebook or Instagram, %2$s - error message */
|
626 |
+
__( '%1$s order could not be fulfilled. %2$s', 'facebook-for-woocommerce' ),
|
627 |
+
ucfirst( $order->get_created_via() ),
|
628 |
+
$exception->getMessage()
|
629 |
+
) );
|
630 |
+
|
631 |
+
throw $exception;
|
632 |
+
}
|
633 |
+
}
|
634 |
+
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Refunds an order.
|
638 |
+
*
|
639 |
+
* @since 2.1.0
|
640 |
+
*
|
641 |
+
* @param \WC_Order_Refund $refund order refund object
|
642 |
+
* @param string $reason_code refund reason code
|
643 |
+
* @throws SV_WC_Plugin_Exception
|
644 |
+
*/
|
645 |
+
public function add_order_refund( \WC_Order_Refund $refund, $reason_code ) {
|
646 |
+
|
647 |
+
$plugin = facebook_for_woocommerce();
|
648 |
+
|
649 |
+
$api = $plugin->get_api( $plugin->get_connection_handler()->get_page_access_token() );
|
650 |
+
|
651 |
+
$valid_reason_codes = [
|
652 |
+
self::REFUND_REASON_BUYERS_REMORSE,
|
653 |
+
self::REFUND_REASON_DAMAGED_GOODS,
|
654 |
+
self::REFUND_REASON_NOT_AS_DESCRIBED,
|
655 |
+
self::REFUND_REASON_QUALITY_ISSUE,
|
656 |
+
self::REFUND_REASON_OTHER,
|
657 |
+
self::REFUND_REASON_WRONG_ITEM,
|
658 |
+
];
|
659 |
+
|
660 |
+
if ( ! in_array( $reason_code, $valid_reason_codes, true ) ) {
|
661 |
+
$reason_code = self::REFUND_REASON_OTHER;
|
662 |
+
}
|
663 |
+
|
664 |
+
try {
|
665 |
+
|
666 |
+
$parent_order = wc_get_order( $refund->get_parent_id() );
|
667 |
+
|
668 |
+
if ( ! $parent_order instanceof \WC_Order ) {
|
669 |
+
throw new SV_WC_Plugin_Exception( __( 'Parent order not found.', 'facebook-for-woocommerce' ) );
|
670 |
+
}
|
671 |
+
|
672 |
+
$remote_id = $parent_order->get_meta( self::REMOTE_ID_META_KEY );
|
673 |
+
|
674 |
+
if ( ! $remote_id ) {
|
675 |
+
throw new SV_WC_Plugin_Exception( __( 'Remote ID for parent order not found.', 'facebook-for-woocommerce' ) );
|
676 |
+
}
|
677 |
+
|
678 |
+
$refund_data = [
|
679 |
+
'reason_code' => $reason_code,
|
680 |
+
];
|
681 |
+
|
682 |
+
if ( ! empty( $reason_text = $refund->get_reason() ) ) {
|
683 |
+
$refund_data['reason_text'] = $reason_text;
|
684 |
+
}
|
685 |
+
|
686 |
+
// only send items for partial refunds
|
687 |
+
if ( $parent_order->get_total() - $refund->get_amount() > 0 ) {
|
688 |
+
$refund_data['items'] = $this->get_refund_items( $refund );
|
689 |
+
}
|
690 |
+
|
691 |
+
if ( ! empty( $refund->get_shipping_total() ) ) {
|
692 |
+
|
693 |
+
$refund_data['shipping'] = [
|
694 |
+
'shipping_refund' => [
|
695 |
+
'amount' => abs( $refund->get_shipping_total() ),
|
696 |
+
'currency' => $refund->get_currency(),
|
697 |
+
],
|
698 |
+
];
|
699 |
+
}
|
700 |
+
|
701 |
+
$api->add_order_refund( $remote_id, $refund_data );
|
702 |
+
|
703 |
+
$parent_order->add_order_note( sprintf(
|
704 |
+
/* translators: Placeholder: %s - sales channel name, like Facebook or Instagram */
|
705 |
+
__( 'Order refunded on %s.', 'facebook-for-woocommerce' ),
|
706 |
+
ucfirst( $parent_order->get_created_via() )
|
707 |
+
) );
|
708 |
+
|
709 |
+
} catch ( SV_WC_Plugin_Exception $exception ) {
|
710 |
+
|
711 |
+
if ( ! empty( $parent_order ) && $parent_order instanceof \WC_Order ) {
|
712 |
+
|
713 |
+
$parent_order->add_order_note( sprintf(
|
714 |
+
/* translators: Placeholders: %1$s - sales channel name, like Facebook or Instagram, %2$s - error message */
|
715 |
+
__( 'Could not refund %1$s order: %2$s', 'facebook-for-woocommerce' ),
|
716 |
+
ucfirst( $parent_order->get_created_via() ),
|
717 |
+
$exception->getMessage()
|
718 |
+
) );
|
719 |
+
|
720 |
+
} else {
|
721 |
+
|
722 |
+
facebook_for_woocommerce()->log( "Could not refund remote order for order refund {$refund->get_id()}: {$exception->getMessage()}" );
|
723 |
+
}
|
724 |
+
|
725 |
+
// re-throw the exception so the error halts refund creation
|
726 |
+
throw $exception;
|
727 |
+
}
|
728 |
+
}
|
729 |
+
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Gets the Facebook items from the given refund.
|
733 |
+
*
|
734 |
+
* @since 2.1.0
|
735 |
+
*
|
736 |
+
* @param \WC_Order_Refund $refund refund object
|
737 |
+
* @return array
|
738 |
+
* @throws SV_WC_Plugin_Exception
|
739 |
+
*/
|
740 |
+
private function get_refund_items( \WC_Order_Refund $refund ) {
|
741 |
+
|
742 |
+
$items = [];
|
743 |
+
|
744 |
+
/** @var \WC_Order_Item_Product $item */
|
745 |
+
foreach ( $refund->get_items() as $item ) {
|
746 |
+
|
747 |
+
if ( $product = $item->get_product() ) {
|
748 |
+
|
749 |
+
$refund_item = [
|
750 |
+
'retailer_id' => \WC_Facebookcommerce_Utils::get_fb_retailer_id( $product ),
|
751 |
+
];
|
752 |
+
|
753 |
+
if ( ! empty( $item->get_quantity() ) ) {
|
754 |
+
|
755 |
+
$refund_item['item_refund_quantity'] = abs( $item->get_quantity() );
|
756 |
+
|
757 |
+
} else {
|
758 |
+
|
759 |
+
$refund_item['item_refund_amount'] = [
|
760 |
+
'amount' => abs( $item->get_total() ),
|
761 |
+
'currency' => $refund->get_currency(),
|
762 |
+
];
|
763 |
+
}
|
764 |
+
|
765 |
+
$items[] = $refund_item;
|
766 |
+
}
|
767 |
+
}
|
768 |
+
|
769 |
+
if ( empty( $items ) ) {
|
770 |
+
throw new SV_WC_Plugin_Exception( __( 'No valid Facebook products were found.', 'facebook-for-woocommerce' ) );
|
771 |
+
}
|
772 |
+
|
773 |
+
return $items;
|
774 |
+
}
|
775 |
+
|
776 |
+
|
777 |
+
/**
|
778 |
+
* Cancels an order.
|
779 |
+
*
|
780 |
+
* @since 2.1.0
|
781 |
+
*
|
782 |
+
* @param \WC_Order $order order object
|
783 |
+
* @param string $reason_code cancellation reason code
|
784 |
+
* @throws SV_WC_Plugin_Exception
|
785 |
+
*/
|
786 |
+
public function cancel_order( \WC_Order $order, $reason_code ) {
|
787 |
+
|
788 |
+
$plugin = facebook_for_woocommerce();
|
789 |
+
|
790 |
+
$api = $plugin->get_api( $plugin->get_connection_handler()->get_page_access_token() );
|
791 |
+
|
792 |
+
$valid_reason_codes = array_keys( $this->get_cancellation_reasons() );
|
793 |
+
|
794 |
+
if ( ! in_array( $reason_code, $valid_reason_codes, true ) ) {
|
795 |
+
$reason_code = Orders::CANCEL_REASON_OTHER;
|
796 |
+
}
|
797 |
+
|
798 |
+
try {
|
799 |
+
|
800 |
+
$remote_id = $order->get_meta( self::REMOTE_ID_META_KEY );
|
801 |
+
|
802 |
+
if ( ! $remote_id ) {
|
803 |
+
throw new SV_WC_Plugin_Exception( __( 'Remote ID not found.', 'facebook-for-woocommerce' ) );
|
804 |
+
}
|
805 |
+
|
806 |
+
$api->cancel_order( $remote_id, $reason_code );
|
807 |
+
|
808 |
+
$order->add_order_note( sprintf(
|
809 |
+
/* translators: Placeholder: %s - sales channel name, like Facebook or Instagram */
|
810 |
+
__( '%s order cancelled.', 'facebook-for-woocommerce' ),
|
811 |
+
ucfirst( $order->get_created_via() )
|
812 |
+
) );
|
813 |
+
|
814 |
+
} catch ( SV_WC_Plugin_Exception $exception ) {
|
815 |
+
|
816 |
+
$order->add_order_note( sprintf(
|
817 |
+
/* translators: Placeholders: %1$s - sales channel name, like Facebook or Instagram, %2$s - error message */
|
818 |
+
__( '%1$s order could not be cancelled. %2$s', 'facebook-for-woocommerce' ),
|
819 |
+
ucfirst( $order->get_created_via() ),
|
820 |
+
$exception->getMessage()
|
821 |
+
) );
|
822 |
+
|
823 |
+
throw $exception;
|
824 |
+
}
|
825 |
+
}
|
826 |
+
|
827 |
+
|
828 |
+
/**
|
829 |
+
* Gets the valid cancellation reasons.
|
830 |
+
*
|
831 |
+
* @since 2.1.0
|
832 |
+
*
|
833 |
+
* @return array key-value array with codes and their labels
|
834 |
+
*/
|
835 |
+
public function get_cancellation_reasons() {
|
836 |
+
|
837 |
+
return [
|
838 |
+
|
839 |
+
self::CANCEL_REASON_CUSTOMER_REQUESTED => __( 'Customer requested cancellation', 'facebook-for-woocommerce' ),
|
840 |
+
self::CANCEL_REASON_OUT_OF_STOCK => __( 'Product(s) are out of stock', 'facebook-for-woocommerce' ),
|
841 |
+
self::CANCEL_REASON_INVALID_ADDRESS => __( 'Customer address is invalid', 'facebook-for-woocommerce' ),
|
842 |
+
self::CANCEL_REASON_SUSPICIOUS_ORDER => __( 'Suspicious order', 'facebook-for-woocommerce' ),
|
843 |
+
self::CANCEL_REASON_OTHER => __( 'Other', 'facebook-for-woocommerce' ),
|
844 |
+
];
|
845 |
+
}
|
846 |
+
|
847 |
+
|
848 |
+
/**
|
849 |
+
* Prevents sending emails for Commerce orders.
|
850 |
+
*
|
851 |
+
* @internal
|
852 |
+
*
|
853 |
+
* @since 2.1.0
|
854 |
+
*
|
855 |
+
* @param bool $is_enabled whether the email is enabled in the first place
|
856 |
+
* @param \WC_Order $order order object
|
857 |
+
* @return bool
|
858 |
+
*/
|
859 |
+
public function maybe_stop_order_email( $is_enabled, $order ) {
|
860 |
+
|
861 |
+
// will decide whether to allow $is_enabled to be filtered
|
862 |
+
$is_previously_enabled = $is_enabled;
|
863 |
+
|
864 |
+
// checks whether or not the order is a Commerce order
|
865 |
+
$is_commerce_order = $order instanceof \WC_Order && self::is_commerce_order( $order );
|
866 |
+
|
867 |
+
// decides whether to disable or to keep emails enabled
|
868 |
+
$is_enabled = $is_enabled && ! $is_commerce_order;
|
869 |
+
|
870 |
+
if ( $is_previously_enabled && $is_commerce_order ) {
|
871 |
+
|
872 |
+
/**
|
873 |
+
* Filters the flag used to determine whether the email is enabled.
|
874 |
+
*
|
875 |
+
* @since 2.1.0
|
876 |
+
*
|
877 |
+
* @param bool $is_enabled whether the email is enabled
|
878 |
+
* @param \WC_Order $order order object
|
879 |
+
* @param Orders $this admin orders instance
|
880 |
+
*
|
881 |
+
*/
|
882 |
+
$is_enabled = (bool) apply_filters( 'wc_facebook_commerce_send_woocommerce_emails', $is_enabled, $order, $this );
|
883 |
+
}
|
884 |
+
|
885 |
+
return $is_enabled;
|
886 |
+
}
|
887 |
+
|
888 |
+
|
889 |
+
}
|
includes/Handlers/Connection.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook\Handlers;
|
12 |
Â
|
13 |
Â
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_API_Exception;
|
Â
|
|
14 |
Â
|
15 |
Â
defined( 'ABSPATH' ) or exit;
|
16 |
Â
|
@@ -37,6 +38,9 @@ class Connection {
|
|
37 |
Â
/** @var string the action callback for the disconnection */
|
38 |
Â
const ACTION_DISCONNECT = 'wc_facebook_disconnect';
|
39 |
Â
|
Â
|
|
Â
|
|
Â
|
|
40 |
Â
/** @var string the WordPress option name where the external business ID is stored */
|
41 |
Â
const OPTION_EXTERNAL_BUSINESS_ID = 'wc_facebook_external_business_id';
|
42 |
Â
|
@@ -55,6 +59,12 @@ class Connection {
|
|
55 |
Â
/** @var string the merchant access token option name */
|
56 |
Â
const OPTION_MERCHANT_ACCESS_TOKEN = 'wc_facebook_merchant_access_token';
|
57 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
58 |
Â
/** @var string|null the generated external merchant settings ID */
|
59 |
Â
private $external_business_id;
|
60 |
Â
|
@@ -177,8 +187,16 @@ class Connection {
|
|
177 |
Â
|
178 |
Â
$response = $this->get_plugin()->get_api()->get_installation_ids( $this->get_external_business_id() );
|
179 |
Â
|
180 |
-
|
181 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
182 |
Â
}
|
183 |
Â
|
184 |
Â
if ( $response->get_pixel_id() ) {
|
@@ -245,6 +263,14 @@ class Connection {
|
|
245 |
Â
facebook_for_woocommerce()->get_products_sync_handler()->create_or_update_all_products();
|
246 |
Â
|
247 |
Â
update_option( 'wc_facebook_has_connected_fbe_2', 'yes' );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
248 |
Â
|
249 |
Â
facebook_for_woocommerce()->get_message_handler()->add_message( __( 'Connection complete! Thanks for using Facebook for WooCommerce.', 'facebook-for-woocommerce' ) );
|
250 |
Â
|
@@ -319,6 +345,51 @@ class Connection {
|
|
319 |
Â
}
|
320 |
Â
|
321 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
322 |
Â
/**
|
323 |
Â
* Gets the API access token.
|
324 |
Â
*
|
@@ -365,16 +436,88 @@ class Connection {
|
|
365 |
Â
}
|
366 |
Â
|
367 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
368 |
Â
/**
|
369 |
Â
* Gets the URL to start the connection flow.
|
370 |
Â
*
|
371 |
Â
* @since 2.0.0
|
372 |
Â
*
|
Â
|
|
373 |
Â
* @return string
|
374 |
Â
*/
|
375 |
-
public function get_connect_url() {
|
376 |
Â
|
377 |
-
return add_query_arg( rawurlencode_deep( $this->get_connect_parameters() ), self::OAUTH_URL );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
378 |
Â
}
|
379 |
Â
|
380 |
Â
|
@@ -424,6 +567,7 @@ class Connection {
|
|
424 |
Â
'business_management',
|
425 |
Â
'ads_management',
|
426 |
Â
'ads_read',
|
Â
|
|
427 |
Â
];
|
428 |
Â
|
429 |
Â
/**
|
@@ -559,6 +703,19 @@ class Connection {
|
|
559 |
Â
}
|
560 |
Â
|
561 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
562 |
Â
/**
|
563 |
Â
* Gets the proxy URL.
|
564 |
Â
*
|
@@ -611,9 +768,16 @@ class Connection {
|
|
611 |
Â
*
|
612 |
Â
* @since 2.0.0
|
613 |
Â
*
|
Â
|
|
614 |
Â
* @return array
|
615 |
Â
*/
|
616 |
-
public function get_connect_parameters() {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
617 |
Â
|
618 |
Â
/**
|
619 |
Â
* Filters the connection parameters.
|
@@ -625,7 +789,7 @@ class Connection {
|
|
625 |
Â
return apply_filters( 'wc_facebook_connection_parameters', [
|
626 |
Â
'client_id' => $this->get_client_id(),
|
627 |
Â
'redirect_uri' => $this->get_proxy_url(),
|
628 |
-
'state' => $
|
629 |
Â
'display' => 'page',
|
630 |
Â
'response_type' => 'code',
|
631 |
Â
'scope' => implode( ',', $this->get_scopes() ),
|
@@ -740,6 +904,19 @@ class Connection {
|
|
740 |
Â
}
|
741 |
Â
|
742 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
743 |
Â
/**
|
744 |
Â
* Stores the given token value.
|
745 |
Â
*
|
@@ -766,6 +943,19 @@ class Connection {
|
|
766 |
Â
}
|
767 |
Â
|
768 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
769 |
Â
/**
|
770 |
Â
* Determines whether the site is connected.
|
771 |
Â
*
|
@@ -816,7 +1006,7 @@ class Connection {
|
|
816 |
Â
*
|
817 |
Â
* @return string
|
818 |
Â
*/
|
819 |
-
|
820 |
Â
|
821 |
Â
/**
|
822 |
Â
* Filters the client ID.
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook\Handlers;
|
12 |
Â
|
13 |
Â
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_API_Exception;
|
14 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_Helper;
|
15 |
Â
|
16 |
Â
defined( 'ABSPATH' ) or exit;
|
17 |
Â
|
38 |
Â
/** @var string the action callback for the disconnection */
|
39 |
Â
const ACTION_DISCONNECT = 'wc_facebook_disconnect';
|
40 |
Â
|
41 |
+
/** @var string the action callback for the connection */
|
42 |
+
const ACTION_CONNECT_COMMERCE = 'wc_facebook_connect_commerce';
|
43 |
+
|
44 |
Â
/** @var string the WordPress option name where the external business ID is stored */
|
45 |
Â
const OPTION_EXTERNAL_BUSINESS_ID = 'wc_facebook_external_business_id';
|
46 |
Â
|
59 |
Â
/** @var string the merchant access token option name */
|
60 |
Â
const OPTION_MERCHANT_ACCESS_TOKEN = 'wc_facebook_merchant_access_token';
|
61 |
Â
|
62 |
+
/** @var string the page access token option name */
|
63 |
+
const OPTION_PAGE_ACCESS_TOKEN = 'wc_facebook_page_access_token';
|
64 |
+
|
65 |
+
/** @var string the Commerce manager ID option name */
|
66 |
+
const OPTION_COMMERCE_MANAGER_ID = 'wc_facebook_commerce_manager_id';
|
67 |
+
|
68 |
Â
/** @var string|null the generated external merchant settings ID */
|
69 |
Â
private $external_business_id;
|
70 |
Â
|
187 |
Â
|
188 |
Â
$response = $this->get_plugin()->get_api()->get_installation_ids( $this->get_external_business_id() );
|
189 |
Â
|
190 |
+
$page_id = sanitize_text_field( $response->get_page_id() );
|
191 |
+
|
192 |
+
if ( $page_id ) {
|
193 |
+
|
194 |
+
update_option( \WC_Facebookcommerce_Integration::SETTING_FACEBOOK_PAGE_ID, $page_id );
|
195 |
+
|
196 |
+
// get and store a current access token for the configured page
|
197 |
+
$page_access_token = $this->retrieve_page_access_token( $page_id );
|
198 |
+
|
199 |
+
$this->update_page_access_token( $page_access_token );
|
200 |
Â
}
|
201 |
Â
|
202 |
Â
if ( $response->get_pixel_id() ) {
|
263 |
Â
facebook_for_woocommerce()->get_products_sync_handler()->create_or_update_all_products();
|
264 |
Â
|
265 |
Â
update_option( 'wc_facebook_has_connected_fbe_2', 'yes' );
|
266 |
+
update_option( 'wc_facebook_has_authorized_pages_read_engagement', 'yes' );
|
267 |
+
|
268 |
+
// redirect to the Commerce onboarding if directed to do so
|
269 |
+
if ( ! empty( SV_WC_Helper::get_requested_value( 'connect_commerce' ) ) ) {
|
270 |
+
|
271 |
+
wp_redirect( $this->get_commerce_connect_url() );
|
272 |
+
exit;
|
273 |
+
}
|
274 |
Â
|
275 |
Â
facebook_for_woocommerce()->get_message_handler()->add_message( __( 'Connection complete! Thanks for using Facebook for WooCommerce.', 'facebook-for-woocommerce' ) );
|
276 |
Â
|
345 |
Â
}
|
346 |
Â
|
347 |
Â
|
348 |
+
/**
|
349 |
+
* Retrieves the configured page access token remotely.
|
350 |
+
*
|
351 |
+
* @since 2.1.0
|
352 |
+
*
|
353 |
+
* @param string $page_id desired Facebook page ID
|
354 |
+
* @return string
|
355 |
+
* @throws SV_WC_API_Exception
|
356 |
+
*/
|
357 |
+
private function retrieve_page_access_token( $page_id ) {
|
358 |
+
|
359 |
+
facebook_for_woocommerce()->log( 'Retrieving page access token' );
|
360 |
+
|
361 |
+
$response = wp_remote_get( 'https://graph.facebook.com/v7.0/me/accounts?access_token=' . $this->get_access_token() );
|
362 |
+
|
363 |
+
$body = wp_remote_retrieve_body( $response );
|
364 |
+
$body = json_decode( $body, true );
|
365 |
+
|
366 |
+
if ( ! is_array( $body ) || empty( $body['data'] ) || 200 !== (int) wp_remote_retrieve_response_code( $response ) ) {
|
367 |
+
|
368 |
+
facebook_for_woocommerce()->log( print_r( $body, true ) );
|
369 |
+
|
370 |
+
throw new SV_WC_API_Exception( sprintf(
|
371 |
+
/* translators: Placeholders: %s - API error message */
|
372 |
+
__( 'Could not retrieve page access data. %s', 'facebook for woocommerce' ),
|
373 |
+
wp_remote_retrieve_response_message( $response )
|
374 |
+
) );
|
375 |
+
}
|
376 |
+
|
377 |
+
$page_access_tokens = wp_list_pluck( $body['data'], 'access_token', 'id' );
|
378 |
+
|
379 |
+
// bail if the user isn't authorized to manage the page
|
380 |
+
if ( empty( $page_access_tokens[ $page_id ] ) ) {
|
381 |
+
|
382 |
+
throw new SV_WC_API_Exception( sprintf(
|
383 |
+
/* translators: Placeholders: %s - Facebook page ID */
|
384 |
+
__( 'Page %s not authorized.', 'facebook-for-woocommerce' ),
|
385 |
+
$page_id
|
386 |
+
) );
|
387 |
+
}
|
388 |
+
|
389 |
+
return $page_access_tokens[ $page_id ];
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
Â
/**
|
394 |
Â
* Gets the API access token.
|
395 |
Â
*
|
436 |
Â
}
|
437 |
Â
|
438 |
Â
|
439 |
+
/**
|
440 |
+
* Gets the page access token.
|
441 |
+
*
|
442 |
+
* @since 2.1.0
|
443 |
+
*
|
444 |
+
* @return string
|
445 |
+
*/
|
446 |
+
public function get_page_access_token() {
|
447 |
+
|
448 |
+
$access_token = get_option( self::OPTION_PAGE_ACCESS_TOKEN, '' );
|
449 |
+
|
450 |
+
/**
|
451 |
+
* Filters the page access token.
|
452 |
+
*
|
453 |
+
* @since 2.1.0
|
454 |
+
*
|
455 |
+
* @param string $access_token page access token
|
456 |
+
* @param Connection $connection connection handler instance
|
457 |
+
*/
|
458 |
+
return (string) apply_filters( 'wc_facebook_connection_page_access_token', $access_token, $this );
|
459 |
+
}
|
460 |
+
|
461 |
+
|
462 |
Â
/**
|
463 |
Â
* Gets the URL to start the connection flow.
|
464 |
Â
*
|
465 |
Â
* @since 2.0.0
|
466 |
Â
*
|
467 |
+
* @param bool $connect_commerce whether to connect to Commerce after successful FBE connection
|
468 |
Â
* @return string
|
469 |
Â
*/
|
470 |
+
public function get_connect_url( $connect_commerce = false ) {
|
471 |
Â
|
472 |
+
return add_query_arg( rawurlencode_deep( $this->get_connect_parameters( $connect_commerce ) ), self::OAUTH_URL );
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Builds the Commerce connect URL.
|
478 |
+
*
|
479 |
+
* The base URL is https://www.facebook.com/commerce_manager/onboarding with two query variables:
|
480 |
+
* - app_id - the developer app ID
|
481 |
+
* - redirect_url - the URL where the user will land after onboarding is complete
|
482 |
+
*
|
483 |
+
* The redirect URL must be an approved domain, so it must be the connect.woocommerce.com proxy app. In that URL, we
|
484 |
+
* include the final site URL, which is where the merchant will redirect to with the data that needs to be stored.
|
485 |
+
* So the final URL looks like this without encoding:
|
486 |
+
*
|
487 |
+
* https://www.facebook.com/commerce_manager/onboarding/?app_id={id}&redirect_url=https://connect.woocommerce.com/auth/facebook/?site_url=https://example.com/?wc-api=wc_facebook_connect_commerce&nonce=1234
|
488 |
+
*
|
489 |
+
* If testing only, &is_test_mode=true can be appended to the URL using the wc_facebook_commerce_connect_url filter
|
490 |
+
* to trigger the test account flow, where fake US-based business details can be used.
|
491 |
+
*
|
492 |
+
* @since 2.1.0
|
493 |
+
*
|
494 |
+
* @return string
|
495 |
+
*/
|
496 |
+
public function get_commerce_connect_url() {
|
497 |
+
|
498 |
+
// build the site URL to which the user will ultimately return
|
499 |
+
$site_url = add_query_arg( [
|
500 |
+
'wc-api' => self::ACTION_CONNECT_COMMERCE,
|
501 |
+
'nonce' => wp_create_nonce( self::ACTION_CONNECT_COMMERCE ),
|
502 |
+
], home_url( '/' ) );
|
503 |
+
|
504 |
+
// build the proxy app URL where the user will land after onboarding, to be redirected to the site URL
|
505 |
+
$redirect_url = add_query_arg( 'site_url', urlencode( $site_url ), 'https://connect.woocommerce.com/auth/facebookcommerce/' );
|
506 |
+
|
507 |
+
// build the final connect URL, direct to Facebook
|
508 |
+
$connect_url = add_query_arg( [
|
509 |
+
'app_id' => $this->get_client_id(), // this endpoint calls the client ID "app ID"
|
510 |
+
'redirect_url' => urlencode( $redirect_url ),
|
511 |
+
], 'https://www.facebook.com/commerce_manager/onboarding/' );
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Filters the URL used to connect to Facebook Commerce.
|
515 |
+
*
|
516 |
+
* @since 2.1.0
|
517 |
+
*
|
518 |
+
* @param string $connect_url connect URL
|
519 |
+
*/
|
520 |
+
return apply_filters( 'wc_facebook_commerce_connect_url', $connect_url );
|
521 |
Â
}
|
522 |
Â
|
523 |
Â
|
567 |
Â
'business_management',
|
568 |
Â
'ads_management',
|
569 |
Â
'ads_read',
|
570 |
+
'pages_read_engagement', // this scope is needed to enable order management if using the Commerce feature
|
571 |
Â
];
|
572 |
Â
|
573 |
Â
/**
|
703 |
Â
}
|
704 |
Â
|
705 |
Â
|
706 |
+
/**
|
707 |
+
* Gets the Commerce manager ID value.
|
708 |
+
*
|
709 |
+
* @since 2.1.0
|
710 |
+
*
|
711 |
+
* @return string
|
712 |
+
*/
|
713 |
+
public function get_commerce_manager_id() {
|
714 |
+
|
715 |
+
return get_option( self::OPTION_COMMERCE_MANAGER_ID, '' );
|
716 |
+
}
|
717 |
+
|
718 |
+
|
719 |
Â
/**
|
720 |
Â
* Gets the proxy URL.
|
721 |
Â
*
|
768 |
Â
*
|
769 |
Â
* @since 2.0.0
|
770 |
Â
*
|
771 |
+
* @param bool $connect_commerce whether to connect to Commerce after successful FBE connection
|
772 |
Â
* @return array
|
773 |
Â
*/
|
774 |
+
public function get_connect_parameters( $connect_commerce = false ) {
|
775 |
+
|
776 |
+
$state = $this->get_redirect_url();
|
777 |
+
|
778 |
+
if ( $connect_commerce ) {
|
779 |
+
$state = add_query_arg( 'connect_commerce', true, $state );
|
780 |
+
}
|
781 |
Â
|
782 |
Â
/**
|
783 |
Â
* Filters the connection parameters.
|
789 |
Â
return apply_filters( 'wc_facebook_connection_parameters', [
|
790 |
Â
'client_id' => $this->get_client_id(),
|
791 |
Â
'redirect_uri' => $this->get_proxy_url(),
|
792 |
+
'state' => $state,
|
793 |
Â
'display' => 'page',
|
794 |
Â
'response_type' => 'code',
|
795 |
Â
'scope' => implode( ',', $this->get_scopes() ),
|
904 |
Â
}
|
905 |
Â
|
906 |
Â
|
907 |
+
/**
|
908 |
+
* Stores the given Commerce manager ID.
|
909 |
+
*
|
910 |
+
* @since 2.1.0
|
911 |
+
*
|
912 |
+
* @param string $id the ID
|
913 |
+
*/
|
914 |
+
public function update_commerce_manager_id( $id ) {
|
915 |
+
|
916 |
+
update_option( self::OPTION_COMMERCE_MANAGER_ID, $id );
|
917 |
+
}
|
918 |
+
|
919 |
+
|
920 |
Â
/**
|
921 |
Â
* Stores the given token value.
|
922 |
Â
*
|
943 |
Â
}
|
944 |
Â
|
945 |
Â
|
946 |
+
/**
|
947 |
+
* Stores the given page access token.
|
948 |
+
*
|
949 |
+
* @since 2.1.0
|
950 |
+
*
|
951 |
+
* @param string $value the access token
|
952 |
+
*/
|
953 |
+
public function update_page_access_token( $value ) {
|
954 |
+
|
955 |
+
update_option( self::OPTION_PAGE_ACCESS_TOKEN, is_string( $value ) ? $value : '' );
|
956 |
+
}
|
957 |
+
|
958 |
+
|
959 |
Â
/**
|
960 |
Â
* Determines whether the site is connected.
|
961 |
Â
*
|
1006 |
Â
*
|
1007 |
Â
* @return string
|
1008 |
Â
*/
|
1009 |
+
public function get_client_id() {
|
1010 |
Â
|
1011 |
Â
/**
|
1012 |
Â
* Filters the client ID.
|
includes/Product_Categories.php
ADDED
@@ -0,0 +1,53 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Helper class with utility methods for getting and setting various product category values.
|
17 |
+
*
|
18 |
+
* @since 2.3.0-dev.1
|
19 |
+
*/
|
20 |
+
class Product_Categories {
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Gets the category’s stored Products::GOOGLE_PRODUCT_CATEGORY_META_KEY meta.
|
25 |
+
*
|
26 |
+
* Does not fall back to the plugin settings.
|
27 |
+
*
|
28 |
+
* @since 2.3.0-dev.1
|
29 |
+
*
|
30 |
+
* @param int $category_id category ID
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
public static function get_google_product_category_id( $category_id ) {
|
34 |
+
|
35 |
+
return get_term_meta( $category_id, Products::GOOGLE_PRODUCT_CATEGORY_META_KEY, true );
|
36 |
+
}
|
37 |
+
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Updates the stored Google product category ID for the Products::GOOGLE_PRODUCT_CATEGORY_META_KEY meta.
|
41 |
+
*
|
42 |
+
* @since 2.3.0-dev.1
|
43 |
+
*
|
44 |
+
* @param int $id category ID
|
45 |
+
* @param string $category_id Google product category ID
|
46 |
+
*/
|
47 |
+
public static function update_google_product_category_id( $id, $category_id ) {
|
48 |
+
|
49 |
+
update_term_meta( $id, Products::GOOGLE_PRODUCT_CATEGORY_META_KEY, $category_id );
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
}
|
includes/Products.php
CHANGED
@@ -10,6 +10,8 @@
|
|
10 |
Â
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
Â
|
Â
|
|
Â
|
|
13 |
Â
use WC_Facebook_Product;
|
14 |
Â
|
15 |
Â
defined( 'ABSPATH' ) or exit;
|
@@ -41,12 +43,33 @@ class Products {
|
|
41 |
Â
/** @var string product image source option to use the parent product image in Facebook */
|
42 |
Â
const PRODUCT_IMAGE_SOURCE_CUSTOM = 'custom';
|
43 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
44 |
Â
|
45 |
Â
/** @var array memoized array of sync enabled status for products */
|
46 |
-
private static $products_sync_enabled =
|
47 |
Â
|
48 |
Â
/** @var array memoized array of visibility status for products */
|
49 |
-
private static $products_visibility =
|
50 |
Â
|
51 |
Â
|
52 |
Â
/**
|
@@ -55,11 +78,11 @@ class Products {
|
|
55 |
Â
* @since 1.10.0
|
56 |
Â
*
|
57 |
Â
* @param \WC_Product[] $products array of product objects
|
58 |
-
* @param bool
|
59 |
Â
*/
|
60 |
Â
private static function set_sync_for_products( array $products, $enabled ) {
|
61 |
Â
|
62 |
-
self::$products_sync_enabled =
|
63 |
Â
|
64 |
Â
$enabled = wc_bool_to_string( $enabled );
|
65 |
Â
|
@@ -79,14 +102,13 @@ class Products {
|
|
79 |
Â
$product_variation->save_meta_data();
|
80 |
Â
}
|
81 |
Â
}
|
82 |
-
|
83 |
Â
} else {
|
84 |
Â
|
85 |
Â
$product->update_meta_data( self::SYNC_ENABLED_META_KEY, $enabled );
|
86 |
Â
$product->save_meta_data();
|
87 |
Â
}
|
88 |
-
}
|
89 |
-
}
|
90 |
Â
}
|
91 |
Â
|
92 |
Â
|
@@ -128,35 +150,42 @@ class Products {
|
|
128 |
Â
*/
|
129 |
Â
public static function disable_sync_for_products_with_terms( array $args ) {
|
130 |
Â
|
131 |
-
$args = wp_parse_args(
|
132 |
-
|
133 |
-
|
134 |
-
|
Â
|
|
Â
|
|
Â
|
|
135 |
Â
|
136 |
-
$products =
|
137 |
Â
|
138 |
Â
// get all products belonging to the given terms
|
139 |
Â
if ( is_array( $args['include'] ) && ! empty( $args['include'] ) ) {
|
140 |
Â
|
141 |
-
$terms = get_terms(
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
Â
|
|
Â
|
|
146 |
Â
|
147 |
Â
if ( ! is_wp_error( $terms ) && ! empty( $terms ) ) {
|
148 |
Â
|
149 |
Â
$taxonomy = $args['taxonomy'] === 'product_tag' ? 'tag' : 'category';
|
150 |
Â
|
151 |
-
$products = wc_get_products(
|
152 |
-
|
153 |
-
|
154 |
-
|
Â
|
|
Â
|
|
155 |
Â
}
|
156 |
-
}
|
157 |
Â
|
158 |
Â
if ( ! empty( $products ) ) {
|
159 |
-
|
160 |
Â
}
|
161 |
Â
}
|
162 |
Â
|
@@ -181,6 +210,7 @@ class Products {
|
|
181 |
Â
* Determines whether the given product should be synced assuming the product is published.
|
182 |
Â
*
|
183 |
Â
* If a product is enabled for sync, but belongs to an excluded term, it will return as excluded from sync:
|
Â
|
|
184 |
Â
* @see Products::is_sync_enabled_for_product()
|
185 |
Â
* @see Products::is_sync_excluded_for_product_terms()
|
186 |
Â
*
|
@@ -201,12 +231,12 @@ class Products {
|
|
201 |
Â
}
|
202 |
Â
|
203 |
Â
// allow simple or variable products (and their variations) with zero or empty price - exclude other product types with zero or empty price
|
204 |
-
if ( $should_sync && ( ! $terms_product || ( ! self::get_product_price( $product ) && ! in_array( $terms_product->get_type(),
|
205 |
Â
$should_sync = false;
|
206 |
Â
}
|
207 |
Â
|
208 |
Â
// exclude products that are excluded from the store catalog or from search results
|
209 |
-
if ( $should_sync && ( ! $terms_product || has_term(
|
210 |
Â
$should_sync = false;
|
211 |
Â
}
|
212 |
Â
|
@@ -265,14 +295,13 @@ class Products {
|
|
265 |
Â
break;
|
266 |
Â
}
|
267 |
Â
}
|
268 |
-
|
269 |
Â
} else {
|
270 |
Â
|
271 |
Â
$enabled = 'no' !== $product->get_meta( self::SYNC_ENABLED_META_KEY );
|
272 |
Â
}
|
273 |
Â
|
274 |
Â
self::$products_sync_enabled[ $product->get_id() ] = $enabled;
|
275 |
-
}
|
276 |
Â
|
277 |
Â
return self::$products_sync_enabled[ $product->get_id() ];
|
278 |
Â
}
|
@@ -292,15 +321,15 @@ class Products {
|
|
292 |
Â
$excluded_categories = $integration->get_excluded_product_category_ids();
|
293 |
Â
$excluded_tags = $integration->get_excluded_product_tag_ids();
|
294 |
Â
} else {
|
295 |
-
$excluded_categories = $excluded_tags =
|
296 |
Â
}
|
297 |
Â
|
298 |
Â
$categories = $product->get_category_ids();
|
299 |
Â
$tags = $product->get_tag_ids();
|
300 |
Â
|
301 |
Â
// returns true if no terms on the product, or no terms excluded, or if the product does not contain any of the excluded terms
|
302 |
-
$matches =
|
303 |
-
|
304 |
Â
|
305 |
Â
return ! $matches;
|
306 |
Â
}
|
@@ -312,7 +341,7 @@ class Products {
|
|
312 |
Â
* @since 1.10.0
|
313 |
Â
*
|
314 |
Â
* @param \WC_Product $product product object
|
315 |
-
* @param bool
|
316 |
Â
* @return bool success
|
317 |
Â
*/
|
318 |
Â
public static function set_product_visibility( \WC_Product $product, $visibility ) {
|
@@ -360,7 +389,6 @@ class Products {
|
|
360 |
Â
break;
|
361 |
Â
}
|
362 |
Â
}
|
363 |
-
|
364 |
Â
} elseif ( $meta = $product->get_meta( self::VISIBILITY_META_KEY ) ) {
|
365 |
Â
|
366 |
Â
$is_visible = wc_string_to_bool( $product->get_meta( self::VISIBILITY_META_KEY ) );
|
@@ -368,10 +396,10 @@ class Products {
|
|
368 |
Â
} else {
|
369 |
Â
|
370 |
Â
$is_visible = true;
|
371 |
-
}
|
372 |
Â
|
373 |
Â
self::$products_visibility[ $product->get_id() ] = $is_visible;
|
374 |
-
}
|
375 |
Â
|
376 |
Â
return self::$products_visibility[ $product->get_id() ];
|
377 |
Â
}
|
@@ -385,7 +413,7 @@ class Products {
|
|
385 |
Â
*
|
386 |
Â
* @since 2.0.0-dev.1
|
387 |
Â
*
|
388 |
-
* @param int
|
389 |
Â
* @param \WC_Product $product product object
|
390 |
Â
* @return int
|
391 |
Â
*/
|
@@ -411,7 +439,7 @@ class Products {
|
|
411 |
Â
|
412 |
Â
} else {
|
413 |
Â
|
414 |
-
$price = wc_get_price_to_display( $product,
|
415 |
Â
}
|
416 |
Â
|
417 |
Â
$price = (int) ( $price ? round( $price * 100 ) : 0 );
|
@@ -429,4 +457,845 @@ class Products {
|
|
429 |
Â
}
|
430 |
Â
|
431 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
432 |
Â
}
|
10 |
Â
|
11 |
Â
namespace SkyVerge\WooCommerce\Facebook;
|
12 |
Â
|
13 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4\SV_WC_Plugin_Exception;
|
14 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
15 |
Â
use WC_Facebook_Product;
|
16 |
Â
|
17 |
Â
defined( 'ABSPATH' ) or exit;
|
43 |
Â
/** @var string product image source option to use the parent product image in Facebook */
|
44 |
Â
const PRODUCT_IMAGE_SOURCE_CUSTOM = 'custom';
|
45 |
Â
|
46 |
+
/** @var string the meta key used to flag if Commerce is enabled for the product */
|
47 |
+
const COMMERCE_ENABLED_META_KEY = '_wc_facebook_commerce_enabled';
|
48 |
+
|
49 |
+
/** @var string the meta key used to store the Google product category ID for the product */
|
50 |
+
const GOOGLE_PRODUCT_CATEGORY_META_KEY = '_wc_facebook_google_product_category';
|
51 |
+
|
52 |
+
/** @var string the meta key prefix used to store the Enhanced Catalog Attributes for the product */
|
53 |
+
const ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX = '_wc_facebook_enhanced_catalog_attributes_';
|
54 |
+
|
55 |
+
/** @var string the meta key used to store the product gender */
|
56 |
+
const GENDER_META_KEY = '_wc_facebook_gender';
|
57 |
+
|
58 |
+
/** @var string the meta key used to store the name of the color attribute for a product */
|
59 |
+
const COLOR_ATTRIBUTE_META_KEY = '_wc_facebook_color_attribute';
|
60 |
+
|
61 |
+
/** @var string the meta key used to store the name of the size attribute for a product */
|
62 |
+
const SIZE_ATTRIBUTE_META_KEY = '_wc_facebook_size_attribute';
|
63 |
+
|
64 |
+
/** @var string the meta key used to store the name of the pattern attribute for a product */
|
65 |
+
const PATTERN_ATTRIBUTE_META_KEY = '_wc_facebook_pattern_attribute';
|
66 |
+
|
67 |
Â
|
68 |
Â
/** @var array memoized array of sync enabled status for products */
|
69 |
+
private static $products_sync_enabled = array();
|
70 |
Â
|
71 |
Â
/** @var array memoized array of visibility status for products */
|
72 |
+
private static $products_visibility = array();
|
73 |
Â
|
74 |
Â
|
75 |
Â
/**
|
78 |
Â
* @since 1.10.0
|
79 |
Â
*
|
80 |
Â
* @param \WC_Product[] $products array of product objects
|
81 |
+
* @param bool $enabled whether sync should be enabled for $products
|
82 |
Â
*/
|
83 |
Â
private static function set_sync_for_products( array $products, $enabled ) {
|
84 |
Â
|
85 |
+
self::$products_sync_enabled = array();
|
86 |
Â
|
87 |
Â
$enabled = wc_bool_to_string( $enabled );
|
88 |
Â
|
102 |
Â
$product_variation->save_meta_data();
|
103 |
Â
}
|
104 |
Â
}
|
Â
|
|
105 |
Â
} else {
|
106 |
Â
|
107 |
Â
$product->update_meta_data( self::SYNC_ENABLED_META_KEY, $enabled );
|
108 |
Â
$product->save_meta_data();
|
109 |
Â
}
|
110 |
+
}//end if
|
111 |
+
}//end foreach
|
112 |
Â
}
|
113 |
Â
|
114 |
Â
|
150 |
Â
*/
|
151 |
Â
public static function disable_sync_for_products_with_terms( array $args ) {
|
152 |
Â
|
153 |
+
$args = wp_parse_args(
|
154 |
+
$args,
|
155 |
+
array(
|
156 |
+
'taxonomy' => 'product_cat',
|
157 |
+
'include' => array(),
|
158 |
+
)
|
159 |
+
);
|
160 |
Â
|
161 |
+
$products = array();
|
162 |
Â
|
163 |
Â
// get all products belonging to the given terms
|
164 |
Â
if ( is_array( $args['include'] ) && ! empty( $args['include'] ) ) {
|
165 |
Â
|
166 |
+
$terms = get_terms(
|
167 |
+
array(
|
168 |
+
'taxonomy' => $args['taxonomy'],
|
169 |
+
'fields' => 'slugs',
|
170 |
+
'include' => array_map( 'intval', $args['include'] ),
|
171 |
+
)
|
172 |
+
);
|
173 |
Â
|
174 |
Â
if ( ! is_wp_error( $terms ) && ! empty( $terms ) ) {
|
175 |
Â
|
176 |
Â
$taxonomy = $args['taxonomy'] === 'product_tag' ? 'tag' : 'category';
|
177 |
Â
|
178 |
+
$products = wc_get_products(
|
179 |
+
array(
|
180 |
+
$taxonomy => $terms,
|
181 |
+
'limit' => -1,
|
182 |
+
)
|
183 |
+
);
|
184 |
Â
}
|
185 |
+
}//end if
|
186 |
Â
|
187 |
Â
if ( ! empty( $products ) ) {
|
188 |
+
self::disable_sync_for_products( $products );
|
189 |
Â
}
|
190 |
Â
}
|
191 |
Â
|
210 |
Â
* Determines whether the given product should be synced assuming the product is published.
|
211 |
Â
*
|
212 |
Â
* If a product is enabled for sync, but belongs to an excluded term, it will return as excluded from sync:
|
213 |
+
*
|
214 |
Â
* @see Products::is_sync_enabled_for_product()
|
215 |
Â
* @see Products::is_sync_excluded_for_product_terms()
|
216 |
Â
*
|
231 |
Â
}
|
232 |
Â
|
233 |
Â
// allow simple or variable products (and their variations) with zero or empty price - exclude other product types with zero or empty price
|
234 |
+
if ( $should_sync && ( ! $terms_product || ( ! self::get_product_price( $product ) && ! in_array( $terms_product->get_type(), array( 'simple', 'variable' ) ) ) ) ) {
|
235 |
Â
$should_sync = false;
|
236 |
Â
}
|
237 |
Â
|
238 |
Â
// exclude products that are excluded from the store catalog or from search results
|
239 |
+
if ( $should_sync && ( ! $terms_product || has_term( array( 'exclude-from-catalog', 'exclude-from-search' ), 'product_visibility', $terms_product->get_id() ) ) ) {
|
240 |
Â
$should_sync = false;
|
241 |
Â
}
|
242 |
Â
|
295 |
Â
break;
|
296 |
Â
}
|
297 |
Â
}
|
Â
|
|
298 |
Â
} else {
|
299 |
Â
|
300 |
Â
$enabled = 'no' !== $product->get_meta( self::SYNC_ENABLED_META_KEY );
|
301 |
Â
}
|
302 |
Â
|
303 |
Â
self::$products_sync_enabled[ $product->get_id() ] = $enabled;
|
304 |
+
}//end if
|
305 |
Â
|
306 |
Â
return self::$products_sync_enabled[ $product->get_id() ];
|
307 |
Â
}
|
321 |
Â
$excluded_categories = $integration->get_excluded_product_category_ids();
|
322 |
Â
$excluded_tags = $integration->get_excluded_product_tag_ids();
|
323 |
Â
} else {
|
324 |
+
$excluded_categories = $excluded_tags = array();
|
325 |
Â
}
|
326 |
Â
|
327 |
Â
$categories = $product->get_category_ids();
|
328 |
Â
$tags = $product->get_tag_ids();
|
329 |
Â
|
330 |
Â
// returns true if no terms on the product, or no terms excluded, or if the product does not contain any of the excluded terms
|
331 |
+
$matches = ( ! $categories || ! $excluded_categories || ! array_intersect( $categories, $excluded_categories ) )
|
332 |
+
&& ( ! $tags || ! $excluded_tags || ! array_intersect( $tags, $excluded_tags ) );
|
333 |
Â
|
334 |
Â
return ! $matches;
|
335 |
Â
}
|
341 |
Â
* @since 1.10.0
|
342 |
Â
*
|
343 |
Â
* @param \WC_Product $product product object
|
344 |
+
* @param bool $visibility true for 'published' or false for 'staging'
|
345 |
Â
* @return bool success
|
346 |
Â
*/
|
347 |
Â
public static function set_product_visibility( \WC_Product $product, $visibility ) {
|
389 |
Â
break;
|
390 |
Â
}
|
391 |
Â
}
|
Â
|
|
392 |
Â
} elseif ( $meta = $product->get_meta( self::VISIBILITY_META_KEY ) ) {
|
393 |
Â
|
394 |
Â
$is_visible = wc_string_to_bool( $product->get_meta( self::VISIBILITY_META_KEY ) );
|
396 |
Â
} else {
|
397 |
Â
|
398 |
Â
$is_visible = true;
|
399 |
+
}//end if
|
400 |
Â
|
401 |
Â
self::$products_visibility[ $product->get_id() ] = $is_visible;
|
402 |
+
}//end if
|
403 |
Â
|
404 |
Â
return self::$products_visibility[ $product->get_id() ];
|
405 |
Â
}
|
413 |
Â
*
|
414 |
Â
* @since 2.0.0-dev.1
|
415 |
Â
*
|
416 |
+
* @param int $price product price in cents
|
417 |
Â
* @param \WC_Product $product product object
|
418 |
Â
* @return int
|
419 |
Â
*/
|
439 |
Â
|
440 |
Â
} else {
|
441 |
Â
|
442 |
+
$price = wc_get_price_to_display( $product, array( 'price' => $product->get_regular_price() ) );
|
443 |
Â
}
|
444 |
Â
|
445 |
Â
$price = (int) ( $price ? round( $price * 100 ) : 0 );
|
457 |
Â
}
|
458 |
Â
|
459 |
Â
|
460 |
+
/**
|
461 |
+
* Determines whether the product meets all of the criteria needed for Commerce.
|
462 |
+
*
|
463 |
+
* @since 2.1.0
|
464 |
+
*
|
465 |
+
* @param \WC_Product $product the product object
|
466 |
+
*/
|
467 |
+
public static function is_product_ready_for_commerce( \WC_Product $product ) {
|
468 |
+
|
469 |
+
return $product->managing_stock()
|
470 |
+
&& self::get_product_price( $product )
|
471 |
+
&& self::is_commerce_enabled_for_product( $product )
|
472 |
+
&& self::product_should_be_synced( $product );
|
473 |
+
}
|
474 |
+
|
475 |
+
|
476 |
+
/**
|
477 |
+
* Determines whether Commerce is enabled for the product.
|
478 |
+
*
|
479 |
+
* @since 2.1.0
|
480 |
+
*
|
481 |
+
* @param \WC_Product $product the product object
|
482 |
+
* @return bool
|
483 |
+
*/
|
484 |
+
public static function is_commerce_enabled_for_product( \WC_Product $product ) {
|
485 |
+
|
486 |
+
if ( $product->is_type( 'variation' ) ) {
|
487 |
+
$product = wc_get_product( $product->get_parent_id() );
|
488 |
+
}
|
489 |
+
|
490 |
+
return $product instanceof \WC_Product && wc_string_to_bool( $product->get_meta( self::COMMERCE_ENABLED_META_KEY ) );
|
491 |
+
}
|
492 |
+
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Enables or disables Commerce for a product.
|
496 |
+
*
|
497 |
+
* @since 2.1.0
|
498 |
+
*
|
499 |
+
* @param \WC_Product $product the product object
|
500 |
+
* @param bool $is_enabled whether or not Commerce is to be enabled
|
501 |
+
*/
|
502 |
+
public static function update_commerce_enabled_for_product( \WC_Product $product, $is_enabled ) {
|
503 |
+
|
504 |
+
$product->update_meta_data( self::COMMERCE_ENABLED_META_KEY, wc_bool_to_string( $is_enabled ) );
|
505 |
+
$product->save_meta_data();
|
506 |
+
}
|
507 |
+
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Gets the Google product category ID stored for the product.
|
511 |
+
*
|
512 |
+
* If the product is a variation, it will get this value from its parent.
|
513 |
+
*
|
514 |
+
* @since 2.1.0
|
515 |
+
*
|
516 |
+
* @param \WC_Product $product the product object
|
517 |
+
* @return string
|
518 |
+
*/
|
519 |
+
public static function get_google_product_category_id( \WC_Product $product ) {
|
520 |
+
|
521 |
+
// attempt to get from product or parent product metadata
|
522 |
+
if ( $product->is_type( 'variation' ) ) {
|
523 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
524 |
+
$google_product_category_id = $parent_product instanceof \WC_Product ? $parent_product->get_meta( self::GOOGLE_PRODUCT_CATEGORY_META_KEY ) : null;
|
525 |
+
} else {
|
526 |
+
$google_product_category_id = $product->get_meta( self::GOOGLE_PRODUCT_CATEGORY_META_KEY );
|
527 |
+
}
|
528 |
+
|
529 |
+
// fallback to the highest category's Google product category ID
|
530 |
+
if ( empty( $google_product_category_id ) ) {
|
531 |
+
|
532 |
+
$google_product_category_id = self::get_google_product_category_id_from_highest_category( $product );
|
533 |
+
}
|
534 |
+
|
535 |
+
// fallback to plugin-level default Google product category ID
|
536 |
+
if ( empty( $google_product_category_id ) ) {
|
537 |
+
|
538 |
+
$google_product_category_id = facebook_for_woocommerce()->get_commerce_handler()->get_default_google_product_category_id();
|
539 |
+
}
|
540 |
+
|
541 |
+
return $google_product_category_id;
|
542 |
+
}
|
543 |
+
|
544 |
+
|
545 |
+
/**
|
546 |
+
* Gets the stored Google product category ID from the highest category.
|
547 |
+
*
|
548 |
+
* @since 2.1.0
|
549 |
+
*
|
550 |
+
* @param \WC_Product $product the product object
|
551 |
+
* @return string
|
552 |
+
*/
|
553 |
+
private static function get_google_product_category_id_from_highest_category( \WC_Product $product ) {
|
554 |
+
|
555 |
+
$google_product_category_id = '';
|
556 |
+
|
557 |
+
// get all categories for the product
|
558 |
+
if ( $product->is_type( 'variation' ) ) {
|
559 |
+
|
560 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
561 |
+
$categories = $parent_product instanceof \WC_Product ? get_the_terms( $parent_product->get_id(), 'product_cat' ) : array();
|
562 |
+
|
563 |
+
} else {
|
564 |
+
|
565 |
+
$categories = get_the_terms( $product->get_id(), 'product_cat' );
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( ! is_array( $categories ) ) {
|
569 |
+
return $google_product_category_id;
|
570 |
+
}
|
571 |
+
|
572 |
+
$categories_per_level = array();
|
573 |
+
|
574 |
+
if ( empty( $categories ) ) {
|
575 |
+
return $categories_per_level;
|
576 |
+
}
|
577 |
+
|
578 |
+
// determine the level (depth) of each category
|
579 |
+
foreach ( $categories as $category ) {
|
580 |
+
|
581 |
+
$level = 0;
|
582 |
+
$parent_category = $category;
|
583 |
+
|
584 |
+
while ( $parent_category->parent !== 0 ) {
|
585 |
+
$parent_category = get_term( $parent_category->parent, 'product_cat' );
|
586 |
+
$level ++;
|
587 |
+
}
|
588 |
+
|
589 |
+
if ( empty( $categories_per_level[ $level ] ) ) {
|
590 |
+
$categories_per_level[ $level ] = array();
|
591 |
+
}
|
592 |
+
|
593 |
+
$categories_per_level[ $level ][] = $category;
|
594 |
+
}
|
595 |
+
|
596 |
+
// sort descending by level
|
597 |
+
krsort( $categories_per_level );
|
598 |
+
|
599 |
+
// remove categories without a Google product category
|
600 |
+
foreach ( $categories_per_level as $level => $categories ) {
|
601 |
+
|
602 |
+
foreach ( $categories as $key => $category ) {
|
603 |
+
|
604 |
+
$google_product_category_id = Product_Categories::get_google_product_category_id( $category->term_id );
|
605 |
+
if ( empty( $google_product_category_id ) ) {
|
606 |
+
unset( $categories_per_level[ $level ][ $key ] );
|
607 |
+
}
|
608 |
+
}
|
609 |
+
|
610 |
+
if ( empty( $categories_per_level[ $level ] ) ) {
|
611 |
+
unset( $categories_per_level[ $level ] );
|
612 |
+
}
|
613 |
+
}
|
614 |
+
|
615 |
+
if ( ! empty( $categories_per_level ) ) {
|
616 |
+
|
617 |
+
// get highest level categories
|
618 |
+
$categories = current( $categories_per_level );
|
619 |
+
|
620 |
+
$google_product_category_id = '';
|
621 |
+
|
622 |
+
foreach ( $categories as $category ) {
|
623 |
+
|
624 |
+
$category_google_product_category_id = Product_Categories::get_google_product_category_id( $category->term_id );
|
625 |
+
|
626 |
+
if ( empty( $google_product_category_id && ! empty( $category_google_product_category_id ) ) ) {
|
627 |
+
|
628 |
+
$google_product_category_id = $category_google_product_category_id;
|
629 |
+
|
630 |
+
} elseif ( $google_product_category_id !== $category_google_product_category_id ) {
|
631 |
+
|
632 |
+
// conflicting Google product category IDs, discard them
|
633 |
+
$google_product_category_id = '';
|
634 |
+
}
|
635 |
+
}
|
636 |
+
}//end if
|
637 |
+
|
638 |
+
return $google_product_category_id;
|
639 |
+
}
|
640 |
+
|
641 |
+
/**
|
642 |
+
* Gets an ordered list of the categories for the product organised by level.
|
643 |
+
*
|
644 |
+
* @param \WC_Product $product the product object.
|
645 |
+
* @return string
|
646 |
+
*/
|
647 |
+
private static function get_ordered_categories_for_product( \WC_Product $product ) {
|
648 |
+
// get all categories for the product
|
649 |
+
if ( $product->is_type( 'variation' ) ) {
|
650 |
+
|
651 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
652 |
+
$categories = $parent_product instanceof \WC_Product ? get_the_terms( $parent_product->get_id(), 'product_cat' ) : array();
|
653 |
+
|
654 |
+
} else {
|
655 |
+
|
656 |
+
$categories = get_the_terms( $product->get_id(), 'product_cat' );
|
657 |
+
}
|
658 |
+
|
659 |
+
if ( empty( $categories ) ) {
|
660 |
+
return array();
|
661 |
+
}
|
662 |
+
|
663 |
+
$categories_per_level = array();
|
664 |
+
|
665 |
+
// determine the level (depth) of each category
|
666 |
+
foreach ( $categories as $category ) {
|
667 |
+
|
668 |
+
$level = 0;
|
669 |
+
$parent_category = $category;
|
670 |
+
|
671 |
+
while ( $parent_category->parent !== 0 ) {
|
672 |
+
$parent_category = get_term( $parent_category->parent, 'product_cat' );
|
673 |
+
$level ++;
|
674 |
+
}
|
675 |
+
|
676 |
+
if ( empty( $categories_per_level[ $level ] ) ) {
|
677 |
+
$categories_per_level[ $level ] = array();
|
678 |
+
}
|
679 |
+
|
680 |
+
$categories_per_level[ $level ][] = $category;
|
681 |
+
}
|
682 |
+
|
683 |
+
// sort descending by level
|
684 |
+
krsort( $categories_per_level );
|
685 |
+
return $categories_per_level;
|
686 |
+
}
|
687 |
+
|
688 |
+
/**
|
689 |
+
* Gets the first unconflicted value for a meta key from the categories a
|
690 |
+
* product belongs to. This does the same job as the above google category
|
691 |
+
* code but (I think) in a slightly simpler form, not going to change
|
692 |
+
* the google category one just yet until I've got unit tests doing what
|
693 |
+
* I want. TODO: refactor the get_google_product_category_id_from_highest_category
|
694 |
+
* function to use this.
|
695 |
+
*
|
696 |
+
* @param \WC_Product $product the product object.
|
697 |
+
* @param string $meta_key the meta key we're looking for.
|
698 |
+
* @return string
|
699 |
+
*/
|
700 |
+
private static function get_meta_value_from_categories_for_product( \WC_Product $product, $meta_key ) {
|
701 |
+
$categories_per_level = self::get_ordered_categories_for_product( $product );
|
702 |
+
// The plan is to find the first level with a value for the meta key
|
703 |
+
// Then we need to check the rest of this level and if there's a conflict
|
704 |
+
// continue to the next level up.
|
705 |
+
|
706 |
+
// We're looking fdr the first non-conflicted level basically
|
707 |
+
$meta_value = null;
|
708 |
+
foreach ( $categories_per_level as $level => $categories ) {
|
709 |
+
foreach ( $categories as $category ) {
|
710 |
+
$category_meta_value = get_term_meta( $category->term_id, $meta_key, true );
|
711 |
+
if ( empty( $category_meta_value ) ) {
|
712 |
+
// No value here, move on
|
713 |
+
continue;
|
714 |
+
}
|
715 |
+
if ( empty( $meta_value ) ) {
|
716 |
+
// We've found a value for this level and there's no conflict as it's
|
717 |
+
// the first one we've found on this level.
|
718 |
+
$meta_value = $category_meta_value;
|
719 |
+
} elseif ( $meta_value !== $category_meta_value ) {
|
720 |
+
// conflict we need to jump out of this loop and go to the next level
|
721 |
+
$meta_value = null;
|
722 |
+
break;
|
723 |
+
}
|
724 |
+
}
|
725 |
+
if ( ! empty( $meta_value ) ) {
|
726 |
+
// We have an unconflicted value, we can use it so break out of the
|
727 |
+
// level loop
|
728 |
+
break;
|
729 |
+
}
|
730 |
+
}//end foreach
|
731 |
+
return $meta_value;
|
732 |
+
}
|
733 |
+
|
734 |
+
|
735 |
+
/**
|
736 |
+
* Updates the stored Google product category ID for the product.
|
737 |
+
*
|
738 |
+
* @since 2.1.0
|
739 |
+
*
|
740 |
+
* @param \WC_Product $product the product object
|
741 |
+
* @param string $category_id the Google product category ID
|
742 |
+
*/
|
743 |
+
public static function update_google_product_category_id( \WC_Product $product, $category_id ) {
|
744 |
+
|
745 |
+
$product->update_meta_data( self::GOOGLE_PRODUCT_CATEGORY_META_KEY, $category_id );
|
746 |
+
$product->save_meta_data();
|
747 |
+
}
|
748 |
+
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Gets the stored gender for the product (`female`, `male`, or `unisex`).
|
752 |
+
*
|
753 |
+
* Defaults to `unisex` if not otherwise set.
|
754 |
+
*
|
755 |
+
* If the product is a variation, it will get this value from its parent.
|
756 |
+
*
|
757 |
+
* @since 2.1.0
|
758 |
+
*
|
759 |
+
* @param \WC_Product $product the product object
|
760 |
+
* @return string
|
761 |
+
*/
|
762 |
+
public static function get_product_gender( \WC_Product $product ) {
|
763 |
+
|
764 |
+
if ( $product->is_type( 'variation' ) ) {
|
765 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
766 |
+
$gender = $parent_product instanceof \WC_Product ? $parent_product->get_meta( self::GENDER_META_KEY ) : null;
|
767 |
+
} else {
|
768 |
+
$gender = $product->get_meta( self::GENDER_META_KEY );
|
769 |
+
}
|
770 |
+
|
771 |
+
if ( ! in_array( $gender, array( 'female', 'male', 'unisex' ) ) ) {
|
772 |
+
$gender = 'unisex';
|
773 |
+
}
|
774 |
+
|
775 |
+
return $gender;
|
776 |
+
}
|
777 |
+
|
778 |
+
|
779 |
+
/**
|
780 |
+
* Updates the stored gender for the product.
|
781 |
+
*
|
782 |
+
* @since 2.1.0
|
783 |
+
*
|
784 |
+
* @param \WC_Product $product the product object
|
785 |
+
* @param string $gender the gender (`female`, `male`, or `unisex`)
|
786 |
+
*/
|
787 |
+
public static function update_product_gender( \WC_Product $product, $gender ) {
|
788 |
+
|
789 |
+
$product->update_meta_data( self::GENDER_META_KEY, $gender );
|
790 |
+
$product->save_meta_data();
|
791 |
+
}
|
792 |
+
|
793 |
+
|
794 |
+
/**
|
795 |
+
* Gets the configured color attribute.
|
796 |
+
*
|
797 |
+
* @since 2.1.0
|
798 |
+
*
|
799 |
+
* @param \WC_Product $product the product object
|
800 |
+
* @return string
|
801 |
+
*/
|
802 |
+
public static function get_product_color_attribute( \WC_Product $product ) {
|
803 |
+
|
804 |
+
if ( $product->is_type( 'variation' ) ) {
|
805 |
+
|
806 |
+
// get the attribute from the parent
|
807 |
+
$product = wc_get_product( $product->get_parent_id() );
|
808 |
+
}
|
809 |
+
|
810 |
+
$attribute_name = '';
|
811 |
+
|
812 |
+
if ( $product ) {
|
813 |
+
|
814 |
+
$meta_value = $product->get_meta( self::COLOR_ATTRIBUTE_META_KEY );
|
815 |
+
|
816 |
+
// check if an attribute with that name exists
|
817 |
+
if ( self::product_has_attribute( $product, $meta_value ) ) {
|
818 |
+
$attribute_name = $meta_value;
|
819 |
+
}
|
820 |
+
|
821 |
+
if ( empty( $attribute_name ) ) {
|
822 |
+
// try to find a matching attribute
|
823 |
+
foreach ( self::get_available_product_attributes( $product ) as $slug => $attribute ) {
|
824 |
+
|
825 |
+
if ( stripos( $attribute->get_name(), 'color' ) !== false || stripos( $attribute->get_name(), 'colour' ) !== false ) {
|
826 |
+
$attribute_name = $slug;
|
827 |
+
break;
|
828 |
+
}
|
829 |
+
}
|
830 |
+
}
|
831 |
+
}
|
832 |
+
|
833 |
+
return $attribute_name;
|
834 |
+
}
|
835 |
+
|
836 |
+
/**
|
837 |
+
* Updates the configured color attribute.
|
838 |
+
*
|
839 |
+
* @since 2.1.0
|
840 |
+
*
|
841 |
+
* @param \WC_Product $product the product object
|
842 |
+
* @param string $attribute_name the attribute to be used to store the color
|
843 |
+
* @throws SV_WC_Plugin_Exception
|
844 |
+
*/
|
845 |
+
public static function update_product_color_attribute( \WC_Product $product, $attribute_name ) {
|
846 |
+
|
847 |
+
// check if the name matches an available attribute
|
848 |
+
if ( ! empty( $attribute_name ) && ! self::product_has_attribute( $product, $attribute_name ) ) {
|
849 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute name $attribute_name does not match any of the available attributes for the product {$product->get_name()}" );
|
850 |
+
}
|
851 |
+
|
852 |
+
if ( $attribute_name !== self::get_product_color_attribute( $product ) && in_array( $attribute_name, self::get_distinct_product_attributes( $product ) ) ) {
|
853 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute $attribute_name is already used for the product {$product->get_name()}" );
|
854 |
+
}
|
855 |
+
|
856 |
+
$product->update_meta_data( self::COLOR_ATTRIBUTE_META_KEY, $attribute_name );
|
857 |
+
$product->save_meta_data();
|
858 |
+
}
|
859 |
+
|
860 |
+
|
861 |
+
/**
|
862 |
+
* Gets the stored color for a product.
|
863 |
+
*
|
864 |
+
* If the product is a variation and it doesn't have the color attribute, falls back to the parent.
|
865 |
+
*
|
866 |
+
* @since 2.1.0
|
867 |
+
*
|
868 |
+
* @param \WC_Product $product the product object
|
869 |
+
* @return string
|
870 |
+
*/
|
871 |
+
public static function get_product_color( \WC_Product $product ) {
|
872 |
+
|
873 |
+
$color_value = '';
|
874 |
+
$color_attribute = self::get_product_color_attribute( $product );
|
875 |
+
|
876 |
+
if ( ! empty( $color_attribute ) ) {
|
877 |
+
$color_value = $product->get_attribute( $color_attribute );
|
878 |
+
}
|
879 |
+
|
880 |
+
if ( empty( $color_value ) && $product->is_type( 'variation' ) ) {
|
881 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
882 |
+
$color_value = $parent_product instanceof \WC_Product ? self::get_product_color( $parent_product ) : '';
|
883 |
+
}
|
884 |
+
|
885 |
+
return $color_value;
|
886 |
+
}
|
887 |
+
|
888 |
+
|
889 |
+
/**
|
890 |
+
* Gets the configured size attribute.
|
891 |
+
*
|
892 |
+
* @since 2.1.0
|
893 |
+
*
|
894 |
+
* @param \WC_Product $product the product object
|
895 |
+
* @return string
|
896 |
+
*/
|
897 |
+
public static function get_product_size_attribute( \WC_Product $product ) {
|
898 |
+
|
899 |
+
if ( $product->is_type( 'variation' ) ) {
|
900 |
+
|
901 |
+
// get the attribute from the parent
|
902 |
+
$product = wc_get_product( $product->get_parent_id() );
|
903 |
+
}
|
904 |
+
|
905 |
+
$attribute_name = '';
|
906 |
+
|
907 |
+
if ( $product ) {
|
908 |
+
|
909 |
+
$meta_value = $product->get_meta( self::SIZE_ATTRIBUTE_META_KEY );
|
910 |
+
|
911 |
+
// check if an attribute with that name exists
|
912 |
+
if ( self::product_has_attribute( $product, $meta_value ) ) {
|
913 |
+
$attribute_name = $meta_value;
|
914 |
+
}
|
915 |
+
|
916 |
+
if ( empty( $attribute_name ) ) {
|
917 |
+
// try to find a matching attribute
|
918 |
+
foreach ( self::get_available_product_attributes( $product ) as $slug => $attribute ) {
|
919 |
+
|
920 |
+
if ( stripos( $attribute->get_name(), 'size' ) !== false ) {
|
921 |
+
$attribute_name = $slug;
|
922 |
+
break;
|
923 |
+
}
|
924 |
+
}
|
925 |
+
}
|
926 |
+
}
|
927 |
+
|
928 |
+
return $attribute_name;
|
929 |
+
}
|
930 |
+
|
931 |
+
|
932 |
+
/**
|
933 |
+
* Updates the configured size attribute.
|
934 |
+
*
|
935 |
+
* @since 2.1.0
|
936 |
+
*
|
937 |
+
* @param \WC_Product $product the product object
|
938 |
+
* @param string $attribute_name the attribute to be used to store the size
|
939 |
+
* @throws SV_WC_Plugin_Exception
|
940 |
+
*/
|
941 |
+
public static function update_product_size_attribute( \WC_Product $product, $attribute_name ) {
|
942 |
+
|
943 |
+
// check if the name matches an available attribute
|
944 |
+
if ( ! empty( $attribute_name ) && ! self::product_has_attribute( $product, $attribute_name ) ) {
|
945 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute name $attribute_name does not match any of the available attributes for the product {$product->get_name()}" );
|
946 |
+
}
|
947 |
+
|
948 |
+
if ( $attribute_name !== self::get_product_size_attribute( $product ) && in_array( $attribute_name, self::get_distinct_product_attributes( $product ) ) ) {
|
949 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute $attribute_name is already used for the product {$product->get_name()}" );
|
950 |
+
}
|
951 |
+
|
952 |
+
$product->update_meta_data( self::SIZE_ATTRIBUTE_META_KEY, $attribute_name );
|
953 |
+
$product->save_meta_data();
|
954 |
+
}
|
955 |
+
|
956 |
+
|
957 |
+
/**
|
958 |
+
* Gets the stored size for a product.
|
959 |
+
*
|
960 |
+
* If the product is a variation and it doesn't have the size attribute, falls back to the parent.
|
961 |
+
*
|
962 |
+
* @since 2.1.0
|
963 |
+
*
|
964 |
+
* @param \WC_Product $product the product object
|
965 |
+
* @return string
|
966 |
+
*/
|
967 |
+
public static function get_product_size( \WC_Product $product ) {
|
968 |
+
|
969 |
+
$size_value = '';
|
970 |
+
$size_attribute = self::get_product_size_attribute( $product );
|
971 |
+
|
972 |
+
if ( ! empty( $size_attribute ) ) {
|
973 |
+
$size_value = $product->get_attribute( $size_attribute );
|
974 |
+
}
|
975 |
+
|
976 |
+
if ( empty( $size_value ) && $product->is_type( 'variation' ) ) {
|
977 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
978 |
+
$size_value = $parent_product instanceof \WC_Product ? self::get_product_size( $parent_product ) : '';
|
979 |
+
}
|
980 |
+
|
981 |
+
return $size_value;
|
982 |
+
}
|
983 |
+
|
984 |
+
|
985 |
+
/**
|
986 |
+
* Gets the configured pattern attribute.
|
987 |
+
*
|
988 |
+
* @since 2.1.0
|
989 |
+
*
|
990 |
+
* @param \WC_Product $product the product object
|
991 |
+
* @return string
|
992 |
+
*/
|
993 |
+
public static function get_product_pattern_attribute( \WC_Product $product ) {
|
994 |
+
|
995 |
+
if ( $product->is_type( 'variation' ) ) {
|
996 |
+
|
997 |
+
// get the attribute from the parent
|
998 |
+
$product = wc_get_product( $product->get_parent_id() );
|
999 |
+
}
|
1000 |
+
|
1001 |
+
$attribute_name = '';
|
1002 |
+
|
1003 |
+
if ( $product ) {
|
1004 |
+
|
1005 |
+
$meta_value = $product->get_meta( self::PATTERN_ATTRIBUTE_META_KEY );
|
1006 |
+
|
1007 |
+
// check if an attribute with that name exists
|
1008 |
+
if ( self::product_has_attribute( $product, $meta_value ) ) {
|
1009 |
+
$attribute_name = $meta_value;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
if ( empty( $attribute_name ) ) {
|
1013 |
+
// try to find a matching attribute
|
1014 |
+
foreach ( self::get_available_product_attributes( $product ) as $slug => $attribute ) {
|
1015 |
+
|
1016 |
+
if ( stripos( $attribute->get_name(), 'pattern' ) !== false ) {
|
1017 |
+
$attribute_name = $slug;
|
1018 |
+
break;
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
return $attribute_name;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
|
1028 |
+
/**
|
1029 |
+
* Updates the configured pattern attribute.
|
1030 |
+
*
|
1031 |
+
* @since 2.1.0
|
1032 |
+
*
|
1033 |
+
* @param \WC_Product $product the product object
|
1034 |
+
* @param string $attribute_name the attribute to be used to store the pattern
|
1035 |
+
* @throws SV_WC_Plugin_Exception
|
1036 |
+
*/
|
1037 |
+
public static function update_product_pattern_attribute( \WC_Product $product, $attribute_name ) {
|
1038 |
+
|
1039 |
+
// check if the name matches an available attribute
|
1040 |
+
if ( ! empty( $attribute_name ) && ! self::product_has_attribute( $product, $attribute_name ) ) {
|
1041 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute name $attribute_name does not match any of the available attributes for the product {$product->get_name()}" );
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
if ( $attribute_name !== self::get_product_pattern_attribute( $product ) && in_array( $attribute_name, self::get_distinct_product_attributes( $product ) ) ) {
|
1045 |
+
throw new SV_WC_Plugin_Exception( "The provided attribute $attribute_name is already used for the product {$product->get_name()}" );
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
$product->update_meta_data( self::PATTERN_ATTRIBUTE_META_KEY, $attribute_name );
|
1049 |
+
$product->save_meta_data();
|
1050 |
+
}
|
1051 |
+
|
1052 |
+
|
1053 |
+
/**
|
1054 |
+
* Gets the stored pattern for a product.
|
1055 |
+
*
|
1056 |
+
* If the product is a variation and it doesn't have the pattern attribute, falls back to the parent.
|
1057 |
+
*
|
1058 |
+
* @since 2.1.0
|
1059 |
+
*
|
1060 |
+
* @param \WC_Product $product the product object
|
1061 |
+
* @return string
|
1062 |
+
*/
|
1063 |
+
public static function get_product_pattern( \WC_Product $product ) {
|
1064 |
+
|
1065 |
+
$pattern_value = '';
|
1066 |
+
$pattern_attribute = self::get_product_pattern_attribute( $product );
|
1067 |
+
|
1068 |
+
if ( ! empty( $pattern_attribute ) ) {
|
1069 |
+
$pattern_value = $product->get_attribute( $pattern_attribute );
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
if ( empty( $pattern_value ) && $product->is_type( 'variation' ) ) {
|
1073 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
1074 |
+
$pattern_value = $parent_product instanceof \WC_Product ? self::get_product_pattern( $parent_product ) : '';
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
return $pattern_value;
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
|
1081 |
+
/**
|
1082 |
+
* Gets all product attributes that are valid for assignment for color, size, or pattern.
|
1083 |
+
*
|
1084 |
+
* @since 2.1.0
|
1085 |
+
*
|
1086 |
+
* @param \WC_Product $product the product object
|
1087 |
+
* @return \WC_Product_Attribute[]
|
1088 |
+
*/
|
1089 |
+
public static function get_available_product_attributes( \WC_Product $product ) {
|
1090 |
+
|
1091 |
+
return $product->get_attributes();
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
|
1095 |
+
/**
|
1096 |
+
* Gets the value for a given enhanced catalog attribute
|
1097 |
+
*
|
1098 |
+
* @since 2.1.0
|
1099 |
+
*
|
1100 |
+
* @param string $key The attribute key.
|
1101 |
+
* @param \WC_Product $product The product object.
|
1102 |
+
* @return string
|
1103 |
+
*/
|
1104 |
+
public static function get_enhanced_catalog_attribute( $key, \WC_Product $product ) {
|
1105 |
+
if ( ! $product ) {
|
1106 |
+
// Break
|
1107 |
+
return null;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
$value = $product->get_meta( self::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . $key );
|
1111 |
+
|
1112 |
+
if ( empty( $value ) ) {
|
1113 |
+
// Check normal product attributes
|
1114 |
+
foreach ( self::get_available_product_attributes( $product ) as $slug => $attribute ) {
|
1115 |
+
if ( strtolower( $attribute->get_name() ) === $key ) {
|
1116 |
+
$value = $product->get_attribute( $slug );
|
1117 |
+
break;
|
1118 |
+
}
|
1119 |
+
}
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
// Check parent if we're a variation
|
1123 |
+
if ( empty( $value ) && $product->is_type( 'variation' ) ) {
|
1124 |
+
$parent_product = wc_get_product( $product->get_parent_id() );
|
1125 |
+
$value = $parent_product instanceof \WC_Product ? self::get_enhanced_catalog_attribute( $key, $parent_product ) : '';
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
// Check categories for default values
|
1129 |
+
if ( empty( $value ) ) {
|
1130 |
+
$value = self::get_meta_value_from_categories_for_product( $product, self::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . $key );
|
1131 |
+
}
|
1132 |
+
|
1133 |
+
return $value;
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
/**
|
1137 |
+
* Updates the passed enhanced catalog attribute
|
1138 |
+
*
|
1139 |
+
* @param \WC_Product $product the product object.
|
1140 |
+
* @param string $attribute_key the attribute key.
|
1141 |
+
* @param mixed $value the attribute value.
|
1142 |
+
*/
|
1143 |
+
public static function update_product_enhanced_catalog_attribute( \WC_Product $product, $attribute_key, $value ) {
|
1144 |
+
// Ensure that we don't override a default with the same value
|
1145 |
+
// as the default.
|
1146 |
+
if ( self::get_enhanced_catalog_attribute( $attribute_key, $product ) === $value ) {
|
1147 |
+
return;
|
1148 |
+
}
|
1149 |
+
$product->update_meta_data( self::ENHANCED_CATALOG_ATTRIBUTES_META_KEY_PREFIX . $attribute_key, $value );
|
1150 |
+
$product->save_meta_data();
|
1151 |
+
}
|
1152 |
+
|
1153 |
+
|
1154 |
+
/**
|
1155 |
+
* Helper function that gets and cleans the submitted values for enhanced
|
1156 |
+
* catalog attributes from the request. Is used by both product categories
|
1157 |
+
* and product pages.
|
1158 |
+
* Returns an array that maps key to value.
|
1159 |
+
*
|
1160 |
+
* @return array
|
1161 |
+
*/
|
1162 |
+
public static function get_enhanced_catalog_attributes_from_request() {
|
1163 |
+
$prefix = Admin\Enhanced_Catalog_Attribute_Fields::FIELD_ENHANCED_CATALOG_ATTRIBUTE_PREFIX;
|
1164 |
+
$attributes = array_filter(
|
1165 |
+
$_POST,
|
1166 |
+
function( $key ) use ( $prefix ) {
|
1167 |
+
return substr( $key, 0, strlen( $prefix ) ) === $prefix;
|
1168 |
+
},
|
1169 |
+
ARRAY_FILTER_USE_KEY
|
1170 |
+
);
|
1171 |
+
|
1172 |
+
return array_reduce(
|
1173 |
+
array_keys( $attributes ),
|
1174 |
+
function( $attrs, $attr_key ) use ( $prefix ) {
|
1175 |
+
return array_merge(
|
1176 |
+
$attrs,
|
1177 |
+
array(
|
1178 |
+
str_replace( $prefix, '', $attr_key ) =>
|
1179 |
+
wc_clean( Framework\SV_WC_Helper::get_posted_value( $attr_key ) ),
|
1180 |
+
),
|
1181 |
+
);
|
1182 |
+
},
|
1183 |
+
array(),
|
1184 |
+
);
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
/**
|
1188 |
+
* Checks if the product has an attribute with the given name.
|
1189 |
+
*
|
1190 |
+
* @since 2.1.0
|
1191 |
+
*
|
1192 |
+
* @param \WC_Product $product the product object
|
1193 |
+
* @param string $attribute_name the attribute name
|
1194 |
+
* @return bool
|
1195 |
+
*/
|
1196 |
+
public static function product_has_attribute( \WC_Product $product, $attribute_name ) {
|
1197 |
+
|
1198 |
+
$found = false;
|
1199 |
+
|
1200 |
+
foreach ( self::get_available_product_attributes( $product ) as $slug => $attribute ) {
|
1201 |
+
|
1202 |
+
// taxonomy attributes have a slugged name, but custom attributes do not so we check the attribute key
|
1203 |
+
if ( $attribute_name === $slug ) {
|
1204 |
+
$found = true;
|
1205 |
+
break;
|
1206 |
+
}
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
return $found;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
|
1213 |
+
/**
|
1214 |
+
* Gets the attributes that are set for the product's color, size, and pattern.
|
1215 |
+
*
|
1216 |
+
* @since 2.1.0
|
1217 |
+
*
|
1218 |
+
* @param \WC_Product $product the product object
|
1219 |
+
* @return string[]
|
1220 |
+
*/
|
1221 |
+
public static function get_distinct_product_attributes( \WC_Product $product ) {
|
1222 |
+
|
1223 |
+
return array_filter(
|
1224 |
+
array(
|
1225 |
+
self::get_product_color_attribute( $product ),
|
1226 |
+
self::get_product_size_attribute( $product ),
|
1227 |
+
self::get_product_pattern_attribute( $product ),
|
1228 |
+
)
|
1229 |
+
);
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
|
1233 |
+
/**
|
1234 |
+
* Gets a product by its Facebook product ID, from the `fb_product_item_id` or `fb_product_group_id`.
|
1235 |
+
*
|
1236 |
+
* @since 2.1.0
|
1237 |
+
*
|
1238 |
+
* @param string $fb_product_id Facebook product ID
|
1239 |
+
* @return \WC_Product|null
|
1240 |
+
*/
|
1241 |
+
public static function get_product_by_fb_product_id( $fb_product_id ) {
|
1242 |
+
|
1243 |
+
$product = null;
|
1244 |
+
|
1245 |
+
// try to by the `fb_product_item_id` meta
|
1246 |
+
$products = wc_get_products(
|
1247 |
+
array(
|
1248 |
+
'limit' => 1,
|
1249 |
+
'meta_key' => \WC_Facebookcommerce_Integration::FB_PRODUCT_ITEM_ID,
|
1250 |
+
'meta_value' => $fb_product_id,
|
1251 |
+
)
|
1252 |
+
);
|
1253 |
+
|
1254 |
+
if ( ! empty( $products ) ) {
|
1255 |
+
$product = current( $products );
|
1256 |
+
}
|
1257 |
+
|
1258 |
+
if ( empty( $product ) ) {
|
1259 |
+
// try to by the `fb_product_group_id` meta
|
1260 |
+
$products = wc_get_products(
|
1261 |
+
array(
|
1262 |
+
'limit' => 1,
|
1263 |
+
'meta_key' => \WC_Facebookcommerce_Integration::FB_PRODUCT_GROUP_ID,
|
1264 |
+
'meta_value' => $fb_product_id,
|
1265 |
+
)
|
1266 |
+
);
|
1267 |
+
|
1268 |
+
if ( ! empty( $products ) ) {
|
1269 |
+
$product = current( $products );
|
1270 |
+
}
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
return ! empty( $product ) ? $product : null;
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
|
1277 |
+
/**
|
1278 |
+
* Gets a product by its Facebook retailer ID.
|
1279 |
+
*
|
1280 |
+
* @see \WC_Facebookcommerce_Utils::get_fb_retailer_id().
|
1281 |
+
*
|
1282 |
+
* @since 2.1.0
|
1283 |
+
*
|
1284 |
+
* @param string $fb_retailer_id Facebook retailer ID
|
1285 |
+
* @return \WC_Product|null
|
1286 |
+
*/
|
1287 |
+
public static function get_product_by_fb_retailer_id( $fb_retailer_id ) {
|
1288 |
+
|
1289 |
+
if ( strpos( $fb_retailer_id, \WC_Facebookcommerce_Utils::FB_RETAILER_ID_PREFIX ) !== false ) {
|
1290 |
+
$product_id = str_replace( \WC_Facebookcommerce_Utils::FB_RETAILER_ID_PREFIX, '', $fb_retailer_id );
|
1291 |
+
} else {
|
1292 |
+
$product_id = substr( $fb_retailer_id, strrpos( $fb_retailer_id, '_' ) + 1 );
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
$product = wc_get_product( $product_id );
|
1296 |
+
|
1297 |
+
return ! empty( $product ) ? $product : null;
|
1298 |
+
}
|
1299 |
+
|
1300 |
+
|
1301 |
Â
}
|
includes/Products/FBCategories.php
ADDED
@@ -0,0 +1,118 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
4 |
+
*
|
5 |
+
* This source code is licensed under the license found in the
|
6 |
+
* LICENSE file in the root directory of this source tree.
|
7 |
+
*
|
8 |
+
* @package FacebookCommerce
|
9 |
+
*/
|
10 |
+
|
11 |
+
namespace SkyVerge\WooCommerce\Facebook\Products;
|
12 |
+
|
13 |
+
defined( 'ABSPATH' ) or exit;
|
14 |
+
|
15 |
+
use SkyVerge\WooCommerce\PluginFramework\v5_5_4 as Framework;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The main product feed handler.
|
19 |
+
*
|
20 |
+
* This will eventually replace \WC_Facebook_Product_Feed as we refactor and move its functionality here.
|
21 |
+
*
|
22 |
+
* @since 1.11.0
|
23 |
+
*/
|
24 |
+
class FBCategories {
|
25 |
+
const ACTION_PRIORITY = 9;
|
26 |
+
const CATEGORY_FILE = 'fb_google_product_categories_en_US_simple.json';
|
27 |
+
const ATTRIBUTES_FILE = 'fb_google_category_to_attribute_mapping.json';
|
28 |
+
/**
|
29 |
+
* FBCategory constructor.
|
30 |
+
*
|
31 |
+
* @since 1.11.0
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
$this->categories_filepath = realpath( __DIR__ ) . '/' . self::CATEGORY_FILE;
|
35 |
+
$this->attributes_filepath = realpath( __DIR__ ) . '/' . self::ATTRIBUTES_FILE;
|
36 |
+
$this->categories_data = null;
|
37 |
+
$this->attributes_data = null;
|
38 |
+
}
|
39 |
+
|
40 |
+
private function ensure_data_is_loaded() {
|
41 |
+
if ( ! $this->categories_data ) {
|
42 |
+
$cat_file_contents = @file_get_contents( $this->categories_filepath );
|
43 |
+
$this->categories_data = json_decode( $cat_file_contents, true );
|
44 |
+
}
|
45 |
+
if ( ! $this->attributes_data ) {
|
46 |
+
$attr_file_contents = @file_get_contents( $this->attributes_filepath );
|
47 |
+
$this->attributes_data = json_decode( $attr_file_contents, true );
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
private function get_attribute( $category_id, $attribute_key ) {
|
52 |
+
$this->ensure_data_is_loaded();
|
53 |
+
if ( ! $this->is_category( $category_id ) ) {
|
54 |
+
return null;
|
55 |
+
}
|
56 |
+
$all_attributes = $this->attributes_data[ $category_id ]['attributes'];
|
57 |
+
$attributes = array_filter(
|
58 |
+
$all_attributes,
|
59 |
+
function( $attr ) use ( $attribute_key ) {
|
60 |
+
return ( $attribute_key === $attr['key'] );
|
61 |
+
}
|
62 |
+
);
|
63 |
+
if ( empty( $attributes ) ) {
|
64 |
+
return null;
|
65 |
+
}
|
66 |
+
return array_shift( $attributes );
|
67 |
+
}
|
68 |
+
|
69 |
+
public function is_valid_value_for_attribute( $category_id, $attribute_key, $value ) {
|
70 |
+
$this->ensure_data_is_loaded();
|
71 |
+
$attribute = $this->get_attribute( $category_id, $attribute_key );
|
72 |
+
|
73 |
+
if ( is_null( $attribute ) ) {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// TODO: can perform more validations here
|
78 |
+
switch ( $attribute['type'] ) {
|
79 |
+
case 'enum':
|
80 |
+
return in_array( $value, $attribute['enum_values'] );
|
81 |
+
case 'boolean':
|
82 |
+
return in_array( $value, array( 'yes', 'no' ) );
|
83 |
+
default:
|
84 |
+
return true;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
public function get_category( $id ) {
|
89 |
+
$this->ensure_data_is_loaded();
|
90 |
+
if ( $this->is_category( $id ) ) {
|
91 |
+
return $this->categories_data[ $id ];
|
92 |
+
} else {
|
93 |
+
return null;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
public function get_category_depth( $id ) {
|
98 |
+
if ( ! $this->is_category( $id ) ) {
|
99 |
+
return 0;
|
100 |
+
}
|
101 |
+
$category = $this->get_category( $id );
|
102 |
+
return count( explode( '>', $category ) );
|
103 |
+
}
|
104 |
+
|
105 |
+
public function get_category_with_attrs( $id ) {
|
106 |
+
$this->ensure_data_is_loaded();
|
107 |
+
if ( $this->is_category( $id ) ) {
|
108 |
+
return $this->attributes_data[ $id ];
|
109 |
+
} else {
|
110 |
+
return null;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
public function is_category( $id ) {
|
115 |
+
$this->ensure_data_is_loaded();
|
116 |
+
return isset( $this->categories_data[ $id ] );
|
117 |
+
}
|
118 |
+
}
|
includes/Products/Sync.php
CHANGED
@@ -54,6 +54,10 @@ class Sync {
|
|
54 |
Â
public function add_hooks() {
|
55 |
Â
|
56 |
Â
add_action( 'shutdown', [ $this, 'schedule_sync' ] );
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
57 |
Â
}
|
58 |
Â
|
59 |
Â
|
@@ -138,6 +142,30 @@ class Sync {
|
|
138 |
Â
}
|
139 |
Â
|
140 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
141 |
Â
/**
|
142 |
Â
* Creates a background job to sync the products in the requests array.
|
143 |
Â
*
|
54 |
Â
public function add_hooks() {
|
55 |
Â
|
56 |
Â
add_action( 'shutdown', [ $this, 'schedule_sync' ] );
|
57 |
+
|
58 |
+
// stock update actions
|
59 |
+
add_action( 'woocommerce_product_set_stock', [ $this, 'handle_stock_update' ] );
|
60 |
+
add_action( 'woocommerce_variation_set_stock', [ $this, 'handle_stock_update' ] );
|
61 |
Â
}
|
62 |
Â
|
63 |
Â
|
142 |
Â
}
|
143 |
Â
|
144 |
Â
|
145 |
+
/**
|
146 |
+
* Adds the products with stock changes to the requests array to be updated.
|
147 |
+
*
|
148 |
+
* @since 2.1.0
|
149 |
+
*
|
150 |
+
* @param \WC_Product $product product object
|
151 |
+
*/
|
152 |
+
public function handle_stock_update( \WC_Product $product ) {
|
153 |
+
|
154 |
+
// bail if not connected
|
155 |
+
if ( ! facebook_for_woocommerce()->get_connection_handler()->is_connected() ) {
|
156 |
+
return;
|
157 |
+
}
|
158 |
+
|
159 |
+
// bail if admin and not AJAX
|
160 |
+
if ( is_admin() && ! is_ajax() ) {
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
// add the product to the list of products to be updated
|
165 |
+
$this->create_or_update_products( [ $product->get_id() ] );
|
166 |
+
}
|
167 |
+
|
168 |
+
|
169 |
Â
/**
|
170 |
Â
* Creates a background job to sync the products in the requests array.
|
171 |
Â
*
|
includes/Products/Sync/Background.php
CHANGED
@@ -217,11 +217,13 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
217 |
Â
// extract the retailer_id
|
218 |
Â
$retailer_id = $product_data['retailer_id'];
|
219 |
Â
|
Â
|
|
220 |
Â
// retailer_id cannot be included in the data object
|
221 |
Â
unset( $product_data['retailer_id'] );
|
Â
|
|
222 |
Â
|
223 |
Â
$request = [
|
224 |
-
'retailer_id' => $retailer_id,
|
225 |
Â
'method' => Sync::ACTION_UPDATE,
|
226 |
Â
'data' => $product_data,
|
227 |
Â
];
|
@@ -261,21 +263,22 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
261 |
Â
$fb_parent_product = new \WC_Facebook_Product( $parent_product->get_id() );
|
262 |
Â
$fb_product = new \WC_Facebook_Product( $product->get_id(), $fb_parent_product );
|
263 |
Â
|
264 |
-
$data = $fb_product->prepare_product();
|
265 |
Â
|
266 |
Â
// product variations use the parent product's retailer ID as the retailer product group ID
|
267 |
-
$data['retailer_product_group_id'] = \WC_Facebookcommerce_Utils::get_fb_retailer_id( $parent_product );
|
Â
|
|
268 |
Â
|
269 |
Â
return $this->normalize_product_data( $data );
|
270 |
Â
}
|
271 |
Â
|
272 |
-
|
273 |
Â
/**
|
274 |
-
* Normalizes product data to be included in a sync request.
|
Â
|
|
275 |
Â
*
|
276 |
Â
* @since 2.0.0
|
277 |
Â
*
|
278 |
-
* @param
|
279 |
Â
* @return array
|
280 |
Â
*/
|
281 |
Â
private function normalize_product_data( $data ) {
|
@@ -283,8 +286,6 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
283 |
Â
// allowed values are 'refurbished', 'used', and 'new', but the plugin has always used the latter
|
284 |
Â
$data['condition'] = 'new';
|
285 |
Â
|
286 |
-
$data['product_type'] = $data['category'];
|
287 |
-
|
288 |
Â
// attributes other than size, color, pattern, or gender need to be included in the additional_variant_attributes field
|
289 |
Â
if ( isset( $data['custom_data'] ) && is_array( $data['custom_data'] ) ) {
|
290 |
Â
|
@@ -295,7 +296,6 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
295 |
Â
return $data;
|
296 |
Â
}
|
297 |
Â
|
298 |
-
|
299 |
Â
/**
|
300 |
Â
* Prepares the product data to be included in a sync request.
|
301 |
Â
*
|
@@ -308,10 +308,10 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
308 |
Â
|
309 |
Â
$fb_product = new \WC_Facebook_Product( $product->get_id() );
|
310 |
Â
|
311 |
-
$data = $fb_product->prepare_product();
|
312 |
Â
|
313 |
Â
// products that are not variations use their retailer retailer ID as the retailer product group ID
|
314 |
-
$data['
|
315 |
Â
|
316 |
Â
return $this->normalize_product_data( $data );
|
317 |
Â
}
|
@@ -327,8 +327,8 @@ class Background extends Framework\SV_WP_Background_Job_Handler {
|
|
327 |
Â
private function process_item_delete( $retailer_id ) {
|
328 |
Â
|
329 |
Â
$request = [
|
330 |
-
'
|
331 |
-
'method'
|
332 |
Â
];
|
333 |
Â
|
334 |
Â
/**
|
217 |
Â
// extract the retailer_id
|
218 |
Â
$retailer_id = $product_data['retailer_id'];
|
219 |
Â
|
220 |
+
//NB: Changing this to get items_batch to work
|
221 |
Â
// retailer_id cannot be included in the data object
|
222 |
Â
unset( $product_data['retailer_id'] );
|
223 |
+
$product_data['id'] = $retailer_id;
|
224 |
Â
|
225 |
Â
$request = [
|
226 |
+
// 'retailer_id' => $retailer_id,
|
227 |
Â
'method' => Sync::ACTION_UPDATE,
|
228 |
Â
'data' => $product_data,
|
229 |
Â
];
|
263 |
Â
$fb_parent_product = new \WC_Facebook_Product( $parent_product->get_id() );
|
264 |
Â
$fb_product = new \WC_Facebook_Product( $product->get_id(), $fb_parent_product );
|
265 |
Â
|
266 |
+
$data = $fb_product->prepare_product( null, \WC_Facebook_Product::PRODUCT_PREP_TYPE_ITEMS_BATCH );
|
267 |
Â
|
268 |
Â
// product variations use the parent product's retailer ID as the retailer product group ID
|
269 |
+
// $data['retailer_product_group_id'] = \WC_Facebookcommerce_Utils::get_fb_retailer_id( $parent_product );
|
270 |
+
$data['item_group_id'] = \WC_Facebookcommerce_Utils::get_fb_retailer_id( $parent_product );
|
271 |
Â
|
272 |
Â
return $this->normalize_product_data( $data );
|
273 |
Â
}
|
274 |
Â
|
Â
|
|
275 |
Â
/**
|
276 |
+
* Normalizes product data to be included in a sync request. /items_batch
|
277 |
+
* rather than /batch this time.
|
278 |
Â
*
|
279 |
Â
* @since 2.0.0
|
280 |
Â
*
|
281 |
+
* @param array $data product data
|
282 |
Â
* @return array
|
283 |
Â
*/
|
284 |
Â
private function normalize_product_data( $data ) {
|
286 |
Â
// allowed values are 'refurbished', 'used', and 'new', but the plugin has always used the latter
|
287 |
Â
$data['condition'] = 'new';
|
288 |
Â
|
Â
|
|
Â
|
|
289 |
Â
// attributes other than size, color, pattern, or gender need to be included in the additional_variant_attributes field
|
290 |
Â
if ( isset( $data['custom_data'] ) && is_array( $data['custom_data'] ) ) {
|
291 |
Â
|
296 |
Â
return $data;
|
297 |
Â
}
|
298 |
Â
|
Â
|
|
299 |
Â
/**
|
300 |
Â
* Prepares the product data to be included in a sync request.
|
301 |
Â
*
|
308 |
Â
|
309 |
Â
$fb_product = new \WC_Facebook_Product( $product->get_id() );
|
310 |
Â
|
311 |
+
$data = $fb_product->prepare_product( null, \WC_Facebook_Product::PRODUCT_PREP_TYPE_ITEMS_BATCH );
|
312 |
Â
|
313 |
Â
// products that are not variations use their retailer retailer ID as the retailer product group ID
|
314 |
+
$data['item_group_id'] = $data['retailer_id'];
|
315 |
Â
|
316 |
Â
return $this->normalize_product_data( $data );
|
317 |
Â
}
|
327 |
Â
private function process_item_delete( $retailer_id ) {
|
328 |
Â
|
329 |
Â
$request = [
|
330 |
+
'data' => array( 'id' => $retailer_id ),
|
331 |
+
'method' => Sync::ACTION_DELETE,
|
332 |
Â
];
|
333 |
Â
|
334 |
Â
/**
|
includes/Products/fb_google_category_to_attribute_mapping.json
ADDED
@@ -0,0 +1 @@
|
|
Â
|
1 |
+
{"1":{"name":"Animals & Pet Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3237":{"name":"Animals & Pet Supplies > Live Animals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2":{"name":"Animals & Pet Supplies > Pet Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7385":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Cage Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499954":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Cage Accessories > Bird Cage Bird Baths","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7386":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Cage Accessories > Bird Cage Food & Water Dishes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4989":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Cages & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4990":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7398":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Gyms & Play Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4991":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Ladders & Perches","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4992":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Toys","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4993":{"name":"Animals & Pet Supplies > Pet Supplies > Bird Supplies > Bird Treats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4497":{"name":"Animals & Pet Supplies > Pet Supplies > Cat & Dog Flaps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5082":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Apparel","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4433":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Beds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3367":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4997":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Furniture","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500059":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Furniture Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4999":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Litter","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8069":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Litter Box Liners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7142":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Litter Box Mats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5000":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Litter Trays","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5001":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Toys","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5002":{"name":"Animals & Pet Supplies > Pet Supplies > Cat Supplies > Cat Treats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5004":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Apparel","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4434":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Beds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3530":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5094":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Houses","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7428":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Kennel & Run Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7274":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Kennels & Runs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499900":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Nappies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7372":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Nappy Pads & Liners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5010":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Toys","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8123":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Treadmills","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5011":{"name":"Animals & Pet Supplies > Pet Supplies > Dog Supplies > Dog Treats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505303":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium & Pond Tubing","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505307":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Air Stones & Diffusers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500038":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Cleaning Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5019":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Decor","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5020":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Filters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505306":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Fish Nets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5021":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Gravel & Substrates","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5079":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Lighting","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6951":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Overflow Boxes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5023":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500062":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Temperature Controllers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5161":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquarium Water Treatments","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3238":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquariums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6085":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Aquatic Plant Fertilisers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6403":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Fish Feeders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5024":{"name":"Animals & Pet Supplies > Pet Supplies > Fish Supplies > Fish Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6983":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Agility Equipment","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500084":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Bed Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5092":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Bells & Charms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6978":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Biometric Monitors","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6980":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Biometric Monitors > Pet Glucose Meters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6982":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Biometric Monitors > Pet Pedometers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6981":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Biometric Monitors > Pet Thermometers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7143":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Bowl Mats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8513":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Bowl Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6252":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Bowls, Feeders & Waterers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500026":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Carrier & Crate Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6251":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Carriers & Crates","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6811":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Clothing Hangers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6250":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Collars & Harnesses","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6321":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Containment Systems","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505811":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Door Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8050":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Eye Drops & Lubricants","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8068":{"name":"Animals & Pet Supplies > Pet Supplies > Pet First Aid & Emergency Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6248":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Flea & Tick Control","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5162":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Food Containers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5163":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Food Scoops","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6383":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6385":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Combs & Brushes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503733":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Fragrances & Deodorising Sprays","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8167":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Hair Dryers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6384":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Hair Trimmers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7318":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Nail Polish","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7319":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Nail Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6406":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Shampoo & Conditioner","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499917":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Grooming Supplies > Pet Wipes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500110":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Heating Pad Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499743":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Heating Pads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5093":{"name":"Animals & Pet Supplies > Pet Supplies > Pet ID Tags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6253":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Lead Extensions","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6249":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Leads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5145":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Medical Collars","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6861":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Medical Tape & Bandages","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5086":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Medicine","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5144":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Muzzles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7144":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Oral Care Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5087":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Playpens","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6276":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Pushchairs & Strollers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6973":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Steps & Ramps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7396":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Sun Cream","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505314":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Training Aids","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505313":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Training Aids > Pet Training Clickers & Treat Dispensers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505304":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Training Aids > Pet Training Pad Holders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6846":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Training Aids > Pet Training Pads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505311":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Training Aids > Pet Training Sprays & Solutions","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5081":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Vitamins & Supplements","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"502982":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Waste Bag Dispensers & Holders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8070":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Waste Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505297":{"name":"Animals & Pet Supplies > Pet Supplies > Pet Waste Disposal Systems & Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5026":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies > Reptile & Amphibian Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5027":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies > Reptile & Amphibian Habitat Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5028":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies > Reptile & Amphibian Habitat Heating & Lighting","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5029":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies > Reptile & Amphibian Habitats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5030":{"name":"Animals & Pet Supplies > Pet Supplies > Reptile & Amphibian Supplies > Reptile & Amphibian Substrates","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5013":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5014":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies > Small Animal Bedding","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5015":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies > Small Animal Food","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5016":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies > Small Animal Habitat Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5017":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies > Small Animal Habitats & Cages","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7517":{"name":"Animals & Pet Supplies > Pet Supplies > Small Animal Supplies > Small Animal Treats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8474":{"name":"Animals & Pet Supplies > Pet Supplies > Vehicle Pet Barriers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8":{"name":"Arts & Entertainment","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499969":{"name":"Arts & Entertainment > Event Tickets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5710":{"name":"Arts & Entertainment > Hobbies & Creative Arts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"16":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505370":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505374":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Candle Making Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4778":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Drawing & Painting Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6382":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Fabric Repair Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6989":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Incense Making Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"502979":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Jewellery Making Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6829":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Mosaic Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7096":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Needlecraft Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503758":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Scrapbooking & Stamping Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4986":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Craft Kits > Toy Craft Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505372":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"24":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505399":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Cardstock & Scrapbooking Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2532":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Construction Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8168":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Craft Foil","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505400":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Drawing & Painting Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2967":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Origami Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6110":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Transfer Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2741":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Art & Craft Paper > Vellum Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505380":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4226":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Buttons & Snaps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505408":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Clasps & Hooks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505409":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Eyelets & Grommets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6145":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Hook & Loop Fasteners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500056":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Zip Pulls","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4174":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Fasteners & Closures > Zips","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505378":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505417":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Art & Craft Paint","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500094":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Art Fixatives","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505416":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Art Ink","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499879":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Ceramic & Pottery Glazes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505415":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Craft Dyes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505414":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Ink Pads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6558":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Paint, Ink & Glaze > Paint Mediums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505381":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Shapes & Bases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6117":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Shapes & Bases > Craft Foam & Polystyrene Foam","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505404":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Shapes & Bases > Craft Wood & Shapes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505403":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Shapes & Bases > Papier Mache Shapes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504419":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Craft Shapes & Bases > Wreath & Floral Frames","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505376":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503745":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets > Craft & Office Glue","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"36":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets > Craft Magnets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505419":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets > Decorative Tape","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7192":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets > Floral Tape","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6418":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Adhesives & Magnets > Fusible Tape","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505382":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Fibres","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6540":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Fibres > Jewellery & Beading Cord","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"49":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Fibres > Thread & Floss","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6140":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Fibres > Unspun Fibre","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2669":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Fibres > Yarn","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505377":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Wire","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5062":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Wire > Craft Pipe Cleaners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505418":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Wire > Floral Wire","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6102":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Crafting Wire > Jewellery & Beading Wire","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505379":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6955":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Appliques & Patches","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"32":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Beads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505413":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Bows & Yo-Yos","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4054":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Decorative Stickers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6146":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Elastic","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505411":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Feathers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5996":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Jewellery Findings","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"198":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Loose Stones","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5982":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Rhinestones & Flatbacks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505412":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Ribbons & Trim","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505410":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Sequins & Glitter","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1927":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embellishments & Trims > Sew-in Labels","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6121":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Embossing Powder","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6142":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Filling & Padding Material","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505407":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Filling & Padding Material > Batting & Stuffing","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505406":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Filling & Padding Material > Filling Pellets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505405":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Filling & Padding Material > Pillow Forms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505383":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Leather & Vinyl","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"44":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Pottery & Sculpting Materials","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3692":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Pottery & Sculpting Materials > Clay & Modelling Dough","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505401":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Pottery & Sculpting Materials > Papier Mache Mixes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505804":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Pottery & Sculpting Materials > Plaster Gauze","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505402":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Pottery & Sculpting Materials > Pottery Slips","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505375":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Raw Candle Wax","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505384":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505397":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Crafting Canvas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505398":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Crafting Canvas > Needlecraft Canvas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"19":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Crafting Canvas > Painting Canvas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6144":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Crafting Canvas > Plastic Canvas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"47":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Fabric","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7076":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Interfacing","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505396":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Textiles > Printable Fabric","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7403":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Wick Tabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7402":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Materials > Wicks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504643":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"232168":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Craft Knife Blades","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4580":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Craft Machine Cases & Covers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505286":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Sewing Machine Extension Tables","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5120":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Sewing Machine Feet","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503348":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Sewing Machine Replacement Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6136":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Spinning Wheel Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499918":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tool Accessories > Stamp Blocks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504639":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6152":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Blocking Mats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6151":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Blocking Wires","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505391":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Colour Mixing Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1653":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Colour Mixing Tools > Palette Knives","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1719":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Colour Mixing Tools > Palettes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504640":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504641":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Craft & Office Scissors","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"504642":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Craft Cutters & Embossers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5136":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Craft Knives","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6119":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Craft Scoring Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7340":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Embossing Heat Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6122":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Embossing Pens & Styluses","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6161":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Seam Rippers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6447":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Cutting & Embossing Tools > Thread & Yarn Cutters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505386":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Decoration Makers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505392":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"18":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Art Brushes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6126":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Brayer Rollers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4032":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Decorative Stamps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3083":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Drafting Compasses","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6125":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Screen Printing Squeegees","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5883":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Stencil Machines","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2671":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Stencils & Die Cuts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6160":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Stitch Markers & Counters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6157":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Textile Art Gauges & Rulers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505420":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Craft Measuring & Marking Tools > Wood Burning Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5137":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Cutting Mats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6150":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Dress Forms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6133":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Felting Pads & Mats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6158":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Frames, Hoops & Stretchers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4073":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Glue Guns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5921":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Light Boxes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505393":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6127":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks > Crochet Hooks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5992":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks > Hand-Sewing Needles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6139":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks > Knitting Needles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6168":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks > Latch & Locker Hooks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4579":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Needles & Hooks > Sewing Machine Needles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6101":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Safety Pins","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6159":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Straight Pins","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505388":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6134":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines > Felting Needles & Machines","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505422":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines > Hand Looms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505421":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines > Mechanical Looms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"615":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines > Sewing Machines","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6137":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Textile Craft Machines > Spinning Wheels","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6156":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thimbles & Sewing Palms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505387":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6164":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Fibre Cards & Brushes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6138":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Hand Spindles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6163":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Needle Threaders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6155":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Thread & Yarn Guides","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6154":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Thread & Yarn Spools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6153":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Thread, Yarn & Bobbin Winders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6167":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Weaving Beaters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6166":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Art & Crafting Tools > Thread & Yarn Tools > Weaving Shuttles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505369":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Craft Organisation","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505394":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Craft Organisation > Needle, Pin & Hook Organisers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499971":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Craft Organisation > Sewing & Textile Art Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505395":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Craft Organisation > Thread & Yarn Organisers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505371":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6999":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds > Beading Patterns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8007":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds > Craft Moulds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6135":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds > Felting Moulds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505373":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds > Needlecraft Patterns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3697":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Arts & Crafts > Crafting Patterns & Moulds > Sewing Patterns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"216":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3599":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Autographs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"217":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Coins & Currency","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"220":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Weapons","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5311":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Weapons > Collectable Knives","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"221":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Weapons > Collectable Swords","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499953":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Weapons > Collectible Guns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1340":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectable Weapons > Sword Stands & Displays","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6997":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Collectible Trading Cards","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"219":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Postage Stamps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"218":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Rocks & Fossils","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6000":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Scale Model Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"37":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Scale Models","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1312":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Seal Stamps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3865":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4333":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4124":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > American Football Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4180":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Auto Racing Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4149":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Baseball & Softball Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4279":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Basketball Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8210":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Boxing Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4093":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Football Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4144":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Hockey Autographed Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6186":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Autographed Sports Paraphernalia > Tennis Autographed Sports Paraphernalia","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3515":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1095":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > American Football Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1051":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Auto Racing Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1074":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Baseball & Softball Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1084":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Basketball Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3576":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Football Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4006":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Hockey Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6187":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Sports Collectables > Sports Fan Accessories > Tennis Fan Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3893":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Collectables > Vintage Advertisements","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3577":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Homebrewing & Winemaking Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3014":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Homebrewing & Winemaking Supplies > Beer Brewing Grains & Malts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"502980":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Homebrewing & Winemaking Supplies > Bottling Bottles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499891":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Homebrewing & Winemaking Supplies > Home Brewing & Winemaking Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2579":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Homebrewing & Winemaking Supplies > Wine Making","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"33":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Juggling","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"35":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Magic & Novelties","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5999":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Model Making","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3885":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Model Making > Model Rocketry","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5151":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Model Making > Model Train Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5150":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Model Making > Model Trains & Train Sets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4175":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Model Making > Scale Model Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"55":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"57":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505310":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass Instrument Cases & Gigbags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505308":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass Instrument Mouthpieces","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505768":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass Instrument Mutes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4798":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass Instrument Replacement Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505309":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass Instrument Straps & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4797":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4891":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass Instrument Care Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4892":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass Instrument Cleaners & Sanitisers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4890":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass Instrument Cleaning Tools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4894":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass Instrument Lubricants","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4895":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass Instrument Polishing Cloths","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4893":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Brass Instrument Accessories > Brass-Instrument Care & Cleaning > Brass-Instrument Guards","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505288":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Conductor Batons","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3270":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Electronic Tuners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505365":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Metronomes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505328":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Benches & Stools","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"500001":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Lyres & Flip Folders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7277":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Stand Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7279":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Stand Accessories > Music Stand Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7280":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Stand Accessories > Music Stand Lights","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7278":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Stand Accessories > Sheet Music Clips","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4142":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Music Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8072":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6970":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Cabinets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8461":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Covers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8073":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Foot Switches","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8462":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Knobs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7364":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8480":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifier Accessories > Musical Instrument Amplifier Tubes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"56":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Instrument Amplifiers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"60":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Keyboard Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7357":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Keyboard Accessories > Musical Keyboard Bags & Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3588":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Keyboard Accessories > Musical Keyboard Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3324":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Musical Keyboard Accessories > Sustain Pedals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3465":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7100":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Cymbal & Drum Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7231":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Cymbal & Drum Mutes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7153":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Heads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7152":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Keys","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7099":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Kit Hardware","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7103":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Kit Hardware > Bass Drum Beaters","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7102":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Kit Hardware > Drum Kit Mounting Hardware","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7101":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Kit Hardware > Drum Pedals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7150":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Stick & Brush Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7151":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Stick & Brush Accessories > Drum Stick & Brush Bags & Holders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"59":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Drum Sticks & Brushes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7455":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Electronic Drum Modules","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7282":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Hand Percussion Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7283":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Hand Percussion Accessories > Hand Percussion Bags & Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7284":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Hand Percussion Accessories > Hand Percussion Stands & Mounts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4631":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Percussion Mallets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7308":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Percussion Accessories > Percussion Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"61":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3502":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3775":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Acoustic Guitar Pickups","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5367":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Capos","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3412":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Electric Guitar Pickups","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3882":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503032":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Fittings & Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3392":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Humidifiers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4111":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Picks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5368":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Slides","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3646":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"499688":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Straps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503721":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar String Winders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3178":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Strings","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3176":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Guitar Accessories > Guitar Tuning Pegs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503033":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8209":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Bow Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503040":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Bows","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503039":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503038":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Fittings & Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503037":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Mutes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503036":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Pickups","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503035":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503034":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > Orchestral String Instrument Accessories > Orchestral String Instrument Strings","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4806":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > String Instrument Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3374":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > String Instrument Care & Cleaning > Bow Rosin","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4911":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > String Instrument Care & Cleaning > String Instrument Cleaning Cloths","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4912":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > String Instrument Accessories > String Instrument Care & Cleaning > String Instrument Polish","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"62":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4790":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4809":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4815":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Care & Cleaning > Bassoon Swabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4810":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4811":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4816":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Parts > Bassoon Bocals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4817":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Parts > Bassoon Small Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4812":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Reeds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4813":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4814":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Bassoon Accessories > Bassoon Straps & Supports","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4791":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4818":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4826":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Care & Cleaning > Clarinet Care Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4827":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Care & Cleaning > Clarinet Pad Savers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4828":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Care & Cleaning > Clarinet Swabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4819":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4820":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Ligatures & Caps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4822":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4829":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Parts > Clarinet Barrels","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4830":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Parts > Clarinet Bells","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4831":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Parts > Clarinet Mouthpieces","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4832":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Parts > Clarinet Small Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4823":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Pegs & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4824":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Reeds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4825":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Clarinet Accessories > Clarinet Straps & Supports","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4792":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4833":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4838":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Care & Cleaning > Flute Care Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4839":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Care & Cleaning > Flute Cleaning Rods","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4840":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Care & Cleaning > Flute Swabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4834":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4836":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4841":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Parts > Flute Head Joints","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4842":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Parts > Flute Small Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4837":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Flute Accessories > Flute Pegs & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4955":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Harmonica Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4956":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Harmonica Accessories > Harmonica Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5046":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Harmonica Accessories > Harmonica Holders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4793":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4843":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4849":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Care & Cleaning > Oboe Care Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4850":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Care & Cleaning > Oboe Swabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4844":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4845":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4851":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Parts > Oboe Small Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4846":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Pegs & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4847":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Reeds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4848":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Oboe Accessories > Oboe Straps & Supports","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503747":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Recorder Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503749":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Recorder Accessories > Recorder Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503748":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Recorder Accessories > Recorder Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"503750":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Recorder Accessories > Recorder Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4794":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4852":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Care & Cleaning","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4860":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Care & Cleaning > Saxophone Care Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4861":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Care & Cleaning > Saxophone Pad Savers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4862":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Care & Cleaning > Saxophone Swabs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4853":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Cases & Gig Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4854":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Ligatures & Caps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4856":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4863":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Parts > Saxophone Mouthpieces","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4864":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Parts > Saxophone Necks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4865":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Parts > Saxophone Small Parts","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4857":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Pegs & Stands","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4858":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Reeds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4859":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Saxophone Accessories > Saxophone Straps & Supports","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4866":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Woodwind Cork Grease","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4867":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Woodwind Polishing Cloths","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4957":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Woodwind Reed Cases","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4939":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instrument & Orchestra Accessories > Woodwind Instrument Accessories > Woodwind Reed Knives","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"54":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4983":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Accordions & Concertinas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4984":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Bagpipes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"63":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505769":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > Alto & Baritone Horns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"65":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > Euphoniums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"67":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > French Horns","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"70":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > Trombones","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505770":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > Trumpets & Cornets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"72":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Brass Instruments > Tubas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6001":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Electronic Musical Instruments","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"245":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Electronic Musical Instruments > Audio Samplers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6002":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Electronic Musical Instruments > MIDI Controllers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"74":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Electronic Musical Instruments > Musical Keyboards","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6003":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Electronic Musical Instruments > Sound Synthesizers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"75":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2917":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Bass Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3043":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Cymbals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2518":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Drum Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2856":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Electronic Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7431":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Glockenspiels & Xylophones","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6098":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Gongs","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7285":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7289":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Claves & Castanets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7288":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Finger & Hand Cymbals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7555":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Bells & Chimes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7295":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7298":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Bongos","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7297":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Cajons","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7296":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Congas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7300":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Frame Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7299":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Goblet Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7302":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Tablas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7301":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Hand Drums > Talking Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7291":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Musical Blocks","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7293":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Musical Cowbells","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7286":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Musical Scrapers & Ratchets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7287":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Musical Shakers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7290":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Musical Triangles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2515":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Tambourines","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7294":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hand Percussion > Vibraslaps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3015":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Hi-Hats","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7232":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Practice Pads","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2797":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Snare Drums","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3005":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Percussion > Tom-Toms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"76":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Pianos","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"77":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"79":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Cellos","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"80":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Guitars","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"84":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Harps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"78":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Upright Basses","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"85":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Violas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"86":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > String Instruments > Violins","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"87":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4540":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Bassoons","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"88":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Clarinets","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"89":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Flutes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7188":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Flutophones","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4743":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Harmonicas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4744":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Jew's Harps","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5481":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Melodicas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7250":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Musical Pipes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4541":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Oboes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7249":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Ocarinas","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"90":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Recorders","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"91":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Saxophones","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6721":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Tin Whistles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6728":{"name":"Arts & Entertainment > Hobbies & Creative Arts > Musical Instruments > Woodwinds > Train Whistles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5709":{"name":"Arts & Entertainment > Party & Celebration","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2559":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6100":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Corsage & Boutonni\u00e8re Pins","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5916":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Corsages & Boutonni\u00e8res","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2899":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Fresh Cut Flowers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"53":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Cards & Certificates","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"94":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5838":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping > Gift Bags","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5091":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping > Gift Boxes and Tins","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8213":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping > Gift Tags & Labels","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6712":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping > Tissue Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2816":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Gift Wrapping > Wrapping Paper","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"95":{"name":"Arts & Entertainment > Party & Celebration > Gift Giving > Greeting & Note Cards","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"96":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"328061":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Advice Cards","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"6311":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Balloon Kits","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2587":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Balloons","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2531":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Banners","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4730":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Birthday Candles","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"505763":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Chair Sashes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"7007":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Cocktail Decorations","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"2781":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Confetti","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8216":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Decorative Pom-Poms","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3735":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Drinking Games","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3361":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Drinking Games > Beer Pong","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"3440":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Drinking Games > Beer Pong > Beer Pong Tables","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"5043":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Drinking Straws & Stirrers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1484":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Envelope Seals","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8038":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Event Programmes","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"4914":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Fireworks & Firecrackers","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"8110":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Inflatable Party Decorations","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product item is targeted towards","enum_values":["adult","all ages","infant","kids","newborn","teen","toddler"],"can_have_unknown_value":false}]},"1371":{"name":"Arts & Entertainment > Party & Celebration > Party Supplies > Invitations","vertical":"","attributes":[{"key":"gender","fieldname":"Gender","recommended":false,"type":"enum","description":"Gender the product item is targeted towards","enum_values":["female","male","unisex"],"can_have_unknown_value":false},{"key":"brand","fieldname":"Brand","recommended":false,"type":"string","description":"Brand name, unique manufacturer part number (MPN), or Global Trade Item Number (GTIN) of the item."},{"key":"color","fieldname":"Color","recommended":false,"type":"string","description":"Color of the product item"},{"key":"size","fieldname":"size","recommended":false,"type":"string","description":"Size of the product item"},{"key":"pattern","fieldname":"Pattern","recommended":false,"type":"string","description":"Pattern of the product item"},{"key":"material","fieldname":"Material","recommended":false,"type":"string","description":"Material of the product item"},{"key":"age_group","fieldname":"AgeGroup","recommended":false,"type":"enum","description":"Age group the product
|