HTML Blocks: setup and help
Quick start
- Upload and install the HTML Blocks ZIP in Modules > Module Manager.
- Open HTML Blocks > Blocks and create a block with Internal Name and translated Content.
- Leave Title empty for content only and Cookie Consent Required at None (always show) for an ordinary text block.
- Keep Active on and save the block.
- Add Display Location displayFooter with Layout contained, or choose another hook used by your theme.
- Open the corresponding storefront page in each language and confirm that the block appears.
- 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.

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.
- Scan the active theme. Supported page types include Product, Category, Listing, Manufacturer, Supplier, All Brands and CMS.
- Review the proposed file, position and hook call for the page type.
- Accept or inject the selected position. The manager can modify the template or create an extends override where supported.
- Assign an existing block to the page profile and choose its layout and insertion position.
- Keep the profile active and save its settings.
- 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.
Configure consent-dependent content
For optional embeds or scripts, choose a category in Cookie Consent Required. The module emits inert encoded content and inserts it in the browser only after the MPR Cookies Revolution client exposes a grant for that category. With no decision, refusal or no usable MPRCR client, the gated content stays absent. Withdrawing consent removes inserted content.
This lifecycle applies to native hooks, template placements, selector placements and product tabs. A block's own category can also be insufficient for an embedded script that needs another category.
Keep essential page text ungated. Consent-dependent content can appear after page load, move the layout and remain absent for crawlers without consent. Use None (always show) for content that should always be present.
Do not manually forge consent cookies. The category names used by the integration are functional, analytics and marketing; the consent module owns the visitor's decision.
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
Service-specific consent was ignored
Theme checks repeated on every page
Module update stopped during installation checks
Administration translations displayed incorrectly
Block administration and placement failed
Theme detection compatibility errors
Theme assets failed with combined stylesheets
Module front pages failed on some installations
Security hardening
Fresh installation could fail
Block placement editing failed
Block lists could not retrieve translated content
Block list filters returned incorrect results
Feature Requests
8
Implemented
Theme style controls for HTML blocks
Visual block placement
Configurable block styles
Contained block layouts
Multilingual block administration
One-click updates
Consent-controlled blocks
Dynamic content variables
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.
By downloading, you accept the demo terms and privacy policy.
By opening this demo you accept the demo terms and the privacy policy.