Add index.php file to googlemerchant XML module with redirect headers
This commit introduces a new index.php file in the googlemerchant XML module. The file contains headers to prevent caching and redirects users to the parent directory. This is part of the module's structure to ensure proper access control and user experience.
This commit is contained in:
36
modules/x13googlemerchant/upgrade/index.php
Normal file
36
modules/x13googlemerchant/upgrade/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License (OSL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/osl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 7233 $
|
||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
26
modules/x13googlemerchant/upgrade/install-1.3.3.php
Normal file
26
modules/x13googlemerchant/upgrade/install-1.3.3.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once (dirname(__FILE__) . '/../x13googlemerchant.php');
|
||||
|
||||
function upgrade_module_1_3_3($module)
|
||||
{
|
||||
$module->registerHook('displayAdminProductsExtra');
|
||||
$module->registerHook('actionProductSave');
|
||||
$module->registerHook('actionProductDelete');
|
||||
|
||||
Db::getInstance()->execute('
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'x13googlemerchant_product`(
|
||||
`id_product` INT(10) UNSIGNED NOT NULL,
|
||||
`id_lang` INT(10) UNSIGNED NOT NULL,
|
||||
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`custom_label` TEXT NULL,
|
||||
PRIMARY KEY(`id_product`, `id_lang`, `id_shop`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
48
modules/x13googlemerchant/upgrade/install-1.4.0.php
Normal file
48
modules/x13googlemerchant/upgrade/install-1.4.0.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once (dirname(__FILE__) . '/../x13googlemerchant.php');
|
||||
|
||||
function upgrade_module_1_4_0($module)
|
||||
{
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_USE_TAX', 1);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_LANG_SUFFIX', 0);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_EXPORT_CUSTOM', 0);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_EXCLUDE_OOS', 0);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_CRON_TOKEN', 0);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_TOKEN', Tools::passwdGen());
|
||||
|
||||
Db::getInstance()->execute('
|
||||
ALTER TABLE `'._DB_PREFIX_.'x13googlemerchant` DROP INDEX `id_category`;
|
||||
|
||||
ALTER TABLE `'._DB_PREFIX_.'x13googlemerchant`
|
||||
ADD `id_shop` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `id_lang`,
|
||||
ADD UNIQUE INDEX (`id_category`, `id_lang`, `id_shop`);
|
||||
|
||||
ALTER TABLE `'._DB_PREFIX_.'x13googlemerchant_product` RENAME `'._DB_PREFIX_.'x13googlemerchant_product_lang`;
|
||||
|
||||
ALTER TABLE `'._DB_PREFIX_.'x13googlemerchant_product_lang`
|
||||
ADD `custom_title` char(255) NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'x13googlemerchant_product`(
|
||||
`id_product` INT(10) UNSIGNED NOT NULL,
|
||||
`id_shop` INT(10) UNSIGNED NOT NULL DEFAULT 0,
|
||||
`export` tinyint(1) unsigned NULL,
|
||||
|
||||
PRIMARY KEY(`id_product`, `id_shop`),
|
||||
INDEX(`export`)
|
||||
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'
|
||||
);
|
||||
|
||||
if (version_compare(_PS_VERSION_, '1.5' , '>=')) {
|
||||
Db::getInstance()->execute('
|
||||
UPDATE `'._DB_PREFIX_.'x13googlemerchant`
|
||||
SET `id_shop` = ' . (int)Configuration::get('PS_SHOP_DEFAULT')
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
14
modules/x13googlemerchant/upgrade/install-1.4.3.php
Normal file
14
modules/x13googlemerchant/upgrade/install-1.4.3.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once (dirname(__FILE__) . '/../x13googlemerchant.php');
|
||||
|
||||
function upgrade_module_1_4_3($module)
|
||||
{
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_EXCLUDE_EAN', 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
11
modules/x13googlemerchant/upgrade/install-1.5.0.php
Normal file
11
modules/x13googlemerchant/upgrade/install-1.5.0.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_5_0($module)
|
||||
{
|
||||
$module->registerHook('displayBackOfficeHeader');
|
||||
|
||||
return true;
|
||||
}
|
||||
12
modules/x13googlemerchant/upgrade/install-1.5.2.php
Normal file
12
modules/x13googlemerchant/upgrade/install-1.5.2.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_5_2($module)
|
||||
{
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_ATTR_TITLE', 1);
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_ATTR_DESC', 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
16
modules/x13googlemerchant/upgrade/install-1.5.5.php
Normal file
16
modules/x13googlemerchant/upgrade/install-1.5.5.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_5_5()
|
||||
{
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_CURRENCY_URL', 1);
|
||||
|
||||
// fix for not set shipping handling method
|
||||
if (!Configuration::get('X13_GOOGLEMERCHANT_SHIP_BEHAVIOR')) {
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_SHIP_BEHAVIOR', 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
11
modules/x13googlemerchant/upgrade/install-1.5.6.php
Normal file
11
modules/x13googlemerchant/upgrade/install-1.5.6.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
function upgrade_module_1_5_6()
|
||||
{
|
||||
Configuration::updateValue('X13_GOOGLEMERCHANT_NOTAX_CURRENCIES', '');
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user