Jump to content

placing module blocks in different sections


Recommended Posts

Hello.

If I go to Modules -> Positions inside PrestaShop admin and if I want to have blocks placed in different sections it wont allow me to change any settions. The select boxes are disabled so that I'm unable to make any change - for instance if I want to put categories module block into other column.

What am I missing here?
Why is that happening?

Are PS templates limited to that kind of functionality so that I have to look up in the html and find out which id/class belongs to which element?

Thanks for help!

Link to comment
Share on other sites

Yes.

Back Office >> Modules >> Positions -> Transplant a module where all select boxes are disabled although I changed the hooks as said in the wiki.
I got the same behaviour for every block/module that I've tried to transplant.

   function install()
   {
       if (!parent::install())
           return false;
       if (!$this->registerHook('top'))
           return false;

       if (!$this->registerHook('rightColumn'))
           return false;
       return true;
   }

   function hookTop($params)
   {
       global $smarty;
       $currencies = Currency::getCurrencies();
       if (!sizeof($currencies))
           return '';
       $smarty->assign('currencies', $currencies);
       return $this->display(__FILE__, 'blockcurrencies.tpl');
   }

   function hookRightColumn($params)
   {
       global $smarty;
       $currencies = Currency::getCurrencies();
       if (!sizeof($currencies))
           return '';
       $smarty->assign('currencies', $currencies);
       return $this->display(__FILE__, 'blockcurrencies.tpl');
   }

Link to comment
Share on other sites

ok, I am not sure what going on there or why you would need to change hooks as Wiki advises to get this function to work

if you have default Ok, language, currencies etc all good, and you are using the transplant a module, selected from modules>>positions I cannot advise anything further

maybe you have a bad module causing the others to mis-behave, I am not sure.

Link to comment
Share on other sites

I'm attaching an image of what I get if I try to transplant categories block.

I don't have any external modules installed.

Should I try installing a fresh copy of PrestaShop or anyone has any idea what could be going on?

Many thanks in advance!

6018_HCPXqLurauiyp97C4F72_t

Link to comment
Share on other sites

  • 5 weeks later...
×
×
  • Create New...