PrestaShop Integration
Add Wewell's intelligent beauty widgets to your PrestaShop store
Overview
PrestaShop offers multiple integration methods for Wewell widgets. Choose the approach that best matches your technical skills and requirements.
Theme Hooks
Use PrestaShop's hook system for easy integration
- Easy to implement
- Theme-independent
- Upgrade-safe
Template Files
Direct modification of theme templates
- More control over placement
- Custom styling options
- Requires theme knowledge
Custom Module
Professional module development
- Best practices approach
- Easy management
- Requires PHP knowledge
Method 1: Theme Hooks (Recommended)
Access Back Office
Log in to your PrestaShop admin panel
Go to Theme & Logo
Navigate to Design → Theme & Logo
Edit Current Theme
Click the three dots next to your active theme and select "Advanced Customization"
Find Footer Template
Navigate to templates/_partials/footer.tpl
Add Wewell Script
Add the script before the closing </footer> tag:
{* Wewell Beauty Widget *}
<script type="module" src="https://widget.wewell.io/wewell.es.js?v=1"></script>
Clear Cache
Go to Advanced Parameters → Performance and clear the cache
Method 2: Template Files
Important Notice
Always create a child theme or backup your files before making direct template modifications.
Access Theme Files
Via FTP or hosting file manager, navigate to:
Edit Layout Template
Open the main layout file:
- layouts/layout-full-width.tpl
- layouts/layout-left-column.tpl
- layouts/layout-right-column.tpl
Add Script to Footer Block
Find the footer hook and add the script:
<footer id="footer" class="js-footer">
{block name='hook_footer_before'}
{hook h='displayFooterBefore'}
{/block}
{* Wewell Beauty Widget *}
<script type="module" src="https://widget.wewell.io/wewell.es.js?v=1"></script>
{block name='hook_footer_after'}
{hook h='displayFooterAfter'}
{/block}
</footer>
Method 3: Custom Module (Advanced)
Professional Approach
Creating a custom module is the most professional way to integrate Wewell widgets in PrestaShop.
Create Module Structure
Create the following directory structure in /modules/
:
Create Main Module File
Create wewellintegration.php
:
<?php
if (!defined('_PS_VERSION_')) {
exit;
}
class WewellIntegration extends Module
{
public function __construct()
{
$this->name = 'wewellintegration';
$this->tab = 'front_office_features';
$this->version = '1.0.0';
$this->author = 'Wewell';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Wewell Beauty Widget');
$this->description = $this->l('Integrate Wewell intelligent beauty widgets into your store.');
}
public function install()
{
Configuration::updateValue('WEWELL_API_KEY', '');
Configuration::updateValue('WEWELL_SHOP_ID', '');
return parent::install() &&
$this->registerHook('header') &&
$this->registerHook('displayFooter');
}
public function uninstall()
{
Configuration::deleteByName('WEWELL_API_KEY');
Configuration::deleteByName('WEWELL_SHOP_ID');
return parent::uninstall();
}
public function hookDisplayFooter()
{
$apiKey = Configuration::get('WEWELL_API_KEY');
$shopId = Configuration::get('WEWELL_SHOP_ID');
if ($apiKey && $shopId) {
$this->context->smarty->assign([
'wewell_api_key' => $apiKey,
'wewell_shop_id' => $shopId,
]);
return $this->display(__FILE__, 'wewell_widget.tpl');
}
}
}
Create Template File
Create views/templates/hook/wewell_widget.tpl
:
<script type="module" src="https://widget.wewell.io/wewell.es.js?v=1"></script>
Install Module
Go to Modules → Module Manager and install your custom module
Verification & Testing
How to Verify Integration
Troubleshooting
Cache Issues
Template Errors
Module Issues
Need Help?
Our PrestaShop experts are here to help with your integration: