Jump to content

Reloading module's content on hook


Recommended Posts

Hey all,

Is there a way to reload a module's template on hook triggered? I have the following hook
 

    public function hookDisplayProductActions($params)
    {
        $product = $params['product'];
        $product_id = $product->getId();
        $reference_to_display = $product->getReferenceToDisplay();
        $attributes = $product->getAttributes()[5]['id_attribute'];

        $custom_url = "xxxxx" . $reference_to_display . "&pi=" . $product_id . "&pa=" . $attributes;

        $this->context->smarty->assign([
            'custom_url' => $custom_url
        ], null, true);

        /* Place your code here. */
        return $this->display(__FILE__, 'custombutton.tpl');
    }

However despite that I can see this hook getting called on combination changed, the template is not reloaded, so the page is still showing with old smarty value. What am I missing or is such thing possible?

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