Автор Тема: Prestashop FAQ - Как показать адреса магазинов + карту на странице stores  (Прочитано 6904 раз)

09 Март 2016, 14:31:36
  • Ветеран
  • *****
  • Сообщений: 105673
  • Репутация: +39553/-0
    • Просмотр профиля
    • Webstudio UwK
Панель управления > Настройки > Контакты магазина
Параметры
Показать упрощенное расположение магазина: Нет

1. В шаблоне /themes/default-bootstrap/stores.tpl
Закомментировать 3 строчки
{* if $simplifiedStoresDiplay *}
...
{* else *}
...
{* /if *}

2. В javascript функциях /themes/default-bootstrap/js/stores.js
Закомментировать 4 строчки
//$('#stores-table tr.node').remove();
...
//$('table#stores-table').find('tbody').append('<tr ><td class="num">'+parseInt(i + 1)+'</td><td class="name">'+(has_store_picture == 1 ? '<img src="'+img_store_dir+parseInt(id_store)+'.jpg" alt="" />' : '')+'<span>'+name+'</span></td><td class="address">'+address+(phone !== '' ? ''+translation_4+' '+phone : '')+'</td><td class="distance">'+distance+' '+distance_unit+'</td></tr>');
//$('#stores-table').show();
...
//$('table#stores-table').find('tbody tr').remove();

3. В контроллере /controllers/front/StoresController.php
Изменить
protected function assignStores()
{
...
        $this->context->smarty->assign(array(
            'distance_unit' => $distance_unit,
            //'simplifiedStoresDiplay' => false,
            'stores_map' => $this->getStores(),
        ));
}

public function initContent()
{
parent::initContent();

        //if (Configuration::get('PS_STORES_SIMPLIFIED')) {
            $this->assignStoresSimplified();
        //} else {
            $this->assignStores();
        //}
Cоздание интернет сайтов Webstudio UwK