$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('field_realname'))
->from($db->quoteName('#__hikashop_field'))
->where($db->quoteName('field_realname') . ' = '. $db->quote('pakkeshop'))
->andwhere($db->quoteName('field_table') . ' = '. $db->quote('order'))
;
$db->setQuery($query);
if ($db->loadResult() === null)
{
$query = $db->getQuery(true);
$query->clear();
$db->setQuery("INSERT INTO `hjemmebryg_hikashop_field` (`field_table`, `field_realname`, `field_namekey`, `field_type`, `field_value`, `field_published`, `field_ordering`, `field_options`, `field_core`, `field_required`, `field_default`, `field_access`, `field_categories`, `field_with_sub_categories`, `field_products`, `field_frontcomp`, `field_backend`, `field_backend_listing`, `field_display`) VALUES('order', 'GLS Pakkeshop ID', 'pakkeshop', 'text', '', 1, 4, 'a:16:{s:15:\"limit_to_parent\";s:0:\"\";s:12:\"errormessage\";s:0:\"\";s:5:\"regex\";s:0:\"\";s:9:\"attribute\";s:0:\"\";s:11:\"placeholder\";s:0:\"\";s:6:\"inline\";s:1:\"0\";s:4:\"cols\";s:0:\"\";s:9:\"filtering\";s:1:\"1\";s:9:\"maxlength\";s:1:\"0\";s:4:\"rows\";s:0:\"\";s:9:\"zone_type\";s:7:\"country\";s:12:\"pleaseselect\";s:1:\"0\";s:4:\"size\";s:0:\"\";s:6:\"format\";s:5:\"d/m/Y\";s:5:\"allow\";s:0:\"\";s:8:\"readonly\";s:1:\"0\";}', 0, 0, '', 'all', 'all', 0, '', 0, 1, 0, ';front_order=0;invoice=0;back_shipping_invoice=0;order_edit=0;mail_order_notif=0;mail_status_notif=0;mail_order_creation=0;mail_admin_notif=0;mail_payment_notif=0;')");
$db->execute();
}
so either there is more needed than adding this, as i can see the field in mysql, but i can't use it from frontend but looks fine in the administrator area