Categories

Featured templates

Prestashop 1.6.x Troubleshooter. 为图像滑块模块设置的选项不起作用

Ryan DeWitt June 15, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

Prestashop 1.6.x Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

本教程展示了如何使用“Image”解决这个问题 slider for your homepage” module (当在admin部分设置的选项不起作用时).

Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  1. Open “Image slider for your home page” module in Modules->Modules section. 我们可以看到宽度1170像素被指定:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  2. Inspect slider 使用Firefox中的Firebug或Chrome中的Developer工具 browser. 我们可以看到900px的宽度是在源代码中指定的:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  3. 为了解决这个问题,我们应该访问prestshop database. Access prestashop database using database management tool like PhpMyAdmin. Open ps_configuration table:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  4. Set Maximum number of rows. 在这种情况下,您将看到所有 database table 记录(这样的字段可以表示为文本输入,并取决于版本) PhpMyAdmin):

    Prestashop Troubleshooter. 图片滑块为您的主页. 在admin部分设置的选项不起作用

  5. IMPORTANT: Be sure to back up database 修改前.

    Press Ctrl+F and perform search using homeslider keyword. 我们可以看到相同选项的重复记录. 同时,我们可以看到一些记录 NULL in id_shop_group and id_shop fields. 检查这些记录并删除它们:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在admin部分设置的选项不起作用

  6. 现在我们应该修改以下文件:
    模块/ homeslider / homeslider.php. 下载文件并打开 editor. Find the following code:

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

    将其替换为以下代码:

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

    此代码指定将添加到的商店和组id database record (please check the screenshot with modified code):

    Prestashop Troubleshooter. 图片滑块为您的主页. 在admin部分设置的选项不起作用

  7. 现在我们应该修改以下代码:

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

    用下面的代码替换它:

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

    Please check the screenshot with modified code:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  8. 保存更改并上传修改后的文件.

    重要:请务必将此文件保存在存储设备或 cloud 因为这个文件将被替换,当Prestashop将提供 update for this module.

  9. Open the module in admin section. 您将看到没有设置(空白字段). 指定适当的设置. Save changes:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

  10. Clear Prestashop and browser cache. Refresh the page. Now slider 是否指定了宽度 module settings:

    Prestashop Troubleshooter. 图片滑块为您的主页. 在admin部分设置的选项不起作用

请随时查看下面的详细视频教程:

Prestashop 1.6.x Troubleshooter. 图片滑块为您的主页. 在“管理”部分设置的选项不起作用

Prestashop Premium Themes
This entry was posted in PrestaShop Tutorials and tagged option, Prestashop, slider. Bookmark the permalink.

Submit a ticket

如果您仍然无法找到关于您的问题的足够的教程,请使用以下链接向我们的技术支持团队提交请求. 我们将在接下来的24小时内为您提供我们的帮助和协助: Submit a ticket