Loading...

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.

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)

1

Access Back Office

Log in to your PrestaShop admin panel

2

Go to Theme & Logo

Navigate to Design → Theme & Logo

3

Edit Current Theme

Click the three dots next to your active theme and select "Advanced Customization"

This will open the file manager for your theme
4

Find Footer Template

Navigate to templates/_partials/footer.tpl

templates/_partials/footer.tpl
5

Add Wewell Script

Add the script before the closing </footer> tag:

footer.tpl
{* Wewell Beauty Widget *}
<script type="module" src="https://widget.wewell.io/wewell.es.js?v=1"></script>
6

Clear Cache

Go to Advanced Parameters → Performance and clear the cache

Your Wewell widgets are now live on PrestaShop!

Method 2: Template Files

Important Notice

Always create a child theme or backup your files before making direct template modifications.

1

Access Theme Files

Via FTP or hosting file manager, navigate to:

/themes/[your-theme]/templates/
2

Edit Layout Template

Open the main layout file:

  • layouts/layout-full-width.tpl
  • layouts/layout-left-column.tpl
  • layouts/layout-right-column.tpl
3

Add Script to Footer Block

Find the footer hook and add the script:

Layout Template
<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.

1

Create Module Structure

Create the following directory structure in /modules/:

wewellintegration/
├── wewellintegration.php
├── config.xml
└── views/
└── templates/
└── hook/
2

Create Main Module File

Create wewellintegration.php:

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');
        }
    }
}
3

Create Template File

Create views/templates/hook/wewell_widget.tpl:

wewell_widget.tpl
<script type="module" src="https://widget.wewell.io/wewell.es.js?v=1"></script>
4

Install Module

Go to Modules → Module Manager and install your custom module

Configure API credentials in the module settings!

Verification & Testing

How to Verify Integration

Troubleshooting

Cache Issues

Clear Smarty cache
Clear browser cache
Disable cache temporarily

Template Errors

Check Smarty syntax
Verify file permissions
Enable debug mode

Module Issues

Check module installation
Verify hook registration
Check configuration values

Need Help?

Our PrestaShop experts are here to help with your integration: