PrestaShop Documentation, PrestaShop Tutorials

Prestashop how to hook unhook module transplant module from back-office

In PrestaShop, managing hooks (also called positions or transplanting modules) from the back-office is straightforward. Here’s how you can hook, unhook, and transplant modules step by step.


🔹 1. Go to Positions (Hooks Page)

  • Login to Admin Panel
  • Navigate:
    Design → Positions
    (In older versions: Modules → Positions)

🔹 2. Transplant (Hook) a Module

This means attaching a module to a hook.

Steps:

  1. Click “Transplant a module” (top-right button)
  2. Fill details:
    • Module → Select your module
    • Hook → Choose where to display (e.g., displayHeader, displayFooter)
    • Exceptions → (Optional) hide on specific pages
  3. Click Save

👉 Example:

  • Hook module to displayHome → shows on homepage
  • Hook to displayFooter → shows in footer

🔹 3. Unhook (Remove Module from Hook)

Method 1:

  1. In Positions page, find the hook
  2. Locate your module
  3. Click Trash/Delete icon

Method 2:

  • Click Edit on module inside hook → remove or change position

🔹 4. Reorder Modules (Change Position)

  • Drag & drop modules within a hook
  • Or use Up/Down arrows
  • Click Save positions

🔹 5. Use “Live Edit” (Optional Visual Way)

  • Click “Run Live Edit”
  • You can visually drag modules on front-end
  • Save changes

⚠️ Note: Live edit may not work well on newer versions/themes


🔹 6. Important Hooks Examples

  • displayHeader → CSS/JS loading
  • displayFooter → footer content
  • displayHome → homepage
  • displayLeftColumn / displayRightColumn
  • displayProductExtraContent → product page tabs

🔹 7. Reset Module (Quick Fix)

If hook not working:

  • Go to Modules → Module Manager
  • Find module → Click Reset
  • Then re-hook again

🔹 8. Developer Tip (Important)

Some modules only work on specific hooks because:

  • They are coded with specific hook functions like:
public function hookDisplayHeader() {}

If hook not exists in module → it won’t show


 

About zohaibk

We develop useful addons for #E-Commerce and #CRM software to provide extra features.#PrestaShop,#Magento,#SugarCRM,#Vtiger & #Android #apps
View all posts by zohaibk →