Jump to content

Custom module 'displayProductFooter'


Recommended Posts

Hello there,

I am developing a custom module for Prestashop 1.7 for color management. 

I am trying to display a table of color codes after the "product-information" section.  The attached image shows the section to display through this plugin. 

This is the piece of code I wrote :

 

public function install()
{
    if (Shop::isFeatureActive())
        Shop::setContext(Shop::CONTEXT_ALL);

    if (!parent::install() ||
        !$this->registerHook('displayProductAdditionalInfo') ||
        !$this->registerHook('header') ||
        !$this->registerHook('displayProductFooter')||
        !$this->registerHook("displayFooter") ||
        !Configuration::updateValue('COLORCHART', 'colorchart')
    )
        return false;

    return true;
}

 

public function hookDisplayProductFooter($params)
{

    return $this->display(__FILE__, 'views/templates/front/colorChart.tpl');
}

Unfortunately, I am not getting anything displayed in the "ProductFooter". I am displaying the colors using jquery and I want to load this from my .tpl view file instead.

This is the first pluging I am developing. Does anyone know how to add a section after product tabs (product-information)  on module install without having to edit the product page manually (add a hook).

Thank sin advance.

Capture.PNG

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...