Stéphane1405 Posted August 19, 2015 Share Posted August 19, 2015 Hello, I have got one Prestashop and one Wordpress running on the same machine. I'm trying to use Prestashop order class in Wordpress . I have included prestashop\config\config.inc.php and prestashop\init.php in my Wordpress script but it redirects Wordpress on Prestashop. Any help would be greatly appreciated. STEF Link to comment Share on other sites More sharing options...
Stéphane1405 Posted August 19, 2015 Author Share Posted August 19, 2015 I eventually found the answer. On your external script, use a constant ex: PRESTASHOP_EXTERNAL_SCRIPT external_script.php define('PRESTASHOP_EXTERNAL_SCRIPT', true); include(dirname(__FILE__).'/../prestashop/config/config.inc.php'); then on prestashop/classes/shop/shop.php add the following BELOW (L401) // Hmm there is something really bad in your Prestashop ! if (!Validate::isLoadedObject($default_shop)) throw new PrestaShopException('Shop not found'); ADD if (defined('PRESTASHOP_EXTERNAL_SCRIPT')) { $shop = $default_shop; } else { AND below (L441) header('HTTP/1.0 '.$redirect_code.' '.$redirect_header); header('Location: http://'.$url); exit; ADD } Hope this will help. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now