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 (
'title' => 'condition',
'type' => 'select',
'variants_function' => 'fn_exim_google_get_conditions',
),
[COLOR="Blue"] 'online_only' => array (
'title' => 'online_only',
'type' => 'select',
'variants_function' => 'fn_exim_google_get_onlines',
),[/COLOR]
'discounts' => array (
'title' => 'export_discounts',
'type' => 'checkbox'
),
'condition' => array (
'#process_get' => array('fn_exim_google_format_field', '', 'condition', '', '@condition'),
'#linked' => false,
'#required' => true,
),
[COLOR="Blue"] 'online_only' => array (
'#process_get' => array('fn_exim_google_format_field', '', 'online_only', '', '@online_only'),
'#linked' => false,
),[/COLOR]
'weight' => array (
'#db_field' => 'weight',
'#process_get' => array('fn_exim_google_format_field', '#this', 'weight', '', '')
),
function fn_exim_google_get_conditions()
{
return array (
'New' => 'New',
'Used' => 'Used',
'Refurbished' => 'Refurbished',
);
}
[COLOR="Blue"]function fn_exim_google_get_onlines()
{
return array (
'y' => 'Yes',
'n' => 'No',
);
}[/COLOR]
function fn_exim_google_get_weight_units()
{
return array ('lbs', 'pounds', 'oz', 'ounces', 'g', 'grams', 'kg', 'kilograms');
}
You will need to add the language variable: online_only - Sold online only