jager Posted March 28, 2012 Share Posted March 28, 2012 Hi all, anyone know I can i display the content of a CMS page in the product page (product.tpl) I'v find how can i do but not for 1.4.x version.... only for older version please help me thank to all Link to comment Share on other sites More sharing options...
jondrew Posted July 5, 2012 Share Posted July 5, 2012 Hi, Anybody got any ideas about this I used this (http://www.prestashop.com/forums/topic/79566-solved-include-a-cms-page-into-the-template/) method in prestashop 1.3 but doesn't seem to work in 1.4? Any ideas would be much appreciated!! Thanks Link to comment Share on other sites More sharing options...
Krystian Podemski Posted July 12, 2012 Share Posted July 12, 2012 Hello Jagger, You can modify ProductController to display page what you want. Go to controllers/ProductController.php and go to line #103, you can see method process() in this place. Now scroll down to line #122 before: self::$smarty->assign('virtual', ProductDownload::getIdFromIdProduct((int)$this->product->id)); and add this code: /** my_page **/ $my_page = new CMS(YOUR_ID_OF_PAGE, self::$cookie->id_lang); self::$smarty->assign('my_page',$my_page); /** END my_page **/ YOUR_ID_OF_PAGE replace by your page id Now you have access to object of your page. You can use for example {$my_page->meta_title} or {$my_page->content} Happy selling! 2 Link to comment Share on other sites More sharing options...
shqvarny Posted January 13, 2013 Share Posted January 13, 2013 Hi anyone know how to display content from cms links in recent prestashop version? (1.5.3) Link to comment Share on other sites More sharing options...
ricardoferreira.net Posted April 12, 2013 Share Posted April 12, 2013 Thanks, works for me. Link to comment Share on other sites More sharing options...
Krishkv Posted April 16, 2013 Share Posted April 16, 2013 Add a widget to the cms page which allows you to specify a category if you need to as well as the template. 1 // all products (it is still paginated) 2 [spam-filter]block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"[spam-filter] 3 4 // products from one category (it is still paginated) 5 [spam-filter]block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"[spam-filter] Link to comment Share on other sites More sharing options...
karin_aeris Posted September 10, 2017 Share Posted September 10, 2017 (edited) how can i do this with prestashop 1.7? Display CMS content in product page? Edited September 11, 2017 by karin_aeris (see edit history) 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