Mobius2000 Posted April 7, 2010 Share Posted April 7, 2010 Hi everyone.I am hoping someone can help me out with a way to duplicate the featured products module onto a blank page (html or php). Basically I need to have the featured products module updated as usually directly through the system but need to have a duplicate copy of the featured products box that appears on the front page to also appear on a static page not linked to anywhere in prestashop.the reason for this is a company we are doing some SEO work through is going to present the featured products box within an iframe in their system and we therefore need to provide the content in a non-template environment.Anybody got any ideas?Thank you in advance to anyone that takes a look at this for me.Richard. Link to comment Share on other sites More sharing options...
Mobius2000 Posted May 11, 2010 Author Share Posted May 11, 2010 Any tips here at all... I'm prepared to pay for assistance at this point!!!Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 11, 2010 Share Posted May 11, 2010 You can make a copy of the index.php, remove footer, and change header to init. Then call Module::getInstanceByName('homefeatured')->hookHome(). Link to comment Share on other sites More sharing options...
Mobius2000 Posted May 11, 2010 Author Share Posted May 11, 2010 Thank you so much for the reply... I followed most of it but you lost me at "change header to init" onwards.I am so sorry for asking but was there any chance you could offer a little more detail, I am very new at PHP. Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 11, 2010 Share Posted May 11, 2010 Change include(dirname(__FILE__).'/header.php'); to include(dirname(__FILE__).'/init.php'); Link to comment Share on other sites More sharing options...
Mobius2000 Posted May 11, 2010 Author Share Posted May 11, 2010 Thank you so much for your help, I have been able to finally get something to show but it all seems to have lost styling and showing more content than I was expecting.I have created a duplicate of index.php and followed your guide using the following code: <?php include(dirname(__FILE__).'/config/config.inc.php'); if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = __PS_BASE_URI__; include(dirname(__FILE__).'/init.php'); $smarty->assign('HOOK_HOME', Module::hookExec('home')); $smarty->display(_PS_THEME_DIR_.'index.tpl'); ?> Using this, the normal site (which is here: http://www.directphones.com.au) stays untouched which is great but when I go to http://www.directphones.com.au/temp.php I get a jumble of the content.I am basically only after a blank page containing the featured products block.If it is at all possible to ask of a little more assistance, I will happily arrange for a $50us payment for your troubles.Thank you so much for all your time so far. Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 11, 2010 Share Posted May 11, 2010 You need to remove the home hook, and only execute the featured products. <?php include(dirname(__FILE__).'/config/config.inc.php'); if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = __PS_BASE_URI__; include(dirname(__FILE__).'/init.php'); echo Module::getInstanceByName('homefeatured')->hookHome(); ?> But this won't have any css files included. If you want to have a css file applied, you need something like this: <html> <head> <link rel="stylesheet" type="text/css" media="all" href="path-to-the-css-file" /> </head> <body> <?php include(dirname(__FILE__).'/config/config.inc.php'); if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = __PS_BASE_URI__; include(dirname(__FILE__).'/init.php'); echo Module::getInstanceByName('homefeatured')->hookHome(); ?> </body> </html> Link to comment Share on other sites More sharing options...
Mobius2000 Posted May 11, 2010 Author Share Posted May 11, 2010 Hey whitelighter, thank you, getting much closer now.It is still getting a strange layout but I will have a play with this. If you have any obvious tips (try viewing http://www.directphones.com.au/temp.php) on getting it to appear more like the original featured products I'd greatly appreciate.You've already provided me with a huge help so I'd understand if you can't spare the time for further assistance.Again, thank you so MUCH for the help. Link to comment Share on other sites More sharing options...
Burhan BVK Posted May 11, 2010 Share Posted May 11, 2010 You can try enclosing the php code (within the body tag) with a div with id center_column. If that does not work you can enclose that div with one more div with the id page. .... Link to comment Share on other sites More sharing options...
Mobius2000 Posted May 11, 2010 Author Share Posted May 11, 2010 Your a champion WhiteLighter, I have been sitting on this task for almost a month now and in one night you've been able to assist enormously.When you get a chance, forward me a PayPal or Google Checkout request for $50US as I promised and I will ensure I pay you for all your troubles.Thank you SOOOOO much. Link to comment Share on other sites More sharing options...
Gruffalo Posted July 4, 2010 Share Posted July 4, 2010 Thanks for this solution, only one problem, URL is not rewritten on other pages. Displays fine on home page using friendly URL, but once inserted in other pages, products URL appear as e.g. ..../product.php?id_product=69. Any idea how to fix this? Many thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now