Jump to content

Display cms page content in product.tpl?


PrabuSS

Recommended Posts

Hi

 

I've created cms page called delivery(id->4). I would like to display or embed this page content globally in product detail page or product.tpl.

 

How do i do this? Please any one.

 

PS version : 1.6.1.6

 

I've tried this thread, but its not working in PS 1.6.1.6

 

https://www.prestashop.com/forums/topic/284307-solved-adding-cms-content-within-another-page/

Edited by Prabukaran (see edit history)
Link to comment
Share on other sites

in product controller add:

$cms_delivery = new CMS(4, $this->context->language->id, $this->context->shop->id);

and assign it to smarty:

$this->context->smarty->assign('cms_delivery',$cms_delivery)

you will be able to use $cms_delivery variable in product.tpl file (its an array with cms object)

  • Like 1
Link to comment
Share on other sites

  • 7 years later...
On 4/5/2017 at 3:50 PM, vekia said:

in product controller add:

$cms_delivery = new CMS(4, $this->context->language->id, $this->context->shop->id);

and assign it to smarty:

$this->context->smarty->assign('cms_delivery',$cms_delivery)

you will be able to use $cms_delivery variable in product.tpl file (its an array with cms object)

 

How to implement this in 1.8?

Link to comment
Share on other sites

20 hours ago, rictools said:

Great, thanks!

Is there any way to move the CMS content out of the tabs, like next to price? I tried to play with hooks and inserted {$cmstab->content} everywhere but it does not show anywhere but in the dedicated tab.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...