alexbab Posted April 2, 2012 Share Posted April 2, 2012 Hello everyone, I hope this question has not been answered 20,000 times.... Although it seems a fairly common problem I have found little resources regarding this issue. I have a Wordpress website which integrates a prestashop shop in one of it's subfolder. my goal is to use the wordpress header for both wordpress and prestashop, and to implement the prestashop info ( containing the cart, and login info) in the wordpress header. to do so I firstly call the file config.inc.php inside the wordpress header then create a new Frontcontroller instance and call the init() function. here is my problem, calling the init function sets the prestashop cookie, wich I need to display the cart content in the wordpress header. Only I think that wordpress also sets a cookie and I get a "warning cannot modify header" Something else happens I have trouble understading, the <head> </head> html tags are closed prematurely by the inti(); function and the content of the wordpress header finds itself in the body. I have already tried to make the prestashop cookies available to wordpress by changing this_path, in the setcookie() function parameters in Cookie.php to '/'. thanks in advance for your help regards Alexandre Babeanu Link to comment Share on other sites More sharing options...
alexbab Posted April 2, 2012 Author Share Posted April 2, 2012 The warnings were due to spaces before php code , I still can't read the prestashop cookie from the wordpress page though.. Link to comment Share on other sites More sharing options...
alexbab Posted April 2, 2012 Author Share Posted April 2, 2012 I checked the registered cookies in my browser... for some reason the domains were strangely set... in the Cookie.php file I changed the parameters of the setcookie functions called in the "_setcookie($cookie = NULL)" function... I changed the $this->_path to '/' and the $this->_domain to www.mydomain.com I also installed the version 0.6 of http://wordpress.org...op-integration/ note that only changing the path as suggested in the plugin faq did not work, I also had to change the domain name. Cheers Link to comment Share on other sites More sharing options...
sellas Posted December 6, 2013 Share Posted December 6, 2013 Did you succeed in calling the WP header in PS ? 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