HTML Blocks: setup and help

Quick start

  1. Upload and install the HTML Blocks ZIP in Modules > Module Manager.
  2. Open HTML Blocks > Blocks and create a block with Internal Name and translated Content.
  3. Leave Title empty for content only and Cookie Consent Required at None (always show) for an ordinary text block.
  4. Keep Active on and save the block.
  5. Add Display Location displayFooter with Layout contained, or choose another hook used by your theme.
  6. Open the corresponding storefront page in each language and confirm that the block appears.
  7. Use HTML Blocks > Templates only if you need to create a position inside a theme template, then check it with Check Status.

Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.

Setup manual

Install and create a block

Upload and install the HTML Blocks ZIP in Modules > Module Manager. Open HTML Blocks > Blocks. Configure opens the module configuration page; the Blocks page contains the content editor.

Create a block with Internal Name, enter Content for your languages and save. Add a display location to make it appear. A saved block without an active placement has no storefront position.

Create blocks with the built-in editor; no additional model file is required.

Edit block content

Field Default How you use it
Internal Name Empty Required admin identifier. It is not shown on the storefront.
Title Empty Optional translated text above the content. Leave it empty for content only.
Title Tag No title / empty Choices are No title, h2, h3, h4, h5, span and p. A nonempty Title with an empty tag still appears in a div. Clear Title to hide it.
Cookie Consent Required None (always show) Choose Functional, Analytics or Marketing only for optional content that should wait for that consent category.
Content Empty Translated HTML, edited with the PrestaShop rich-text editor.
CSS Class Empty Class or classes for the outer wrapper. The renderer keeps letters, numbers, spaces, underscores and hyphens.
Active On Disable the whole block without deleting it.

For a footer message, you can enter:

<div class="footer-trust">
  <strong>Secure payment</strong>
  <span>Pay using a payment method enabled in this shop.</span>
</div>

Set Internal Name to Footer - Payment message, leave Title empty, use CSS Class footer-trust-block, and keep Cookie Consent Required at None (always show) for an ordinary text message.

Block editor

In multistore, review the intended shop context and fill Title and Content for each required language. These two fields have language- and shop-specific records. CSS Class, the block Active switch and placement definitions are shared rather than separate translated fields. Native-hook rendering selects content for the current shop and language and skips a block with no usable content. Check each shop and language after changing a shared block or placement.

Assign native hook locations

In the block's placement panel, choose Display Location and Layout, then add the location. The visual preview opens the shop with hook markers so you can inspect supported locations. A theme must actually render the hook for its placement to appear.

Placement option Default Effect
Display Location You must choose a hook Choose where the block appears. The underlying placement model defaults to displayMprHtmlBlock; this is not a substitute for selecting a real native location.
Layout contained Use the theme container, or select full-width for viewport-width content.
Active On Hide one placement while keeping other placements active.
Sort Order Next available for a new hook placement Order blocks at the same location. The storage default is 0.

You can reuse a block at several locations. The same block cannot be added twice to the same native hook through the placement action.

Available locations include:

Area Hooks
Homepage displayHomeIntro, displayHome
Product displayProductAdditionalInfo, displayAfterProductThumbs, displayFooterProduct, displayReassurance, displayProductTabContent, displayLeftColumnProduct, displayRightColumnProduct
Listings displayHeaderCategory, displayFooterCategory
Layout displayWrapperTop, displayContentWrapperTop, displayContentWrapperBottom, displayWrapperBottom, displayLeftColumn, displayRightColumn
Header displayBanner, displayNav1, displayNav2, displayTop, displayNavFullWidth
Footer displayFooterBefore, displayFooter, displayFooterAfter
Cart and checkout displayShoppingCart, displayShoppingCartFooter, displayExpressCheckout
Other displayOrderConfirmation1, displayOrderConfirmation2, displayCustomerAccount

For a homepage banner, use displayHomeIntro, Layout full-width and a suitable class such as homepage-seasonal-banner. For a footer message, use displayFooter and contained.

Add a product tab

Create the translated block, set Title to the tab label and add displayProductTabContent as its display location. The module supplies the tab label and content through product-tab hooks. Your theme must support those hooks.

For a Delivery tab, use Internal Name Product - Delivery Tab and Title Delivery. Add your delivery content and save. Check the tab on an actual product page, including its label and content in each language.

The product-tab label and content both follow the block’s consent requirement.

Add positions with Template Manager

