<commit_before><?php
/**
 * This is a standard Product page-type with fields like
 * Price, Weight, Model and basic management of
 * groups.
 *
 * It also has an associated Product_OrderItem class,
 * an extension of OrderItem, which is the mechanism
 * that links this page type class to the rest of the
 * eCommerce platform. This means you can add an instance
 * of this page type to the shopping cart.
 *
 * @package shop
 */
class Product extends Page implements Buyable{

	private static $db = array(
		'InternalItemID' => 'Varchar(30)', //ie SKU, ProductID etc (internal / existing recognition of product)
		'Model' => 'Varchar(30)',

		'CostPrice' => 'Currency', // Wholesale cost of the product to the merchant
		'BasePrice' => 'Currency', // Base retail price the item is marked at.

		//physical properties
		'Weight' => 'Decimal(9,2)',
		'Height' => 'Decimal(9,2)',
		'Width' => 'Decimal(9,2)',
		'Depth' => 'Decimal(9,2)',

		'Featured' => 'Boolean',
		'AllowPurchase' => 'Boolean',

		'Popularity' => 'Float' //storage for ClaculateProductPopularity task
	);

	private static $has_one = array(
		'Image' => 'Image'
	);

	private static $many_many = array(
		'ProductCategories' => 'ProductCategory'
	);

	private static $defaults = array(
		'AllowPurchase' => true,
		'ShowInMenus' => false
	);

	private static $casting = array(
		'Price' => 'Currency'
	);

	private static $summary_fields = array(
		'InternalItemID','Title','BasePrice'
	);

	private static $searchable_fields = array(
		'InternalItemID','Title','BasePrice'
	);

	private static $field_labels = array(
		'InternalItemID' => 'SKU',
		'Title' => 'Title',
		'BasePrice' => 'Price'
	);
<commit_msg>Add 'Featured' as a searchable field<commit_after><?php
/**
 * This is a standard Product page-type with fields like
 * Price, Weight, Model and basic management of
 * groups.
 *
 * It also has an associated Product_OrderItem class,
 * an extension of OrderItem, which is the mechanism
 * that links this page type class to the rest of the
 * eCommerce platform. This means you can add an instance
 * of this page type to the shopping cart.
 *
 * @package shop
 */
class Product extends Page implements Buyable{

	private static $db = array(
		'InternalItemID' => 'Varchar(30)', //ie SKU, ProductID etc (internal / existing recognition of product)
		'Model' => 'Varchar(30)',

		'CostPrice' => 'Currency', // Wholesale cost of the product to the merchant
		'BasePrice' => 'Currency', // Base retail price the item is marked at.

		//physical properties
		'Weight' => 'Decimal(9,2)',
		'Height' => 'Decimal(9,2)',
		'Width' => 'Decimal(9,2)',
		'Depth' => 'Decimal(9,2)',

		'Featured' => 'Boolean',
		'AllowPurchase' => 'Boolean',

		'Popularity' => 'Float' //storage for ClaculateProductPopularity task
	);

	private static $has_one = array(
		'Image' => 'Image'
	);

	private static $many_many = array(
		'ProductCategories' => 'ProductCategory'
	);

	private static $defaults = array(
		'AllowPurchase' => true,
		'ShowInMenus' => false
	);

	private static $casting = array(
		'Price' => 'Currency'
	);

	private static $summary_fields = array(
		'InternalItemID','Title','BasePrice'
	);

	private static $searchable_fields = array(
		'InternalItemID','Title','BasePrice','Featured'
	);

	private static $field_labels = array(
		'InternalItemID' => 'SKU',
		'Title' => 'Title',
		'BasePrice' => 'Price'
	);

{'fraction_non_alphanumeric': 0.1437426210153483, 'fraction_numerical': 0.0070838252656434475, 'mean_word_length': 4.166158536585366, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3591651', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1058, 'n_words': 349}