Jump to content
Florian_domomat

undifined hookDisplay method style working

Recommended Posts

I was looking for a way to display the displayNav3 in base prestashop theme in 2 different hooks, the first one for the cart and the second one for the customer sign in.

After a few hours, looking for a solution,  i choose to override Ps_Shoppingcart in the way you can see below

<?php
class Ps_ShoppingcartOverride extends Ps_Shoppingcart
{
    public function __construct()
    {
        parent::__construct();
    }

    public function install()
    {
        return
            parent::install() &&
            $this->registerHook('displayHeaderCart');
    }
}

here is my header.tpl file

<div class="secondaryNav">
    <div class="secondaryNav-content">
        <div class="secondaryNav-img">
            <a href="{$urls.base_url}">
                {*            <img src="{$shop.logo}" alt="{$shop.name}">*}
                <img src="https://img/img.png" alt="{$shop.name}">
                <!--todo dell image en dure-->
            </a>
        </div>
        {hook h='displayTop' mod='ps_searchbar'}
        {hook h='displayHeaderCart'}
    </div>
</div>

It's working (i can move displayHeaderCart anywhere in a .tpl file), but i don't understand why it's work,there is absolutly nowhere a declaration of hookDisplayHeaderCart.

i would like to know how it's work. i found nothing about this subject.

Ty For help !

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More