Hi,
To add the "Check database" button on the product listing page, you have to:
- Edit the file "administrator/components/com_hikashop/views/product/view.html.php" and replace:
$this->toolbar = array(
array('name' => 'custom', 'icon' => $exportIcon, 'alt'=>JText::_('HIKA_EXPORT'), 'task' => 'export', 'check' => false),
By:
$importIcon = 'upload';
if(HIKASHOP_J30) {
$importIcon = 'import';
}
$this->toolbar = array(
array('name' => 'custom', 'icon' => $importIcon, 'alt' => JText::_('CHECK_DATABASE'), 'task' => 'checkdb', 'check' => false, 'display' => $manage),
array('name' => 'custom', 'icon' => $exportIcon, 'alt'=>JText::_('HIKA_EXPORT'), 'task' => 'export', 'check' => false),
- Then edit the file "administrator/components/com_hikashop/controllers/product.php" and add:
$this->modify[]='checkdb';
After:
if(JRequest::getInt('variant')){
$this->publish_return_view = 'variant';
}
- Finally, in that same file (product controller) add the function:
function checkdb() {
$databaseHelper = hikashop_get('helper.database');
$html = $databaseHelper->checkdb();
$js = '';
echo hikashop_getLayout('config', 'checkdb', $html, $js);
}