Opencart header and Footer Call in Codeigniter Site - codeigniter

I have a site in opencart on root and Codeigniter site in sub-directory.
Is there any way to call Opencart Header and Footer in Codeigniter site.
Thanks

Well it is possible to call it, you just have to call the tpl files, but variables used there will throw errors and finally it will not work, only if you had static elements only called in your header.tpl and footer.tpl would this work, in the other cases it will not(you would have to include manyy files, and security issues would come up).

Related

Building Magento - how to keep code and CMS in sync

We are developing with Magento 1.7.0.2, we are having problem of keeping our code and our CMS page in sync. Let say I have a branch that task include
Create a new CMS page
Use jQuery slider to display products on this new CMS page
We create a new CMS page in Magento admin. We then add jquery.js and js for slider, and write js function to slide all products inside the main div of the new CMS page. However, when we check code into our branch, we only able to checkin the js files. So people are assigned to review this task, they only able to pull the js code, but not the CMS page, which I think locate inside the database. Therefore, they are unable to test, since I dont have the CMS page. I am thinking of couples way:
Passing the db around. This is not a solution, because it is big, and will take long time to import.
point db connection in app/etc/local.xml to the remote db that contain the CMS page. Also not a valid solution, because magento store url in database under web/unsecure/base_url. So I will always get redirect to the other machine ip address instead of my local ip address.
So how do I resolve this issue? What are industry accepted method for this?Please help? THank you very much
Did you try to place full content outside of block code and use only its template?
Let's say you have static page 'Slider-2014'. In WYSIWYG editor you place
{{widget type="cms/widget_block" template="customjs/slider-2014.phtml"}}
In app/design/frontend/base/default/template/ create folder 'customjs'
In folder customjs create file slider-2014.phtml and place anything you need to show in slideshow:
<div class="slider"></div>
Clear cache if needed. Then reload /slider-2014.html page and you'll get all content from that file. Now you can share folder customjs

Can I insert a phpBB Forum into a Magento CMS Static Page or Block?

I'm sure there is a much simpler solution for what I am trying to do here, but I am running out of ideas. Essentially I need to create a phpBB forum what exists within my Magento install so that the header and footer from my Magento store are always visible.
The thought is to use a CMS static page for the forum and then style it accordingly. Is there a way to accomplish what I want to do without significant modification? Or, do I just create a one off .phtml file that calls my header, footer and forum? Am I on the right page or am I over/under thinking this?
You'll need to get around Magento's bootstrap (/index.php), because phpBB won't function if Magento is intercepting every URL.
There's also the issue of Magento and phpBB not sharing authentication systems, so users have to log into one, neither, or both. That's not a great UX if you ask me, but solving that problem is a very complicated issue.
Other than that you shouldn't have many problems.

How routing is done in codeigniter?

I could not find the .htaccess file in CodeIgniter framework and i'm wondering how do they do route without it? Or it is somewhere hidden?
There is no .htaccess by default provided with codeigniter. They serve it through the index.php. .htaccess is only used to direct the urls to the index.php. This way codeigniter is working in environments where rewriting isn't allowed. Another way of getting controller and function is by query strings.
Anyway the actual routing is done in system/core/Router.php so you can read the code. Since Codeigniter is open source application that can't be hidden.

Renaming index.php and accessing other pages in Joomla

I have to do some modifications online on my website, and I don't want the users to see those pages. So I renamed index.php to index_orig.php and I put another index.html that show a message (WebSite under construction) for my users.
My problem is that I want to access online to the rest of my pages to check the modifications until satisfaction, but when I try to access the rest of the pages by their whole URL (404 error is shown).
Example : www.mywebsite.com/floder1/pagetarget.php.
Put back index.php.
In your global configuration, set the site to offline and put up a message and a logo etc (assuming you are on 2.5 or 3). You'll be able to login and see the site.
Please keep in mind that in a database driven cms there are not pages in the way that you would think of them in a static html site. Everything gets pushed into the index.php of your template file.
Update the directory default document on whatever webserver you are using. Also update any rewrite rules that may be pointing to index.php

Joomla SEO remove index.php through canonical?

I've run my Joomla 1.5 site through the Google Webmaster Tools, it's telling me my site has multiple pages with double title-tags.
Here's an example:
http://www.example.com/section/page
http://www.example.com/index.php/section/page
I'm using the default .htaccess-file from Joomla 1.5, what should I add to prevent Google to see things like this?
Perhaps a canonical-tag, but a rewrite would be mostly loved for, right?
Thanks in advance!
Either will work.
Either:
An htaccess instruction following the correct logic with a 301 redirect from index.php to clean, or
A dynamic canonical tag placed on each page template (generally in Joomla this will fix it, as placing the code on one template will (by default) place it on both the / and /index.php pages.

Resources