1. What this module does

The module puts your own content in any place of your theme — a banner above the footer, a notice in the header, a video on the home page, an extra text under the add-to-cart button — without editing the theme files, which an update would overwrite. Each content block has its own content in every language, written with the same editor as product descriptions, and a hook: the position of the theme where it appears. You can show a block only between two dates, only on chosen types of pages and only to chosen customer groups. Blocks are switched on and off, ordered, duplicated and deleted from one list.

The editor keeps any HTML, including scripts, styles and embedded videos. Blocks take the fonts and colours of your theme; the module adds no styles of its own.

Works with PrestaShop 1.7.8, 8.x and 9.x (PHP 7.2.5 or newer), with the Classic and Hummingbird themes and with multistore.

2. Installation

  1. On the module page at addonspresta.com, click Free download (no account needed).
  2. In your Back Office, open Modules → Module Manager and click Upload a module.
  3. Drop the ap_contentbox_v1.0.0.zip file and wait for the confirmation.
  4. Click Configure on the module card.

The module is installed without any block. Add the first one with the + button above the list.

3. How it works

Your theme is made of hooks: named places such as displayHome (home page content), displayFooterBefore (above the footer) or displayProductAdditionalInfo (next to the add-to-cart button). When you save a block, the module attaches itself to the block's hook; when no block uses a hook any more, it detaches itself. Design → Positions shows the hooks of your theme and the modules attached to them.

Each time a page shows a hook, the module takes the enabled blocks of the current shop for that hook, in the order of the list, and keeps those that apply now:

  • Dates — the current time of the shop (time zone from International → Localization) is between Show from and Show until; an empty date means no limit.
  • Pages — all pages, or only the ticked page types (home page, categories, products, CMS pages, brands and suppliers, search and product lists, cart, checkout, customer account, other pages).
  • Customer groups — the visitor belongs to one of the ticked groups. Visitors who are not logged in are in the Visitor group, guests who ordered without an account in Guest. When the group feature is off in Customers → Groups, PrestaShop treats every logged-in customer as a member of the default customer group.

The content is shown in the visitor's language; a language left empty uses the content of the default language. It is published exactly as you entered it, scripts included: paste only code you trust, and load tracking scripts only after the visitor's cookie consent, as the GDPR requires. The module itself sets no cookies.

The module creates its own database tables, does not change PrestaShop tables and does not connect to addonspresta.com or any other server. Dates, pages and groups are checked at every page view; if your shop uses a full-page cache, a block changes when the cached page is refreshed.

4. Features and settings

Open Modules → Module Manager → Content Blocks → Configure. The Help box at the top links to this manual and to the module page at addonspresta.com, in the language of your Back Office.

List of blocks

The list shows the blocks of the shops selected in the Back Office header, sorted by hook: ID, name, hook, dates, pages, status and position; under each hook a short description says where it appears. Above it, Show the blocks of limits the list to one hook.

  • Dates — Always, From …, Until … or both dates; Scheduled means the block starts later, Expired that its end date has passed.
  • Status — click the icon to switch a block on or off. A disabled block keeps its content.
  • Position — the arrows move a block one place up or down within its hook. Blocks of the same hook appear in this order.
  • Edit — opens the form of the block.
  • Duplicate — creates a copy named "… (copy)" with the same content and settings, disabled, at the end of its hook. Change it and switch it on when it is ready.
  • Delete — asks for confirmation, then deletes the block. In multistore it is removed only from the shops selected in the header (see Multistore).

Block form

  • Name — for you only, shown in the list, for example "Christmas banner on the home page". Up to 128 characters.
  • Hook — the place of the theme, with a short description of where it appears, for example displayHome — Home page, main content. Popular positions come first, then Other positions of your shop, including the hooks of your theme and of other modules. Back Office, PDF and technical hooks are not offered.
  • Content — the editor, with the language selector next to it. Use the Source code button of the editor to paste HTML, a script or an embed code. Required in the default language.
  • Enabled — shows or hides the block.
  • Show from / Show until — optional, in shop time, for example 2026-12-01 08:00. A date without time in Show until means the end of that day.
  • Pages — All pages or Only on the pages below with the page types to tick.
  • Customer groups — the groups that see the block; all of them are ticked for a new block.
  • Shops — in multistore only: the shops where the block appears.

In your theme's templates

A developer can place blocks in a template of the theme without a hook: {widget name='ap_contentbox' hook='displayHome'} prints the blocks of a hook, {widget name='ap_contentbox' id_box=5} prints the block with ID 5. Dates, pages and groups still apply.

5. Multistore

Each block belongs to one or more shops. The list shows the blocks of the shop or shop group selected in the Back Office header; select All shops to see them all. You only see the blocks of the shops you have access to.

  • A new block is offered for the shops of the current selection; change them in the Shops field. An employee who works on one shop only does not see this field: their blocks belong to that shop.
  • Name, hook, content, dates, pages, groups, status and position are common to all shops of a block.
  • Delete removes the block from the shops selected in the header. The block is deleted completely once it is in no shop any more; with All shops selected it is deleted at once.
  • An employee who can work only on some shops edits, switches, duplicates and moves only the blocks that appear in their shops alone. A block shared with other shops stays as it is and shows a message; Delete removes it from the employee's shops only.

6. Uninstall

Module Manager → Content Blocks → Uninstall deletes the module's tables with all blocks and their content. This cannot be undone. To hide the blocks and keep them, use Disable instead. Reset also deletes the blocks.

7. FAQ and troubleshooting

A block does not appear. Check that it is enabled, that its dates include the current time (the list shows Scheduled or Expired), that it belongs to the shop you are looking at, that the page type and your customer group are ticked, and that you are looking at a page that shows the hook. Then check in Design → Positions that the module is attached to the hook (saving the block attaches it again) and clear the cache in Advanced Parameters → Performance.

I chose a hook but nothing shows on my theme. Not every theme prints every hook. Try one of the popular positions, or ask your theme's author which hooks the theme prints.

My script does not run. Paste it with the Source code button of the editor and check the browser console for errors. Scripts that need a library, such as jQuery, run only if the theme loads it before them.

Can I add a video or a map? Yes. Paste the embed code (<iframe>) with the Source code button.

A block shows English text in my Polish or French shop. That language was left empty, so the default language is used. Edit the block and fill in that language.

Can I change how blocks look? Yes. Style .ap-contentbox (every block) or .ap-contentbox-5 (the block with ID 5) in your theme, or copy views/templates/hook/boxes.tpl to themes/<your-theme>/modules/ap_contentbox/views/templates/hook/ and edit the copy, then clear the cache in Advanced Parameters → Performance.

8. Updates and support

Updates are free: download new versions from the module page at addonspresta.com and upload them like a new module. Your blocks are kept. Every version passes our security audit before it is published.

This free module comes under the same licence as our paid modules (one shop with any number of multistore shops, code you may modify but not share) and without technical support. If you need help with installation or configuration, we can offer it as a paid service. Report security issues to mail@addonspresta.com — we fix them as a priority.

Back to User manuals

Loading...
Back to top