Merge branch 'master' of gitlab.antadis.fr:dev-antadis/toutpratique
4
.gitignore
vendored
@ -1,3 +1,7 @@
|
|||||||
|
.gitconfig
|
||||||
|
.viminfo
|
||||||
|
.bash_history
|
||||||
|
.mysql_history
|
||||||
.htpasswd
|
.htpasswd
|
||||||
.buildpath
|
.buildpath
|
||||||
.htaccess
|
.htaccess
|
||||||
|
@ -36,8 +36,8 @@ if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION'))
|
|||||||
$smarty->registerPlugin("function","printCouleur", "print_couleur");
|
$smarty->registerPlugin("function","printCouleur", "print_couleur");
|
||||||
|
|
||||||
function print_couleur($params, $smarty) {
|
function print_couleur($params, $smarty) {
|
||||||
$colors = ['#d2e1e6', '#d7e9e7', '#ebd1dc',
|
$colors = array('#d2e1e6', '#d7e9e7', '#ebd1dc',
|
||||||
'#ddd6e1', '#efd2d4', '#ebebd9'];
|
'#ddd6e1', '#efd2d4', '#ebebd9');
|
||||||
return $colors[array_rand($colors)];
|
return $colors[array_rand($colors)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
if (!class_exists('CmsPsEdito')) {
|
||||||
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
||||||
|
}
|
||||||
|
|
||||||
class HomeEditoControllerCore extends FrontController
|
class HomeEditoControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
if (!class_exists('CmsPsEdito')) {
|
||||||
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
||||||
|
}
|
||||||
|
|
||||||
class PostEditoControllerCore extends FrontController
|
class PostEditoControllerCore extends FrontController
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* @copyright 2007-2015 PrestaShop SA
|
* @copyright 2007-2015 PrestaShop SA
|
||||||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require(dirname(__FILE__).'/config/config.inc.php');
|
require(dirname(__FILE__).'/config/config.inc.php');
|
||||||
Dispatcher::getInstance()->dispatch();
|
Dispatcher::getInstance()->dispatch();
|
||||||
|
@ -23,7 +23,7 @@ class AdvMenuLink extends ObjectModel {
|
|||||||
|
|
||||||
// Lang fields
|
// Lang fields
|
||||||
'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'required' => FALSE, 'size' => 255),
|
'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'required' => FALSE, 'size' => 255),
|
||||||
'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'required' => TRUE, 'size' => 40),
|
'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'required' => TRUE, 'size' => 255),
|
||||||
'text' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml')
|
'text' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -220,6 +220,11 @@ class Blockadshooks extends Module
|
|||||||
return $this->runByHook('displayPubliciteRight');
|
return $this->runByHook('displayPubliciteRight');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hookDisplayPubliciteRightBottom($params)
|
||||||
|
{
|
||||||
|
return $this->runByHook('displayPubliciteRightBottom');
|
||||||
|
}
|
||||||
|
|
||||||
public function hookDisplayPubliciteBottom($params)
|
public function hookDisplayPubliciteBottom($params)
|
||||||
{
|
{
|
||||||
return $this->runByHook('displayPubliciteBottom');
|
return $this->runByHook('displayPubliciteBottom');
|
||||||
|
@ -76,6 +76,7 @@ class Categorieshome extends Module
|
|||||||
$collection = new Collection('Category', $id_lang);
|
$collection = new Collection('Category', $id_lang);
|
||||||
$collection->where('id_parent', '=', '2');
|
$collection->where('id_parent', '=', '2');
|
||||||
$collection->where('active', '=', '1');
|
$collection->where('active', '=', '1');
|
||||||
|
$collection->orderBy('position', 'ASC');
|
||||||
return $collection->getResults();
|
return $collection->getResults();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,99 +5,99 @@ require_once dirname(__FILE__).'/classes/CmsComments.php';
|
|||||||
require_once dirname(__FILE__).'../../cmsps/classes/CmsPsPost.php';
|
require_once dirname(__FILE__).'../../cmsps/classes/CmsPsPost.php';
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
$id_element = Tools::getValue('id_element');
|
$id_element = Tools::getValue('id_element');
|
||||||
$cmsps = new CmsPsPost($id_element);
|
$cmsps = new CmsPsPost($id_element);
|
||||||
|
|
||||||
$code = Tools::getValue('g-recaptcha-response');
|
$code = Tools::getValue('g-recaptcha-response');
|
||||||
|
|
||||||
if(isValid($code) == FALSE) {
|
if(isValid($code) == FALSE) {
|
||||||
$result['errors'] = true;
|
$result['errors'] = true;
|
||||||
$result['html'] = 'Êtes-vous un robot ? Veuillez cocher la case svp.';
|
$result['html'] = 'Êtes-vous un robot ? Veuillez cocher la case svp.';
|
||||||
die(Tools::jsonEncode($result));
|
die(Tools::jsonEncode($result));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Validate::isLoadedObject($cmsps)) {
|
if (Validate::isLoadedObject($cmsps)) {
|
||||||
$name = Tools::getValue('name');
|
$name = Tools::getValue('name');
|
||||||
$email = Tools::getValue('email');
|
$email = Tools::getValue('email');
|
||||||
$commentaire = Tools::getValue('comments');
|
$commentaire = Tools::getValue('comments');
|
||||||
|
|
||||||
if (Tools::getValue('offre')) {
|
if (Tools::getValue('offre')) {
|
||||||
$context = Context::getContext();
|
$context = Context::getContext();
|
||||||
if (!isNewsletterRegistered($email, $context->shop->id)) {
|
if (!isNewsletterRegistered($email, $context->shop->id)) {
|
||||||
$sql = '
|
$sql = '
|
||||||
INSERT INTO '._DB_PREFIX_.'newsletter (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active)
|
INSERT INTO '._DB_PREFIX_.'newsletter (id_shop, id_shop_group, email, newsletter_date_add, ip_registration_newsletter, http_referer, active)
|
||||||
VALUES
|
VALUES
|
||||||
('.$context->shop->id.',
|
('.$context->shop->id.',
|
||||||
'.$context->shop->id_shop_group.',
|
'.$context->shop->id_shop_group.',
|
||||||
\''.pSQL($email).'\',
|
\''.pSQL($email).'\',
|
||||||
NOW(),
|
NOW(),
|
||||||
\''.pSQL(Tools::getRemoteAddr()).'\',
|
\''.pSQL(Tools::getRemoteAddr()).'\',
|
||||||
(
|
(
|
||||||
SELECT c.http_referer
|
SELECT c.http_referer
|
||||||
FROM '._DB_PREFIX_.'connections c
|
FROM '._DB_PREFIX_.'connections c
|
||||||
WHERE c.id_guest = '.(int)$context->customer->id.'
|
WHERE c.id_guest = '.(int)$context->customer->id.'
|
||||||
ORDER BY c.date_add DESC LIMIT 1
|
ORDER BY c.date_add DESC LIMIT 1
|
||||||
),
|
),
|
||||||
1
|
1
|
||||||
)';
|
)';
|
||||||
Db::getInstance()->execute($sql);
|
Db::getInstance()->execute($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$comments = new CmsComments();
|
$comments = new CmsComments();
|
||||||
$comments->published = 0;
|
$comments->published = 0;
|
||||||
$comments->name = $name;
|
$comments->name = $name;
|
||||||
$comments->email = $email;
|
$comments->email = $email;
|
||||||
$comments->comments = $commentaire;
|
$comments->comments = $commentaire;
|
||||||
$comments->id_element = $cmsps->id;
|
$comments->id_element = $cmsps->id;
|
||||||
|
|
||||||
if ($comments->add()) {
|
if ($comments->add()) {
|
||||||
$result['errors'] = false;
|
$result['errors'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$result['errors'] = true;
|
$result['errors'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
die(Tools::jsonEncode($result));
|
die(Tools::jsonEncode($result));
|
||||||
|
|
||||||
function isValid($code)
|
function isValid($code)
|
||||||
{
|
{
|
||||||
if (empty($code)) {
|
if (empty($code)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$params = [
|
$params = [
|
||||||
'secret' => '6LchYwsTAAAAAFSK4EEtSJV3kJon6H7bEgOTpLA0',
|
'secret' => '6LchYwsTAAAAAFSK4EEtSJV3kJon6H7bEgOTpLA0',
|
||||||
'response' => $code
|
'response' => $code
|
||||||
];
|
];
|
||||||
$url = "https://www.google.com/recaptcha/api/siteverify?" . http_build_query($params);
|
$url = "https://www.google.com/recaptcha/api/siteverify?" . http_build_query($params);
|
||||||
if (function_exists('curl_version')) {
|
if (function_exists('curl_version')) {
|
||||||
$curl = curl_init($url);
|
$curl = curl_init($url);
|
||||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
|
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
|
||||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
$response = curl_exec($curl);
|
$response = curl_exec($curl);
|
||||||
} else {
|
} else {
|
||||||
$response = file_get_contents($url);
|
$response = file_get_contents($url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($response) || is_null($response)) {
|
if (empty($response) || is_null($response)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$json = json_decode($response);
|
$json = json_decode($response);
|
||||||
return $json->success;
|
return (bool) $json->success;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isNewsletterRegistered($customer_email, $id_shop) {
|
function isNewsletterRegistered($customer_email, $id_shop) {
|
||||||
$sql = 'SELECT `email`
|
$sql = 'SELECT `email`
|
||||||
FROM '._DB_PREFIX_.'newsletter
|
FROM '._DB_PREFIX_.'newsletter
|
||||||
WHERE `email` = \''.pSQL($customer_email).'\'
|
WHERE `email` = \''.pSQL($customer_email).'\'
|
||||||
AND id_shop = '.$id_shop;
|
AND id_shop = '.$id_shop;
|
||||||
|
|
||||||
if (Db::getInstance()->getRow($sql))
|
if (Db::getInstance()->getRow($sql))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
@ -95,6 +95,13 @@ class Cms_Pack extends Module
|
|||||||
$result['price_total'] = array_sum($price);
|
$result['price_total'] = array_sum($price);
|
||||||
|
|
||||||
$result['pack'] = $pack->title;
|
$result['pack'] = $pack->title;
|
||||||
|
|
||||||
|
if ($pack->id_cart_rule) {
|
||||||
|
$result['remise'] = true;
|
||||||
|
$result['remise_percent'] = $pack->getPercentageReduction();
|
||||||
|
} else {
|
||||||
|
$result['remise']= false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -67,9 +67,12 @@ function addCmsPackToCart(checkboxes, pack) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ajaxCart.updateInfoCart(quantity_add);
|
|
||||||
$('#layer_cart_pack #product-info').html(html);
|
setTimeout(function(){
|
||||||
if($('#layer_cart_pack').hasClass('open') == false)
|
ajaxCart.updateInfoCart(quantity_add);
|
||||||
$('#layer_cart_pack').addClass('open');
|
$('#layer_cart_pack #product-info').html(html);
|
||||||
$('.layer_cart_overlay_pack').show();
|
if($('#layer_cart_pack').hasClass('open') == false)
|
||||||
|
$('#layer_cart_pack').addClass('open');
|
||||||
|
$('.layer_cart_overlay_pack').show();
|
||||||
|
}, 1500);
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,14 @@
|
|||||||
<p class="col-md-offset-2 title">
|
<p class="col-md-offset-2 title">
|
||||||
{l s='La séléction de produit pour vous aider' mod='cms_pack'}
|
{l s='La séléction de produit pour vous aider' mod='cms_pack'}
|
||||||
</p>
|
</p>
|
||||||
<p class="desc">
|
{if $pack.remise}
|
||||||
{l s='+ de produit = + de réductions' mod='cms_pack'}
|
<p class="desc">
|
||||||
</p>
|
<span class="remise">
|
||||||
|
{l s='Vous économisez'} <span>{$pack.remise_percent} %</span> {l s='sur cette sélection'}
|
||||||
|
</span>
|
||||||
|
{l s='+ de produit = + de réductions' mod='cms_pack'}
|
||||||
|
</p>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="products">
|
<div class="products">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
@ -157,7 +157,10 @@ class CmsPsCategory extends ObjectModel {
|
|||||||
$collection_post->orderBy('date_add', 'DESC');
|
$collection_post->orderBy('date_add', 'DESC');
|
||||||
$collection_post->setPageSize(1);
|
$collection_post->setPageSize(1);
|
||||||
$tips_category = $collection_post->getFirst();
|
$tips_category = $collection_post->getFirst();
|
||||||
return CmsPsPost::injectsData($tips_category, TRUE);
|
if(!empty($tips_category))
|
||||||
|
return CmsPsPost::injectsData($tips_category, TRUE);
|
||||||
|
|
||||||
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getArticles($id_lang, $limit = 10, $num_page, $total = FALSE, $order_by = 'date_add', $filter_word = '')
|
public function getArticles($id_lang, $limit = 10, $num_page, $total = FALSE, $order_by = 'date_add', $filter_word = '')
|
||||||
|
@ -107,7 +107,7 @@ class CmsPsPost extends ObjectModel {
|
|||||||
foreach ($articles as $key => $article) {
|
foreach ($articles as $key => $article) {
|
||||||
$article->new = $article->isNew();
|
$article->new = $article->isNew();
|
||||||
$article->id = $article->id_post;
|
$article->id = $article->id_post;
|
||||||
if (file_exists(_PS_ROOT_DIR_.'/img/cms_post/'.$article->id_post.'/small.jpg')) {
|
if (Tools::file_exists_cache(_PS_ROOT_DIR_.'/img/cms_post/'.$article->id_post.'/small.jpg')) {
|
||||||
$article->have_image = true;
|
$article->have_image = true;
|
||||||
} else {
|
} else {
|
||||||
$article->have_image = false;
|
$article->have_image = false;
|
||||||
|
@ -7,110 +7,112 @@ include_once dirname(__FILE__).'/classes/CmsPsEdito.php';
|
|||||||
include_once dirname(__FILE__).'/classes/CmsPsCategory.php';
|
include_once dirname(__FILE__).'/classes/CmsPsCategory.php';
|
||||||
include_once dirname(__FILE__).'/../cms_extrafields/classes/CmsPsExtraFieldsValue.php';
|
include_once dirname(__FILE__).'/../cms_extrafields/classes/CmsPsExtraFieldsValue.php';
|
||||||
|
|
||||||
class CmsPS extends Module
|
if (!class_exists('CmsPS')) {
|
||||||
{
|
class CmsPS extends Module
|
||||||
public function __construct()
|
|
||||||
{
|
{
|
||||||
$this->name = 'cmsps';
|
public function __construct()
|
||||||
$this->tab = 'front_office_features';
|
{
|
||||||
$this->version = '1.0';
|
$this->name = 'cmsps';
|
||||||
$this->author = 'Antadis';
|
$this->tab = 'front_office_features';
|
||||||
$this->need_instance = 0;
|
$this->version = '1.0';
|
||||||
|
$this->author = 'Antadis';
|
||||||
|
$this->need_instance = 0;
|
||||||
|
|
||||||
$this->bootstrap = true;
|
$this->bootstrap = true;
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
$this->displayName = $this->l('CMS component by Antadis');
|
$this->displayName = $this->l('CMS component by Antadis');
|
||||||
$this->description = $this->l('Manage CMS data in Prestashop');
|
$this->description = $this->l('Manage CMS data in Prestashop');
|
||||||
$this->secure_key = Tools::encrypt($this->name);
|
$this->secure_key = Tools::encrypt($this->name);
|
||||||
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
|
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
|
||||||
}
|
|
||||||
|
|
||||||
public function install()
|
|
||||||
{
|
|
||||||
if (Shop::isFeatureActive())
|
|
||||||
Shop::setContext(Shop::CONTEXT_ALL);
|
|
||||||
|
|
||||||
if (!parent::install()
|
|
||||||
|| !$this->registerHook('displayRelatedProduct')
|
|
||||||
|| !$this->registerHook('displayProductCategory')
|
|
||||||
|| !$this->registerHook('footer')
|
|
||||||
|| !$this->createTables()
|
|
||||||
)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function createTables (){
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function hookdisplayFooter() {
|
|
||||||
$this->context->controller->addJS(($this->_path).'voting.js', 'all');
|
|
||||||
if($this->context->controller->php_self == 'categorycms' && $this->context->controller->categorycms->id_category == 1){
|
|
||||||
$this->context->controller->addJqueryUI('ui.autocomplete', $theme = 'toutpratique', $check_dependencies = true);
|
|
||||||
|
|
||||||
$allTags = CmsPsExtraFieldsValue::getAll(false,true,false,Context::getContext()->language->id);
|
|
||||||
$tags = array();
|
|
||||||
foreach ($allTags as $key => $value) {
|
|
||||||
$tags[] = array(
|
|
||||||
'value' => $value->value,
|
|
||||||
'id' => $value->id_cmsps_extrafields_value,
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$allSupports = CmsPsExtraFieldsValue::getAll(false,false,true,Context::getContext()->language->id);
|
|
||||||
$supports = array();
|
|
||||||
foreach ($allSupports as $key => $value) {
|
|
||||||
$supports[] = array(
|
|
||||||
'value' => $value->value,
|
|
||||||
'id' => $value->id_cmsps_extrafields_value,
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
global $smarty;
|
|
||||||
$smarty->assign(array(
|
|
||||||
'tags' => $tags,
|
|
||||||
'supports' => $supports
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function hookdisplayRelatedProduct($params) {
|
public function install()
|
||||||
$id_product = $params['product']->id;
|
{
|
||||||
$relations = CmsPsPost::getPostRelationWithProduct($id_product, 3, Context::getContext()->language->id);
|
if (Shop::isFeatureActive())
|
||||||
if ($relations) {
|
Shop::setContext(Shop::CONTEXT_ALL);
|
||||||
$this->smarty->assign(array(
|
|
||||||
'relations' => $relations,
|
if (!parent::install()
|
||||||
));
|
|| !$this->registerHook('displayRelatedProduct')
|
||||||
return $this->display(__FILE__, 'product_relationscms.tpl');
|
|| !$this->registerHook('displayProductCategory')
|
||||||
|
|| !$this->registerHook('footer')
|
||||||
|
|| !$this->createTables()
|
||||||
|
)
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function hookdisplayProductCategory($params)
|
public function createTables (){
|
||||||
{
|
return true;
|
||||||
if (isset(Context::getContext()->controller->categorycms)) {
|
}
|
||||||
$categorycms = Context::getContext()->controller->categorycms;
|
|
||||||
$products = $categorycms->loadProductForCategoryDisplay();
|
|
||||||
|
|
||||||
if (!empty($products)) {
|
public function hookdisplayFooter() {
|
||||||
$this->smarty->assign(array(
|
$this->context->controller->addJS(($this->_path).'voting.js', 'all');
|
||||||
'products' => $products,
|
if($this->context->controller->php_self == 'categorycms' && $this->context->controller->categorycms->id_category == 1){
|
||||||
|
$this->context->controller->addJqueryUI('ui.autocomplete', $theme = 'toutpratique', $check_dependencies = true);
|
||||||
|
|
||||||
|
$allTags = CmsPsExtraFieldsValue::getAll(false,true,false,Context::getContext()->language->id);
|
||||||
|
$tags = array();
|
||||||
|
foreach ($allTags as $key => $value) {
|
||||||
|
$tags[] = array(
|
||||||
|
'value' => $value->value,
|
||||||
|
'id' => $value->id_cmsps_extrafields_value,
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$allSupports = CmsPsExtraFieldsValue::getAll(false,false,true,Context::getContext()->language->id);
|
||||||
|
$supports = array();
|
||||||
|
foreach ($allSupports as $key => $value) {
|
||||||
|
$supports[] = array(
|
||||||
|
'value' => $value->value,
|
||||||
|
'id' => $value->id_cmsps_extrafields_value,
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
global $smarty;
|
||||||
|
$smarty->assign(array(
|
||||||
|
'tags' => $tags,
|
||||||
|
'supports' => $supports
|
||||||
));
|
));
|
||||||
return $this->display(__FILE__, 'category_products.tpl');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function hookdisplayHomeVideo($params) {
|
public function hookdisplayRelatedProduct($params) {
|
||||||
$context = Context::getContext();
|
$id_product = $params['product']->id;
|
||||||
$video_article = CmsPsPost::getVideoPost($context->language->id, 1);
|
$relations = CmsPsPost::getPostRelationWithProduct($id_product, 3, Context::getContext()->language->id);
|
||||||
|
if ($relations) {
|
||||||
|
$this->smarty->assign(array(
|
||||||
|
'relations' => $relations,
|
||||||
|
));
|
||||||
|
return $this->display(__FILE__, 'product_relationscms.tpl');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($video_article) {
|
public function hookdisplayProductCategory($params)
|
||||||
$this->smarty->assign(array(
|
{
|
||||||
'video_article' => $video_article,
|
if (isset(Context::getContext()->controller->categorycms)) {
|
||||||
));
|
$categorycms = Context::getContext()->controller->categorycms;
|
||||||
return $this->display(__FILE__, 'video_article.tpl');
|
$products = $categorycms->loadProductForCategoryDisplay();
|
||||||
|
|
||||||
|
if (!empty($products)) {
|
||||||
|
$this->smarty->assign(array(
|
||||||
|
'products' => $products,
|
||||||
|
));
|
||||||
|
return $this->display(__FILE__, 'category_products.tpl');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function hookdisplayHomeVideo($params) {
|
||||||
|
$context = Context::getContext();
|
||||||
|
$video_article = CmsPsPost::getVideoPost($context->language->id, 1);
|
||||||
|
|
||||||
|
if ($video_article) {
|
||||||
|
$this->smarty->assign(array(
|
||||||
|
'video_article' => $video_article,
|
||||||
|
));
|
||||||
|
return $this->display(__FILE__, 'video_article.tpl');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
493
override/classes/Mail.php
Normal file
@ -0,0 +1,493 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* 2007-2015 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Open Software License (OSL 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/osl-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-2015 PrestaShop SA
|
||||||
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*/
|
||||||
|
|
||||||
|
include_once(_PS_SWIFT_DIR_.'Swift.php');
|
||||||
|
include_once(_PS_SWIFT_DIR_.'Swift/Connection/SMTP.php');
|
||||||
|
include_once(_PS_SWIFT_DIR_.'Swift/Connection/NativeMail.php');
|
||||||
|
include_once(_PS_SWIFT_DIR_.'Swift/Plugin/Decorator.php');
|
||||||
|
|
||||||
|
class Mail extends MailCore
|
||||||
|
{
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/** @var string Recipient */
|
||||||
|
public $recipient;
|
||||||
|
|
||||||
|
/** @var string Template */
|
||||||
|
public $template;
|
||||||
|
|
||||||
|
/** @var string Subject */
|
||||||
|
public $subject;
|
||||||
|
|
||||||
|
/** @var unsigned integer Language ID */
|
||||||
|
public $id_lang;
|
||||||
|
|
||||||
|
/** @var timestamp Date */
|
||||||
|
public $date_add;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ObjectModel::$definition
|
||||||
|
*/
|
||||||
|
public static $definition = array(
|
||||||
|
'table' => 'mail',
|
||||||
|
'primary' => 'id_mail',
|
||||||
|
'fields' => array(
|
||||||
|
'recipient' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'copy_post' => false, 'required' => true, 'size' => 126),
|
||||||
|
'template' => array('type' => self::TYPE_STRING, 'validate' => 'isTplName', 'copy_post' => false, 'required' => true, 'size' => 62),
|
||||||
|
'subject' => array('type' => self::TYPE_STRING, 'validate' => 'isMailSubject', 'copy_post' => false, 'required' => true, 'size' => 254),
|
||||||
|
'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false, 'required' => true),
|
||||||
|
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false, 'required' => true),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
const TYPE_HTML = 1;
|
||||||
|
const TYPE_TEXT = 2;
|
||||||
|
const TYPE_BOTH = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send Email
|
||||||
|
*
|
||||||
|
* @param int $id_lang Language of the email (to translate the template)
|
||||||
|
* @param string $template Template: the name of template not be a var but a string !
|
||||||
|
* @param string $subject
|
||||||
|
* @param string $template_vars
|
||||||
|
* @param string $to
|
||||||
|
* @param string $to_name
|
||||||
|
* @param string $from
|
||||||
|
* @param string $from_name
|
||||||
|
* @param array $file_attachment Array with three parameters (content, mime and name). You can use an array of array to attach multiple files
|
||||||
|
* @param bool $modeSMTP
|
||||||
|
* @param string $template_path
|
||||||
|
* @param bool $die
|
||||||
|
* @param string $bcc Bcc recipient
|
||||||
|
*/
|
||||||
|
public static function Send($id_lang, $template, $subject, $template_vars, $to,
|
||||||
|
$to_name = null, $from = null, $from_name = null, $file_attachment = null, $mode_smtp = null,
|
||||||
|
$template_path = _PS_MAIL_DIR_, $die = false, $id_shop = null, $bcc = null, $reply_to = null)
|
||||||
|
{
|
||||||
|
if (!$id_shop)
|
||||||
|
$id_shop = Context::getContext()->shop->id;
|
||||||
|
|
||||||
|
$configuration = Configuration::getMultiple(array(
|
||||||
|
'PS_SHOP_EMAIL',
|
||||||
|
'PS_MAIL_METHOD',
|
||||||
|
'PS_MAIL_SERVER',
|
||||||
|
'PS_MAIL_USER',
|
||||||
|
'PS_MAIL_PASSWD',
|
||||||
|
'PS_SHOP_NAME',
|
||||||
|
'PS_MAIL_SMTP_ENCRYPTION',
|
||||||
|
'PS_MAIL_SMTP_PORT',
|
||||||
|
'PS_MAIL_TYPE'
|
||||||
|
), null, null, $id_shop);
|
||||||
|
|
||||||
|
// Returns immediatly if emails are deactivated
|
||||||
|
if ($configuration['PS_MAIL_METHOD'] == 3)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
$theme_path = _PS_THEME_DIR_;
|
||||||
|
|
||||||
|
// Get the path of theme by id_shop if exist
|
||||||
|
if (is_numeric($id_shop) && $id_shop)
|
||||||
|
{
|
||||||
|
$shop = new Shop((int)$id_shop);
|
||||||
|
$theme_name = $shop->getTheme();
|
||||||
|
|
||||||
|
if (_THEME_NAME_ != $theme_name)
|
||||||
|
$theme_path = _PS_ROOT_DIR_.'/themes/'.$theme_name.'/';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($configuration['PS_MAIL_SMTP_ENCRYPTION']))
|
||||||
|
$configuration['PS_MAIL_SMTP_ENCRYPTION'] = 'off';
|
||||||
|
if (!isset($configuration['PS_MAIL_SMTP_PORT']))
|
||||||
|
$configuration['PS_MAIL_SMTP_PORT'] = 'default';
|
||||||
|
|
||||||
|
// Sending an e-mail can be of vital importance for the merchant, when his password is lost for example, so we must not die but do our best to send the e-mail
|
||||||
|
if (!isset($from) || !Validate::isEmail($from))
|
||||||
|
$from = $configuration['PS_SHOP_EMAIL'];
|
||||||
|
if (!Validate::isEmail($from))
|
||||||
|
$from = null;
|
||||||
|
|
||||||
|
// $from_name is not that important, no need to die if it is not valid
|
||||||
|
if (!isset($from_name) || !Validate::isMailName($from_name))
|
||||||
|
$from_name = $configuration['PS_SHOP_NAME'];
|
||||||
|
if (!Validate::isMailName($from_name))
|
||||||
|
$from_name = null;
|
||||||
|
|
||||||
|
// It would be difficult to send an e-mail if the e-mail is not valid, so this time we can die if there is a problem
|
||||||
|
if (!is_array($to) && !Validate::isEmail($to))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error: parameter "to" is corrupted'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is_array($template_vars))
|
||||||
|
$template_vars = array();
|
||||||
|
|
||||||
|
// Do not crash for this error, that may be a complicated customer name
|
||||||
|
if (is_string($to_name) && !empty($to_name) && !Validate::isMailName($to_name))
|
||||||
|
$to_name = null;
|
||||||
|
|
||||||
|
if (!Validate::isTplName($template))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail template'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Validate::isMailSubject($subject))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail subject'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Construct multiple recipients list if needed */
|
||||||
|
$to_list = new Swift_RecipientList();
|
||||||
|
if (is_array($to) && isset($to))
|
||||||
|
{
|
||||||
|
foreach ($to as $key => $addr)
|
||||||
|
{
|
||||||
|
$addr = trim($addr);
|
||||||
|
if (!Validate::isEmail($addr))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error: invalid e-mail address'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($to_name) && $to_name && is_array($to_name) && Validate::isGenericName($to_name[$key]))
|
||||||
|
$to_name = $to_name[$key];
|
||||||
|
|
||||||
|
$to_name = (($to_name == null || $to_name == $addr) ? '' : self::mimeEncode($to_name));
|
||||||
|
$to_list->addTo($addr, $to_name);
|
||||||
|
}
|
||||||
|
$to_plugin = $to[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Simple recipient, one address */
|
||||||
|
$to_plugin = $to;
|
||||||
|
$to_name = (($to_name == null || $to_name == $to) ? '' : self::mimeEncode($to_name));
|
||||||
|
$to_list->addTo($to, $to_name);
|
||||||
|
}
|
||||||
|
if (isset($bcc))
|
||||||
|
$to_list->addBcc($bcc);
|
||||||
|
|
||||||
|
try {
|
||||||
|
/* Connect with the appropriate configuration */
|
||||||
|
if ($configuration['PS_MAIL_METHOD'] == 2)
|
||||||
|
{
|
||||||
|
if (empty($configuration['PS_MAIL_SERVER']) || empty($configuration['PS_MAIL_SMTP_PORT']))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error: invalid SMTP server or SMTP port'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$connection = new Swift_Connection_SMTP(
|
||||||
|
$configuration['PS_MAIL_SERVER'],
|
||||||
|
$configuration['PS_MAIL_SMTP_PORT'],
|
||||||
|
$configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'ssl' ? Swift_Connection_SMTP::ENC_SSL : (($configuration['PS_MAIL_SMTP_ENCRYPTION'] == 'tls' ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_OFF))
|
||||||
|
);
|
||||||
|
$connection->setTimeout(4);
|
||||||
|
if (!$connection)
|
||||||
|
return false;
|
||||||
|
if (!empty($configuration['PS_MAIL_USER']))
|
||||||
|
$connection->setUsername($configuration['PS_MAIL_USER']);
|
||||||
|
if (!empty($configuration['PS_MAIL_PASSWD']))
|
||||||
|
$connection->setPassword($configuration['PS_MAIL_PASSWD']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$connection = new Swift_Connection_NativeMail();
|
||||||
|
|
||||||
|
if (!$connection)
|
||||||
|
return false;
|
||||||
|
$swift = new Swift($connection, Configuration::get('PS_MAIL_DOMAIN', null, null, $id_shop));
|
||||||
|
/* Get templates content */
|
||||||
|
$iso = Language::getIsoById((int)$id_lang);
|
||||||
|
if (!$iso)
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error - No ISO code for email'), $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$iso_template = $iso.'/'.$template;
|
||||||
|
|
||||||
|
$module_name = false;
|
||||||
|
$override_mail = false;
|
||||||
|
|
||||||
|
// get templatePath
|
||||||
|
if (preg_match('#'.__PS_BASE_URI__.'modules/#', str_replace(DIRECTORY_SEPARATOR, '/', $template_path)) && preg_match('#modules/([a-z0-9_-]+)/#ui', str_replace(DIRECTORY_SEPARATOR, '/',$template_path), $res))
|
||||||
|
$module_name = $res[1];
|
||||||
|
|
||||||
|
if ($module_name !== false && (file_exists($theme_path.'modules/'.$module_name.'/mails/'.$iso_template.'.txt') ||
|
||||||
|
file_exists($theme_path.'modules/'.$module_name.'/mails/'.$iso_template.'.html')))
|
||||||
|
$template_path = $theme_path.'modules/'.$module_name.'/mails/';
|
||||||
|
elseif (file_exists($theme_path.'mails/'.$iso_template.'.txt') || file_exists($theme_path.'mails/'.$iso_template.'.html'))
|
||||||
|
{
|
||||||
|
$template_path = $theme_path.'mails/';
|
||||||
|
$override_mail = true;
|
||||||
|
}
|
||||||
|
if (!file_exists($template_path.$iso_template.'.txt') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$iso_template.'.txt', $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
elseif (!file_exists($template_path.$iso_template.'.html') && ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML))
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error - The following e-mail template is missing:').' '.$template_path.$iso_template.'.html', $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$template_html = file_get_contents($template_path.$iso_template.'.html');
|
||||||
|
$template_txt = strip_tags(html_entity_decode(file_get_contents($template_path.$iso_template.'.txt'), null, 'utf-8'));
|
||||||
|
|
||||||
|
if ($override_mail && file_exists($template_path.$iso.'/lang.php'))
|
||||||
|
include_once($template_path.$iso.'/lang.php');
|
||||||
|
elseif ($module_name && file_exists($theme_path.'mails/'.$iso.'/lang.php'))
|
||||||
|
include_once($theme_path.'mails/'.$iso.'/lang.php');
|
||||||
|
elseif (file_exists(_PS_MAIL_DIR_.$iso.'/lang.php'))
|
||||||
|
include_once(_PS_MAIL_DIR_.$iso.'/lang.php');
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Tools::dieOrLog(Tools::displayError('Error - The language file is missing for:').' '.$iso, $die);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create mail and attach differents parts */
|
||||||
|
$subject = '['.Configuration::get('PS_SHOP_NAME', null, null, $id_shop).'] '.$subject;
|
||||||
|
$message = new Swift_Message($subject);
|
||||||
|
|
||||||
|
$message->setCharset('utf-8');
|
||||||
|
|
||||||
|
/* Set Message-ID - getmypid() is blocked on some hosting */
|
||||||
|
$message->setId(Mail::generateId());
|
||||||
|
|
||||||
|
$message->headers->setEncoding('Q');
|
||||||
|
|
||||||
|
$template_vars = array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $template_vars);
|
||||||
|
$template_vars = array_map(array('Tools', 'stripslashes'), $template_vars);
|
||||||
|
|
||||||
|
if (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop)))
|
||||||
|
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL', null, null, $id_shop);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop)))
|
||||||
|
$logo = _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, $id_shop);
|
||||||
|
else
|
||||||
|
$template_vars['{shop_logo}'] = '';
|
||||||
|
}
|
||||||
|
ShopUrl::cacheMainDomainForShop((int)$id_shop);
|
||||||
|
|
||||||
|
if ((Context::getContext()->link instanceof Link) === false)
|
||||||
|
Context::getContext()->link = new Link();
|
||||||
|
|
||||||
|
|
||||||
|
/* Personnalisation des mails */
|
||||||
|
$template_vars['{header_img}'] = Context::getContext()->smarty->tpl_vars['base_dir']->value . 'themes/fanavenue/mails/header-mail.png';
|
||||||
|
$template_vars['{footer_img}'] = Context::getContext()->smarty->tpl_vars['base_dir']->value . 'themes/fanavenue/mails/footer-mail.png';
|
||||||
|
$template_vars['{box-border-color}'] = '#e4535d';
|
||||||
|
$template_vars['{box-bg-color}'] = '#ffffff';
|
||||||
|
$template_vars['{mail-bg-color}'] = '#f0f0f0';
|
||||||
|
$template_vars['{table-bg-color}'] = '#ffffff';
|
||||||
|
$template_vars['{titre1-color}'] = '#e4535d';
|
||||||
|
$template_vars['{titre2-color}'] = '#e4535d ';
|
||||||
|
$template_vars['{link-color}'] = '#e4535d';
|
||||||
|
|
||||||
|
|
||||||
|
$template_vars['{shop_name}'] = Tools::safeOutput(Configuration::get('PS_SHOP_NAME', null, null, $id_shop));
|
||||||
|
$template_vars['{shop_url}'] = Context::getContext()->link->getPageLink('index', true, Context::getContext()->language->id, null, false, $id_shop);
|
||||||
|
$template_vars['{my_account_url}'] = Context::getContext()->link->getPageLink('my-account', true, Context::getContext()->language->id, null, false, $id_shop);
|
||||||
|
$template_vars['{guest_tracking_url}'] = Context::getContext()->link->getPageLink('guest-tracking', true, Context::getContext()->language->id, null, false, $id_shop);
|
||||||
|
$template_vars['{history_url}'] = Context::getContext()->link->getPageLink('history', true, Context::getContext()->language->id, null, false, $id_shop);
|
||||||
|
$template_vars['{color}'] = Tools::safeOutput(Configuration::get('PS_MAIL_COLOR', null, null, $id_shop));
|
||||||
|
$swift->attachPlugin(new Swift_Plugin_Decorator(array($to_plugin => $template_vars)), 'decorator');
|
||||||
|
if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_TEXT)
|
||||||
|
$message->attach(new Swift_Message_Part($template_txt, 'text/plain', '8bit', 'utf-8'));
|
||||||
|
if ($configuration['PS_MAIL_TYPE'] == Mail::TYPE_BOTH || $configuration['PS_MAIL_TYPE'] == Mail::TYPE_HTML)
|
||||||
|
$message->attach(new Swift_Message_Part($template_html, 'text/html', '8bit', 'utf-8'));
|
||||||
|
if ($file_attachment && !empty($file_attachment))
|
||||||
|
{
|
||||||
|
// Multiple attachments?
|
||||||
|
if (!is_array(current($file_attachment)))
|
||||||
|
$file_attachment = array($file_attachment);
|
||||||
|
|
||||||
|
foreach ($file_attachment as $attachment)
|
||||||
|
if (isset($attachment['content']) && isset($attachment['name']) && isset($attachment['mime']))
|
||||||
|
$message->attach(new Swift_Message_Attachment($attachment['content'], $attachment['name'], $attachment['mime']));
|
||||||
|
}
|
||||||
|
/* Send mail */
|
||||||
|
$send = $swift->send($message, $to_list, new Swift_Address($from, $from_name));
|
||||||
|
$swift->disconnect();
|
||||||
|
|
||||||
|
ShopUrl::resetMainDomainCache();
|
||||||
|
|
||||||
|
if ($send && Configuration::get('PS_LOG_EMAILS'))
|
||||||
|
{
|
||||||
|
$mail = new Mail();
|
||||||
|
$mail->template = substr($template, 0, 62);
|
||||||
|
$mail->subject = substr($subject, 0, 254);
|
||||||
|
$mail->id_lang = (int)$id_lang;
|
||||||
|
foreach (array_merge($to_list->getTo(), $to_list->getCc(), $to_list->getBcc()) as $recipient)
|
||||||
|
{
|
||||||
|
$mail->id = null;
|
||||||
|
$mail->recipient = substr($recipient->getAddress(), 0, 126);
|
||||||
|
$mail->add();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $send;
|
||||||
|
}
|
||||||
|
catch (Swift_Exception $e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function eraseAllLogs()
|
||||||
|
{
|
||||||
|
return Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'mail');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sendMailTest($smtpChecked, $smtpServer, $content, $subject, $type, $to, $from, $smtpLogin, $smtpPassword, $smtpPort = 25, $smtpEncryption)
|
||||||
|
{
|
||||||
|
$result = false;
|
||||||
|
try {
|
||||||
|
if ($smtpChecked)
|
||||||
|
{
|
||||||
|
$smtp = new Swift_Connection_SMTP($smtpServer, $smtpPort, ($smtpEncryption == 'off') ?
|
||||||
|
Swift_Connection_SMTP::ENC_OFF : (($smtpEncryption == 'tls') ? Swift_Connection_SMTP::ENC_TLS : Swift_Connection_SMTP::ENC_SSL));
|
||||||
|
$smtp->setUsername($smtpLogin);
|
||||||
|
$smtp->setpassword($smtpPassword);
|
||||||
|
$smtp->setTimeout(5);
|
||||||
|
$swift = new Swift($smtp, Configuration::get('PS_MAIL_DOMAIN'));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$swift = new Swift(new Swift_Connection_NativeMail(), Configuration::get('PS_MAIL_DOMAIN'));
|
||||||
|
|
||||||
|
$message = new Swift_Message($subject, $content, $type);
|
||||||
|
|
||||||
|
if ($swift->send($message, $to, $from))
|
||||||
|
$result = true;
|
||||||
|
|
||||||
|
$swift->disconnect();
|
||||||
|
} catch (Swift_ConnectionException $e) {
|
||||||
|
$result = $e->getMessage();
|
||||||
|
} catch (Swift_Message_MimeException $e) {
|
||||||
|
$result = $e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is used to get the translation for email Object.
|
||||||
|
* For an object is forbidden to use htmlentities,
|
||||||
|
* we have to return a sentence with accents.
|
||||||
|
*
|
||||||
|
* @param string $string raw sentence (write directly in file)
|
||||||
|
*/
|
||||||
|
public static function l($string, $id_lang = null, Context $context = null)
|
||||||
|
{
|
||||||
|
global $_LANGMAIL;
|
||||||
|
|
||||||
|
if (!$context)
|
||||||
|
$context = Context::getContext();
|
||||||
|
if ($id_lang == null)
|
||||||
|
$id_lang = (!isset($context->language) || !is_object($context->language)) ? (int)Configuration::get('PS_LANG_DEFAULT') : (int)$context->language->id;
|
||||||
|
$iso_code = Language::getIsoById((int)$id_lang);
|
||||||
|
|
||||||
|
$file_core = _PS_ROOT_DIR_.'/mails/'.$iso_code.'/lang.php';
|
||||||
|
if (Tools::file_exists_cache($file_core) && empty($_LANGMAIL))
|
||||||
|
include($file_core);
|
||||||
|
|
||||||
|
$file_theme = _PS_THEME_DIR_.'mails/'.$iso_code.'/lang.php';
|
||||||
|
if (Tools::file_exists_cache($file_theme))
|
||||||
|
include($file_theme);
|
||||||
|
|
||||||
|
if (!is_array($_LANGMAIL))
|
||||||
|
return (str_replace('"', '"', $string));
|
||||||
|
|
||||||
|
$key = str_replace('\'', '\\\'', $string);
|
||||||
|
return str_replace('"', '"', stripslashes((array_key_exists($key, $_LANGMAIL) && !empty($_LANGMAIL[$key])) ? $_LANGMAIL[$key] : $string));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Rewrite of Swift_Message::generateId() without getmypid() */
|
||||||
|
protected static function generateId($idstring = null)
|
||||||
|
{
|
||||||
|
$midparams = array(
|
||||||
|
"utctime" => gmstrftime("%Y%m%d%H%M%S"),
|
||||||
|
"randint" => mt_rand(),
|
||||||
|
"customstr" => (preg_match("/^(?<!\\.)[a-z0-9\\.]+(?!\\.)\$/iD", $idstring) ? $idstring : "swift") ,
|
||||||
|
"hostname" => (isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : php_uname("n")),
|
||||||
|
);
|
||||||
|
return vsprintf("<%s.%d.%s@%s>", $midparams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function isMultibyte($data)
|
||||||
|
{
|
||||||
|
$length = strlen($data);
|
||||||
|
for ($i = 0; $i < $length; $i++)
|
||||||
|
if (ord(($data[$i])) > 128)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function mimeEncode($string, $charset = 'UTF-8', $newline = "\r\n")
|
||||||
|
{
|
||||||
|
if (!self::isMultibyte($string) && strlen($string) < 75)
|
||||||
|
return $string;
|
||||||
|
|
||||||
|
$charset = strtoupper($charset);
|
||||||
|
$start = '=?'.$charset.'?B?';
|
||||||
|
$end = '?=';
|
||||||
|
$sep = $end.$newline.' '.$start;
|
||||||
|
$length = 75 - strlen($start) - strlen($end);
|
||||||
|
$length = $length - ($length % 4);
|
||||||
|
|
||||||
|
if ($charset === 'UTF-8')
|
||||||
|
{
|
||||||
|
$parts = array();
|
||||||
|
$maxchars = floor(($length * 3) / 4);
|
||||||
|
$stringLength = strlen($string);
|
||||||
|
|
||||||
|
while ($stringLength > $maxchars)
|
||||||
|
{
|
||||||
|
$i = (int)$maxchars;
|
||||||
|
$result = ord($string[$i]);
|
||||||
|
|
||||||
|
while ($result >= 128 && $result <= 191)
|
||||||
|
$result = ord($string[--$i]);
|
||||||
|
|
||||||
|
$parts[] = base64_encode(substr($string, 0, $i));
|
||||||
|
$string = substr($string, $i);
|
||||||
|
$stringLength = strlen($string);
|
||||||
|
}
|
||||||
|
|
||||||
|
$parts[] = base64_encode($string);
|
||||||
|
$string = implode($sep, $parts);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$string = chunk_split(base64_encode($string), $length, $sep);
|
||||||
|
$string = preg_replace('/' . preg_quote($sep) . '$/', '', $string);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $start.$string.$end;
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
include _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsEdito.php';
|
||||||
include _PS_MODULE_DIR_.'cmsps/classes/CmsPsPost.php';
|
require_once _PS_MODULE_DIR_.'cmsps/classes/CmsPsPost.php';
|
||||||
|
|
||||||
class IndexController extends IndexControllerCore
|
class IndexController extends IndexControllerCore
|
||||||
{
|
{
|
||||||
@ -13,8 +13,8 @@ class IndexController extends IndexControllerCore
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'edito' => $edito,
|
'edito' => $edito,
|
||||||
'posts_home_1' => array_slice($posts, 0, 4),
|
'posts_home_1' => array_slice($posts, 0, 3),
|
||||||
'posts_home_2' => array_slice($posts, 4, 3),
|
'posts_home_2' => array_slice($posts, 3, 4),
|
||||||
'posts_home_3' => array_slice($posts, 7, 3),
|
'posts_home_3' => array_slice($posts, 7, 3),
|
||||||
'posts_home_4' => array_slice($posts, 10, 3),
|
'posts_home_4' => array_slice($posts, 10, 3),
|
||||||
'posts_home_5' => array_slice($posts, 11, 1)
|
'posts_home_5' => array_slice($posts, 11, 1)
|
||||||
|
@ -374,7 +374,8 @@ class BlockNewsletterOverride extends BlockNewsletter
|
|||||||
$fileAttachment['content'] = file_get_contents(_CMS_CAT_IMG_DIR_.'pdf/Tout-pratique-'.$cmsCategory['slug'].'.pdf');
|
$fileAttachment['content'] = file_get_contents(_CMS_CAT_IMG_DIR_.'pdf/Tout-pratique-'.$cmsCategory['slug'].'.pdf');
|
||||||
$fileAttachment['name'] = 'Tout-pratique-'.$cmsCategory['slug'].'.pdf';
|
$fileAttachment['name'] = 'Tout-pratique-'.$cmsCategory['slug'].'.pdf';
|
||||||
$fileAttachment['mime'] = "application/pdf";
|
$fileAttachment['mime'] = "application/pdf";
|
||||||
$data['{attached_file_url}'] = _CMS_CAT_IMG_DIR_.'pdf/Tout-pratique-'.$cmsCategory['slug'].'.pdf';
|
|
||||||
|
$data['{attached_file_url}'] = _PS_BASE_URL_.'img/cms_c/pdf/Tout-pratique-'.$cmsCategory['slug'].'.pdf';
|
||||||
$data['{attached_file}'] = "Tout-pratique-".$cmsCategory['slug'];
|
$data['{attached_file}'] = "Tout-pratique-".$cmsCategory['slug'];
|
||||||
} else {
|
} else {
|
||||||
// on envoie le pdf générique
|
// on envoie le pdf générique
|
||||||
@ -383,12 +384,12 @@ class BlockNewsletterOverride extends BlockNewsletter
|
|||||||
}
|
}
|
||||||
$fileAttachment['name'] = 'Tout-pratique.pdf';
|
$fileAttachment['name'] = 'Tout-pratique.pdf';
|
||||||
$fileAttachment['mime'] = "application/pdf";
|
$fileAttachment['mime'] = "application/pdf";
|
||||||
$data['{attached_file_url}'] = _CMS_CAT_IMG_DIR_.'pdf/Tout-pratique.pdf';
|
$data['{attached_file_url}'] = _PS_BASE_URL_.'img/cms_c/pdf/Tout-pratique.pdf';
|
||||||
$data['{attached_file}'] = "Tout-pratique";
|
$data['{attached_file}'] = "Tout-pratique";
|
||||||
}
|
}
|
||||||
} elseif($genericPdf != false) {
|
} elseif($genericPdf != false) {
|
||||||
$fileAttachment = $genericPdf;
|
$fileAttachment = $genericPdf;
|
||||||
$data['{attached_file_url}'] = _CMS_CAT_IMG_DIR_.'pdf/Tout-pratique.pdf';
|
$data['{attached_file_url}'] = _PS_BASE_URL_.'img/cms_c/pdf/Tout-pratique.pdf';
|
||||||
$data['{attached_file}'] = $genericPdf['name'];
|
$data['{attached_file}'] = $genericPdf['name'];
|
||||||
}
|
}
|
||||||
return Mail::Send($this->context->language->id, 'newsletter_conf', Mail::l('Newsletter confirmation', $this->context->language->id), $data, pSQL($email), null, null, null, $fileAttachment, null, _THEME_DIR_.'modules/blocknewsletter/mails/', false, $this->context->shop->id);
|
return Mail::Send($this->context->language->id, 'newsletter_conf', Mail::l('Newsletter confirmation', $this->context->language->id), $data, pSQL($email), null, null, null, $fileAttachment, null, _THEME_DIR_.'modules/blocknewsletter/mails/', false, $this->context->shop->id);
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 desc_category">
|
<section class="col-md-8 desc_category">
|
||||||
{if $categorycms->description}
|
{if $categorycms->description}
|
||||||
<div class="desc">
|
<div class="desc">
|
||||||
{$categorycms->description}
|
{$categorycms->description}
|
||||||
@ -81,8 +81,10 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<!-- All posts -->
|
<!-- All posts -->
|
||||||
<div class="all_posts">
|
<section class="all_posts">
|
||||||
<span class="title blue">{l s='Toutes les astuces'}</span>
|
<header>
|
||||||
|
<span class="title blue">{l s='Toutes les astuces'}</span>
|
||||||
|
</header>
|
||||||
|
|
||||||
<div class="search_category">
|
<div class="search_category">
|
||||||
<form class="form-horizontal" action="" method="GET">
|
<form class="form-horizontal" action="" method="GET">
|
||||||
@ -158,9 +160,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="col-md-4">
|
<aside class="col-md-4 right_column_category">
|
||||||
<div class="pub">
|
<div class="pub">
|
||||||
{hook h='displayPubliciteRight'}
|
{hook h='displayPubliciteRight'}
|
||||||
</div>
|
</div>
|
||||||
@ -202,11 +204,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div style="padding: 20px; background:#f1f1f1; margin-bottom:30px;" class="pub"></div>
|
<div class="pub">
|
||||||
|
{hook h='displayPubliciteRightBottom'}
|
||||||
|
</div>
|
||||||
<div class="hidden-sm hidden-xs">
|
<div class="hidden-sm hidden-xs">
|
||||||
{include file="$tpl_dir./encart_boutique.tpl"}
|
{include file="$tpl_dir./encart_boutique.tpl"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
@ -568,8 +568,8 @@ body .ac_results {
|
|||||||
font-family: 'vidaloka';
|
font-family: 'vidaloka';
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
font-size: 48px;
|
font-size: 48px;
|
||||||
margin: 0;
|
margin-top: 20px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
.video_home iframe {
|
.video_home iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -658,9 +658,12 @@ body .ac_results {
|
|||||||
padding: 0 300px;
|
padding: 0 300px;
|
||||||
}
|
}
|
||||||
.newsletter_footer p.nw-alert-footer{
|
.newsletter_footer p.nw-alert-footer{
|
||||||
color: #ebccd1;
|
background: none;
|
||||||
background-color: rgba(0, 0, 0, 0);
|
border: 1px solid;
|
||||||
border: none;
|
color: #000;
|
||||||
|
margin: 7px auto 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 300px;
|
||||||
}
|
}
|
||||||
.newsletter_footer .form-group {
|
.newsletter_footer .form-group {
|
||||||
width: 450px;
|
width: 450px;
|
||||||
@ -1256,34 +1259,81 @@ body .ac_results {
|
|||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
|
.article_content .content ul { margin-left: 20px; margin-bottom: 15px;}
|
||||||
|
.article_content .content ul li {
|
||||||
|
margin: 5px 0;
|
||||||
|
list-style: inside;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
.article_content .content h2 strong { font-weight: normal;}
|
.article_content .content h2 strong { font-weight: normal;}
|
||||||
.article_content .content h2 {
|
.article_content .content h2 {
|
||||||
font-size: 22px;
|
font-size: 36px;
|
||||||
|
line-height: 42px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
font-family: 'pompiere_regular';
|
||||||
font-family: 'vidaloka';
|
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
border-bottom: 3px solid #333333;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
|
.article_content .content br {
|
||||||
|
display: block;
|
||||||
|
margin:0;
|
||||||
}
|
}
|
||||||
.article_content .content h3 {
|
.article_content .content h3 {
|
||||||
|
font-weight: bold;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
padding: 15px;
|
||||||
|
background: #eeeeee;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.article_content .content h5, h4 {
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 24px;
|
||||||
}
|
}
|
||||||
.article_content .content p {margin-bottom: 0;}
|
.article_content .content p {margin-bottom: 0;}
|
||||||
.article_content .content .info {
|
.article_content .content .info {
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
border-radius: 5px;
|
margin-top: 40px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 20px;
|
||||||
|
background: url('../img/ico_danger.png') no-repeat left 15px center;
|
||||||
|
padding-left: 170px;
|
||||||
|
}
|
||||||
|
.article_content .content .info.asavoir { background-image: url('../img/ico_asavoir.png')}
|
||||||
|
.article_content .content .info.anoter { background-image: url('../img/ico_anoter.png')}
|
||||||
|
.article_content .content .info.truc { background-image: url('../img/ico_truc.png')}
|
||||||
|
.article_content .content .info h3 {
|
||||||
|
background: none;
|
||||||
|
text-transform: none;
|
||||||
|
padding: 0;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 15px;
|
||||||
|
margin: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
.article_content .content .info h5 {
|
.article_content .content .info h5 {
|
||||||
|
font-size: 18px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-family: 'pt_sansbold';
|
||||||
|
color: #e4535d;
|
||||||
}
|
}
|
||||||
|
.article_content .content .info.truc{ background-color: #dfeaed;}
|
||||||
|
.article_content .content .info.truc h5 {color: #529bb6}
|
||||||
|
.article_content .content .info.warning{ background-color: #f4dfe1;}
|
||||||
|
.article_content .content .info.asavoir{ background-color: #e3f0ee;}
|
||||||
|
.article_content .content .info.asavoir h5 {color: #6ac5bb}
|
||||||
|
.article_content .content .info.anoter{ background-color: #ddd6e1;}
|
||||||
|
.article_content .content .info.anoter h5 {color: #8a669d}
|
||||||
|
.article_content .content a { color: #e44e58;}
|
||||||
|
.article_content .content .video { margin: 15px 0; }
|
||||||
|
.article_content .content .pub_bottom_post { margin: 15px 0; }
|
||||||
|
|
||||||
.article_content .content .info.truc{ background-color: #d7e9e7;}
|
.right_column_category .pub {
|
||||||
.article_content .content .info.warning{ background-color: #efd2d4;}
|
margin: 15px 0;
|
||||||
.article_content .content .info.asavoir{ background-color: #ebebd9;}
|
text-align: center;
|
||||||
.article_content .content .info.anoter{ background-color: #ebd1dc;}
|
|
||||||
.article_content .content a {
|
|
||||||
color: #e44e58;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.others {
|
.others {
|
||||||
@ -1733,6 +1783,12 @@ body .ac_results {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
font-family: 'pompiere_regular';
|
font-family: 'pompiere_regular';
|
||||||
}
|
}
|
||||||
|
#postcms .pack_bottom .desc .remise {
|
||||||
|
float: left;
|
||||||
|
padding-left: 200px;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
#postcms .pack_bottom .desc .remise span { font-weight: bold; color: #e4535d}
|
||||||
#postcms .pack_bottom .products {
|
#postcms .pack_bottom .products {
|
||||||
border: 1px solid #dfdfdf;
|
border: 1px solid #dfdfdf;
|
||||||
-webkit-border-radius: 5px 5px 5px 5px;
|
-webkit-border-radius: 5px 5px 5px 5px;
|
||||||
@ -1888,6 +1944,7 @@ body .ac_results {
|
|||||||
#postcms .pack_content .reinsurance .bloc span{ font-size: 18px;}
|
#postcms .pack_content .reinsurance .bloc span{ font-size: 18px;}
|
||||||
#postcms .pack_content .reinsurance .border { font-size: 12px; line-height: 18px; padding: 10px 0;}
|
#postcms .pack_content .reinsurance .border { font-size: 12px; line-height: 18px; padding: 10px 0;}
|
||||||
|
|
||||||
|
#postcms .pack_bottom .desc .remise { padding-left: 150px; }
|
||||||
#postcms .share .share_btn a {width: 120px; margin: 0 auto;}
|
#postcms .share .share_btn a {width: 120px; margin: 0 auto;}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1924,6 +1981,9 @@ body .ac_results {
|
|||||||
#postcms .form_comment .submit input[type="submit"]{ width: 350px;}
|
#postcms .form_comment .submit input[type="submit"]{ width: 350px;}
|
||||||
|
|
||||||
#postcms .selection_bottom .reassurance{ padding-left: 15px;}
|
#postcms .selection_bottom .reassurance{ padding-left: 15px;}
|
||||||
|
|
||||||
|
#postcms .pack_bottom .desc { margin-right: 0; }
|
||||||
|
#postcms .pack_bottom .desc .remise { padding-left: 0; }
|
||||||
#postcms .pack_bottom .name { font-family: "pt_sans"; font-size: 15px; font-weight: normal; width: 216px; }
|
#postcms .pack_bottom .name { font-family: "pt_sans"; font-size: 15px; font-weight: normal; width: 216px; }
|
||||||
#postcms .pack_bottom .custom-checkbox { margin-left: 15px; }
|
#postcms .pack_bottom .custom-checkbox { margin-left: 15px; }
|
||||||
}
|
}
|
||||||
@ -1941,10 +2001,11 @@ body .ac_results {
|
|||||||
}
|
}
|
||||||
@media (max-width: 570px) {
|
@media (max-width: 570px) {
|
||||||
#postcms .pack_content .price-percent-reduction { background-size: 70% auto; font-size: 14px; line-height: 50px; right: 10px; }
|
#postcms .pack_content .price-percent-reduction { background-size: 70% auto; font-size: 14px; line-height: 50px; right: 10px; }
|
||||||
|
|
||||||
#postcms .tips_utile .title {font-size: 25px;}
|
#postcms .tips_utile .title {font-size: 25px;}
|
||||||
#postcms .intro_note .left { margin-left: 24%; margin-top: 16px; }
|
#postcms .intro_note .left { margin-left: 24%; margin-top: 16px; }
|
||||||
#postcms .intro_note .right { font-size: 14px; margin-right: 13%; margin-top: 25px; }
|
#postcms .intro_note .right { font-size: 14px; margin-right: 13%; margin-top: 25px; }
|
||||||
|
|
||||||
|
#postcms .pack_bottom .desc .remise { display: block; width: 100%; }
|
||||||
}
|
}
|
||||||
@media (max-width: 500px) {
|
@media (max-width: 500px) {
|
||||||
.vote_box.button span {padding: 0px 18px;}
|
.vote_box.button span {padding: 0px 18px;}
|
||||||
@ -2511,6 +2572,9 @@ body .ac_results {
|
|||||||
}
|
}
|
||||||
#product #features ul li span:first-child { font-weight: bold; }
|
#product #features ul li span:first-child { font-weight: bold; }
|
||||||
|
|
||||||
|
#product .attachments h3{ font-family: 'vidaloka'; border-bottom: 2px solid #333; }
|
||||||
|
#product .attachments a.link{ color: #333; }
|
||||||
|
|
||||||
#product #related .subtitle {
|
#product #related .subtitle {
|
||||||
background: url('../img/bg_title.png') no-repeat 0 0px;
|
background: url('../img/bg_title.png') no-repeat 0 0px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -2556,6 +2620,15 @@ body .ac_results {
|
|||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
#product #related .subtitle {
|
||||||
|
background: #529bb6;
|
||||||
|
border-radius: 10px;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 24px;
|
||||||
|
width: 300px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
#product #features .subtitle {
|
#product #features .subtitle {
|
||||||
background: #6ac5bb;
|
background: #6ac5bb;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
@ -214,12 +214,12 @@ span.title {
|
|||||||
/* ICONE */
|
/* ICONE */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icomoon';
|
font-family: 'icomoon';
|
||||||
src:url('../fonts/icomoon.eot?-sfq5xb');
|
src:url('../fonts/icomoon.eot?uem8rg');
|
||||||
src:url('../fonts/icomoon.eot?#iefix-sfq5xb') format('embedded-opentype'),
|
src:url('../fonts/icomoon.eot?uem8rg#iefix') format('embedded-opentype'),
|
||||||
url('../fonts/icomoon.woff2?-sfq5xb') format('woff2'),
|
url('../fonts/icomoon.woff2?uem8rg') format('woff2'),
|
||||||
url('../fonts/icomoon.ttf?-sfq5xb') format('truetype'),
|
url('../fonts/icomoon.ttf?uem8rg') format('truetype'),
|
||||||
url('../fonts/icomoon.woff?-sfq5xb') format('woff'),
|
url('../fonts/icomoon.woff?uem8rg') format('woff'),
|
||||||
url('../fonts/icomoon.svg?-sfq5xb#icomoon') format('svg');
|
url('../fonts/icomoon.svg?uem8rg#icomoon') format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
@ -238,6 +238,9 @@ span.title {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-youtube:before {
|
||||||
|
content: "\e900";
|
||||||
|
}
|
||||||
.icon-wallet2:before {
|
.icon-wallet2:before {
|
||||||
content: "\e607";
|
content: "\e607";
|
||||||
}
|
}
|
||||||
@ -276,6 +279,9 @@ span.title {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* BOUTONS */
|
/* BOUTONS */
|
||||||
.btn {
|
.btn {
|
||||||
background: #e4535d;
|
background: #e4535d;
|
||||||
|
@ -19,4 +19,5 @@
|
|||||||
<glyph unicode="" 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="" 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="" 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="" 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="" 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="" 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="" 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" />
|
||||||
</font></defs></svg>
|
</font></defs></svg>
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
@ -36,6 +36,9 @@
|
|||||||
<span class="social">
|
<span class="social">
|
||||||
<a href="https://twitter.com/Toutpratique" target="_blank"><i class="icon icon-twitter"></i></a>
|
<a href="https://twitter.com/Toutpratique" target="_blank"><i class="icon icon-twitter"></i></a>
|
||||||
</span>
|
</span>
|
||||||
|
<span class="social">
|
||||||
|
<a href="https://www.youtube.com/user/toutpratique" target="_blank"><i class="icon icon-youtube"></i></a>
|
||||||
|
</span>
|
||||||
{l s='Contactez-nous'}
|
{l s='Contactez-nous'}
|
||||||
<span class="social">
|
<span class="social">
|
||||||
<a href="{$link->getPageLink('contact')}"><i class="icon icon-email"></i></a>
|
<a href="{$link->getPageLink('contact')}"><i class="icon icon-email"></i></a>
|
||||||
|
BIN
themes/toutpratique/img/ico_anoter.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
themes/toutpratique/img/ico_asavoir.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
themes/toutpratique/img/ico_danger.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
themes/toutpratique/img/ico_truc.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
@ -55,6 +55,11 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="row post_home_top">
|
<div class="row post_home_top">
|
||||||
{foreach from=$posts_home_1 item=post key=key}
|
{foreach from=$posts_home_1 item=post key=key}
|
||||||
|
{if $key == 2}
|
||||||
|
<div class="col-md-6 col-sm-6 pub">
|
||||||
|
{hook h='displayHomeRight2'}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
<div class="col-md-6 col-sm-6">
|
<div class="col-md-6 col-sm-6">
|
||||||
{include file="./post_img.tpl" post=$post}
|
{include file="./post_img.tpl" post=$post}
|
||||||
</div>
|
</div>
|
||||||
@ -72,9 +77,6 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pub">
|
|
||||||
{hook h='displayHomeRight2'}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -997,31 +997,31 @@ function refreshDeliveryOptions()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateExtraCarrier(id_delivery_option, id_address)
|
function updateExtraCarrier(iddelivery_option, id_address)
|
||||||
{
|
{
|
||||||
var url = "";
|
var url = "";
|
||||||
|
|
||||||
if(typeof(orderOpcUrl) !== 'undefined')
|
if(typeof(orderOpcUrl) !== 'undefined')
|
||||||
url = orderOpcUrl;
|
url = orderOpcUrl;
|
||||||
else
|
else
|
||||||
url = orderUrl;
|
url = orderUrl;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
headers: { "cache-control": "no-cache" },
|
headers: { "cache-control": "no-cache" },
|
||||||
url: url + '?rand=' + new Date().getTime(),
|
url: url + '?rand=' + new Date().getTime(),
|
||||||
async: true,
|
async: true,
|
||||||
cache: false,
|
cache: false,
|
||||||
dataType : "json",
|
dataType : "json",
|
||||||
data: 'ajax=true'
|
data: 'ajax=true'
|
||||||
+ '&method=updateExtraCarrier'
|
+ '&method=updateExtraCarrier'
|
||||||
+ '&id_address='+id_address
|
+ '&id_address='+id_address
|
||||||
+ '&id_delivery_option='+id_delivery_option
|
+ '&id_delivery_option='+id_delivery_option
|
||||||
+ '&token='+static_token
|
+ '&token='+static_token
|
||||||
+ '&allow_refresh=1',
|
+ '&allow_refresh=1',
|
||||||
success: function(jsonData)
|
success: function(jsonData)
|
||||||
{
|
{
|
||||||
$('#HOOK_EXTRACARRIER_' + id_address).html(jsonData['content']);
|
$('#HOOK_EXTRACARRIER' + id_address).html(jsonData['content']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -101,3 +101,32 @@ function updateCarriers(){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateExtraCarrier(id_delivery_option, id_address)
|
||||||
|
{
|
||||||
|
var url = "";
|
||||||
|
|
||||||
|
if(typeof(orderOpcUrl) !== 'undefined')
|
||||||
|
url = orderOpcUrl;
|
||||||
|
else
|
||||||
|
url = orderUrl;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
headers: { "cache-control": "no-cache" },
|
||||||
|
url: url + '?rand=' + new Date().getTime(),
|
||||||
|
async: true,
|
||||||
|
cache: false,
|
||||||
|
dataType : "json",
|
||||||
|
data: 'ajax=true'
|
||||||
|
+ '&method=updateExtraCarrier'
|
||||||
|
+ '&id_address='+id_address
|
||||||
|
+ '&id_delivery_option='+id_delivery_option
|
||||||
|
+ '&token='+static_token
|
||||||
|
+ '&allow_refresh=1',
|
||||||
|
success: function(jsonData)
|
||||||
|
{
|
||||||
|
$('#HOOK_EXTRACARRIER' + id_address).html(jsonData['content']);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
@ -537,6 +537,8 @@ $_LANG['product_476efcbaed950dd513ffc08e4e9a632f'] = 'Envoi en cours, veuillez p
|
|||||||
$_LANG['product_63a78ed4647f7c63c2929e35ec1c95e3'] = 'Personnaliser';
|
$_LANG['product_63a78ed4647f7c63c2929e35ec1c95e3'] = 'Personnaliser';
|
||||||
$_LANG['product_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité :';
|
$_LANG['product_694e8d1f2ee056f98ee488bdc4982d73'] = 'Quantité :';
|
||||||
$_LANG['product_7dcd185f890fd28f69d1ed210292d77f'] = 'Fiche technique';
|
$_LANG['product_7dcd185f890fd28f69d1ed210292d77f'] = 'Fiche technique';
|
||||||
|
$_LANG['product_801ab24683a4a8c433c6eb40c48bcd9d'] = 'Télécharger';
|
||||||
|
$_LANG['product_91f3a2c0e4424c87689525da44c4db11'] = 'Fichiers';
|
||||||
$_LANG['product_9a9a97ca85af73f90515e72745f730f0'] = 'au lieu de';
|
$_LANG['product_9a9a97ca85af73f90515e72745f730f0'] = 'au lieu de';
|
||||||
$_LANG['product_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description';
|
$_LANG['product_b5a7adde1af5c87d7fd797b6245c2a39'] = 'Description';
|
||||||
$_LANG['product_bc0f7082192ef02e934a036cf4991789'] = 'Ce produit n\'est plus en stock';
|
$_LANG['product_bc0f7082192ef02e934a036cf4991789'] = 'Ce produit n\'est plus en stock';
|
||||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -27,7 +27,7 @@
|
|||||||
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
||||||
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||||
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
|
{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
|
||||||
<span class="price" itemprop="price">
|
<span class="price">
|
||||||
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
|
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
|
||||||
</span>
|
</span>
|
||||||
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
|
{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
|
||||||
@ -52,6 +52,7 @@
|
|||||||
{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
{if (!$PS_CATALOG_MODE && $PS_STOCK_MANAGEMENT && ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
|
||||||
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
|
{if isset($product.available_for_order) && $product.available_for_order && !isset($restricted_country_mode)}
|
||||||
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
|
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="availability">
|
||||||
|
<link itemprop="price" content="{$product.price_without_reduction|number_format:2}">
|
||||||
{if (isset($product.allow_oosp) && $product.allow_oosp || $product.quantity > 0)}
|
{if (isset($product.allow_oosp) && $product.allow_oosp || $product.quantity > 0)}
|
||||||
<link itemprop="availability" href="http://schema.org/InStock" />
|
<link itemprop="availability" href="http://schema.org/InStock" />
|
||||||
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
|
{elseif (isset($product.quantity_all_versions) && $product.quantity_all_versions > 0)}
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
{else}
|
{else}
|
||||||
{assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
|
{assign var=imageTitle value=$product->name|escape:'html':'UTF-8'}
|
||||||
{/if}
|
{/if}
|
||||||
<li id="thumbnail_{$image.id_image}"{if $smarty.foreach.thumbnails.last} class="image_thumb last"{else}class="image_thumb"{/if}>
|
<li id="thumbnail_{$image.id_image}" {if $smarty.foreach.thumbnails.last} class="image_thumb last"{else} class="image_thumb"{/if}>
|
||||||
<a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal}}{/literal}"{else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" data-fancybox-group="other-views" class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"{/if} title="{$imageTitle}">
|
<a{if $jqZoomEnabled && $have_image && !$content_only} href="javascript:void(0);" rel="{literal}{{/literal}gallery: 'gal1', smallimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'large_default')|escape:'html':'UTF-8'}',largeimage: '{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}'{literal}}{/literal}"{else} href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html':'UTF-8'}" data-fancybox-group="other-views" class="fancybox{if $image.id_image == $cover.id_image} shown{/if}"{/if} title="{$imageTitle}">
|
||||||
<img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}"{if isset($cartSize)} height="{$cartSize.height}" width="{$cartSize.width}"{/if} itemprop="image" />
|
<img class="img-responsive" id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'cart_default')|escape:'html':'UTF-8'}" alt="{$imageTitle}" title="{$imageTitle}"{if isset($cartSize)} height="{$cartSize.height}" width="{$cartSize.width}"{/if} itemprop="image" />
|
||||||
</a>
|
</a>
|
||||||
@ -164,7 +164,7 @@
|
|||||||
<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">{strip}
|
<p class="our_price_display" itemprop="offers" itemscope itemtype="http://schema.org/Offer">{strip}
|
||||||
{if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if}
|
{if $product->quantity > 0}<link itemprop="availability" href="http://schema.org/InStock"/>{/if}
|
||||||
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
{if $priceDisplay >= 0 && $priceDisplay <= 2}
|
||||||
<span id="our_price_display" class="price" itemprop="price" content="{$productPrice}">{convertPrice price=$productPrice|floatval}</span>
|
<span id="our_price_display" class="price" itemprop="price" content="{$productPrice|number_format:2}">{convertPrice price=$productPrice|floatval}</span>
|
||||||
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
|
<meta itemprop="priceCurrency" content="{$currency->iso_code}" />
|
||||||
{hook h="displayProductPriceBlock" product=$product type="price"}
|
{hook h="displayProductPriceBlock" product=$product type="price"}
|
||||||
{/if}
|
{/if}
|
||||||
@ -258,7 +258,7 @@
|
|||||||
{foreach from=$group.attributes key=id_attribute item=group_attribute}
|
{foreach from=$group.attributes key=id_attribute item=group_attribute}
|
||||||
{assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
|
{assign var='img_color_exists' value=file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}
|
||||||
<li{if $group.default == $id_attribute} class="selected"{/if}>
|
<li{if $group.default == $id_attribute} class="selected"{/if}>
|
||||||
<a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" name="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
|
<a href="{$link->getProductLink($product)|escape:'html':'UTF-8'}" id="color_{$id_attribute|intval}" id="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" class="color_pick{if ($group.default == $id_attribute)} selected{/if}"{if !$img_color_exists && isset($colors.$id_attribute.value) && $colors.$id_attribute.value} style="background:{$colors.$id_attribute.value|escape:'html':'UTF-8'};"{/if} title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}">
|
||||||
{if $img_color_exists}
|
{if $img_color_exists}
|
||||||
<img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />
|
<img src="{$img_col_dir}{$id_attribute|intval}.jpg" alt="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" title="{$colors.$id_attribute.name|escape:'html':'UTF-8'}" width="20" height="20" />
|
||||||
{/if}
|
{/if}
|
||||||
@ -296,13 +296,30 @@
|
|||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<p class="availlability">
|
|
||||||
{if $product->quantity > 0}
|
<p class="availlability" id="availability_statut"{if !$PS_STOCK_MANAGEMENT || ($product->quantity <= 0 && !$product->available_later && $allow_oosp) || ($product->quantity > 0 && !$product->available_now) || !$product->available_for_order || $PS_CATALOG_MODE} style="display: none;"{/if}>
|
||||||
|
{*<span id="availability_label">{l s='Availability:'}</span>*}
|
||||||
|
<span id="availability_value">{if $product->quantity <= 0}
|
||||||
|
{if $PS_STOCK_MANAGEMENT && $allow_oosp}
|
||||||
|
{$product->available_later}
|
||||||
|
{else}
|
||||||
|
{l s='This product is no longer in stock'}
|
||||||
|
{/if}
|
||||||
|
{elseif $PS_STOCK_MANAGEMENT}
|
||||||
{l s='En stock'}
|
{l s='En stock'}
|
||||||
{else}
|
{/if}
|
||||||
<span class="out">{l s='Hors stock'}</span>
|
</span>
|
||||||
|
</p>
|
||||||
|
<p class="availlability">
|
||||||
|
{if $product->quantity <= 0}
|
||||||
|
{if $PS_STOCK_MANAGEMENT && $allow_oosp}
|
||||||
|
{$product->available_later}
|
||||||
|
{else}
|
||||||
|
{$product->available_later}
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="payment_logo">
|
<div class="payment_logo">
|
||||||
<img src="{$img_dir}paiement.png" alt="">
|
<img src="{$img_dir}paiement.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
@ -380,7 +397,7 @@
|
|||||||
|
|
||||||
<!-- Infos -->
|
<!-- Infos -->
|
||||||
{if !$content_only}
|
{if !$content_only}
|
||||||
<div class="container">
|
<section class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div id="description">
|
<div id="description">
|
||||||
@ -391,12 +408,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div id="features-docs" class="tab-title">
|
<section id="features-docs" class="tab-title">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- Features -->
|
<!-- Features -->
|
||||||
{if isset($features) && $features}
|
{if isset($features) && $features}
|
||||||
<div id="features">
|
<div id="features">
|
||||||
<h3 class="subtitle">{l s='Data sheet'}</h3>
|
<header>
|
||||||
|
<h3 class="subtitle">{l s='Data sheet'}</h3>
|
||||||
|
</header>
|
||||||
<ul class="col-xs-12">
|
<ul class="col-xs-12">
|
||||||
{foreach from=$features item=feature}
|
{foreach from=$features item=feature}
|
||||||
<li>
|
<li>
|
||||||
@ -410,27 +429,49 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
{if isset($attachments) && $attachments}
|
||||||
|
<!--Download -->
|
||||||
|
<section class="attachments">
|
||||||
|
{foreach from=$attachments item=attachment name=attachements}
|
||||||
|
<header>
|
||||||
|
<h3>{l s='Files'}</h3>
|
||||||
|
</header>
|
||||||
|
{if $smarty.foreach.attachements.iteration %3 == 1}<div class="row">{/if}
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<a class="link" href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">{$attachment.name|escape:'html':'UTF-8'}</a>
|
||||||
|
<p class="text-muted">{$attachment.description|escape:'html':'UTF-8'}</p>
|
||||||
|
<a class="btn btn-default" href="{$link->getPageLink('attachment', true, NULL, "id_attachment={$attachment.id_attachment}")|escape:'html':'UTF-8'}">
|
||||||
|
<i class="icon-download"></i>
|
||||||
|
{l s='Download'} ({Tools::formatBytes($attachment.file_size, 2)})
|
||||||
|
</a>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
{if $smarty.foreach.attachements.iteration %3 == 0 || $smarty.foreach.attachements.last}</div>{/if}
|
||||||
|
{/foreach}
|
||||||
|
</section>
|
||||||
|
<!--end Download -->
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<!-- Produits relatifs / Accessoires -->
|
<!-- Produits relatifs / Accessoires -->
|
||||||
{if isset($accessories) && $accessories}
|
{if isset($accessories) && $accessories}
|
||||||
<div id="related" class="tab-title container">
|
<aside id="related" class="tab-title container">
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
<h3 class="subtitle">{l s='Related Products'}</h3>
|
<h3 class="subtitle">{l s='Related Products'}</h3>
|
||||||
<div class="products row">
|
<div class="products row">
|
||||||
<!-- Blocs produits relatifs -->
|
<!-- Blocs produits relatifs -->
|
||||||
{include file="./product-list.tpl" products=$accessories position='homestore' position=2 position_sm=4}
|
{include file="./product-list.tpl" products=$accessories position='homestore' position=2 position_sm=4}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</aside>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="container">
|
<aside class="container">
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
{hook h='displayRelatedProduct' product=$product}
|
{hook h='displayRelatedProduct' product=$product}
|
||||||
</div>
|
</aside>
|
||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
{strip}
|
{strip}
|
||||||
|