Jump to content

How to display a module under the shopping cart button?


Recommended Posts

Hello all!

My question is very simple:

 

How can I move the orange module under the shopping cart button?

 

 

 

You need to add a hook to your module file php

in - function install

$this->registerHook('productActions')

    public function hookProductActions()
    {
        return $this->hookDisplayHome();
    }

and add new function - hookProductActions

 

Only replace the hook (hookDisplayHome) with your own

  • Like 1
Link to comment
Share on other sites

So, I put the ( $this->registerHook('productActions') && ) line here

 public function install()
        {
            if (Shop::isFeatureActive())
            Shop::setContext(Shop::CONTEXT_ALL);
            return parent::install() &&
            $this->registerHook('productActions') &&
            $this->registerHook('header') &&
            $this->registerHook('displayRightColumnProduct') &&
            $this->registerHook('displayShoppingCart')&&
            Configuration::updateValue('CREDITTBI_NAME', 'tbi credit');
		}

and added the

 

(........................................

public function hookProductActions()
{
return $this->hookDisplayRightColumn();
}

...............................................)

code here:

public function hookProductActions()
        {
        return $this->hookDisplayRightColumn();
        }
		
		public function hookDisplayLeftColumnProduct($params)
		{
			return $this->hookDisplayRightColumnProduct($params);
		}

But nothing happens...

Edited by markovo (see edit history)
Link to comment
Share on other sites

So I have to copy the edited php file in the zip and install it from there?

If you didn't cloned or added a new module, than not. If you changed the files of the module or added an override, than simply go to modules list, and deinstall and install the module again to take effect.

  • Like 1
Link to comment
Share on other sites

Well, I have reset the module and now the product pages wont load, there is just a white screen. Obviously my code is wrong...

BontaPres gave a right solution, by may be there is error in your code syntax, you can try to enable dev to see the errors, open config/defines.inc.php find define('_PS_MODE_DEV_', false); and change it to define('_PS_MODE_DEV_', true);

  • Like 1
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...