Use HTML Blocks > Templates when the theme has no suitable native hook at the required position. Back up the theme first. The PHP process needs write access to the affected theme files or child-theme override path, plus the PrestaShop cache.

  1. Scan the active theme. Supported page types include Product, Category, Listing, Manufacturer, Supplier, All Brands and CMS.
  2. Review the proposed file, position and hook call for the page type.
  3. Accept or inject the selected position. The manager can modify the template or create an extends override where supported.
  4. Assign an existing block to the page profile and choose its layout and insertion position.
  5. Keep the profile active and save its settings.
  6. Open a matching storefront page and check the location.

The manager inserts marked Smarty content using the module hook:

{* MPR_HTMLBLOCK_INJECT *}
{hook h='displayMprHtmlBlock'}
{* /MPR_HTMLBLOCK_INJECT *}

Generated calls may include page-specific parameters. Preserve those when using the manager's suggested call. A developer can also place {hook h='displayMprHtmlBlock'} manually, but must account for the intended page context and placements.

The profile's active state defaults to on. After a theme update, use Check Status. If markers are missing or the position is stale, scan again before reinjecting. Remove All removes tracked injections. Use the manager to remove a tracked position instead of deleting marker fragments by hand.

Selector-based placement support also exists. Use native hooks or Template Manager for the ordinary setup workflow; selector placement depends on stable theme markup.

Match the theme

Open HTML Blocks > Settings > Configuration > Theme styles. The shared style editor starts with detected theme values and lets you override them. Use Refresh shop styles after a theme change. Use Clear custom styles to return to detected values.

The module maps background, secondary background, border, text, muted text, radius, shadow and transition to its mpr-card style tokens. In the shared editor, these correspond to Primary surface, Secondary, border Normal, text Body and Muted, Default radius, Default shadow and Transition. Existing shop overrides can change the values.

For local CSS, use your CSS Class and the stable content wrapper:

