isaac.dvory Posted November 4, 2016 Share Posted November 4, 2016 Hello, I'm trying to edit blockcart module because I want to only display link to the cart in the site Nav bar. There was already a hook for displaynav but it still loaded the full blockcart file which isn't what I wanted, I just want a link to the cart with a little image of a cart. What I did is edit blockcart.php to call nav.tpl (which I added to my theme folder only) : public function hookRightColumn($params) { if (Configuration::get('PS_CATALOG_MODE')) return; // @todo this variable seems not used $this->smarty->assign(array( 'order_page' => (strpos($_SERVER['PHP_SELF'], 'order') !== false), 'blockcart_top' => (isset($params['blockcart_top']) && $params['blockcart_top']) ? true : false, )); $this->assignContentVars($params); if (isset($params['blockcart_tpl']) && $params['blockcart_tpl']) { return $this->display(__FILE__, 'nav.tpl'); } return $this->display(__FILE__, 'blockcart.tpl'); } It works but the problem I'm having is that the CSS file for blockcart does not load. it seems to only load when header hook is active, which I don't want. I checked that hook and it does have : $this->context->controller->addCSS(($this->_path).'blockcart.css', 'all'); but when I try to add the same to my IF , it still does not load that module css. Please help : ) Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now