Files
b2b.redline.com.pl/modules/privateshoplite/controllers/admin/AdminPrivatePagesController.php
Jacek Pyziak 4d2561ce4e Add PrivateShop module templates and initial setup files
- Created restricted.tpl for displaying restricted access messages with customizable background options.
- Added index.php files in hook and main template directories to prevent direct access and ensure proper redirection.
- Implemented info.tpl to provide module information and support links, enhancing user experience with promotional content.
- Included necessary CSS styles for the new templates to ensure proper layout and responsiveness.
2025-07-04 01:27:12 +02:00

36 lines
993 B
PHP

<?php
/**
* DISCLAIMER.
*
* Do not edit or add to this file.
* You are not authorized to modify, copy or redistribute this file.
* Permissions are reserved by FME Modules.
*
* @author FMM Modules
* @copyright FME Modules 2021
* @license Single domain
*/
if (!defined('_PS_VERSION_')) {
exit;
}
class AdminPrivatePagesController extends ModuleAdminController
{
public function init()
{
parent::init();
if (!$this->ajax) {
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminModules') . '&configure=' . $this->module->name);
}
}
public function ajaxProcessGetProducts()
{
$query = Tools::replaceAccentedChars(urldecode(Tools::getValue('q')));
$searchResults = '';
if (!empty($query) && $query) {
$searchResults = Search::find((int) Tools::getValue('id_lang'), $query, 1, 10, 'position', 'desc', true);
}
exit(json_encode($searchResults));
}
}