ilovekutchi.com Posted February 26, 2018 Share Posted February 26, 2018 (edited) Hi. I am looking for a module that integrates an existing wordpress blog into prestashop. It is essential that the blog main page (eg. www.shop.com/blog) keeps the looks of wordpress, but also has the cart, shop menus, shop search, etc. The blog stays at wordpress (same files, database, URLs) and posting too. Also, it should include a block to show recent blog posts in the main page (www.shop.com). Do you know of any module, paid or free, that meets my needs? Should go for woocommerce if I want that? Many thanks! Edited February 26, 2018 by ilovekutchi.com (see edit history) Link to comment Share on other sites More sharing options...
ilovekutchi.com Posted March 5, 2018 Author Share Posted March 5, 2018 Found this in spanish:https://www.prestashop.com/forums/topic/2320[spam-filter]aporte-integrar-wordpress-con-prestashop-15/https://www.prestashop.com/forums/topic/436733-solucionado-integrar-wordpress-con-prestashop-16014/ It's working for 1.6.1.18 Basically: - The blog needs to be in the folder /blog/ insides your shop (yourshop/blog/) - Replace the header.php of your blog for: <?php require_once(dirname(__FILE__).'/../../../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../../../header.php'); ?> - Replace the footer.php for: <?php require_once(dirname(__FILE__).'/../../../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../../../footer.php'); ?> - In style.css of wordpress you might need to add div.row to some selectors and this code somewhere in the file: #pagenotfound #left_column, #pagenotfound #right_column, #pagenotfound #footer {display:block !important;} - In the header.tpl of your theme, right before <body... add: {$dir=$smarty.server.PHP_SELF} {if strpos($dir,"/blog/")!==false} <link href="{$tpl_uri|escape:'html':'UTF-8'}css/global.css" rel="stylesheet" type="text/css" media="all" /> <link rel='stylesheet' href='{$base_dir}blog/wp-content/themes/olsen-light/style.css' type='text/css' media='all' /> </head> <body id="blog"> {else}</head> and after the original <body (...)> add {/if}. Don't forget to replace "olsen-light" for your theme name. - In the same file, right before <title> add: {$dir=$smarty.server.PHP_SELF} {if strpos($dir,"/blog/")===false} and before <meta name="generator" (...) add {/if}. - Also in header.tpl add {hook h='displayMyNewHook'} between meta and link tags. - Install the module modulewp 1_5_4.zip from the first link of this post. To solve javascript errors, put this into modulowp.tpl: <!-- Inicio Modulo integracion WP --> {$messageSmarty} {$js_def} {foreach from=$js_files item=js_uri key=i} <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script> {/foreach} <!-- Fin Modulo integracion WP --> I hope I didn't forget anything. Link to comment Share on other sites More sharing options...
Pedro73 Posted October 5, 2020 Share Posted October 5, 2020 Hello ilovekutchi and others, I'm trying to integrate wordpress following these instructions but it keeps showing 4 PageCache errors in chrome console: -PageCache cannot parse data of error=SyntaxError:... -PageCache cannot display dynamic modules:... -PageCache cannot parse data of error=SyntaxError:... -PageCache cannot display dynamic modules:... Also, in mobile version, there is a button that displays the menu in the Prestashop header, but it's not working in wordpress pages. Any help with that? Thank you. Link to comment Share on other sites More sharing options...
Pedro73 Posted October 13, 2020 Share Posted October 13, 2020 On 10/9/2020 at 9:18 AM, ndiaga said: Hi, Witch instructions are talking about? Hello, this: On 3/5/2018 at 2:28 PM, ilovekutchi.com said: Found this in spanish:https://www.prestashop.com/forums/topic/2320[spam-filter]aporte-integrar-wordpress-con-prestashop-15/https://www.prestashop.com/forums/topic/436733-solucionado-integrar-wordpress-con-prestashop-16014/ It's working for 1.6.1.18 Basically: - The blog needs to be in the folder /blog/ insides your shop (yourshop/blog/) - Replace the header.php of your blog for: <?php require_once(dirname(__FILE__).'/../../../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../../../header.php'); ?> - Replace the footer.php for: <?php require_once(dirname(__FILE__).'/../../../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../../../footer.php'); ?> - In style.css of wordpress you might need to add div.row to some selectors and this code somewhere in the file: #pagenotfound #left_column, #pagenotfound #right_column, #pagenotfound #footer {display:block !important;} - In the header.tpl of your theme, right before <body... add: {$dir=$smarty.server.PHP_SELF} {if strpos($dir,"/blog/")!==false} <link href="{$tpl_uri|escape:'html':'UTF-8'}css/global.css" rel="stylesheet" type="text/css" media="all" /> <link rel='stylesheet' href='{$base_dir}blog/wp-content/themes/olsen-light/style.css' type='text/css' media='all' /> </head> <body id="blog"> {else}</head> and after the original <body (...)> add {/if}. Don't forget to replace "olsen-light" for your theme name. - In the same file, right before <title> add: {$dir=$smarty.server.PHP_SELF} {if strpos($dir,"/blog/")===false} and before <meta name="generator" (...) add {/if}. - Also in header.tpl add {hook h='displayMyNewHook'} between meta and link tags. - Install the module modulewp 1_5_4.zip from the first link of this post. To solve javascript errors, put this into modulowp.tpl: <!-- Inicio Modulo integracion WP --> {$messageSmarty} {$js_def} {foreach from=$js_files item=js_uri key=i} <script type="text/javascript" src="{$js_uri|escape:'html':'UTF-8'}"></script> {/foreach} <!-- Fin Modulo integracion WP --> I hope I didn't forget anything. 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