[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

Prestashop 1.6.x Troubleshooter. Options set for image slider module do not work

Prestashop 1.6.x Troubleshooter. Image slider for your homepage. Options set in admin section do not work

This tutorial shows how to solve the issue with “Image slider for your homepage” module (when options set in admin section do not work).

Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-1

  1. Open “Image slider for your home page” module in Modules->Modules section. We can see that width 1170 px is specified:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-2

  2. Inspect slider using Firebug in Firefox or Developer tool in Chrome browser. We can see that width 900px is specified in the source code:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-3

  3. In order to resolve this issue, we should access Prestashop database. Access prestashop database using database management tool like PhpMyAdmin. Open ps_configuration table:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-4

  4. Set Maximum number of rows. In this case you will see all database table records (such field can be represented as text input and depends on version of PhpMyAdmin):

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-5

  5. IMPORTANT: Be sure to back up database before performing modifications.

    Press Ctrl+F and perform search using homeslider keyword. We can see duplicated records for the same options. Also, we can see that some records have NULL in id_shop_group and id_shop fields. Check those records and remove them:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-6

  6. Now we should modify the following file:
    modules/homeslider/homeslider.php. Download the file and open it in editor. Find the following code:

     $slider = array(
        'width' => Configuration::get('HOMESLIDER_WIDTH'),
        'speed' => Configuration::get('HOMESLIDER_SPEED'),
        'pause' => Configuration::get('HOMESLIDER_PAUSE'),
        'loop' => (bool)Configuration::get('HOMESLIDER_LOOP'),
    );

    Replace it with the following code:

    $slider = array(
        'width' => Configuration::get('HOMESLIDER_WIDTH', null, $this->context->shop->getGroup(), $this->context->shop->id),
        'speed' => Configuration::get('HOMESLIDER_SPEED', null, $this->context->shop->getGroup(), $this->context->shop->id),
        'pause' => Configuration::get('HOMESLIDER_PAUSE', null, $this->context->shop->getGroup(), $this->context->shop->id),
        'loop' => (bool)Configuration::get('HOMESLIDER_LOOP', null, $this->context->shop->getGroup(), $this->context->shop->id),
    );

    This code specifies that shop and group IDs will be added to database record (please check the screenshot with modified code):

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-7

  7. Now we should modify the following code:

     return array(
        'HOMESLIDER_WIDTH' => Tools::getValue('HOMESLIDER_WIDTH', Configuration::get('HOMESLIDER_WIDTH')),
        'HOMESLIDER_SPEED' => Tools::getValue('HOMESLIDER_SPEED', Configuration::get('HOMESLIDER_SPEED')),
        'HOMESLIDER_PAUSE' => Tools::getValue('HOMESLIDER_PAUSE', Configuration::get('HOMESLIDER_PAUSE')),
        'HOMESLIDER_LOOP' => Tools::getValue('HOMESLIDER_LOOP', Configuration::get('HOMESLIDER_LOOP')),
    );

    Replace it with this code:

    return array(
        'HOMESLIDER_WIDTH' => Tools::getValue('HOMESLIDER_WIDTH', Configuration::get('HOMESLIDER_WIDTH', null, $this->context->shop->getGroup(), $this->context->shop->id)),
        'HOMESLIDER_SPEED' => Tools::getValue('HOMESLIDER_SPEED', Configuration::get('HOMESLIDER_SPEED', null, $this->context->shop->getGroup(), $this->context->shop->id)),
        'HOMESLIDER_PAUSE' => Tools::getValue('HOMESLIDER_PAUSE', Configuration::get('HOMESLIDER_PAUSE', null, $this->context->shop->getGroup(), $this->context->shop->id)),
        'HOMESLIDER_LOOP' => Tools::getValue('HOMESLIDER_LOOP', Configuration::get('HOMESLIDER_LOOP', null, $this->context->shop->getGroup(), $this->context->shop->id)),
    );

    Please check the screenshot with modified code:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-8

  8. Save changed and upload the modified file.

    IMPORTANT: Be sure to save this file on storage device or cloud as this file will be replaced when Prestashop will provide update for this module.

  9. Open the module in admin section. You will see that settings are not set (blank fields). Specify appropriate settings. Save changes:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-9

  10. Clear Prestashop and browser cache. Refresh the page. Now slider has width that was specified in module settings:

    Prestashop Troubleshooter. Image slider for your homepage. Options set in admin section do not work-10

Feel free to check the detailed video tutorial below:

Prestashop 1.6.x Troubleshooter. Image slider for your homepage. Options set in admin section do not work