Query another database from .tpl page
5 posts
• Page 1 of 1
Query another database from .tpl page
Just installed opencart and loving it. I'm starting to customise sections of the page layout and modify the code... I now have an error at the bottom of catalog pages:
Error: Table 'minimonk_admin.session' doesn't exist
Error No: 1146
select * from session where session_id = '045427b19199d8548d1937fb470f7cf5'
What I've done is replace the entire 'information.tpl' document with a random testimonial from another mysql database (I liked where it was positioned as a 'testimonial block'. Is this a bad thing to do? Should I move the testimonials table into the opencart database or is there another fix out there?
Thanks to all the developers and contributors out there!!
Error: Table 'minimonk_admin.session' doesn't exist
Error No: 1146
select * from session where session_id = '045427b19199d8548d1937fb470f7cf5'
What I've done is replace the entire 'information.tpl' document with a random testimonial from another mysql database (I liked where it was positioned as a 'testimonial block'. Is this a bad thing to do? Should I move the testimonials table into the opencart database or is there another fix out there?
Thanks to all the developers and contributors out there!!
- redboxdesign
- Posts: 7
- Joined: Fri Apr 11, 2008 5:57 am
Re: Query another database from .tpl page
Information is a module that can be enabled or disabled if you want. Have a look in store admin menu Extensions->Module to see them all.
What you could do is to create your own testimonial module based on the module that is closest in functionality to what you want and modify layout.tpl to display it if it is enabled.
What you could do is to create your own testimonial module based on the module that is closest in functionality to what you want and modify layout.tpl to display it if it is enabled.
- bruce
- Posts: 1094
- Joined: Wed Dec 12, 2007 6:26 am
Re: Query another database from .tpl page
Thanks bruce! I played around with enabling/disabling modules but ended up creating a table within the opencart database and a small php script to call the data inside the layout.tpl file. Easier than creating a new module which seems very hard to do as a newbie!
- redboxdesign
- Posts: 7
- Joined: Fri Apr 11, 2008 5:57 am
Re: Query another database from .tpl page
I am also having this problem, so it seems when a custom php mysql query is added in the layout file this error message occurs.
Did you manage to get this of this error message?
Did you manage to get this of this error message?
- zapper
- Posts: 13
- Joined: Sun Oct 12, 2008 10:47 pm
Re: Query another database from .tpl page
I created the tables within the opencart cart database, now it is fine and does not up with the error.
- zapper
- Posts: 13
- Joined: Sun Oct 12, 2008 10:47 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests













