Jump to content

How to integrate PW into Shopware


dotnetic
 Share

Recommended Posts

I want to use the ProcessWire API and rendering of templates inside of a Shopware installation.

So CMS pages should be served via ProcessWire (but with elements like a shopping cart coming from Shopware) and the products category page and the products detail page should be served from Shopware.

How would I do that? I tried to include ProcessWire´s index.php into the shopware.php and even Shopware´s autoload.php but when I do this, I get a 500 Server Error.

I use ProcessWire Version 3.0.24 (devns) and Shopware 5.2.1

My shopware directory is located at the same level as ProcessWire´s index.php and site and wire directories.

Now I enabled ProcessWire´s debug mode and I get the following error:
 

Error: Uncaught Zend_Session_Exception: session has already been started by session.auto-start or session_start() in K:\xampp\htdocs\meinprojekt\relaunch2016\src\shopware\engine\Library\Zend\Session.php:473
Stack trace:
#0 K:\xampp\htdocs\meinprojekt\relaunch2016\src\shopware\engine\Shopware\Components\DependencyInjection\Bridge\Session.php(77): Zend_Session::start(Array)
#1 K:\xampp\htdocs\meinprojekt\relaunch2016\src\shopware\var\cache\production_201607041559\proxies\ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer.php(679): Shopware\Components\DependencyInjection\Bridge\Session->factory(Object(ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer))
#2 K:\xampp\htdocs\meinprojekt\relaunch2016\src\shopware\vendor\symfony\dependency-injection\Container.php(314): ShopwareProductionda39a3ee5e6b4b0d3255bfef95601890afd80709ProjectContainer->getSessionService()
#3 K:\xampp\htdocs\meinprojekt\relaunch2016\src\shopwar (line 473 of K:\xampp\htdocs\jentschura\p-jentschura\relaunch2016\src\shopware\engine\Library\Zend\Session.php) 

This error message was shown because: site is in debug mode. ($config->debug = true; => /site/config.php). Error has been logged.

So it seems, when I include ProcessWire, it wants to start a new session, but Shopware already started one. Any suggestions what to do?

Link to comment
Share on other sites

@felix pointed me to the following post which provides a possible solution for avoiding multiple session_starts, but I don´t get it to work.

When I use

Zend_Session::start();

I get an error

Uncaught Error: Class 'Zend_Session' not found

because Shopware or Zend is not included in ProcessWire. I try to include ProcessWire into Shopware.

 

 

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
 Share

×
×
  • Create New...