Tuesday, 8 January 2019

How to move a hook in prestashop?

I need to move my hook right between the product description and the add button to the cart, in the area I marked in the photo

enter image description here

So far I can only put it before and after the buttons of social networks using the admin, but I need to put my module before the button.

This is how I create my hook:

public function install()
    {
        if (!parent::install() || !$this->registerHook('displayProductAdditionalInfo'))
            return false;
        return true;
    }

public function uninstall()
    {
        if (!parent::uninstall() || !$this->unregisterHook('displayProductAdditionalInfo'))
            return false;
        return true;
    }

public function hookDisplayProductAdditionalInfo($params)
    {
        return $this->runnable();
    }

And this is my file that contains the iframe that I want to show

{block name='product_description_short' prepend}
    <style type='text/css'> 
        .crediya_details_products { border: none; width: 100%; height: {$height}px;  } 
    </style>
    <iframe class='crediya_details_products' src='{$iframe}{$token}'></iframe>
{/block}

How can I move my hook to where I need it?



from How to move a hook in prestashop?

No comments:

Post a Comment