Show content from PrestaShop footer in Joomla footer?

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Show content from PrestaShop footer in Joomla footer?

Post by vincebodie » Tue Nov 25, 2014 4:22 pm

I am currently developing a site that uses Joomla for the content pages and PrestaShop for the store pages:
http://askwhatif.org/microfiber/
http://askwhatif.org/microfiber/store/prestashop/

I have successfully tweaked both templates to make the headers match, and now I'm working on the footer. What I'm wondering before I get too far into this is this... Is there a way to display the whole PrestaShop footer in a singe Joomla module position?

jcms
I've been banned!
Posts: 2233
Joined: Wed Nov 19, 2014 9:23 am

Re: Show content from PrestaShop footer in Joomla footer?

Post by jcms » Wed Nov 26, 2014 9:28 am

- try to use Curl and file_get_contents
- if have rss feed, you can use some Feed Module

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1469
Joined: Mon Nov 12, 2012 10:48 pm

Re: Show content from PrestaShop footer in Joomla footer?

Post by sitesrus » Wed Nov 26, 2014 2:29 pm

I've found it easier to work with Joomla on other sites. Joomla is very flexible and easy to load the framework up elsewhere, other systems fall short sometimes.

With some code/expertise you may be able to easily inject joomla into prestashop by including a file, calling the framework, innitializing the app, and just rendering module positions yourself. So put joomla in prestashop so it looks like a single site when you visit the prestashop system.

Curl is a bad suggestion, however alternatives mean you need to know a bit about programming and how to write prestashop modules or override the template. But it's possible in PHP to just instantiate the joomla framework and tell it to render the footer.

Old example from a code snippet where we did something similar,

Code: Select all

<?php
define( '_JEXEC', 1 );

define('JPATH_BASE', dirname(__FILE__) );

define( 'DS', DIRECTORY_SEPARATOR );

require( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require( JPATH_LIBRARIES        .DS.'joomla'.DS.'import.php');

jimport( 'joomla.environment.uri' );
jimport( 'joomla.user.user');
jimport('joomla.application.module.helper');
 
$mainframe =& JFactory::getApplication('site');

$modules = JModuleHelper::getModules('<position>');
$document   = JFactory::getDocument();
$renderer   = $document->loadRenderer('module');
$contents = $renderer->render(current($modules), array('style'=>''));

echo $contents;
?>
Just don't forget you want to make state is preserved so you may need to do session stuff with Joomla as well and make sure both prestashop and joomla don't collide for sessions. Frameworks now think about that stuff, but some systems think they are the only ones in existence like open cart and do all session stuff straight with PHP so other systems break down when you try and have to systems and sessions...

Have you bridges user systems and logins for both systems? Ie user state persists in both systems transparently?
I like working with Joomla :). I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.

vincebodie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 138
Joined: Thu Sep 02, 2010 3:57 am

Re: Show content from PrestaShop footer in Joomla footer?

Post by vincebodie » Wed Nov 26, 2014 3:37 pm

sitesrus wrote:I've found it easier to work with Joomla on other sites. Joomla is very flexible and easy to load the framework up elsewhere, other systems fall short sometimes.

With some code/expertise you may be able to easily inject joomla into prestashop by including a file, calling the framework, innitializing the app, and just rendering module positions yourself. So put joomla in prestashop so it looks like a single site when you visit the prestashop system.

Curl is a bad suggestion, however alternatives mean you need to know a bit about programming and how to write prestashop modules or override the template. But it's possible in PHP to just instantiate the joomla framework and tell it to render the footer.
Thanks for the suggestion. The issue I have however is that I would prefer to keep the footer as it is laid out in PrestaShop, so showing the Joomla footer content in PS isn't the direction I want to go.
sitesrus wrote:Just don't forget you want to make state is preserved so you may need to do session stuff with Joomla as well and make sure both prestashop and joomla don't collide for sessions. Frameworks now think about that stuff, but some systems think they are the only ones in existence like open cart and do all session stuff straight with PHP so other systems break down when you try and have to systems and sessions...

Have you bridges user systems and logins for both systems? Ie user state persists in both systems transparently?
There is a Joomla extension for this, is this what you are referring to?
http://extensions.joomla.org/extensions ... dges/26417

Ideally I would also like to have the PS search functionality within Joomla, as well as the Newsletter subscription function.

User avatar
sitesrus
Joomla! Ace
Joomla! Ace
Posts: 1469
Joined: Mon Nov 12, 2012 10:48 pm

Re: Show content from PrestaShop footer in Joomla footer?

Post by sitesrus » Wed Nov 26, 2014 4:34 pm

That plugin is an example of bridging authentication in joomla and prestashop yes. This allows you to make two seperate systems seam as one and share user bases for authentication, but other integrations would still be missing.

I'm not sure if you can initialize the prestashp framework and render module positions as easily as you can joomla or if you can at all. I'm not familiar with prestashop development. But if you could you should look into it so you can inject prestashop footer in joomla.

Static HTML tweaks/hacks will work. IE copy the prestashop output HTML for the footer and create a custom HTML module in joomla, paste the HTML from prestashop, publish it to the footer position, and you have a prestashop footer module in joomla.

Just be aware that when you do this type of fixes like template hacks, HTML pasting, etc. you run the risk of updating multiple spots now to change one thing, and clobbering on updates if you make direct template hacks. Also be aware if prestashop output html uses relative images ie /images/ you'll have to fully qualify it http://<url>/prestashop/images otherwise the images may not render properly because they're relatively pointing to the wrong place.
I like working with Joomla :). I offer the following professional services: Custom extension development, SEO/marketing, maintenance/support, security and WCAG audits, and will work on websites at a reasonable rate.


Locked

Return to “Templates for Joomla! 3.x”