Jump to content

How to modify block positions?


Recommended Posts

  • 2 weeks later...

AFTER TRIAL AND ERROR - I FOUND THE ANSWER:

All logic would say to open it under "Back Office >> Modules >> Positions" and go to the "EDIT" button and move it.

However - In order to do it you have to first DELETE the module out of the Position View, then Re-add it. When you re-add it to the list you are given an option to where to hook it.

----------------------------------------------------------------------------------------------------

Original Post:

Sorry to ask the same question - but Both the wiki and search has provided little help.

The transplant for the cart is disabled for me as well - I've tried going into the templates for the theme and moving the "Hook" code to where I want it but that didn't work.

The wiki refers to this, but I haven't been able to really figure it out. I just want to transplant the cart module to the left side.

---------------------------------------------------------------

Transplanting a module by modifying the code

Certain modules are not transplantable into other page sections because they lack the necessary code. For example, the Quick Search block contains templates for both column display and header display. On the other hand, the Currencies block only has one template file which only pertains to the header section.

If you want to display certain modules like the Currencies block in either the left or right column, you’ll have to modify its template files. Likewise, the default Featured Products block can only be placed in the center content section of the main page. If you want to move it to a column, you’ll have to do the customization yourself.

If you want to customize the transplantation of a module on a hook, you must create the PHP function in this module for the hook.

For example, for the Currency block, this function exists: function hookTop($params). To transplant the Currency block into the right column, you need to create: function hookRightColumn($params)

  • Like 1
Link to comment
Share on other sites

Transplanting a module

For most modules, transplantation can easily be done directly via the Back Office. Certain modules require altering the code in order to transplant the module.
Transplanting a module via the Back Office

1. Go to Back Office >> Modules
2. Click Positions, located in the upper-left corner of the Modules page.
3. Click Transplant a module.
4. In the Module drop-down list, select the module you want to transplant.
5. In the Hook Into drop-down list, select where you want to transplant the module to.
6. In the Exceptions field, type the name of the file(s) of the pages in which you do not want the module to appear.
7. Click Save.


That is taken from the wiki
  • Like 1
Link to comment
Share on other sites

Thank you for quoting the Wiki which you obviously posted one post above.

The POINT that the Wiki fails to touch on is that you have go against common sense to relocate or "Transplant" a module.

The button - "Transplant a Module" has a + sign next to which usually signifies the start of a procedure (Like with a NEW module that may not be transplanted yet). Add that to the fact that all the modules have an "Edit" button next to it, and upon editing the position you can't.

No where does the Wiki say - "Certain Modules you have to add completely from scratch while deleting the old module".
If you were to follow the Wiki's directions - you would end up with 2 shopping cart modules (one in the default position and the second whereever you add it).

So to get the Cart Module from the Right to the Left you have to

1) Delete the existing Position via the Position menu
2) Add a new transplant by clicking "+ Transplant a Module"

Some modules you can just click the Edit button. With The cart you can't - hence why the wiki is confusing. Mind you - doing this is REALLY REALLY easy - it's just not intuitive and the Wiki's instructions aren't perfectly clear.

The way the wiki is written - it implies that you have to actually go into the source code edit said module. And you don't. And since tons of people ask the same question, and since the Wiki assumes you can piece the steps together, I reposted the solution I found solely due to experimentation.

Transplanting a module

For most modules, transplantation can easily be done directly via the Back Office. Certain modules require altering the code in order to transplant the module.
Transplanting a module via the Back Office

1. Go to Back Office >> Modules
2. Click Positions, located in the upper-left corner of the Modules page.
3. Click Transplant a module.
4. In the Module drop-down list, select the module you want to transplant.
5. In the Hook Into drop-down list, select where you want to transplant the module to.
6. In the Exceptions field, type the name of the file(s) of the pages in which you do not want the module to appear.
7. Click Save.


That is taken from the wiki
Link to comment
Share on other sites

Thank you for quoting the Wiki which you obviously posted one post above.


I didnt quote the wiki, I just linked to it.

Your explanation wasnt very clear to me, which is why I quoted how to transplant a module. I didnt have any problems when I first started using prestashop, but I understand what your talking about now, and yes it isnt very clear that you need to remove the block aswell as add the new one.
Link to comment
Share on other sites

  • 2 weeks later...

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