Jump to content

Problem using prestashop core classes in a external php file


dinobigioni

Recommended Posts

I want to write a simple script which uses Prestashop core class. I wrote this bunch of code

<?php
	ini_set('display_errors','On');
	error_reporting(E_ALL ^ E_NOTICE);
	set_time_limit(0);
	
	include(dirname(__FILE__).'/prestashop/config/config.inc.php');
	include(dirname(__FILE__) . '/prestashop/init.php');
	phpinfo();
	
?>

When i try it, i'm redirected to my store index page. What's wrong?

Thanks in advance.

 

PS: my script is in wwwroot and prestashop in wwwroot/prestashop folder

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

Hi, how to use header and footer of our Prestashop template from external php file please ?

 

for now i have :

require($_SERVER["DOCUMENT_ROOT"]."/header.php");

ErShow();
echo $TDMContent;

require($_SERVER["DOCUMENT_ROOT"]."/footer.php");

i have a custom php file.

 

thanks for your help.

Edited by Mecadisc (see edit history)
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...