Google Base Attribute "online only"

Here is how to implement the Google Base attribute “online only” into CS version 2.x.





[ATTACH]1499[/ATTACH]





/schemas/exim/google.php:


		'condition' => array (<br />
			'title' => 'condition',<br />
			'type' => 'select',<br />
			'variants_function' => 'fn_exim_google_get_conditions',<br />
		),<br />
[COLOR="Blue"]		'online_only' => array (<br />
			'title' => 'online_only',<br />
			'type' => 'select',<br />
			'variants_function' => 'fn_exim_google_get_onlines',<br />
		),[/COLOR]<br />
		'discounts' => array (<br />
			'title' => 'export_discounts',<br />
			'type' => 'checkbox'<br />
		),
```<br />
<br />
```php
		'condition' => array (<br />
			'#process_get' => array('fn_exim_google_format_field', '', 'condition', '', '@condition'),<br />
			'#linked' => false,<br />
			'#required' => true,<br />
		),<br />
[COLOR="Blue"]		'online_only' => array (<br />
			'#process_get' => array('fn_exim_google_format_field', '', 'online_only', '', '@online_only'),<br />
			'#linked' => false,<br />
		),[/COLOR]<br />
		'weight' => array (<br />
			'#db_field' => 'weight',<br />
			'#process_get' => array('fn_exim_google_format_field', '#this', 'weight', '', '')<br />
		),
```<br />
<br />
```php
function fn_exim_google_get_conditions()<br />
{<br />
	return array (<br />
		'New' => 'New',<br />
		'Used' => 'Used',<br />
		'Refurbished' => 'Refurbished',<br />
	);<br />
}<br />
<br />
[COLOR="Blue"]function fn_exim_google_get_onlines()<br />
{<br />
	return array (<br />
		'y' => 'Yes',<br />
		'n' => 'No',<br />
	);<br />
}[/COLOR]<br />
<br />
function fn_exim_google_get_weight_units()<br />
{<br />
	return array ('lbs', 'pounds', 'oz', 'ounces', 'g', 'grams', 'kg', 'kilograms');<br />
}
```<br />
<br />
<br />
You will need to add the language variable:   online_only  -  Sold online only<p><a href="127.0.0.1/uploads/monthly_06_2011/post-775-13081579051481.jpg">online_only.jpg</a></p>