PrestaShop integration#
Use a small PrestaShop module to load Room Visualizer and render a button from the current product or combination reference.
Verification status: PrestaShop 8/9 module, hook, and asset documentation reviewed on September 7, 2026. No merchant store was available. The example uses documented hooks common to Classic and Hummingbird, but third-party themes may move or omit them.
Before loading the SDK: Open Dashboard → Settings, add your storefront origin to Allowed Origins (CORS), and click Save. Include the published hostname and any preview or staging origins you use; separate multiple origins with commas. See configuration steps.
Prerequisites and mapping#
Prepare a staging shop, module-development access, Shop ID, Publishable Key, and imported SKUs. Decide whether the ideal.house code comes from the base product reference or the selected combination reference. Every visualizable combination should have a unique, non-empty reference.
Minimal SDK contract#
<script
src="https://sdk.ideal.house/sdk.js"
data-shop-id="<SHOP_ID>"
data-publishable-key="<PUBLISHABLE_KEY>"
async
></script>
<div data-idealhouse-button-container data-product-code="CHAIR-OAK-01"></div>
The Product Code must exactly match the imported ideal.house sku. PrestaShop IDs are not interchangeable with references.
Create a module insertion point#
Register displayProductAdditionalInfo to place content on product pages and actionFrontControllerSetMedia to load your local adapter. Both Classic and Hummingbird document the display hook in product and quick-view templates.
public function install()
{
return parent::install()
&& $this->registerHook('displayProductAdditionalInfo')
&& $this->registerHook('actionFrontControllerSetMedia');
}
public function hookActionFrontControllerSetMedia($params)
{
$this->context->controller->registerJavascript(
'module-' . $this->name . '-adapter',
'modules/' . $this->name . '/views/js/adapter.js',
array('position' => 'bottom', 'priority' => 200)
);
}
In the display-hook callback, obtain the presented product, choose its reference, assign it to Smarty, and render a module template. Escape the value in that template:
<div class="idealhouse-host">
{if $idealhouse_product_code}
<div
data-idealhouse-button-container
data-product-code="{$idealhouse_product_code|escape:'html':'UTF-8'}">
</div>
{/if}
</div>
Do not copy the abbreviated PHP as a complete production module: add normal module metadata, version compatibility, configuration storage, permission checks, and uninstall cleanup.
Load the SDK once#
In adapter.js, create the exact SDK element after reading the two public values from your module's sanitized storefront configuration:
if (!document.querySelector('script[src="https://sdk.ideal.house/sdk.js"]')) {
const script = document.createElement('script');
script.src = 'https://sdk.ideal.house/sdk.js';
script.async = true;
script.dataset.shopId = window.idealhousePublicConfig.shopId;
script.dataset.publishableKey = window.idealhousePublicConfig.publishableKey;
document.head.append(script);
}
Expose idealhousePublicConfig with PrestaShop's supported JavaScript-definition/configuration mechanism. Never expose a Client Secret.
Combination changes and dynamic pages#
The theme's product-refresh lifecycle and third-party combination modules vary. At the point where the active theme has resolved the selected combination, pass its reference to this customer bridge:
function renderIdealhouseCombination(host, reference) {
host.replaceChildren();
const code = String(reference || '').trim();
if (!code) return;
const container = document.createElement('div');
container.dataset.idealhouseButtonContainer = '';
container.dataset.productCode = code;
host.append(container);
}
Do not guess from displayed labels. Quick view is included in documented hook locations, but verify the active theme actually renders the hook. For AJAX filters or refreshed product fragments, let the hook create a new host or invoke the bridge after the theme's documented update callback.
Import product data#
Map PrestaShop product/combination reference to ideal.house sku. Use Product upload and the guides for import, job status, listing, updates, deletion, and errors/retries. Any PrestaShop Webservice export, cron, or hook-based sync is customer implementation.
Verify and remove#
Test a simple product, every combination, missing/duplicate references, an unknown ideal.house SKU, quick view, listings, faceted navigation, browser history, mobile, language/currency sales contexts, consent, and production caching. Confirm one SDK request and exact reference/SKU equality.
Uninstall or disable the module, ensure its hooks/configuration/assets are removed, clear Smarty and storefront caches, and verify the SDK URL and data-idealhouse-* markup are absent.