/** * update the productprices default user group * As of v0.5.6 * * return boolean */ function updatePriceUserGroups() { // if this has already been done, don't repeat if (Tienda::getInstance()->get('updatePriceUserGroups', '0')) { return true; } Tienda::load('TiendaHelperProduct', 'helpers.product'); $helper = new TiendaHelperProduct(); if ($helper->updatePriceUserGroups()) { // Update config to say this has been done already JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables'); $config = JTable::getInstance('Config', 'TiendaTable'); $config->load(array('config_name' => 'updatePriceUserGroups')); $config->config_name = 'updatePriceUserGroups'; $config->value = '1'; $config->save(); return true; } return false; }