Jump to content

Reset To DEFAULT Activated / Positions for Modules


Recommended Posts

Is it possible to reset to the default activaed modules and also the positions of the modules activated.

 

I installed a theme and while doing so also changed which modules to use and make several changes in position.

 

Now I want to change back to the default theme and also the original settings of all modules and its positions if possible.

 

Thanks in advance

Link to comment
Share on other sites

Unfortunately, there is no easy way to do that. However, you can use an SQL query on PHPMyadmin to reset the modules's positions.

 

I don't know which version you currently use, but for 1.4.7 and 1.4.8.3 you can use the query below: (If your database prefix is different than ps_ , please change the table name ps_hook_module accordingly)

 

I suggest you to make a backup of your ps_hook_module table bafore you start.

 

-- --------------------------------------------------------
-- This should reset your module positions to normal.
-- Positions copied from Prestashop 1.4.7.0
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=[spam-filter]CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;
/*!40000 ALTER TABLE `ps_hook_module` DISABLE KEYS */;
REPLACE INTO `ps_hook_module` (`id_module`, `id_hook`, `position`) VALUES
(1, 8, 2),
(3, 1, 1),
(3, 4, 1),
(4, 1, 3),
(4, 4, 3),
(5, 8, 1),
(5, 9, 6),
(6, 1, 2),
(6, 4, 2),
(7, 7, 7),
(7, 9, 16),
(8, 2, 1),
(8, 6, 3),
(8, 9, 7),
(8, 19, 1),
(9, 6, 1),
(9, 9, 4),
(10, 7, 3),
(10, 9, 8),
(10, 60, 1),
(10, 61, 1),
(10, 62, 1),
(10, 66, 1),
(11, 9, 10),
(11, 14, 1),
(12, 6, 5),
(12, 7, 6),
(12, 9, 15),
(12, 21, 1),
(13, 9, 13),
(13, 14, 2),
(14, 7, 5),
(14, 9, 14),
(15, 7, 1),
(15, 9, 5),
(16, 6, 2),
(16, 9, 11),
(17, 7, 8),
(17, 9, 1),
(18, 9, 2),
(18, 14, 3),
(19, 9, 19),
(19, 14, 4),
(20, 6, 4),
(20, 9, 9),
(21, 7, 2),
(21, 9, 17),
(22, 9, 12),
(22, 14, 5),
(24, 7, 4),
(24, 9, 3),
(25, 11, 1),
(25, 21, 2),
(25, 25, 1),
(26, 32, 1),
(27, 32, 2),
(28, 32, 3),
(30, 32, 4),
(31, 32, 5),
(32, 32, 6),
(33, 32, 7),
(34, 33, 1),
(35, 33, 2),
(36, 33, 3),
(37, 33, 4),
(39, 37, 1),
(40, 32, 8),
(41, 20, 1),
(41, 32, 9),
(42, 14, 6),
(42, 32, 10),
(42, 95, 1),
(43, 14, 7),
(43, 32, 11),
(44, 32, 12),
(45, 32, 13),
(46, 32, 15),
(47, 32, 14),
(48, 32, 16),
(49, 32, 17),
(50, 32, 18),
(51, 32, 19),
(51, 45, 1),
(52, 32, 20),
(53, 32, 21),
(54, 6, 6),
(54, 9, 18),
(55, 32, 22),
(56, 2, 2),
(56, 15, 1),
(56, 19, 2),
(56, 23, 1),
(56, 26, 1),
(56, 30, 1),
(56, 34, 1),
(56, 39, 1),
(56, 96, 1),
(57, 8, 3),
(58, 2, 3),
(58, 5, 1),
(58, 13, 1),
(58, 16, 1),
(58, 26, 2),
(58, 41, 1),
(58, 42, 1),
(58, 53, 1),
(58, 96, 2),
(59, 7, 9),
(59, 9, 20),
(60, 9, 21),
(60, 17, 1),
(61, 9, 22),
(61, 17, 2),
(62, 40, 1),
(63, 1, 4),
(63, 4, 4),
(63, 6, 7),
(63, 20, 2),
(63, 21, 3),
(64, 6, 8),
(64, 9, 23),
(64, 10, 1),
(64, 23, 2),
(64, 26, 3),
(64, 35, 1),
(64, 96, 3),
(66, 7, 10),
(67, 7, 11),
(67, 9, 24),
(67, 21, 4),
(67, 60, 2),
(67, 61, 2),
(67, 62, 2),
(67, 67, 1),
(67, 68, 1),
(67, 69, 1),
(67, 70, 1),
(67, 71, 1),
(67, 72, 1),
(67, 73, 1),
(67, 74, 1),
(67, 75, 1),
(67, 76, 1),
(67, 77, 1),
(67, 78, 1),
(67, 79, 1),
(67, 90, 1),
(67, 91, 1),
(67, 92, 1),
(67, 93, 1),
(67, 94, 1),
(68, 63, 1);
/*!40000 ALTER TABLE `ps_hook_module` ENABLE KEYS */;
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

