Jump to content

Les fichiers dans prestashop


Recommended Posts

Bonjour 

 

 

J'aimerai faire moi même la page web pour mobile de mon site web

 

J'ai une classe en php que j'utilise pour identifier si c'est un mobile ou un pc, elle marche très bien

Mais j'ai besoin de savoir quel fichier ".php" prestashop lance t'il en premier.

 

J'ai essayer avec "index.php" et ça ne marche pas 

 

pour info je rajoute que ces lignes la :

require 'Mobile_Detect.php';
			$detect = new Mobile_Detect();
			 
			if ($detect->isMobile())
			{
			   header('Location: adressedemonsite'); 
			}
Link to comment
Share on other sites

<?php

/*

* 2007-2014 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 [email protected] 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 <[email protected]>

* @copyright 2007-2014 PrestaShop SA

* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*/

 

        

require('tools/mobile_Detect/Mobile_Detect.php');

            $detect = new Mobile_Detect();

            

            if ($detect->isMobile())

            {

             header('Location: http://192.168.3.162/sitemobile/testmobile.php');

            }

        

require(dirname(__FILE__).'/config/config.inc.php');

Dispatcher::getInstance()->dispatch();

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

oups pardon ^-^

 

c'est juste une page de test pour voir si la redirection a marché

 

<!DOCTYPE html>
<html>
<head>
	<title>mobile</title>
</head>
<body>
<h1>TESSSSSSST</h1>
</body>
</html>
Link to comment
Share on other sites

Problème résolue je me suis embrouillez dans les fichiers ,j'envoyez le mauvais sur le serveur vers les derniers changement mais mettre les lignes avant le "require(dirname(__FILE__).'/config/config.inc.php');" a très bien fonctionner du coup !

 

merci beaucoup beaucoup ! tu m'a beaucoup aidé !

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...