__( 'matches', 'datafeedr-api' ), 'contain' => __( 'contains', 'datafeedr-api' ), 'not_contain' => __( 'doesn\'t contain', 'datafeedr-api' ), 'start' => __( 'starts with', 'datafeedr-api' ), 'end' => __( 'ends with', 'datafeedr-api' ), ); $opFulltextExact = array_merge( $opFulltext, array( 'is' => __( 'is', 'datafeedr-api' ) ) ); $opRange = array( 'eq' => __( 'equal to', 'datafeedr-api' ), 'lt' => __( 'less than', 'datafeedr-api' ), 'lte' => __( 'less than or equal to', 'datafeedr-api' ), 'gt' => __( 'greater than', 'datafeedr-api' ), 'gte' => __( 'greater than or equal to', 'datafeedr-api' ), 'between' => __( 'between', 'datafeedr-api' ) ); $opIs = array( 'is' => __( 'is', 'datafeedr-api' ) ); $opIsIsnt = array( 'is' => __( 'is', 'datafeedr-api' ), 'is_not' => __( 'isn\'t', 'datafeedr-api' ) ); $opYesNo = array( 'yes' => __( 'yes', 'datafeedr-api' ), 'no' => __( 'no', 'datafeedr-api' ) ); $opInStock = array( 'yes_unknown' => __( 'yes or unknown', 'datafeedr-api' ), 'yes' => __( 'yes', 'datafeedr-api' ), 'no' => __( 'no', 'datafeedr-api' ), ); $sortOpts = array( '' => __( 'Relevance', 'datafeedr-api' ), '+price' => __( 'Price Ascending', 'datafeedr-api' ), '-price' => __( 'Price Descending', 'datafeedr-api' ), '+saleprice' => __( 'Sale Price Ascending', 'datafeedr-api' ), '-saleprice' => __( 'Sale Price Descending', 'datafeedr-api' ), '+finalprice' => __( 'Final Price Ascending', 'datafeedr-api' ), '-finalprice' => __( 'Final Price Descending', 'datafeedr-api' ), '+salediscount' => __( 'Discount Ascending', 'datafeedr-api' ), '-salediscount' => __( 'Discount Descending', 'datafeedr-api' ), '+merchant' => __( 'Merchant', 'datafeedr-api' ), '+time_updated' => __( 'Last Updated Ascending', 'datafeedr-api' ), '-time_updated' => __( 'Last Updated Descending', 'datafeedr-api' ), '+_id' => __( 'Product ID Ascending', 'datafeedr-api' ), '-_id' => __( 'Product ID Descending', 'datafeedr-api' ), ); return array( array( 'title' => __( 'Any Field', 'datafeedr-api' ), 'name' => 'any', 'input' => 'text', 'operator' => $opFulltext, 'help' => $this->help( 'any' ) ), array( 'title' => __( 'Product Name', 'datafeedr-api' ), 'name' => 'name', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'name' ) ), array( 'title' => __( 'Product ID', 'datafeedr-api' ), 'name' => 'id', 'input' => 'text', 'operator' => $opIsIsnt, 'help' => $this->help( 'id' ) ), array( 'title' => __( 'Barcode', 'datafeedr-api' ), 'name' => 'barcode', 'input' => 'text', 'operator' => $opIsIsnt, 'help' => $this->help( 'barcode' ) ), array( 'title' => __( 'Brand', 'datafeedr-api' ), 'name' => 'brand', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'brand' ) ), array( 'title' => __( 'Color', 'datafeedr-api' ), 'name' => 'color', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'color' ) ), array( 'title' => __( 'Material', 'datafeedr-api' ), 'name' => 'material', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'material' ) ), array( 'title' => __( 'Size', 'datafeedr-api' ), 'name' => 'size', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'size' ) ), array( 'title' => __( 'Gender', 'datafeedr-api' ), 'name' => 'gender', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'gender' ) ), array( 'title' => __( 'SKU', 'datafeedr-api' ), 'name' => 'sku', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'sku' ) ), array( 'title' => __( 'Condition', 'datafeedr-api' ), 'name' => 'condition', 'input' => 'text', 'operator' => $opFulltextExact, 'help' => $this->help( 'condition' ) ), array( 'title' => __( 'Description', 'datafeedr-api' ), 'name' => 'description', 'input' => 'text', 'operator' => $opFulltext, 'help' => $this->help( 'description' ) ), array( 'title' => __( 'Tags', 'datafeedr-api' ), 'name' => 'tags', 'input' => 'text', 'operator' => array( 'in' => __( 'contain', 'datafeedr-api' ), 'not_in' => __( 'don\'t contain', 'datafeedr-api' ) ), 'help' => $this->help( 'tags' ) ), array( 'title' => __( 'Category', 'datafeedr-api' ), 'name' => 'category', 'input' => 'text', 'operator' => $opFulltext, 'help' => $this->help( 'category' ) ), array( 'title' => __( 'Product Type', 'datafeedr-api' ), 'name' => 'type', 'input' => 'select', 'options' => array( 'products' => __( 'Product', 'datafeedr-api' ), 'coupons' => __( 'Coupon', 'datafeedr-api' ) ), 'operator' => $opIs, 'help' => $this->help( 'type' ) ), array( 'title' => __( 'Currency', 'datafeedr-api' ), 'name' => 'currency', 'input' => 'select', 'options' => array( 'AUD' => 'AUD', 'BRL' => 'BRL', 'CAD' => 'CAD', 'CHF' => 'CHF', 'CZK' => 'CZK', 'DKK' => 'DKK', 'EUR' => 'EUR', 'GBP' => 'GBP', 'INR' => 'INR', 'NOK' => 'NOK', 'NZD' => 'NZD', 'PLN' => 'PLN', 'SEK' => 'SEK', 'TRY' => 'TRY', 'USD' => 'USD', ), 'operator' => $opIsIsnt, 'help' => $this->help( 'currency' ) ), array( 'title' => __( 'Price', 'datafeedr-api' ), 'name' => 'price', 'input' => 'range', 'operator' => $opRange, 'help' => $this->help( 'price' ) ), array( 'title' => __( 'Sale Price', 'datafeedr-api' ), 'name' => 'saleprice', 'input' => 'range', 'operator' => $opRange, 'help' => $this->help( 'saleprice' ) ), array( 'title' => __( 'Final Price', 'datafeedr-api' ), 'name' => 'finalprice', 'input' => 'range', 'operator' => $opRange, 'help' => $this->help( 'finalprice' ) ), array( 'title' => __( 'Discount', 'datafeedr-api' ), 'name' => 'salediscount', 'input' => 'range', 'operator' => $opRange, 'help' => $this->help( 'salediscount' ) ), array( 'title' => __( 'Network', 'datafeedr-api' ), 'name' => 'source_id', 'input' => 'network', 'operator' => $opIsIsnt, 'help' => $this->help( 'source_id' ) ), array( 'title' => __( 'Merchant', 'datafeedr-api' ), 'name' => 'merchant_id', 'input' => 'merchant', 'operator' => $opIsIsnt, 'help' => $this->help( 'merchant_id' ) ), array( 'title' => __( 'On Sale', 'datafeedr-api' ), 'name' => 'onsale', 'input' => 'none', 'operator' => $opYesNo, 'help' => $this->help( 'onsale' ) ), array( 'title' => __( 'In Stock', 'datafeedr-api' ), 'name' => 'instock', 'input' => 'none', 'operator' => $opInStock, 'help' => $this->help( 'instock' ) ), array( 'title' => __( 'Stock Quantity', 'datafeedr-api' ), 'name' => 'stockquantity', 'input' => 'range', 'operator' => $opRange, 'help' => $this->help( 'instock' ) ), array( 'title' => __( 'Has Direct URL', 'datafeedr-api' ), 'name' => 'direct_url', 'input' => 'none', 'operator' => $opYesNo, 'help' => $this->help( 'direct_url' ) ), array( 'title' => __( 'Has Image', 'datafeedr-api' ), 'name' => 'image', 'input' => 'none', 'operator' => $opYesNo, 'help' => $this->help( 'image' ) ), array( 'title' => __( 'Has Barcode', 'datafeedr-api' ), 'name' => 'has_barcode', 'input' => 'none', 'operator' => $opYesNo, 'help' => $this->help( 'has_barcode' ) ), array( 'title' => __( 'Last Updated', 'datafeedr-api' ), 'name' => 'time_updated', 'input' => 'range', 'operator' => array( 'lt' => 'before', 'gt' => 'after', 'between' => 'between' ), 'help' => $this->help( 'time_updated' ) ), array( 'title' => __( 'Limit', 'datafeedr-api' ), 'name' => 'limit', 'input' => 'text', 'operator' => array( 'is' => 'is' ), 'help' => $this->help( 'limit' ) ), array( 'title' => __( 'Merchant Limit', 'datafeedr-api' ), 'name' => 'merchant_limit', 'input' => 'select', 'options' => array_filter( range( 0, 10 ), function ( $num ) { return $num != 0; } ), 'operator' => array( 'is' => 'is' ), 'help' => $this->help( 'merchant_limit' ) ), array( 'title' => __( 'Sort By', 'datafeedr-api' ), 'name' => 'sort', 'input' => 'none', 'operator' => $sortOpts, 'help' => $this->help( 'sort' ) ), array( 'title' => __( 'Exclude Duplicates', 'datafeedr-api' ), 'name' => 'duplicates', 'input' => 'text', 'operator' => array( 'is' => __( 'matching these fields', 'datafeedr-api' ), ), 'help' => $this->help( 'duplicates' ) ) ); } function defaults() { return array( 'any' => array( 'operator' => 'match', 'value' => '' ), 'id' => array( 'operator' => 'is', 'value' => '' ), 'barcode' => array( 'operator' => 'is', 'value' => '' ), 'name' => array( 'operator' => 'match', 'value' => '' ), 'brand' => array( 'operator' => 'match', 'value' => '' ), 'color' => array( 'operator' => 'match', 'value' => '' ), 'material' => array( 'operator' => 'match', 'value' => '' ), 'size' => array( 'operator' => 'match', 'value' => '' ), 'gender' => array( 'operator' => 'match', 'value' => '' ), 'sku' => array( 'operator' => 'match', 'value' => '' ), 'condition' => array( 'operator' => 'match', 'value' => '' ), 'type' => array( 'value' => 'product' ), 'currency' => array( 'value' => 'USD' ), 'price' => array( 'operator' => 'between', 'value' => '0', 'value2' => '999999' ), 'saleprice' => array( 'operator' => 'between', 'value' => '0', 'value2' => '999999' ), 'source_id' => array( 'value' => array() ), 'merchant_id' => array( 'value' => array() ), 'onsale' => array( 'value' => '1' ), 'instock' => array( 'value' => 'yes_unknown' ), 'stockquantity' => array( 'operator' => 'between', 'value' => '0', 'value2' => '100' ), 'direct_url' => array( 'value' => '1' ), 'image' => array( 'value' => '1' ), 'has_barcode' => array( 'value' => '1' ), 'thumbnail' => array( 'value' => '1' ), 'time_updated' => array( 'operator' => 'lt', 'value' => 'today' ), 'limit' => array( 'value' => 1000 ), 'merchant_limit' => array( 'value' => 5 ), ); } public $useSelected; public $prefix; function get($ary, $key, $default="") { return is_array($ary) && isset($ary[$key]) ? $ary[$key] : $default; } function inputPrefix($index) { return sprintf('%s[%s]', $this->prefix ? $this->prefix : "query", $index); } function byName($a, $b) { return strcasecmp($a['name'], $b['name']); } function ary($s) { if(!is_array($s)) $s = explode(',', trim($s)); return array_filter($s, 'strlen'); } function ids($lst) { $ids = array(); foreach($lst as $obj) $ids []= $obj['_id']; return $ids; } function selectOpts($opts, $selectedValue=NULL) { $html = ""; foreach($opts as $value => $title) { $sel = $selectedValue == $value ? "selected='selected'" : ""; $title = htmlspecialchars($title); $value = htmlspecialchars($value); $html .= ""; } return $html; } function allNetworks() { $lst = dfrapi_api_get_all_networks(); usort($lst, array($this, 'byName')); return $lst; } function selectedNetworks() { $selected = $this->get(get_option( 'dfrapi_networks' ), 'ids'); if(empty($selected)) return array(); $lst = array(); foreach($this->allNetworks() as $net) if(isset($selected[$net['_id']])) $lst []= $net; return $lst; } function groupClass($nid) { if (empty($nid)) { return ''; } $networks = $this->allNetworks(); foreach($networks as $network) { if ($network['_id'] == $nid) { $name = str_replace( array( " ", "-", "." ), "", $network['group'] ); $type = ( $network['type'] == 'coupons' ) ? '_coupons' : ''; return 'network_logo_16x16_' . strtolower( $name . $type ); } } } function selectedMerchants() { $selected = $this->get(get_option( 'dfrapi_merchants' ), 'ids'); if(empty($selected)) return array(); $lst = array(); foreach(dfrapi_api_get_merchants_by_id($selected) as $merchant) { $lst []= $merchant; } usort($lst, array($this, 'byName')); return $lst; } function networksMerchantsPopup($kind, $value) { $title = array( 'network' => __( 'Select Networks', 'datafeedr-api' ), 'merchant' => __( 'Select Merchants', 'datafeedr-api' ) ); $clear = __( 'Clear search', 'datafeedr-api' ); $ok = __( 'OK', 'datafeedr-api' ); $cells = ""; $all = ($kind == 'network') ? ($this->useSelected ? $this->selectedNetworks() : $this->allNetworks()) : $this->selectedMerchants(); foreach($all as $obj) { $id = absint($obj['_id']); $nid = absint(($kind == 'network') ? $obj['_id'] : $obj['source_id']); $group_class = esc_attr($this->groupClass($nid)); $name = esc_html($obj['name']); $checked = in_array($id, $value) ? "checked='checked'" : ""; $cells .= "
' . __( 'TIP:', 'datafeedr-api' ) . ' ' . $tip . '
' . __('Learn more', 'datafeedr-api' ) . ' ' . __('about advanced uses of this field.', 'datafeedr-api' ) . '
'; } function help($field) { $help = array(); // Any $help['any'] = '' . __( 'Search all indexed text fields at once to return a broad set of results.', 'datafeedr-api' ) . '
'; $help['any'] .= '' . __( 'The fields listed below are indexed as text fields and searchable using Any Field. Image, currency, and price fields are not searched.', 'datafeedr-api' ) . '
'; $help['any'] .= '' . __( '*Note that not all merchants and networks provide every field. ', 'datafeedr-api' ) . '
'; $help['any'] .= '' . __( 'Fields searched using Any Field:', 'datafeedr-api' ) . '
'; $help['any'] .= '| accommodationtype address artist author bestsellers brand category city color commissiontype condition country county description destination discount | discounttype ean fabric featured flavour gender genre isbn language location manufacturer manufacturerid material size gender model mpn name | offercode offertype platform productnumber promo publisher rating region size sku stars state subcategory tags upc weight |
' . __( 'Search by product name to narrow your results.', 'datafeedr-api' ) . '
'; $help['name'] .= $this->help_tip( __( 'Some merchants include color, size, gender, product codes, sale information and promotions in the product name field.', 'datafeedr-api' ) ); $help['name'] .= $this->help_operators(); // ID $help['id'] = '' . __( 'Search by Product ID to find specific products.', 'datafeedr-api' ) . '
'; $help['id'] .= $this->help_tip( __( 'Separate each product ID with a comma "," to search for multiple products by their IDs.' . __( 'Product IDs are assigned by Datafeedr and are not related to any IDs merchants use to identify their products. Each product in the Datafeedr product database has a unique Product ID.', 'datafeedr-api' ) . '
'; // $help['id'] .= $this->help_operators(); // Barcode $help['barcode'] = '' . __( 'Search for products by their barcode (ie. EAN, UPC or GTIN value).', 'datafeedr-api' ) . '
'; $help['barcode'] .= $this->help_tip( __( 'Separate each barcode with a comma "," to search for multiple products by their barcodes.' . __( 'The Barcode search filter ignores leading zeros. Therefore, searching for 889169871993 and searching for 00889169871993 will return the same results.', 'datafeedr-api' ) . '
'; // Brand $help['brand'] = '' . __( 'Search by brand name to get specific results. Not every item has a brand name.', 'datafeedr-api' ) . '
'; $help['brand'] .= $this->help_tip( __( 'Enter the shorter version of a brand name in this field. Omit words such as "Incorporated", "Limited" and their abbreviations like Inc., Ltd. and so on.', 'datafeedr-api' ) ); $help['brand'] .= $this->help_operators(); // Color $help['color'] = '' . __( 'Search by color to get specific results. Not every item has a color field.', 'datafeedr-api' ) . '
'; // Material $help['material'] = '' . __( 'Search by material to get specific results. Not every item has a material field.', 'datafeedr-api' ) . '
'; // Size $help['size'] = '' . __( 'Search by size to get specific results. Not every item has a size field.', 'datafeedr-api' ) . '
'; // Gender $help['gender'] = '' . __( 'Search by gender to get specific results. Not every item has a gender field.', 'datafeedr-api' ) . '
'; // SKU $help['sku'] = '' . __( 'Search by SKU to get specific results. Not every item has a SKU field.', 'datafeedr-api' ) . '
'; // Condition $help['condition'] = '' . __( 'Search by condition to get specific results. Not every item has a condition field.', 'datafeedr-api' ) . '
'; // Description $help['description'] = '' . __( 'Search the description field for product attributes such as size, color, material, gender or usage.', 'datafeedr-api' ) . '
'; $help['description'] .= $this->help_tip( __( 'Most merchants provide a product description. Some product details may only appear in the description and not in any other field. However, some merchants duplicate the product name or product code in the description field without supplying additional details or leave the product description blank.', 'datafeedr-api' ) ); $help['description'] .= $this->help_operators(); // Tags $help['tags'] = '' . __( 'Limit search results based on product tag and keyword information.', 'datafeedr-api' ) . '
'; $help['tags'] .= $this->help_tip( __( 'This field contains data from various keyword-related fields provided by the merchant. This field does not always exist.', 'datafeedr-api' ) ); // Category $help['category'] = '' . __( 'Limit search results based on category information.', 'datafeedr-api' ) . '
'; $help['category'] .= $this->help_tip( __( 'This field contains data from various category-related fields provided by the merchant. This field does not always exist.', 'datafeedr-api' ) ); $help['category'] .= $this->help_operators(); // Type $help['type'] = '' . __( 'Limit your search results to one type of item, either Product or Coupon.', 'datafeedr-api' ) . '
'; $help['type'] .= $this->help_tip( __( 'In order to use this filter, you must have already selected merchants that provide that type of item. For example, if you choose "Product type: Coupon" but have not selected any merchants that offer coupons, your search will return an error.', 'datafeedr-api' ) ); // Currency $help['currency'] = '' . __( 'Limit your search results to items with a specific currency code.', 'datafeedr-api' ) . '
'; $help['currency'] .= $this->help_tip( __( 'Selecting a currency code is one way to limit your search results to items from a specific country. However, not every item has been given a currency code value by the merchant. Items without a currency code will be excluded from your search results.', 'datafeedr-api' ) ); // Price $help['price'] = '' . __( 'Filter your search results based on price. Return products less than, greater than, or within a price range that you set.', 'datafeedr-api' ) . '
'; $help['price'] .= $this->help_tip( __( 'This field does not search on sale price. If you set a price range to less than 30, you will exclude an item with a regular price of 40 that is on sale for less than 30.', 'datafeedr-api' ) ); // Sale Price $help['saleprice'] = '' . __( 'Filter your search results based on sale price. Return items less than, greater than, or within a sale price range that you set.', 'datafeedr-api' ) . '
'; $help['saleprice'] .= $this->help_tip( __( 'This field does not search on regular price. If you set a sale price range to between 50 and 100, an item with a sale price of 40 will be excluded even if it\'s regular price matches the range you set.', 'datafeedr-api' ) ); // Final Price $help['finalprice'] = '' . __( 'Filter your search results based on the final price. Return items less than, greater than, or within a sale price range that you set.', 'datafeedr-api' ) . '
'; $help['finalprice'] .= $this->help_tip( __( 'The final price is the lower price when comparing the regular price and sale price field.', 'datafeedr-api' ) ); // Discount $help['salediscount'] = '' . __( 'Limit your search results to items with a specified discount. Enter the number in terms of percentage (1 - 100) to indicate a discount less than, greater than, or between a given range. You do not need to enter the percentage sign.', 'datafeedr-api' ) . '
'; $help['salediscount'] .= $this->help_tip( __( 'To display, for example, only products that are on sale for a discount of 20% or more, choose the "greater than" operator and type "19".', 'datafeedr-api' ) ); // Network $help['source_id'] = '' . __( 'Limit your search results to items from one or more affiliate networks.', 'datafeedr-api' ) . '
'; $help['source_id'] .= $this->help_tip( __( 'Affiliate networks are generally country-specific. Using the Network filter is one way to limit your search results by country.', 'datafeedr-api' ) ); // Merchant $help['merchant_id'] = '' . __( 'Limit your search results to items from one or more merchants.', 'datafeedr-api' ) . '
'; $help['merchant_id'] .= $this->help_tip( __( 'Using the Merchant filter is a quick way to exclude unrelated products and reduce the number of API requests made when building a Product Set. For example, if you are creating a Product Set related to cat products, exclude all merchants that only sell dog products.', 'datafeedr-api' ) ); // On Sale $help['onsale'] = '' . __( 'Set this field to "yes" to return only items which are on sale. To exclude products which are on sale, set this field to "no".', 'datafeedr-api' ) . '
'; // In Stock $help['instock'] = '' . __( 'This allows you to filter products by stock status.', 'datafeedr-api' ) . '
'; $help['instock'] .= '' . __( 'yes or unknown: This will return products which are explicitly set as "in-stock" or products which have no field containing stock-related information.', 'datafeedr-api' ) . '
'; $help['instock'] .= '' . __( 'yes: This will only return products which are explicitly set as "in-stock".', 'datafeedr-api' ) . '
'; $help['instock'] .= '' . __( 'no: This will only return products which are explicitly set as NOT "in-stock".', 'datafeedr-api' ) . '
'; $help['instock'] .= $this->help_tip( __( 'Not all products contain stock-related information. Therefore selecting "yes or unknown" is the recommended choice when you want to find products which are "in-stock".', 'datafeedr-api' ) ); // Stock Quantity $help['instock'] = '' . __( 'This allows you to filter products by the number of products in stock.', 'datafeedr-api' ) . '
'; $help['instock'] .= '' . __( 'NOTE: Not all products have a "Stock Quantity" value. Therefore, searching for a product with a stock quantity greater than or equal to "0" will eliminate all products which have an unknow "Stock Quantity".', 'datafeedr-api' ) . '
'; $help['instock'] .= '' . __( 'To search for products which either have a stock quantity in a specific range AND also include products which do not have a stock quantity value, use the "between" search option and enter "-1" for the first option and enter the upper limit (ie. 100) for the second value.', 'datafeedr-api' ) . '
'; // Has Direct URL $help['direct_url'] = '' . __( 'Limit your search results to items which have a direct URL (or which don\'t).', 'datafeedr-api' ) . '
'; $help['direct_url'] .= $this->help_tip( __( 'A "Direct URL" is a URL directly to the product page on the merchant\'s website. By default, the "Direct URL" is never used as the URL in your "Buy" links. However, if you need the products in your store to contain a "Direct URL" to the product page on the merchants\' websites, then you should use this filter. This is most useful if you are using Skimlinks (or similar service) to generate your affiliate links instead of the affiliate networks.', 'datafeedr-api' ) ); // Has Image $help['image'] = '' . __( 'Limit your search results to items which have an image (or which don\'t).', 'datafeedr-api' ) . '
'; $help['image'] .= $this->help_tip( __( 'Sometimes the image URL in the merchant\'s data feed is broken. Items with broken images will still return in search results even though there appears to be no image.', 'datafeedr-api' ) ); // Has Barcode $help['has_barcode'] = '' . __( 'Limit your search results to products which have a barcode (ie. a UPC, EAN or GTIN value).', 'datafeedr-api' ) . '
'; // Last Updated $help['time_updated'] = '' . __( 'Filter products by the last time they were updated by the merchant. Enter an English textual datetime description using PHP\'s strtotime() function.', 'datafeedr-api' ) . '
'; $help['time_updated'] .= '';
$help['time_updated'] .= '' . __('last week', 'datafeedr-api' ) . '
';
$help['time_updated'] .= '' . __('2 days ago', 'datafeedr-api' ) . '
';
$help['time_updated'] .= '' . __('1 month ago', 'datafeedr-api' ) . '';
$help['time_updated'] .= '
' . __( '', 'datafeedr-api' ) . '
'; $help['time_updated'] .= $this->help_tip( __( 'An item\'s Last Updated date will not change if the merchant does not change any product information during a data feed update.', 'datafeedr-api' ) ); // Limit $help['limit'] = '' . __( 'Limit the number of items returned in your search results. The maximum number of products that can be returned is 10,000.', 'datafeedr-api' ) . '
'; $help['limit'] .= $this->help_tip( __( 'Limiting the number of products returned helps reduce the number of API requests made during searching and updating Product Sets.', 'datafeedr-api' ) ); // Merchant Limit $help['merchant_limit'] = '' . __( 'Limit the number of items returned per merchant. The number must be between 1 and 10.', 'datafeedr-api' ) . '
'; $help['merchant_limit'] .= $this->help_tip( __( 'This is useful to use when you have one merchant which has many products that match your search but other merchants have fewer of those same products and you want equal distribution between all merchants.', 'datafeedr-api' ) ); // Sort By $help['sort'] = '' . __( 'Change the sort criteria by which items are displayed in your search results.', 'datafeedr-api' ) . '
'; $help['sort'] .= $this->help_tip( __( 'By default, search results are sorted by relevance. You can change that to sort by price, sale price, discount, or last updated date in ascending order (lowest to highest) or descending order (highest to lowest). You can also sort by merchant, which lists items alphabetically by merchant name.', 'datafeedr-api' ) ); // Exclude Duplicates $help['duplicates'] = '' . __( 'Exclude items that contain identical product names, image URLs, etc. Enter one or more terms from the list below. Separate terms by a space (meaning AND) or | (pipe symbol, meaning OR).', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '
' . __( 'Enter one of these terms to exclude duplicates matching these fields:', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('name', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('brand', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('description', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('currency', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('price', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('saleprice', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('source_id', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('merchant_id', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('direct_url', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('onsale', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('image', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('thumbnail', 'datafeedr-api' ) . '';
$help['duplicates'] .= '
';
$help['duplicates'] .= '' . __('image - Exclude items which have the same image URL.', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('name image - Exclude items with the same name AND the same image URL.', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('name|image - Exclude items with the same name OR the same image URL.', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '' . __('merchant_id name|image - Exclude items which have the same merchant id AND (product name OR image URL).', 'datafeedr-api' ) . '
';
$help['duplicates'] .= '