block manufacturer

This commit is contained in:
Nolwenn 2016-06-08 17:36:29 +02:00
parent 6c7a4b5a5f
commit 2599cb5eeb
18 changed files with 848 additions and 6 deletions

View File

@ -0,0 +1,136 @@
<?php
if (!defined('_CAN_LOAD_FILES_'))
exit;
include_once(dirname(__FILE__) . '/classes/AdvManu.php');
class AdvManufacturer extends Module
{
public function __construct()
{
$this->name = 'advmanufacturer';
$this->tab = 'front_office_features';
$this->version = '1.0';
$this->author = 'Antadis';
$this->need_instance = 0;
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l('Slider des marques avancé');
$this->description = $this->l('Gestion du slider des marques');
}
public function install()
{
$sql = array();
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmanufacturer` (
`id_advmanu` int(10) unsigned NOT NULL auto_increment,
`position` INT(11) unsigned NOT NULL default 0,
`active` INT(11) unsigned NOT NULL default 1,
`id_brand` INT(11) unsigned,
`link` INT(11) unsigned,
PRIMARY KEY (`id_advmanu`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmanufacturer_lang` (
`id_advmanu` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`subtitle` varchar(255) NOT NULL,
`url` varchar(255),
PRIMARY KEY (`id_advmanu`,`id_lang`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
$sql[] =
'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advmanufacturer_shop` (
`id_advmanu` int(10) unsigned NOT NULL auto_increment,
`id_shop` int(10) unsigned NOT NULL,
PRIMARY KEY (`id_advmanu`, `id_shop`)
) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8';
foreach ($sql as $_sql) {
Db::getInstance()->Execute($_sql);
}
$tab = new Tab();
$tab->class_name = 'AdminAdvManufacturer';
$tab->id_parent = Tab::getCurrentParentId();
$tab->module = $this->name;
$languages = Language::getLanguages();
foreach ($languages as $language) {
$tab->name[$language['id_lang']] = 'Slider de marques';
}
$img_dir = _PS_IMG_DIR_ . 'manufacturer';
$folder = is_dir($img_dir);
if (!$folder)
{
$folder = mkdir($img_dir, 0755, true);
}
return parent::install() && $tab->add() && $this->registerHook('displayManufacturers') && $this->registerHook('displayHeader') && $this->registerHook('actionRefreshManufacturer') && $folder;
}
public function uninstall()
{
$sql = 'DROP TABLE IF EXISTS
`' . _DB_PREFIX_ . 'advmanufacturer_lang`,
`' . _DB_PREFIX_ . 'advmanufacturer_shop`,
`' . _DB_PREFIX_ . 'advmanufacturer`
';
Db::getInstance()->Execute($sql);
$idTab = Tab::getIdFromClassName('AdminAdvManufacturer');
if ($idTab) {
$tab = new Tab($idTab);
$tab->delete();
}
return parent::uninstall();
}
public function hookDisplayManufacturers($params)
{
if (!$this->isCached('advmanufacturer.tpl', $this->getCacheId()))
{
$brands = AdvManu::getSlides();
if (!$brands)
{
return false;
}
$this->smarty->assign('brands', $brands);
}
return $this->display(__FILE__, 'advmanufacturer.tpl', $this->getCacheId());
}
public function hookHeader($params)
{
$jsFiles = $this->context->controller->js_files;
foreach($jsFiles as $jsFile)
{
if(strpos($jsFile, 'flexslider') !== false)
{
return false;
}
}
$this->context->controller->addJS($this->_path.'js/flexslider.js');
}
public function hookActionRefreshSlider()
{
$this->_clearCache('advmanufacturer');
}
}

View File

@ -0,0 +1,209 @@
<?php
class AdvManu extends ObjectModel {
public $id_advmanu;
public $position;
public $active;
public $id_brand;
public $link;
public $title;
public $url;
public static $definition = array(
'table' => 'advmanufacturer',
'primary' => 'id_advmanu',
'multilang' => TRUE,
'fields' => array(
'id_advmanu' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isInt'),
'id_brand' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
'link' => array('type' => self::TYPE_BOOL, 'validate' => 'isInt'),
// Lang fields
'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255),
'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'size' => 255),
)
);
public function __construct($id = NULL, $id_lang = NULL, $id_shop = NULL) {
parent::__construct($id, $id_lang, $id_shop);
$this->image_dir = _PS_IMG_DIR_ . 'manufacturer/';
}
public function add($null_values = false, $autodate = true)
{
$result = parent::add($null_values, $autodate);
Hook::exec('actionRefreshManufacturer');
return $result;
}
public function update($null_values = FALSE) {
$result = parent::update($null_values);
Hook::exec('actionRefreshManufacturer');
return $result;
}
public function delete($null_values = FALSE) {
$result = parent::delete($null_values);
Hook::exec('actionRefreshManufacturer');
return $result;
}
public static function getAllBrands()
{
$brands = Db::getInstance()->executeS('
SELECT m.`id_manufacturer` as id, m.`name`
FROM `' . _DB_PREFIX_ . 'manufacturer` m
');
return $brands;
}
public static function getSlides()
{
$context = Context::getContext();
$brands = Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'advmanufacturer` adv
JOIN `'._DB_PREFIX_.'advmanufacturer_lang` advl ON adv.`id_advmanu` = advl.`id_advmanu` AND id_lang = '. (int)$context->language->id . '
WHERE adv.`active` = 1
ORDER BY `position` ASC
');
foreach($brands as $key => $brand)
{
if(!empty($brand['id_brand']) && $brand['id_brand'] != 0)
{
$brandInfo = new Manufacturer($brand['id_brand'], Context::getContext()->language->id);
$brands[$key]['title'] = $brandInfo->name;
if($brand['link'])
{
$brands[$key]['url'] = Context::getContext()->link->getManufacturerLink($brandInfo->id);
}
}
if(file_exists(_PS_IMG_DIR_ . 'manufacturer/' . $brand['id_advmanu'] . '.jpg'))
{
$brands[$key]['img'] = 'manufacturer/' . $brand['id_advmanu'] . '.jpg';
}
elseif(file_exists(_PS_IMG_DIR_ . 'm/' . $brand['id_brand'] . '.jpg'))
{
$brands[$key]['img'] = 'm/' . $brand['id_brand'] . '.jpg';
}
else
{
unset($brands[$key]);
}
}
return $brands;
}
public function deleteImage($force_delete = false)
{
if (!$this->id) {
return false;
}
$imgToDelete = Tools::getValue('imgName', false);
if ($imgToDelete === false) {
return parent::deleteImage($force_delete = false);
}
if ($force_delete || !$this->hasMultishopEntries()) {
/* Deleting object images and thumbnails (cache) */
if ($this->image_dir) {
if (file_exists($this->image_dir.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink($this->image_dir.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
if (file_exists(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)
&& !unlink(_PS_TMP_IMG_DIR_.$this->def['table'].'_mini_'.$this->id.'-'.$imgToDelete.'.'.$this->image_format)) {
return false;
}
}
return true;
}
public function cleanPositions(){
return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'advmanufacturer`
SET `position`= `position` - 1
WHERE `id_advmanu` = '.(int)$this->id_advmanu.'
AND `position` > '.(int)$this->position);
}
public function updatePosition($way, $position)
{
$sql = 'SELECT `position`, `id_advmanu`
FROM `'._DB_PREFIX_.'advmanufacturer`
ORDER BY `position` ASC';
if (!$res = Db::getInstance()->executeS($sql))
return false;
foreach ($res as $row)
if ((int)$row['id_advmanu'] == (int)$this->id_advmanu)
$moved_row = $row;
if (!isset($moved_row) || !isset($position))
return false;
// < and > statements rather than BETWEEN operator
// since BETWEEN is treated differently according to databases
$res = Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advmanufacturer`
SET `position`= `position` '.($way ? '- 1' : '+ 1').'
WHERE `position`
'.($way
? '> '.(int)$moved_row['position'].' AND `position` <= '.(int)$position
: '< '.(int)$moved_row['position'].' AND `position` >= '.(int)$position)
)
&& Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advmanufacturer`
SET `position` = '.(int)$position.'
WHERE `id_advmanu`='.(int)$moved_row['id_advmanu']
);
$this->refreshPositions();
Hook::exec('actionRefreshManufacturer');
return $res;
}
public function refreshPositions(){
$sql = 'SELECT `id_advmanu`
FROM `'._DB_PREFIX_.'advmanufacturer`
ORDER BY `position` ASC';
if (!$blocks = Db::getInstance()->executeS($sql))
return false;
$pos=0;
foreach ($blocks as $block) {
Db::getInstance()->execute('
UPDATE `'._DB_PREFIX_.'advmanufacturer`
SET `position` = '.(int)$pos.'
WHERE `id_advmanu`='.(int)$block['id_advmanu']);
$pos++;
}
}
}

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>advmanufacturer</name>
<displayName><![CDATA[Slider des marques avanc&eacute;]]></displayName>
<version><![CDATA[1.0]]></version>
<description><![CDATA[Gestion du slider des marques]]></description>
<author><![CDATA[Antadis]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>

View File

@ -0,0 +1,280 @@
<?php
include_once dirname(__FILE__).'/../../classes/AdvManu.php';
class AdminAdvManufacturerController extends ModuleAdminController
{
public function __construct()
{
$this->table = 'advmanufacturer';
$this->className = 'AdvManu';
$this->identifier = 'id_advmanu';
$this->lang = TRUE;
$this->deleted = FALSE;
$this->bootstrap = TRUE;
$this->fieldImageSettings = array(
'name' => 'image',
'dir' => 'manufacturer'
);
$this->position_identifier = 'id_advmanu';
$this->_defaultOrderBy = 'position';
parent::__construct();
$this->actions = array('edit', 'delete');
$this->fields_list = array(
'id_advmanu' => array(
'title' => 'ID',
'width' => 25
),
'id_brand' => array(
'title' => 'Marque',
'width' => 25,
'callback' => 'getBrandName'
),
'title' => array(
'title' => $this->module->l('Titre'),
),
'url' => array(
'title' => $this->module->l('Url'),
'width' => 45,
),
'position' => array(
'title' => $this->l('Position'),
'align' => 'center',
'position' => 'position',
'filter_key' => 'a!position'
)
);
if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL){
$this->_join .= 'JOIN `'._DB_PREFIX_.'advmanufacturer_shop` as ashop ON a.`id_advmanu` = ashop.`id_advmanu` AND ashop.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') ';
$this->_group .= 'GROUP BY ashop.`id_advmanu`';
}
}
public static function getBrandName($id_brand)
{
if ($id_brand != 0)
{
return Db::getInstance()->getValue('SELECT name FROM ' . _DB_PREFIX_ . 'manufacturer WHERE id_manufacturer = ' . $id_brand);;
}
else
{
return '--';
}
}
public function initPageHeaderToolbar()
{
parent::initPageHeaderToolbar();
if ($this->display != 'edit' && $this->display != 'add') {
$this->page_header_toolbar_btn['new_link'] = array(
'href' => self::$currentIndex.'&id_parent='.(int)Tools::getValue('id_advmanu').'&addadvmanufacturer&token='.$this->token,
'desc' => $this->l('Ajouter une marque', NULL, NULL, FALSE),
'icon' => 'process-icon-new'
);
}
}
public function renderView()
{
return $this->renderList();
}
public function renderForm()
{
$brands = AdvManu::getAllBrands();
$brands = array_merge($brands, array(array('id' => 0, 'name' => '-- Slide lié à aucune marque --')));
$this->fields_form = array(
'tinymce' => TRUE,
'legend' => array(
'title' => $this->className,
),
'submit' => array(
'name' => 'submitAdvManufacturer',
'title' => $this->l('Save'),
),
'input' => array(
array(
'type' => 'select',
'label' => $this->l('Marque'),
'name' => 'id_brand',
'options' => array(
'query' => $brands,
'id' => 'id',
'name' => 'name'
)
),
array(
'type' => 'switch',
'label' => $this->l('Lien vers la page marque ?'),
'name' => 'link',
'required' => FALSE,
'is_bool' => TRUE,
'default' => 1,
'form_group_class' => 'switch-link',
'values' => array(
array(
'id' => 'link_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'link_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
),
array(
'type' => 'text',
'label' => $this->l('Lien'),
'name' => 'url',
'lang' => TRUE,
'form_group_class' => 'group-link',
'class' => 'link'
),
array(
'type' => 'text',
'label' => $this->l('Titre'),
'name' => 'title',
'lang' => TRUE,
'form_group_class' => 'customization',
'class' => 'field-customization'
),
array(
'type' => 'switch',
'label' => $this->l('Activé'),
'name' => 'active',
'required' => FALSE,
'is_bool' => TRUE,
'default' => 1,
'values' => array(
array(
'id' => 'active_on',
'value' => 1,
'label' => $this->l('Enabled')
),
array(
'id' => 'active_off',
'value' => 0,
'label' => $this->l('Disabled')
)
),
),
array(
'type' => 'shop',
'label' => $this->l('Shop'),
'form_group_class' => 'fieldhide input_association',
'name' => 'checkBoxShopAsso_advmanufacturer'
)
)
);
$obj = $this->loadObject(TRUE);
$image = FALSE;
$image_url = '';
$image_size = '';
if($obj)
{
$image = _PS_IMG_DIR_ . 'manufacturer/' . $obj->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, TRUE, TRUE);
$image_size = file_exists($image) ? filesize($image) / 1000 : FALSE;
}
$this->fields_form['input'][] = array(
'type' => 'file',
'label' => $this->l('Image'),
'name' => 'image',
'display_image' => TRUE,
'lang' => TRUE,
'image' => $image_url,
'size' => $image_size,
'hint' => 'Si pas d\'image, celle de la marque par défaut sera utilisée',
'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&token='.$this->token.'&deleteImage=1'
);
return parent::renderForm();
}
public function postProcess()
{
if (Tools::getValue('deleteImage')) {
$this->processForceDeleteImage();
$this->refreshPreview();
}
parent::postProcess();
}
public function processForceDeleteImage()
{
$link = $this->loadObject(TRUE);
if (Validate::isLoadedObject($link))
{
$link->deleteImage(TRUE);
}
}
protected function postImage($id) {
$ret = parent::postImage($id);
$this->refreshPreview();
if (isset($_FILES) && count($_FILES) && $_FILES['image']['name'] != NULL && !empty($this->object->id) )
{
return TRUE;
}
return TRUE;
}
public function refreshPreview()
{
$current_preview = _PS_TMP_IMG_DIR_.'advmanufacturer_mini_'.$this->object->id_advmanu.'_'.$this->context->shop->id.'.jpg';
if (file_exists($current_preview)) {
unlink($current_preview);
}
}
public function ajaxProcessUpdatePositions()
{
$way = (int)(Tools::getValue('way'));
$id = (int)(Tools::getValue('id'));
$positions = Tools::getValue('advmanu');
$obj = 'advmanufacturer';
if (is_array($positions)){
foreach ($positions as $position => $value)
{
$pos = explode('_', $value);
if (isset($pos[2]) && (int)$pos[2] === $id)
{
$menu_obj = new AdvManu((int)$pos[2]);
if (Validate::isLoadedObject($menu_obj))
if (isset($position) && $menu_obj->updatePosition($way, $position))
{
echo 'ok position '.(int)$position.' for '.$obj.' '.(int)$pos[2]."\r\n";
}
else
echo '{"hasError" : true, "errors" : "Can not update '.$obj.' '.(int)$id.' to position '.(int)$position.' "}';
else
echo '{"hasError" : true, "errors" : "This '.$obj.' ('.(int)$id.') cannot be loaded"}';
break;
}
}
}
}
}

View File

@ -0,0 +1,35 @@
<?php
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2014 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,63 @@
{extends file="helpers/form/form.tpl"}
{block name="defaultForm"}
{$smarty.block.parent}
<style>
.customization { display: none; }
</style>
<script>
$(document).ready(function() {
manageDisplay($('#id_brand'));
manageLinkDisplay($('#link_on'));
$('#id_brand').on('change', function() {
manageDisplay($(this));
});
if($('#link_on').prop('checked'))
{
$('.group-link').hide();
}
$('input[name="link"]').on('change', function() {
manageLinkDisplay($('#link_on'));
});
});
function manageDisplay(el)
{
if(el.val() == 0)
{
$('.customization').show();
$('.group-link').show();
$('#link_off').prop('checked', true);
$('.switch-link').hide();
}
else
{
$('.customization').hide();
$('.field-customization').val('');
$('.switch-link').show();
}
manageLinkDisplay($('#link_on'));
}
function manageLinkDisplay(el)
{
console.log('toto');
if(el.prop('checked'))
{
$('.group-link').hide();
$('.link').val('');
}
else
{
$('.group-link').show();
}
}
</script>
{/block}

View File

@ -0,0 +1,4 @@
<!-- Block Advmenu module -->
<!-- /Block Advmenu module -->

View File

@ -862,6 +862,7 @@ body .ac_results {
text-align: center;
padding-bottom: 30px;
}
.inner_partenaire span.h4 { font-size: 36px; margin-top: 45px;}
.inner_partenaire .pub {
margin: 15px 0;
text-align: center;
@ -1007,6 +1008,7 @@ body .ac_results {
#header #mainmenu .menu-content > li .boutique a.see-all, #header #mainmenu .menu-content > li .see-more { display: none }
}
@media (max-width: 767px) {
#submit_search { width: 40px;}
#header .account_box {
float: right;
@ -1102,10 +1104,11 @@ body .ac_results {
.footer_social { text-align: center }
.footer_social .title-social { display: block }
.inner_partenaire span.h4 { font-size: 40px; padding: 0 15px 20px 15px; }
.inner_partenaire span.h4 { font-size: 30px; padding: 0 15px 20px 15px; }
}
@media (max-width: 549px) {
.inner_partenaire span.h4 { font-size: 25px;}
.index .intro_top { padding: 5px 0px 15px;}
.intro_top .intro_home h1 {font-size: 30px;}
.intro_top .intro_home p { font-size: 13px;}
@ -2404,6 +2407,54 @@ main#categorycms { margin-bottom: 30px }
text-align: center;
}
/**** Blokcmanufacturer SLIDER *******/
#manufacturers2 {
position: relative;
}
#manufacturers2 .inner {
padding: 0 15px;
}
#manufacturers2 .slides img {
max-width: 90%;
}
#manufacturers2 .flex-direction-nav {
opacity: 0;
}
#manufacturers2:hover .flex-direction-nav { opacity: 1; }
#manufacturers2 .flex-direction-nav li {
width: 30px;
position: absolute;
top: 0px;
height: 100%;
bottom: 0;
}
#manufacturers2 .flex-direction-nav li.flex-nav-next {
right: 0;
}
#manufacturers2 .flex-direction-nav li a {
color: #333333;
font-size: 25px;
position: absolute;
top: 0;
bottom:0;
height: 30px;
margin: auto;
}
#manufacturers2 .flex-direction-nav li a:hover { text-decoration: none; }
#manufacturers2 .flex-direction-nav .flex-next::after {
content: '\e905';
font-family: 'icomoon';
}
#manufacturers2 .flex-direction-nav .flex-prev::after {
content: '\e904';
font-family: 'icomoon';
}
@media (max-width: 1199px) {
.homeslider-description { margin-left: 340px; width: 518px; }
.homeslider-title{ font-size: 40px;}

View File

@ -18,7 +18,10 @@
<glyph unicode="&#xe608;" glyph-name="coins30" d="M1022.863 378.438c-4.098 18.171-18.845 29.613-40.418 34.356-17.976 3.948-49.545 3.859-97.868-18.992-3.37-1.462-226.836-96.814-268.536-114.697-6.426-2.753-8.642-11.845-8.642-11.845-55.393-152.375-213.752-89.197-213.572-87.12 81.842-3.537 140.305 41.332 158.002 76.418 41.328 81.941-51.509 71.225-102.144 71.79-189.655 2.135-186.874-44.364-288.579-78.307l-154.182-59.438c-3.944-1.618-5.755-5.189-6.595-8.971-0.84-3.784-0.052-7.745 2.172-10.918l10.119-14.433c25.223-35.976 55.042-91.378 81.3-127.635 1.691-2.335 4.074-4.083 6.814-4.997 0.606-0.208 1.408-0.44 2.395-0.661 3.532-0.773 7.329-0.847 10.253-0.16l112.765 28.439c5.93 1.408 291.398-86.459 401.036-10.11l337.357 255.803c13.335 10.552 27.122 21.461 40.893 32.147 15.029 11.669 21.351 31.946 17.43 49.328zM626.425 886.062c-75.834 0-140.221-48.819-163.568-116.726 71.827-21.032 124.304-87.36 124.304-165.987 0-19.702-3.34-38.612-9.406-56.255 15.444-4.522 31.766-6.991 48.674-6.991 95.536 0 172.983 77.445 172.983 172.979s-77.449 172.981-172.987 172.981zM661.154 619.423c0-7.076-5.735-12.813-12.811-12.813h-23.599c-7.076 0-12.809 5.735-12.809 12.813v143.781l-14.604-7.884c-3.474-1.876-7.624-2.045-11.236-0.457s-6.298 4.754-7.266 8.581l-4.663 18.377c-1.447 5.707 1.18 11.667 6.372 14.444l40.674 21.771c1.858 0.994 3.935 1.516 6.045 1.516h21.084c7.076 0 12.811-5.733 12.811-12.811v-187.318h0.002zM389.271 757.558c-93.141 0-168.645-75.507-168.645-168.647s75.504-168.647 168.645-168.647c93.143 0 168.651 75.507 168.651 168.647s-75.509 168.647-168.651 168.647zM423.127 497.596c0-6.9-5.594-12.492-12.49-12.492h-23.007c-6.898 0-12.49 5.592-12.49 12.492v140.182l-14.238-7.686c-3.387-1.83-7.431-1.993-10.955-0.446s-6.14 4.635-7.087 8.364l-4.546 17.918c-1.41 5.564 1.152 11.375 6.214 14.082l39.658 21.227c1.813 0.97 3.836 1.479 5.893 1.479h20.558c6.898 0 12.49-5.592 12.49-12.49v-182.63z" />
<glyph unicode="&#xe609;" glyph-name="lock39" d="M512.003 960c-165.121 0-299.462-134.336-299.462-299.462v-171.031c0-1.944-2.398-5.218-4.282-5.845-16.194-5.4-29.346-10.080-41.385-14.721-14.357-5.535-25.186-21.446-25.186-37.011v-392.98c0-15.459 10.759-31.384 25.025-37.038 110.38-43.739 226.552-65.913 345.289-65.913s234.909 22.178 345.294 65.918c14.261 5.652 25.014 21.573 25.014 37.032v392.98c0 15.566-10.827 31.476-25.191 37.017-12.044 4.641-25.194 9.321-41.376 14.721-1.879 0.626-4.277 3.903-4.277 5.846v171.029c-0.009 165.121-134.341 299.457-299.462 299.457zM430.437 312.242c0 45.079 36.518 81.559 81.561 81.559 45.039 0 81.557-36.476 81.557-81.559 0-29.87-16.845-54.879-40.78-69.056v-134.843c0-22.542-18.239-40.78-40.78-40.78-22.542 0-40.78 18.237-40.78 40.78v134.843c-23.933 14.177-40.78 39.186-40.78 69.056zM708.494 660.543v-147.568c-64.436 13.865-130.543 20.887-196.465 20.893-65.892 0-131.985-7.024-196.521-20.877v147.552c0 108.347 88.144 196.489 196.489 196.489 108.344 0.002 196.496-88.142 196.496-196.489z" />
<glyph unicode="&#xe60a;" glyph-name="logistics3" d="M379.422 331.963c-47.266 0-85.464-38.333-85.464-85.601 0-47.127 38.198-85.464 85.464-85.464s85.464 38.336 85.464 85.464c-0.002 47.268-38.198 85.601-85.464 85.601zM379.422 203.63c-23.634 0-42.734 19.238-42.734 42.735 0 23.631 19.1 42.732 42.734 42.732 23.632 0 42.732-19.101 42.732-42.732-0.002-23.497-19.1-42.735-42.732-42.735zM1024 395.192v-91.258c0-22.764-18.454-41.219-41.221-41.219h-44.106c-7.969 54.687-55.097 96.731-111.982 96.731-56.745 0-103.876-42.046-111.845-96.731h-223.552c-7.969 54.687-55.099 96.731-111.845 96.731s-103.876-42.046-111.844-96.731h-55.236c-22.766 0-41.219 18.454-41.219 41.219v91.258h852.85zM826.801 331.963c-47.266 0-85.601-38.333-85.601-85.601 0-47.127 38.336-85.464 85.601-85.464 47.127 0 85.462 38.336 85.462 85.464 0 47.268-38.335 85.601-85.462 85.601zM826.801 203.63c-23.634 0-42.732 19.238-42.732 42.735 0 23.631 19.098 42.732 42.732 42.732 23.495 0 42.732-19.101 42.732-42.732 0-23.497-19.237-42.735-42.732-42.735zM1007.758 487.091l-161.994 160.211c-10.305 10.168-24.183 15.939-38.611 15.939h-81.753v30.641c0 22.807-18.412 41.219-41.219 41.219h-471.84c-22.672 0-41.219-18.414-41.219-41.219v-6.459l-167.273-19.279 296.401-38.597-300.25-29.827 299.192-42.538-299.192-25.941 171.132-32.276-0.012-80.988h852.851v30.093c0 14.702-5.908 28.716-16.213 39.021zM937.134 481.733h-156.774c-3.572 0-6.459 2.885-6.459 6.457v121.051c0 3.572 2.886 6.459 6.459 6.459h29.816c1.648 0 3.298-0.688 4.534-1.787l126.822-121.051c4.257-3.984 1.37-11.128-4.399-11.128z" />
<glyph unicode="&#xe60b;" glyph-name="menu61" d="M91.428 649.145h841.14c50.493 0 91.432 40.935 91.432 91.428s-40.935 91.428-91.432 91.428h-841.14c-50.493-0.004-91.428-40.935-91.428-91.432 0-50.493 40.935-91.424 91.428-91.424zM932.568 539.43h-841.14c-50.493 0-91.428-40.935-91.428-91.428 0-50.497 40.935-91.428 91.428-91.428h841.14c50.493 0 91.432 40.931 91.432 91.428 0 50.493-40.939 91.428-91.432 91.428zM932.568 246.859h-841.14c-50.493 0-91.428-40.931-91.428-91.428 0-50.493 40.935-91.428 91.428-91.428h841.14c50.493 0 91.432 40.935 91.432 91.428 0 50.497-40.939 91.428-91.432 91.428z" />
<glyph unicode="&#xe900;" glyph-name="youtube" d="M827.528 763.040h-631.080c-74.28 0-134.496-60.256-134.496-134.592v-360.888c0-74.336 60.216-134.592 134.496-134.592h631.080c74.304 0 134.512 60.256 134.512 134.592v360.888c0 74.336-60.208 134.592-134.512 134.592zM421.976 295.768v338.952l257.056-169.496-257.056-169.456z" />
<glyph unicode="&#xe901;" glyph-name="flag" d="M965.632 899.666c-7.482-11.335-14.537-22.855-21.403-34.434-78.845 29.612-151.574 53.524-237.11 41.874-68.279-9.304-128.347-49.57-174.693-98.625-26.876-28.445-49.38-60.22-69.21-93.913-86.106-4.213-170.134 3.664-254.106 23.737-5.075 1.219-9.749 1.186-13.984 0.298-9.978 0.592-20.183-3.451-26.946-14.44-79.968-129.922-144.472-270.961-166.299-423.018-0.527-3.664-0.313-7.068 0.214-10.313-4.773-12.344-1.888-26.542 13.928-33.706 142.409-64.448 301.137-75.53 451.707-33.903 0.449 0.121 0.791 0.339 1.223 0.473 10.205 1.711 19.519 8.26 23.359 21.032 17.11 56.845 34.741 113.666 58.478 168.142 1.13 2.61 1.821 5.168 2.271 7.701 6.089-0.573 11.808-1.186 16.942-1.776 74.958-8.723 148.295-27.782 221.444-45.884-17.216-117.892-28.177-237.056-44.458-351.973-5.497-38.831 53.826-55.561 59.377-16.369 41.111 290.224 45.62 611.302 212.436 864.010 21.959 33.265-31.388 64.074-53.167 31.088zM64.187 303.052c22.279 133.254 77.088 256.448 146.216 371.922 72.501-15.998 145.585-23.985 219.622-23.030-37.211-77.455-65.848-160.483-101.747-235.684-1.201-2.511-1.964-4.991-2.502-7.428-15.278-44.194 7.774-83.44 37.403-119.646 1.482-4.235 3.74-8.284 6.862-11.838 3.066-3.5 6.281-6.834 9.561-10.095-106.149-16.445-215.467-5.443-315.415 35.8zM443.427 295.021c-7.75 4.708-14.796 10.434-21.367 16.996-1.279 3.027-2.93 6.022-5.393 8.874-71.959 83.375-0.663 101.94 72.6 102.674-17.348-42.15-32.22-85.095-45.84-128.544zM801.022 433.958c-108.981 26.917-220.16 55.088-332.955 51.797-13.891-0.406-28.977-1.646-44.008-4.328 35.863 84.927 70.455 170.571 122.66 246.959 36.524 53.442 86.677 94.555 148.932 113.316 75.145 22.65 148.709-3.917 218.952-30.748-59.018-117.734-91.528-245.948-113.581-376.996z" />
<glyph unicode="&#xe902;" glyph-name="search" d="M683.841 842.832c-156.213 156.213-410.46 156.213-566.673 0-156.179-156.246-156.179-410.46 0-566.707 139.111-139.078 355.77-153.978 511.881-45.377 3.285-15.543 10.802-30.376 22.892-42.465l227.495-227.495c33.152-33.085 86.725-33.085 119.708 0 33.119 33.119 33.119 86.691 0 119.708l-227.495 227.563c-12.022 11.988-26.888 19.539-42.431 22.824 108.668 156.145 93.768 372.77-45.377 511.949zM612.016 347.95c-116.626-116.626-306.431-116.626-423.024 0-116.558 116.626-116.558 306.397 0 423.024 116.592 116.592 306.397 116.592 423.024 0 116.626-116.626 116.626-306.397 0-423.024z" />
<glyph unicode="&#xe903;" glyph-name="menu" d="M38.642 699.17h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642zM38.642 409.358h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642zM38.642 119.547h946.717c21.33 0 38.642 17.311 38.642 38.642s-17.311 38.642-38.642 38.642h-946.717c-21.33 0-38.642-17.311-38.642-38.642s17.311-38.642 38.642-38.642z" />
<glyph unicode="&#xe904;" glyph-name="arrow-left" d="M220.139 448.010c0 18.345 6.991 36.682 20.99 50.687l440.304 440.297c28.009 28.009 73.418 28.009 101.415 0 27.997-27.997 27.997-73.402 0-101.41l-389.589-389.576 389.598-389.592c27.997-27.995 27.997-73.402 0-101.401-27.995-28.022-73.406-28.022-101.415 0l-440.304 440.292c-13.994 13.999-20.999 32.349-20.999 50.703z" />
<glyph unicode="&#xe905;" glyph-name="arrow-right" d="M782.857 397.307l-440.304-440.29c-28.009-28.022-73.42-28.022-101.415 0-27.997 27.997-27.997 73.406 0 101.401l389.601 389.589-389.589 389.576c-27.997 28.009-27.997 73.413 0 101.41 27.997 28.009 73.406 28.009 101.415 0l440.304-440.297c13.999-14.005 20.99-32.342 20.99-50.687 0-18.354-7.005-36.704-21.001-50.703z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -5,9 +5,12 @@
</div>
<div class="container">
<div class="separator"></div>
{if $page_name != 'password'}
<div class="inner_partenaire row">
<span class="h4">{l s='Tous les produits de nos marques partenaires'}</span>
{hook h='displayManufacturers'}
</div>
{*{if $page_name != 'password'}
<div class="inner_partenaire row">
<span class="h4">{l s='Nos partenaires'}</span>
<div class="col-md-4">
@ -26,7 +29,7 @@
</div>
</div>
</div>
{/if}
{/if}*}
</div>
{/if}

View File

@ -0,0 +1,41 @@
{if isset($brands)}
<div id="manufacturers2" >
<div class="inner">
<div class="flexslider">
<ul class="slides clearfix">
{foreach from=$brands item=brand}
{if $brand.active}
<li>
{if $brand.url}
<a href="{$brand.url}" title="{$brand.title}">
{/if}
<img class="xxs-hidden xs-hidden" src="{$base_dir}img/{$brand.img}" alt="{$brand.title|escape:'htmlall':'UTF-8'}" />
{if $brand.url}
</a>
{/if}
</li>
{/if}
{/foreach}
</ul>
</div>
</div>
</div>
<script type="text/javascript">
$(window).load(function() {
$('#manufacturers2 .flexslider').flexslider({
animation: "slide",
animationLoop: true,
prevText: ' ',
nextText: ' ',
controlNav: false,
itemWidth: 150,
itemMargin: 10,
minItems: 2,
maxItems: 6,
});
});
</script>
{/if}