public static function getPreferredSku()
{
$app = Factory::getApplication();
$paramsC = PhocacartUtils::getComponentParameters();
$pos_preferred_sku = $paramsC->get('pos_preferred_sku', 'sku');
$a = array();
$a['name'] = $pos_preferred_sku;
switch ($pos_preferred_sku) {
case 'upc':
$a['title'] = Text::_('COM_PHOCACART_FIELD_UPC_LABEL');
break;
case 'ean':
$a['title'] = Text::_('COM_PHOCACART_FIELD_EAN_LABEL');
break;
case 'jan':
$a['title'] = Text::_('COM_PHOCACART_FIELD_JAN_LABEL');
break;
case 'isbn':
$a['title'] = Text::_('COM_PHOCACART_FIELD_ISBN_LABEL');
break;
case 'mpn':
$a['title'] = Text::_('COM_PHOCACART_FIELD_MPN_LABEL');
break;
case 'serial_number':
$a['title'] = Text::_('COM_PHOCACART_FIELD_SERIAL_NUMBER_LABEL');
break;
case 'registration_key':
$a['title'] = Text::_('COM_PHOCACART_FIELD_REGISTRATION_KEY_LABEL');
break;
default:
case 'sku':
$a['title'] = Text::_('COM_PHOCACART_FIELD_SKU_LABEL');
break;
}
return $a;
}