Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I'm trying to set up a site using CouchCMS and Opencart.
I need to use OpenCart for the Store and Couch for the rest of the site and a blog.
Open Cart is working correctly from the admin side, Couch is working correctly from the admin side, but there an issue with the front end.

I have added the Couch Opening tag to the OpenCart header.tpl and the couch invoke closing tag to the footer.tpl
When the invoke tag is in the footer, I get just the footer (no header, body, menu's etc) and the following message:
Code: Select all
Fatal error: Class 'COUCH' not found in D:\xampplite\htdocs\VIN\catalog\view\theme\vintessential\template\common\footer.tpl on line 48

When I remove the invoke tag from the footer, I'm getting the following error message:

Code: Select all
Notice: Undefined variable: port in D:\xampplite\htdocs\VIN\couch\header.php on line 219Notice: Undefined variable: PAGE in D:\xampplite\htdocs\VIN\couch\cms.php on line 26
Fatal error: Call to a member function get_secret_key() on a non-object in D:\xampplite\htdocs\VIN\couch\auth\auth.php on line 48

I've looked at both the header.php and cms.php files, but as the code is obfuscated I can't see what might be causing the problem.

Hi Dan,

While it is definitely possible to retrofit Couch into a PHP application (such as Opencart in this case), instead of the usual static HTMl templates, generally it doesn't make much sense to do so.

Please let me explain - the only physical file that is invoked via the URL in Opencart is the 'index.php' (all the other functionalities are invoked via parameters to this file).
By adding require_once( 'couch/cms.php' ); and COUCH::invoke(); to the header and footer templates of Opencart, you'll effectively begin to manage Opencart (index.php) via CouchCMS.
First Couch will execute and then it will make Opencart execute and then output the combined results.
This is possible but we incur the unnecessary overhead of running both of them in tandem and also run the risk of both the applications corrupting each other's global data etc.

More importantly, why exactly are we trying to do this? Could you please explain what you have in mind?

As far as I can see, you probably need Couch to manage some static pages (about-us etc.) and the blog. What we should do is create static HTML templates for these sections and attach Couch to them while letting Opencart run separately. The menu in Opencart templates can be made to link to Couch managed sections.

Please let me know the scenario you wish to manage in detail and we'll try to work out a solution.

Thanks for the explanation. I didn't realise OpenCart operated like that. I can see it doesn't make sense to run them both combined.

Initially, I was hoping to have the store in the top level folder of the site rather than in a 'store' folder (mainly for SEO reasons), I also would like to be able to 'pull' products from OpenCart to be 'featured' on certain pages i.e. under a related article or on the homepage as seasonal specials etc.

I'm sure there will be another way around this without the need to increase the overhead or risk the variable conflicts you mentioned.

I'll put it together with Couch and OpenCart separated first, but I'm sure I'll be back with some integration questions afterwards.

Thanks KK

3 posts Page 1 of 1

Who is online

In total there are 18 users online :: 0 registered, 0 hidden and 18 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 18 guests