Link to comment
Share on other sites

  • 8 months later...

Hi!

 

Sql Code to reset all data related with modules and positions.

 

BACKUP THE DB FIRST!!!

 

- Reset Prestashop 1.5.4.1
-- CarlosC
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
DROP TABLE IF EXISTS `ps_hook_module`;
CREATE TABLE IF NOT EXISTS `ps_hook_module` (
 `id_module` int(10) unsigned NOT NULL,
 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
 `id_hook` int(10) unsigned NOT NULL,
 `position` tinyint(2) unsigned NOT NULL,
 PRIMARY KEY (`id_module`,`id_hook`,`id_shop`),
 KEY `id_hook` (`id_hook`),
 KEY `id_module` (`id_module`),
 KEY `position` (`id_shop`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_hook_module`
--
INSERT INTO `ps_hook_module` (`id_module`, `id_shop`, `id_hook`, `position`) VALUES
(3, 1, 6, 1),
(3, 1, 9, 1),
(3, 1, 19, 1),
(5, 1, 60, 1),
(5, 1, 61, 1),
(5, 1, 62, 1),
(5, 1, 89, 1),
(5, 1, 90, 1),
(6, 1, 91, 1),
(10, 1, 31, 1),
(10, 1, 92, 1),
(11, 1, 14, 1),
(19, 1, 21, 1),
(20, 1, 95, 1),
(21, 1, 40, 1),
(27, 1, 96, 1),
(27, 1, 97, 1),
(27, 1, 98, 1),
(27, 1, 99, 1),
(27, 1, 100, 1),
(27, 1, 101, 1),
(27, 1, 102, 1),
(27, 1, 103, 1),
(27, 1, 104, 1),
(27, 1, 105, 1),
(30, 1, 1, 1),
(30, 1, 4, 1),
(31, 1, 26, 1),
(31, 1, 86, 1),
(35, 1, 33, 1),
(37, 1, 37, 1),
(39, 1, 8, 1),
(39, 1, 91, 1),
(50, 1, 11, 1),
(50, 1, 25, 1),
(60, 1, 45, 1),
(62, 1, 32, 1),
(64, 1, 2, 1),
(64, 1, 50, 1),
(64, 1, 88, 1),
(64, 1, 106, 1),
(64, 1, 107, 1),
(64, 1, 108, 1),
(64, 1, 109, 1),
(64, 1, 110, 1),
(64, 1, 111, 1),
(64, 1, 112, 1),
(64, 1, 113, 1),
(64, 1, 114, 1),
(64, 1, 115, 1),
(64, 1, 116, 1),
(64, 1, 117, 1),
(64, 1, 118, 1),
(64, 1, 119, 1),
(64, 1, 120, 1),
(64, 1, 121, 1),
(64, 1, 122, 1),
(64, 1, 123, 1),
(64, 1, 124, 1),
(1, 1, 1, 2),
(1, 1, 4, 2),
(5, 1, 21, 2),
(9, 1, 14, 2),
(15, 1, 6, 2),
(17, 1, 9, 2),
(26, 1, 7, 2),
(27, 1, 61, 2),
(27, 1, 91, 2),
(31, 1, 40, 2),
(36, 1, 33, 2),
(38, 1, 8, 2),
(59, 1, 32, 2),
(64, 1, 19, 2),
(5, 1, 7, 3),
(18, 1, 9, 3),
(18, 1, 14, 3),
(34, 1, 33, 3),
(58, 1, 32, 3),
(6, 1, 21, 4),
(14, 1, 21, 4),
(20, 1, 14, 4),
(23, 1, 6, 4),
(29, 1, 7, 4),
(29, 1, 9, 4),
(33, 1, 33, 4),
(56, 1, 32, 4),
(4, 1, 9, 5),
(6, 1, 6, 5),
(7, 1, 9, 5),
(12, 1, 7, 5),
(22, 1, 9, 5),
(22, 1, 21, 5),
(25, 1, 7, 5),
(28, 1, 14, 5),
(53, 1, 32, 5),
(6, 1, 7, 6),
(8, 1, 21, 6),
(13, 1, 9, 6),
(24, 1, 6, 6),
(27, 1, 14, 6),
(51, 1, 32, 6),
(2, 1, 7, 7),
(4, 1, 14, 7),
(41, 1, 14, 7),
(46, 1, 32, 7),
(48, 1, 32, 7),
(50, 1, 21, 7),
(10, 1, 9, 8),
(17, 1, 7, 8),
(40, 1, 14, 8),
(43, 1, 32, 8),
(5, 1, 9, 9),
(16, 1, 7, 9),
(55, 1, 32, 9),
(23, 1, 9, 10),
(40, 1, 32, 10),
(9, 1, 9, 11),
(41, 1, 32, 11),
(14, 1, 9, 12),
(15, 1, 9, 12),
(57, 1, 32, 12),
(28, 1, 9, 13),
(44, 1, 32, 13),
(11, 1, 9, 14),
(12, 1, 9, 15),
(42, 1, 32, 15),
(6, 1, 9, 16),
(45, 1, 32, 16),
(47, 1, 32, 17),
(26, 1, 9, 18),
(54, 1, 32, 18),
(24, 1, 9, 19),
(60, 1, 32, 19),
(20, 1, 9, 20),
(49, 1, 32, 20),
(8, 1, 9, 21),
(61, 1, 32, 21),
(52, 1, 32, 22),
(31, 1, 9, 23),
(38, 1, 9, 24),
(16, 1, 9, 25),
(7, 1, 6, 26),
(25, 1, 9, 27),
(32, 1, 9, 28);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_hook_module_exceptions`
--
DROP TABLE IF EXISTS `ps_hook_module_exceptions`;
CREATE TABLE IF NOT EXISTS `ps_hook_module_exceptions` (
 `id_hook_module_exceptions` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
 `id_module` int(10) unsigned NOT NULL,
 `id_hook` int(10) unsigned NOT NULL,
 `file_name` varchar(255) DEFAULT NULL,
 PRIMARY KEY (`id_hook_module_exceptions`),
 KEY `id_module` (`id_module`),
 KEY `id_hook` (`id_hook`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_hook_module_exceptions`
--

-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module`
--
DROP TABLE IF EXISTS `ps_module`;
CREATE TABLE IF NOT EXISTS `ps_module` (
 `id_module` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `name` varchar(64) NOT NULL,
 `active` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `version` varchar(8) NOT NULL,
 PRIMARY KEY (`id_module`),
 KEY `name` (`name`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module`
--
INSERT INTO `ps_module` (`id_module`, `name`, `active`, `version`) VALUES
(1, 'bankwire', 1, '0.5'),
(2, 'blockadvertising', 1, '0.5'),
(3, 'blockbestsellers', 1, '1.1'),
(4, 'blockcart', 1, '1.2'),
(5, 'blockcategories', 1, '2.0'),
(6, 'blockcms', 1, '1.1.1'),
(7, 'blockcontact', 1, '1.0'),
(8, 'blockcontactinfos', 1, '1.0'),
(9, 'blockcurrencies', 1, '0.1'),
(10, 'blockcustomerprivacy', 1, '1.0'),
(11, 'blocklanguages', 1, '1.1'),
(12, 'blockmanufacturer', 1, '1'),
(13, 'blockmyaccount', 1, '1.2'),
(14, 'blockmyaccountfooter', 1, '1.2'),
(15, 'blocknewproducts', 1, '0.9'),
(16, 'blocknewsletter', 1, '1.4'),
(17, 'blockpaymentlogo', 1, '0.2'),
(18, 'blockpermanentlinks', 1, '0.1'),
(19, 'blockreinsurance', 1, '2.0'),
(20, 'blocksearch', 1, '1.2'),
(21, 'blocksharefb', 1, '1.0'),
(22, 'blocksocial', 1, '1.0'),
(23, 'blockspecials', 1, '0.8'),
(24, 'blockstore', 1, '1'),
(25, 'blocksupplier', 1, '1'),
(26, 'blocktags', 1, '1.1'),
(27, 'blocktopmenu', 1, '1.5'),
(28, 'blockuserinfo', 1, '0.1'),
(29, 'blockviewed', 1, '0.9'),
(30, 'cheque', 1, '2.3'),
(31, 'favoriteproducts', 1, '1'),
(32, 'feeder', 1, '0.3'),
(33, 'graphartichow', 1, '1'),
(34, 'graphgooglechart', 1, '1'),
(35, 'graphvisifire', 1, '1'),
(36, 'graphxmlswfcharts', 1, '1'),
(37, 'gridhtml', 1, '1'),
(38, 'homefeatured', 1, '0.9'),
(39, 'homeslider', 1, '1.2.1'),
(40, 'pagesnotfound', 1, '1.1'),
(41, 'sekeywords', 1, '1'),
(42, 'statsbestcategories', 1, '1'),
(43, 'statsbestcustomers', 1, '1'),
(44, 'statsbestproducts', 1, '1'),
(45, 'statsbestsuppliers', 1, '1'),
(46, 'statsbestvouchers', 1, '1'),
(47, 'statscarrier', 1, '1'),
(48, 'statscatalog', 1, '1'),
(49, 'statscheckup', 1, '1'),
(50, 'statsdata', 1, '1'),
(51, 'statsequipment', 1, '1'),
(52, 'statsforecast', 1, '1'),
(53, 'statslive', 1, '1'),
(54, 'statsnewsletter', 1, '1'),
(55, 'statsorigin', 1, '1'),
(56, 'statspersonalinfos', 1, '1'),
(57, 'statsproduct', 1, '1'),
(58, 'statsregistrations', 1, '1'),
(59, 'statssales', 1, '1'),
(60, 'statssearch', 1, '1'),
(61, 'statsstock', 1, '1'),
(62, 'statsvisits', 1, '1'),
(63, 'themeinstallator', 1, '2.4'),
(64, 'gamification', 1, '1.4');
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_access`
--
DROP TABLE IF EXISTS `ps_module_access`;
CREATE TABLE IF NOT EXISTS `ps_module_access` (
 `id_profile` int(10) unsigned NOT NULL,
 `id_module` int(10) unsigned NOT NULL,
 `view` tinyint(1) NOT NULL,
 `configure` tinyint(1) NOT NULL,
 PRIMARY KEY (`id_profile`,`id_module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_access`
--
INSERT INTO `ps_module_access` (`id_profile`, `id_module`, `view`, `configure`) VALUES
(2, 1, 1, 0),
(2, 2, 1, 0),
(2, 3, 1, 0),
(2, 4, 1, 0),
(2, 5, 1, 0),
(2, 6, 1, 0),
(2, 7, 1, 0),
(2, 8, 1, 0),
(2, 9, 1, 0),
(2, 10, 1, 0),
(2, 11, 1, 0),
(2, 12, 1, 0),
(2, 13, 1, 0),
(2, 14, 1, 0),
(2, 15, 1, 0),
(2, 16, 1, 0),
(2, 17, 1, 0),
(2, 18, 1, 0),
(2, 19, 1, 0),
(2, 20, 1, 0),
(2, 21, 1, 0),
(2, 22, 1, 0),
(2, 23, 1, 0),
(2, 24, 1, 0),
(2, 25, 1, 0),
(2, 26, 1, 0),
(2, 27, 1, 0),
(2, 28, 1, 0),
(2, 29, 1, 0),
(2, 30, 1, 0),
(2, 31, 1, 0),
(2, 32, 1, 0),
(2, 33, 1, 0),
(2, 34, 1, 0),
(2, 35, 1, 0),
(2, 36, 1, 0),
(2, 37, 1, 0),
(2, 38, 1, 0),
(2, 39, 1, 0),
(2, 40, 1, 0),
(2, 41, 1, 0),
(2, 42, 1, 0),
(2, 43, 1, 0),
(2, 44, 1, 0),
(2, 45, 1, 0),
(2, 46, 1, 0),
(2, 47, 1, 0),
(2, 48, 1, 0),
(2, 49, 1, 0),
(2, 50, 1, 0),
(2, 51, 1, 0),
(2, 52, 1, 0),
(2, 53, 1, 0),
(2, 54, 1, 0),
(2, 55, 1, 0),
(2, 56, 1, 0),
(2, 57, 1, 0),
(2, 58, 1, 0),
(2, 59, 1, 0),
(2, 60, 1, 0),
(2, 61, 1, 0),
(2, 62, 1, 0),
(2, 63, 1, 0),
(2, 64, 1, 0),
(3, 1, 1, 0),
(3, 2, 1, 0),
(3, 3, 1, 0),
(3, 4, 1, 0),
(3, 5, 1, 0),
(3, 6, 1, 0),
(3, 7, 1, 0),
(3, 8, 1, 0),
(3, 9, 1, 0),
(3, 10, 1, 0),
(3, 11, 1, 0),
(3, 12, 1, 0),
(3, 13, 1, 0),
(3, 14, 1, 0),
(3, 15, 1, 0),
(3, 16, 1, 0),
(3, 17, 1, 0),
(3, 18, 1, 0),
(3, 19, 1, 0),
(3, 20, 1, 0),
(3, 21, 1, 0),
(3, 22, 1, 0),
(3, 23, 1, 0),
(3, 24, 1, 0),
(3, 25, 1, 0),
(3, 26, 1, 0),
(3, 27, 1, 0),
(3, 28, 1, 0),
(3, 29, 1, 0),
(3, 30, 1, 0),
(3, 31, 1, 0),
(3, 32, 1, 0),
(3, 33, 1, 0),
(3, 34, 1, 0),
(3, 35, 1, 0),
(3, 36, 1, 0),
(3, 37, 1, 0),
(3, 38, 1, 0),
(3, 39, 1, 0),
(3, 40, 1, 0),
(3, 41, 1, 0),
(3, 42, 1, 0),
(3, 43, 1, 0),
(3, 44, 1, 0),
(3, 45, 1, 0),
(3, 46, 1, 0),
(3, 47, 1, 0),
(3, 48, 1, 0),
(3, 49, 1, 0),
(3, 50, 1, 0),
(3, 51, 1, 0),
(3, 52, 1, 0),
(3, 53, 1, 0),
(3, 54, 1, 0),
(3, 55, 1, 0),
(3, 56, 1, 0),
(3, 57, 1, 0),
(3, 58, 1, 0),
(3, 59, 1, 0),
(3, 60, 1, 0),
(3, 61, 1, 0),
(3, 62, 1, 0),
(3, 63, 1, 0),
(3, 64, 1, 0),
(4, 1, 1, 0),
(4, 2, 1, 0),
(4, 3, 1, 0),
(4, 4, 1, 0),
(4, 5, 1, 0),
(4, 6, 1, 0),
(4, 7, 1, 0),
(4, 8, 1, 0),
(4, 9, 1, 0),
(4, 10, 1, 0),
(4, 11, 1, 0),
(4, 12, 1, 0),
(4, 13, 1, 0),
(4, 14, 1, 0),
(4, 15, 1, 0),
(4, 16, 1, 0),
(4, 17, 1, 0),
(4, 18, 1, 0),
(4, 19, 1, 0),
(4, 20, 1, 0),
(4, 21, 1, 0),
(4, 22, 1, 0),
(4, 23, 1, 0),
(4, 24, 1, 0),
(4, 25, 1, 0),
(4, 26, 1, 0),
(4, 27, 1, 0),
(4, 28, 1, 0),
(4, 29, 1, 0),
(4, 30, 1, 0),
(4, 31, 1, 0),
(4, 32, 1, 0),
(4, 33, 1, 0),
(4, 34, 1, 0),
(4, 35, 1, 0),
(4, 36, 1, 0),
(4, 37, 1, 0),
(4, 38, 1, 0),
(4, 39, 1, 0),
(4, 40, 1, 0),
(4, 41, 1, 0),
(4, 42, 1, 0),
(4, 43, 1, 0),
(4, 44, 1, 0),
(4, 45, 1, 0),
(4, 46, 1, 0),
(4, 47, 1, 0),
(4, 48, 1, 0),
(4, 49, 1, 0),
(4, 50, 1, 0),
(4, 51, 1, 0),
(4, 52, 1, 0),
(4, 53, 1, 0),
(4, 54, 1, 0),
(4, 55, 1, 0),
(4, 56, 1, 0),
(4, 57, 1, 0),
(4, 58, 1, 0),
(4, 59, 1, 0),
(4, 60, 1, 0),
(4, 61, 1, 0),
(4, 62, 1, 0),
(4, 63, 1, 0),
(4, 64, 1, 0),
(5, 1, 1, 0),
(5, 2, 1, 0),
(5, 3, 1, 0),
(5, 4, 1, 0),
(5, 5, 1, 0),
(5, 6, 1, 0),
(5, 7, 1, 0),
(5, 8, 1, 0),
(5, 9, 1, 0),
(5, 10, 1, 0),
(5, 11, 1, 0),
(5, 12, 1, 0),
(5, 13, 1, 0),
(5, 14, 1, 0),
(5, 15, 1, 0),
(5, 16, 1, 0),
(5, 17, 1, 0),
(5, 18, 1, 0),
(5, 19, 1, 0),
(5, 20, 1, 0),
(5, 21, 1, 0),
(5, 22, 1, 0),
(5, 23, 1, 0),
(5, 24, 1, 0),
(5, 25, 1, 0),
(5, 26, 1, 0),
(5, 27, 1, 0),
(5, 28, 1, 0),
(5, 29, 1, 0),
(5, 30, 1, 0),
(5, 31, 1, 0),
(5, 32, 1, 0),
(5, 33, 1, 0),
(5, 34, 1, 0),
(5, 35, 1, 0),
(5, 36, 1, 0),
(5, 37, 1, 0),
(5, 38, 1, 0),
(5, 39, 1, 0),
(5, 40, 1, 0),
(5, 41, 1, 0),
(5, 42, 1, 0),
(5, 43, 1, 0),
(5, 44, 1, 0),
(5, 45, 1, 0),
(5, 46, 1, 0),
(5, 47, 1, 0),
(5, 48, 1, 0),
(5, 49, 1, 0),
(5, 50, 1, 0),
(5, 51, 1, 0),
(5, 52, 1, 0),
(5, 53, 1, 0),
(5, 54, 1, 0),
(5, 55, 1, 0),
(5, 56, 1, 0),
(5, 57, 1, 0),
(5, 58, 1, 0),
(5, 59, 1, 0),
(5, 60, 1, 0),
(5, 61, 1, 0),
(5, 62, 1, 0),
(5, 63, 1, 0),
(5, 64, 1, 0);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_country`
--
DROP TABLE IF EXISTS `ps_module_country`;
CREATE TABLE IF NOT EXISTS `ps_module_country` (
 `id_module` int(10) unsigned NOT NULL,
 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
 `id_country` int(10) unsigned NOT NULL,
 PRIMARY KEY (`id_module`,`id_shop`,`id_country`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_country`
--
INSERT INTO `ps_module_country` (`id_module`, `id_shop`, `id_country`) VALUES
(1, 1, 15),
(30, 1, 15);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_currency`
--
DROP TABLE IF EXISTS `ps_module_currency`;
CREATE TABLE IF NOT EXISTS `ps_module_currency` (
 `id_module` int(10) unsigned NOT NULL,
 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
 `id_currency` int(11) NOT NULL,
 PRIMARY KEY (`id_module`,`id_shop`,`id_currency`),
 KEY `id_module` (`id_module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_currency`
--
INSERT INTO `ps_module_currency` (`id_module`, `id_shop`, `id_currency`) VALUES
(1, 1, 1),
(30, 1, 1);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_group`
--
DROP TABLE IF EXISTS `ps_module_group`;
CREATE TABLE IF NOT EXISTS `ps_module_group` (
 `id_module` int(10) unsigned NOT NULL,
 `id_shop` int(11) unsigned NOT NULL DEFAULT '1',
 `id_group` int(11) unsigned NOT NULL,
 PRIMARY KEY (`id_module`,`id_shop`,`id_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_group`
--
INSERT INTO `ps_module_group` (`id_module`, `id_shop`, `id_group`) VALUES
(1, 1, 1),
(1, 1, 2),
(1, 1, 3),
(2, 1, 1),
(2, 1, 2),
(2, 1, 3),
(3, 1, 1),
(3, 1, 2),
(3, 1, 3),
(4, 1, 1),
(4, 1, 2),
(4, 1, 3),
(5, 1, 1),
(5, 1, 2),
(5, 1, 3),
(6, 1, 1),
(6, 1, 2),
(6, 1, 3),
(7, 1, 1),
(7, 1, 2),
(7, 1, 3),
(8, 1, 1),
(8, 1, 2),
(8, 1, 3),
(9, 1, 1),
(9, 1, 2),
(9, 1, 3),
(10, 1, 1),
(10, 1, 2),
(10, 1, 3),
(11, 1, 1),
(11, 1, 2),
(11, 1, 3),
(12, 1, 1),
(12, 1, 2),
(12, 1, 3),
(13, 1, 1),
(13, 1, 2),
(13, 1, 3),
(14, 1, 1),
(14, 1, 2),
(14, 1, 3),
(15, 1, 1),
(15, 1, 2),
(15, 1, 3),
(16, 1, 1),
(16, 1, 2),
(16, 1, 3),
(17, 1, 1),
(17, 1, 2),
(17, 1, 3),
(18, 1, 1),
(18, 1, 2),
(18, 1, 3),
(19, 1, 1),
(19, 1, 2),
(19, 1, 3),
(20, 1, 1),
(20, 1, 2),
(20, 1, 3),
(21, 1, 1),
(21, 1, 2),
(21, 1, 3),
(22, 1, 1),
(22, 1, 2),
(22, 1, 3),
(23, 1, 1),
(23, 1, 2),
(23, 1, 3),
(24, 1, 1),
(24, 1, 2),
(24, 1, 3),
(25, 1, 1),
(25, 1, 2),
(25, 1, 3),
(26, 1, 1),
(26, 1, 2),
(26, 1, 3),
(27, 1, 1),
(27, 1, 2),
(27, 1, 3),
(28, 1, 1),
(28, 1, 2),
(28, 1, 3),
(29, 1, 1),
(29, 1, 2),
(29, 1, 3),
(30, 1, 1),
(30, 1, 2),
(30, 1, 3),
(31, 1, 1),
(31, 1, 2),
(31, 1, 3),
(32, 1, 1),
(32, 1, 2),
(32, 1, 3),
(33, 1, 1),
(33, 1, 2),
(33, 1, 3),
(34, 1, 1),
(34, 1, 2),
(34, 1, 3),
(35, 1, 1),
(35, 1, 2),
(35, 1, 3),
(36, 1, 1),
(36, 1, 2),
(36, 1, 3),
(37, 1, 1),
(37, 1, 2),
(37, 1, 3),
(38, 1, 1),
(38, 1, 2),
(38, 1, 3),
(39, 1, 1),
(39, 1, 2),
(39, 1, 3),
(40, 1, 1),
(40, 1, 2),
(40, 1, 3),
(41, 1, 1),
(41, 1, 2),
(41, 1, 3),
(42, 1, 1),
(42, 1, 2),
(42, 1, 3),
(43, 1, 1),
(43, 1, 2),
(43, 1, 3),
(44, 1, 1),
(44, 1, 2),
(44, 1, 3),
(45, 1, 1),
(45, 1, 2),
(45, 1, 3),
(46, 1, 1),
(46, 1, 2),
(46, 1, 3),
(47, 1, 1),
(47, 1, 2),
(47, 1, 3),
(48, 1, 1),
(48, 1, 2),
(48, 1, 3),
(49, 1, 1),
(49, 1, 2),
(49, 1, 3),
(50, 1, 1),
(50, 1, 2),
(50, 1, 3),
(51, 1, 1),
(51, 1, 2),
(51, 1, 3),
(52, 1, 1),
(52, 1, 2),
(52, 1, 3),
(53, 1, 1),
(53, 1, 2),
(53, 1, 3),
(54, 1, 1),
(54, 1, 2),
(54, 1, 3),
(55, 1, 1),
(55, 1, 2),
(55, 1, 3),
(56, 1, 1),
(56, 1, 2),
(56, 1, 3),
(57, 1, 1),
(57, 1, 2),
(57, 1, 3),
(58, 1, 1),
(58, 1, 2),
(58, 1, 3),
(59, 1, 1),
(59, 1, 2),
(59, 1, 3),
(60, 1, 1),
(60, 1, 2),
(60, 1, 3),
(61, 1, 1),
(61, 1, 2),
(61, 1, 3),
(62, 1, 1),
(62, 1, 2),
(62, 1, 3),
(63, 1, 1),
(63, 1, 2),
(63, 1, 3),
(64, 1, 1),
(64, 1, 2),
(64, 1, 3);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_preference`
--
DROP TABLE IF EXISTS `ps_module_preference`;
CREATE TABLE IF NOT EXISTS `ps_module_preference` (
 `id_module_preference` int(11) NOT NULL AUTO_INCREMENT,
 `id_employee` int(11) NOT NULL,
 `module` varchar(255) NOT NULL,
 `interest` tinyint(1) DEFAULT NULL,
 `favorite` tinyint(1) DEFAULT NULL,
 PRIMARY KEY (`id_module_preference`),
 UNIQUE KEY `employee_module` (`id_employee`,`module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_preference`
--

-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_module_shop`
--
DROP TABLE IF EXISTS `ps_module_shop`;
CREATE TABLE IF NOT EXISTS `ps_module_shop` (
 `id_module` int(11) unsigned NOT NULL,
 `id_shop` int(11) unsigned NOT NULL,
 PRIMARY KEY (`id_module`,`id_shop`),
 KEY `id_shop` (`id_shop`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_module_shop`
--
INSERT INTO `ps_module_shop` (`id_module`, `id_shop`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(26, 1),
(27, 1),
(28, 1),
(29, 1),
(30, 1),
(31, 1),
(32, 1),
(33, 1),
(34, 1),
(35, 1),
(36, 1),
(37, 1),
(38, 1),
(39, 1),
(40, 1),
(41, 1),
(42, 1),
(43, 1),
(44, 1),
(45, 1),
(46, 1),
(47, 1),
(48, 1),
(49, 1),
(50, 1),
(51, 1),
(52, 1),
(53, 1),
(54, 1),
(55, 1),
(56, 1),
(57, 1),
(58, 1),
(59, 1),
(60, 1),
(61, 1),
(62, 1),
(63, 1),
(64, 1);
-- --------------------------------------------------------
--
-- Estrutura da tabela `ps_tab_module_preference`
--
DROP TABLE IF EXISTS `ps_tab_module_preference`;
CREATE TABLE IF NOT EXISTS `ps_tab_module_preference` (
 `id_tab_module_preference` int(11) NOT NULL AUTO_INCREMENT,
 `id_employee` int(11) NOT NULL,
 `id_tab` int(11) NOT NULL,
 `module` varchar(255) NOT NULL,
 PRIMARY KEY (`id_tab_module_preference`),
 UNIQUE KEY `employee_module` (`id_employee`,`id_tab`,`module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `ps_tab_module_preference`
--

Edited by CarlosC (see edit history)
Link to comment
Share on other sites

Tanks Vekia and CarlosC, but I've tried to run the CarlosC's query and others i found on forums but i got errors, i think my prestashop version is different, because its from 1.5.4.0 and i've updated to 1.5.4.1, i don't know... :unsure:

i think the best way to not loose data or configuration is to make regular backups, lesson learned B)

any way, i've reeinstalled Prestashop from zero... again...

 

but we need someone to make a module (reset prestashop config module) anyone? :D

Edited by majority (see edit history)
  • Like 1
Link to comment
Share on other sites

So the tables that contain all hook and module information are:

ps_hook_module

ps_hook_module_exceptions

ps_module

ps_module_access

ps_module_country

ps_module_currency

ps_module_group

ps_module_preference

ps_module_shop

ps_tab_module_preference

 

Right?

Link to comment
Share on other sites

  • 2 months later...

So if you don't like a theme you installed you're stuck with a broken layout ?! This is inadmissible !

You can't even reinstall the default theme.

 

I installed 2 themes (using the importation module) and for each I did check the option to use the themes' configuration. Then I selected back the default theme and as a result the header footer and main content of my store disappeared. (see screenshot)

So I deleted the themes from the interface which deleted their folders. Then I replaced the entire modules folder by the one in the zip. That didn't change anything. Now I just tried CarlosC's SQL query and it didn't do anything either.

And no I'm not going to reinstall prestashop, there has to be a way.

 

b7qs.jpg

Link to comment
Share on other sites

So if you don't like a theme you installed you're stuck with a broken layout ?! This is inadmissible !

You can't even reinstall the default theme.

 

I installed 2 themes (using the importation module) and for each I did check the option to use the themes' configuration. Then I selected back the default theme and as a result the header footer and main content of my store disappeared. (see screenshot)

So I deleted the themes from the interface which deleted their folders. Then I replaced the entire modules folder by the one in the zip. That didn't change anything. Now I just tried CarlosC's SQL query and it didn't do anything either.

And no I'm not going to reinstall prestashop, there has to be a way.

 

b7qs.jpg

There is a way to prevent the lost of your previous theme: backup current theme/Files/DB before installing a new theme!

This is only a preventive solution if you have not made a backup you're fu**ed! sorry....

Link to comment
Share on other sites

Apparently the popular free theme simple responsive that screwed up my installation. Even after I restored the default theme it and the other free theme were broken.

 

BTW you can restore the default theme simply by exporting then importing it (from the dedicated module).

Here it is attached if anyone needs it.

PrestaShop 1.5.4.1 default theme.zip

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I am using v1.5.5. After installing the free presonsive theme, the default theme was messed up, so I went to download this and re-imported it hoping that the modules/positions/themes would be restored. That didn't happen. I would rather not re-install again, but in case if this is a must, how do I go about it?

No solution worked for me ! So I reinstalled like I installed then I did a backup of the database and of the files so I can just redeploy them (it's faster than reinstall).

Link to comment
Share on other sites

  • 5 months later...

i found that in the modules section - if you accidently remove a block/module just hit Reset in the text links below the module name and it'll return it to the original location.

That's not always works, and if you have 200+ modules you have to do a lot of clicking...

and what about the other elements? some themes screw your prestashop core files.

prestashop 1.6 must have a non destructive theme modification and a real "reset to the original position/theme/design"

feature.

 

Just my 2 cents.

Edited by majority (see edit history)
  • Like 1
Link to comment
Share on other sites

i suppose i should've stated that for me, just starting out, when learning the tool that is PrestaShop, the reset link, i found to be very helpful.

 

due to the fact that i'm a noob to this, i am still learning the in's and out's so perhaps i spoke to quickly or offered a solution that may not fit everyones needs, but for me, it did work and restored my info as i needed it.

 

thank you for the clarification though - it does put such a fix in perspective.

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Is there any news in this matter, 

 

Is it possible to backup only the databases that contains orders and products and then clean install prestashop, Anyone have any experience with that.

 

My shop is also completely messes up after installing theme and I have no clue about how to reset it to default so It will work again. 

 

Prestashop 1.6xx

Link to comment
Share on other sites

it's not as easy as it seems,

but it is possible.

you can dump databses

ps_customer_*

ps_order_*

ps_products_*

ps_category_*

 

and import these tables in your shop, of course passwords for customer accounts will not work due to the differencies in the security keys, but they will be able to restore their passwords

  • Like 1
Link to comment
Share on other sites

it's not as easy as it seems,

but it is possible.

you can dump databses

ps_customer_*

ps_order_*

ps_products_*

ps_category_*

 

and import these tables in your shop, of course passwords for customer accounts will not work due to the differencies in the security keys, but they will be able to restore their passwords

Hey Vekia, can you make a module that auto restore your store/theme/data? I will be the first to buy ;)

Link to comment
Share on other sites

  • 1 year later...
  • 1 year later...

I have the same issue. please let me know the correct solution of this problem.

 

I am migrated prestsahop 1.5.6 version to 1.6.1 version. Migrated complete properly .

 

I am selected "default-bootstrap" theme in back-office. I clicked to "save" button its getting below error.

 

INSERT INTO `ps_hook_module` (`id_module`, `id_shop`, `id_hook`, `position`)
VALUES (68, 1, 0, 1)
 
How to resolve it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...