.mpr-html-block-content img { max-width: 100%; height: auto; }
.mpr-html-block-content table { width: 100%; border-collapse: collapse; }
.footer-trust-block .mpr-html-block-content {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.homepage-seasonal-banner.mpr-html-block-full-width {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

There are no start/end scheduling fields, customer-group targeting fields or per-product/category ID targeting fields in the standard block editor. Use the block, placement and page-profile active switches as applicable.

Verify and troubleshoot

Check the block in each language, at each assigned location and at phone and desktop widths. Disable one placement to confirm that the other locations remain available. Disable the whole block to hide all its placements.

For a gated block, test undecided, granted, refused and withdrawn states in a browser with the consent module running. Check both the product-tab label and panel if you use tabs.

If nothing appears, check block Active, placement Active, language content, profile Active and whether the theme renders the hook. For gated content, check the consent decision and browser JavaScript errors. For an injected position, run Check Status and inspect the proposed template file.

If a title remains visible after choosing No title, clear the Title field. The current template renders a nonempty title with an empty tag in a div.

Use Settings > Integrity to check and repair required module tables. If styles or content remain stale, clear the relevant PrestaShop and page/CDN caches and check theme template overrides.

Uninstall

Back up blocks, placements and the theme before uninstalling. The module removes tracked template injections before removing menu entries and calling schema cleanup. If it cannot remove injections, uninstall reports failure so you can fix file access and retry. Module-owned tables are removed by schema cleanup; export any content you want to keep first.

Compatibility

Requires PrestaShop 1.6.1 or later and PHP 7.1 or later.

Questions

1

Can the content inside my blocks affect page loading?

HTML Blocks renders the HTML you save. Large images, video embeds and third-party scripts in that content can add downloads or execution work, so performance depends on the blocks and media used on each page. Keep media small and check the affected pages after editing a block.

Known Issues

14

Saved block placements rendered incorrectly

ResolvedUpdated:
Fixed in: 1.12.12
Existing template placements could stop rendering, while inserted blocks could lose their order or execute scripts more than once.

Service-specific consent was ignored

ResolvedUpdated:
Fixed in: 1.12.12
Consent-controlled blocks did not consistently honor a visitor grant for an individual service.

Theme checks repeated on every page

ResolvedUpdated:
Fixed in: 1.12.12
A confirmed theme could still trigger an additional theme-asset request on every page view.

Module update stopped during installation checks

ResolvedUpdated:
Fixed in: 1.12.12
Updating the module could stop and roll back during its database checks.

Administration translations displayed incorrectly

ResolvedUpdated:
Fixed in: 1.12.12
Module administration text could remain in English or show damaged escaping in translated languages.

Block administration and placement failed

ResolvedUpdated:
Fixed in: 1.11.1
Opening block administration or rendering injected blocks could fail because required block support was missing.

Theme detection compatibility errors

ResolvedUpdated:
Fixed in: 1.11.0
Block pages could fail when another installed module supplied an older theme detection component.

Theme assets failed with combined stylesheets

ResolvedUpdated:
Fixed in: 1.9.2
Theme detection assets did not consistently work when PrestaShop combined storefront assets.

Module front pages failed on some installations

ResolvedUpdated:
Fixed in: 1.9.2
Module front page requests could fail because page naming was inconsistent.

Security hardening

ResolvedUpdated:
Fixed in: 1.9.2
Security hardening.

Fresh installation could fail

ResolvedUpdated:
Fixed in: 1.6.7
The module could fail to install because its installation requirements were incomplete.

Block placement editing failed

ResolvedUpdated:
Fixed in: 1.6.5
Block placement management could fail because the required placement support was missing.

Block lists could not retrieve translated content

ResolvedUpdated:
Fixed in: 1.6.5
Block administration could fail to retrieve saved titles and content from the translated block records.

Block list filters returned incorrect results

ResolvedUpdated:
Fixed in: 1.6.5
Filtering administration lists did not consistently apply the selected filter values.

Feature Requests

8

Implemented

Theme style controls for HTML blocks

Implemented
The Theme styles tab controls colours, borders, rounded corners and shadows for HTML blocks. Adjust these settings in the module configuration to match the storefront.

Visual block placement

Implemented
Choose block positions with a visual picker and manage placements in theme templates or product tabs.

Configurable block styles

Implemented
Configure block styling to suit the shop theme.

Contained block layouts

Implemented
Display contained blocks using the theme page container.

Multilingual block administration

Implemented
Use module administration text in German, Spanish, French, Italian and Polish.

One-click updates

Implemented
Update the module from its administration page.

Consent-controlled blocks

Implemented
Assign blocks to cookie categories and activate them in the browser after the required consent, including on cached pages.

Dynamic content variables

Implemented
Resolve configured content variables in staff-written block titles and content across supported placements.

Changelog

v1.6.72026-06-18

  • AddedAdd configurable theme styles
  • Addedcomplete FR/DE/ES/IT/PL translations
  • FixedRepair install schema and release packaging
Older releases

v1.3.02026-02-02

  • AddedUse Bootstrap container for contained blocks, bump to v1.6.0
  • Addedself-healing integrity checks for automatic diagnostics and repair
  • Addedautomatic theme detection for Classic and Hummingbird style compatibility
  • AddedLicense management tab with key management and renewal options
  • Addedcomplete FR/DE/ES/IT/PL translations
  • FixedSelect title/content from block_lang table, not block
  • FixedAdd missing HtmlBlockPlacement ObjectModel class
  • Fixedadmin list filters — sorting, searching, and filtering now work correctly on all columns

v1.2.02025-10-28

  • Addedfull compatibility with PrestaShop 9.x and Hummingbird theme
  • Addedconditional display rules: show/hide blocks by customer group, device type, or date range
  • ImprovedWYSIWYG editor integration — TinyMCE 6 with custom toolbar configuration
  • Fixedblock not rendering when hook name contained uppercase characters
  • Addedshortcode support: {customer_name}, {shop_name}, {current_date} auto-replaced at render

v1.1.02025-09-01

  • Addedblock scheduling: set start and end datetimes for seasonal campaigns
  • Improvedmulti-shop support — blocks can be scoped to specific shops or shared globally
  • FixedXSS sanitization incorrectly stripping valid <iframe> embed codes
  • Addedblock preview button in admin list without needing to visit the front-office

v1.0.02025-03-31

  • Initialrelease: custom HTML block manager for any PrestaShop hook
  • InitialUnlimited blocks per hook with drag-and-drop position ordering
  • InitialFull WYSIWYG editor with raw HTML fallback mode
  • InitialMulti-language block content with per-language enable/disable toggle

Demo

Test the full module before you buy

Buy a licence later and keep your settings.

  • Your 30-day demo Test it on your own shop for 30 days from the first install.
  • Ready demo shop Explore a ready demo shop in your browser.
  • No registration No account, email or store domain needed.
Launch demo shop

By downloading, you accept the demo terms and privacy policy.

By opening this demo you accept the demo terms and the privacy policy.

Loading...
Back to top