Merge branch 'develop' of gitlab.antadis.net:dev-antadis/bebeboutik into develop

This commit is contained in:
Nolwenn J 2017-11-28 14:48:10 +01:00
commit c0b998f4de
35 changed files with 2559 additions and 572 deletions

View File

@ -96,6 +96,13 @@ if (Tools::isSubmit('submitMessage')) {
$customer->getByEmail($from); $customer->getByEmail($from);
} }
if($id_contact == 9){
$id_order_state = Order::getCurrentIdState((int)Tools::getValue('id_order'));
if($id_order_state && in_array($id_order_state, array(4,17,5))) {
Tools::redirectLink('modules/ant_support_form/support.php?id_contact=1&id_order='.Tools::getValue('id_order'));
}
}
$contact = new Contact($id_contact, $cookie->id_lang); $contact = new Contact($id_contact, $cookie->id_lang);
if (!(( if (!((

View File

@ -111,24 +111,24 @@ class AdminAntWp extends AdminTab
$ean = trim($line[0]); $ean = trim($line[0]);
$products[$ean] = array( $products[$ean] = array(
'ean' => $ean, 'ean' => $ean,
'supplier_ref' => trim($line[1]), 'supplier_ref' => trim((String)utf8_encode($line[1])),
'name_ha' => trim($line[2]), 'name_ha' => trim((String)utf8_encode($line[2])),
'quantity' => trim($line[3]), 'quantity' => trim($line[3]),
'ppc' => trim($line[4]), 'ppc' => trim((float)$line[4]),
'prix_ha' => trim($line[5]), 'prix_ha' => trim((float)$line[5]),
'name_attribute_ha' => trim($line[6]) 'name_attribute_ha' => trim((String)$line[6])
); );
$eans[] = $ean; $eans[] = $ean;
} else { } else {
$ref = trim($line[1]); $ref = trim((String)utf8_encode($line[1]));
$products[$ref] = array( $products[$ref] = array(
'ean' => trim($line[0]), 'ean' => trim($line[0]),
'supplier_ref' => $ref, 'supplier_ref' => $ref,
'name_ha' => trim($line[2]), 'name_ha' => trim((String)utf8_encode($line[2])),
'quantity' => trim($line[3]), 'quantity' => trim($line[3]),
'ppc' => trim($line[4]), 'ppc' => trim((float)$line[4]),
'prix_ha' => trim($line[5]), 'prix_ha' => trim((float)$line[5]),
'name_attribute_ha' => trim($line[6]) 'name_attribute_ha' => trim((String)utf8_encode($line[6]))
); );
$refs[] = $ref; $refs[] = $ref;
} }
@ -181,7 +181,7 @@ class AdminAntWp extends AdminTab
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` ac LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` ac
ON (ac.`id_product_attribute` = at.`id_product_attribute`) ON (ac.`id_product_attribute` = at.`id_product_attribute`)
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
ON (al.`id_attribute` = ac.`id_attribute` AND al.`id_land` = 2) ON (al.`id_attribute` = ac.`id_attribute` AND al.`id_lang` = 2)
WHERE at.`ean13` IN ("'.implode('","',$eans).'") WHERE at.`ean13` IN ("'.implode('","',$eans).'")
AND p.`id_product` IS NOT NULL AND p.`id_product` IS NOT NULL
ORDER BY c.`position` ORDER BY c.`position`
@ -189,28 +189,51 @@ class AdminAntWp extends AdminTab
if($row['ean13']!='' && isset($products[$row['ean13']])){ if($row['ean13']!='' && isset($products[$row['ean13']])){
$products[$row['ean13']] = array_merge($products[$row['ean13']], $row); $products[$row['ean13']] = array_merge($products[$row['ean13']], $row);
$product_found++; $product_found++;
$ids[] = (int)$row['id_product'];
} elseif($row['supplier_reference']!='' && isset($products[$row['supplier_reference']])){ } elseif($row['supplier_reference']!='' && isset($products[$row['supplier_reference']])){
$products[$row['supplier_reference']] = array_merge($products[$row['supplier_reference']], $row); $products[$row['supplier_reference']] = array_merge($products[$row['supplier_reference']], $row);
$product_found++; $product_found++;
$ids[] = (int)$row['id_product'];
} }
if(!in_array((int)$row['id_product'],$ids)){ if(!in_array((int)$row['id_product'],$ids)){
$ids[] = (int)$row['id_product']; $ids[] = (int)$row['id_product'];
} }
} }
$new_products = count($products) - $product_found; $new_products = count($products) - $product_found;
if(!empty($ids)){ if(!empty($ids)){
foreach (Db::getInstance()->executeS(' foreach (Db::getInstance()->executeS('
SELECT p.`ean13`, p.`supplier_reference`, pl.* SELECT p.`ean13`, p.`supplier_reference`, pl.*
FROM ps_product_lang pl FROM '._DB_PREFIX_.'product p
LEFT JOIN ps_product p ON (pl.`id_product` = p.`id_product`) LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.`id_product` = p.`id_product`)
WHERE pl.`id_product` IN ('.implode(',',$ids).') WHERE p.`id_product` IN ('.implode(',',$ids).')
AND (pl.id_lang = 2 OR pl.id_lang = 3) AND (pl.id_lang = 2 OR pl.id_lang = 3)
ORDER BY pl.`id_product` ORDER BY p.`id_product`
') as $row) { ') as $row) {
if($row['ean13']!='' && isset($products[$row['ean13']])){ if($row['ean13']!='' && isset($products[(int)$row['ean13']])){
if(!isset($products[$row['ean13']]['lang'])){
$products[$row['ean13']]['lang'] = array();
}
if(!isset($products[$row['ean13']]['lang'][(int)$row['id_lang']])){
$products[$row['ean13']]['lang'][(int)$row['id_lang']] = $row;
}
} elseif($row['supplier_reference']!='' && isset($products[$row['supplier_reference']])){
if(!isset($products[$row['supplier_reference']]['lang'])){
$products[$row['supplier_reference']]['lang'] = array();
}
if(!isset($products[$row['supplier_reference']]['lang'][(int)$row['id_lang']])){
$products[$row['supplier_reference']]['lang'][(int)$row['id_lang']] = $row;
}
}
}
foreach (Db::getInstance()->executeS('
SELECT at.`ean13`, p.`supplier_reference`, pl.*
FROM '._DB_PREFIX_.'product p
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (pl.`id_product` = p.`id_product`)
LEFT JOIN `'._DB_PREFIX_.'product_attribute` at ON (at.`id_product` = p.`id_product`)
WHERE p.`id_product` IN ('.implode(',',$ids).')
AND (pl.id_lang = 2 OR pl.id_lang = 3)
ORDER BY p.`id_product`
') as $row) {
if($row['ean13']!='' && isset($products[(int)$row['ean13']])){
if(!isset($products[$row['ean13']]['lang'])){ if(!isset($products[$row['ean13']]['lang'])){
$products[$row['ean13']]['lang'] = array(); $products[$row['ean13']]['lang'] = array();
} }

File diff suppressed because one or more lines are too long

View File

@ -100,7 +100,11 @@ class BlockBestSellers extends Module
if (Configuration::get('PS_CATALOG_MODE')) if (Configuration::get('PS_CATALOG_MODE'))
return ; return ;
global $cookie, $smarty, $cart; global $cookie, $smarty, $cart, $page_name;
if ($page_name == 'post') {
return;
}
$step = Tools::getValue('step'); $step = Tools::getValue('step');
if(!$step || ($step && $step != 3 && $step != 4)) { if(!$step || ($step && $step != 3 && $step != 4)) {
$id_lang = $cookie->id_lang; $id_lang = $cookie->id_lang;

View File

@ -31,6 +31,7 @@ if (!defined('_PS_VERSION_'))
class BlockUserInfo extends Module class BlockUserInfo extends Module
{ {
private $useTopUpper = true; private $useTopUpper = true;
private $disableCredits = true;
public function __construct() public function __construct()
{ {
@ -72,6 +73,8 @@ class BlockUserInfo extends Module
return; return;
} }
$display_credits = false;
if ($this->disableCredits === false) {
$display_credits = true; $display_credits = true;
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer; $sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){ if(Db::getInstance()->getValue($sql)){
@ -80,6 +83,7 @@ class BlockUserInfo extends Module
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer; $sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql); $loyalties = Db::getInstance()->getValue($sql);
}
$smarty->assign(array( $smarty->assign(array(
'onlyForm' => !$this->useTopUpper, 'onlyForm' => !$this->useTopUpper,
@ -110,8 +114,11 @@ class BlockUserInfo extends Module
global $smarty, $cookie, $cart; global $smarty, $cookie, $cart;
$display_credits = false;
if ($this->disableCredits === false) {
$display_credits = true; $display_credits = true;
if ($cookie->logged) { if ($cookie->logged) {
$display_credits = true;
$sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer; $sql = 'SELECT id_customer FROM `'._DB_PREFIX_.'customer_credits` WHERE id_customer = ' .(int) $cookie->id_customer;
if(Db::getInstance()->getValue($sql)){ if(Db::getInstance()->getValue($sql)){
$display_credits = false; $display_credits = false;
@ -120,9 +127,10 @@ class BlockUserInfo extends Module
$sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer; $sql = 'SELECT SUM(`discount_value`) FROM `'._DB_PREFIX_.'loyalty` WHERE `id_loyalty_state`=2 AND `id_discount`=0 AND `id_customer` = ' .(int) $cookie->id_customer;
$loyalties = Db::getInstance()->getValue($sql); $loyalties = Db::getInstance()->getValue($sql);
} }
}
$smarty->assign(array( $smarty->assign(array(
'onlyForm' => !$this->useTopUpper, 'onlyForm' => $this->useTopUpper,
'display_credits' => $display_credits, 'display_credits' => $display_credits,
'loyalties' => ($loyalties)?$loyalties:0, 'loyalties' => ($loyalties)?$loyalties:0,
'cart' => $cart, 'cart' => $cart,

View File

@ -84,6 +84,13 @@ if($canSendInvitations) {
foreach ($friendsEmail AS $key => $friendEmail) { foreach ($friendsEmail AS $key => $friendEmail) {
$friendEmail = strval($friendEmail); $friendEmail = strval($friendEmail);
$friendEmail = trim($friendEmail); $friendEmail = trim($friendEmail);
/** @Override Antadis - mail fixing */
$friendEmail = str_replace(array('@hotmil.','@htmail.','@hotmal.','@hotml.','@hotmai.'),'@hotmail.',$friendEmail);
$friendEmail = str_replace(array('@gmal.','@gail.','@gml.','@gmai.','@gmil.'),'@gmail.',$friendEmail);
$friendEmail = str_replace('@gmailcom','@gmail.com',$friendEmail);
$friendEmail = str_replace('@hotmailcom','@hotmail.com',$friendEmail);
$friendEmail = str_replace('@hotmailfr','@hotmail.fr',$friendEmail);
/** @End Override Antadis - mail fixing */
if($askName) { if($askName) {
$friendLastName = strval($friendsLastName[$key]); $friendLastName = strval($friendsLastName[$key]);
$friendFirstName = strval($friendsFirstName[$key]); $friendFirstName = strval($friendsFirstName[$key]);

View File

@ -1286,6 +1286,10 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
else { else {
// Add // Add
if ($sponsor === false) { if ($sponsor === false) {
// Last check : if a sponsor has sent a email and customer doesn't use it
$checkSentLink = Db::getInstance()->getRow('SELECT id_invite FROM `'._DB_PREFIX_.'invite`
WHERE LOWER(email)="'.$customer->email.'" AND `id_customer`=0');
if ($checkSentLink === false) {
$result = Db::getInstance()->Execute(' $result = Db::getInstance()->Execute('
INSERT INTO `'._DB_PREFIX_.'invite` INSERT INTO `'._DB_PREFIX_.'invite`
VALUES ( VALUES (
@ -1303,6 +1307,28 @@ RewriteRule ^invite/(.*)$ '.__PS_BASE_URI__.'modules/invite/sponsor.php?sponsor=
NOW(), NOW(),
0 0
)'); )');
}
else {
$result = Db::getInstance()->Execute('
UPDATE `'._DB_PREFIX_.'invite` SET
id_sponsor = '.$id_sponsor.',
email = "'.pSQL($customer->email).'",
lastname = "'.pSQL($customer->lastname).'",
firstname = "'.pSQL($customer->firstname).'",
id_customer = '.$customer->id.',
id_discount = 0,
id_discount_sponsor = 0,
credit = 0,
credit_sponsor = 0,
date_add = NOW(),
date_upd = NOW(),
when_invite = 0 WHERE id_invite='.$checkSentLink['id_invite'].'
');
}
if (!$result) {
$error_edit = $this->l("Impossible d'enregistrer le parain");
}
// Create rewards // Create rewards
if (count($orders) == 1 && $result) { if (count($orders) == 1 && $result) {

View File

@ -100,7 +100,7 @@ if($magistorModule->active) {
p.`id_product` = pl.`id_product` p.`id_product` = pl.`id_product`
AND pl.`id_lang` = '.(int)(Configuration::get('PS_LANG_DEFAULT')).' AND pl.`id_lang` = '.(int)(Configuration::get('PS_LANG_DEFAULT')).'
) )
LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` c ON (c.`id_product` = pp.`id_product_pack`) LEFT JOIN `'._DB_PREFIX_.'product_ps_cache` c ON (c.`id_product` = pp.`id_product_item`)
WHERE c.`id_sale` = '.(int) $id_sale.' WHERE c.`id_sale` = '.(int) $id_sale.'
ORDER BY p.`id_product` ASC ORDER BY p.`id_product` ASC
') as $row){ ') as $row){
@ -178,6 +178,24 @@ if($magistorModule->active) {
foreach ($result_quantities as $od) { foreach ($result_quantities as $od) {
$quantity += ((int)$od['product_quantity'] - (int)$od['product_quantity_reinjected']); $quantity += ((int)$od['product_quantity'] - (int)$od['product_quantity_reinjected']);
} }
$id_product_packs = array();
$packs = Pack::getPacks($product['id_product']);
foreach ($packs as $key => $pack) {
$id_product_packs[(int)$pack['id_product_pack']] = (int)$pack['id_product_pack'];
}
if(!empty($id_product_packs)){
$result_quantities2 = Db::getInstance()->executeS('
SELECT od.`product_quantity`,od.`product_quantity_reinjected`
FROM '._DB_PREFIX_.'order_detail od
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.`id_order` = od.`id_order`)
WHERE od.`product_id` IN ('.implode(',',$id_product_packs).') AND `product_attribute_id` = 0 AND o.`valid` != 0'
);
foreach ($result_quantities2 as $od) {
$quantity += ((int)$od['product_quantity'] - (int)$od['product_quantity_reinjected']);
}
}
if($quantity>0){ if($quantity>0){
if(isset($product['ean13']) && !empty($product['ean13'])) { if(isset($product['ean13']) && !empty($product['ean13'])) {
$ean = $product['ean13']; $ean = $product['ean13'];
@ -185,6 +203,15 @@ if($magistorModule->active) {
$ean = $product['supplier_reference']; $ean = $product['supplier_reference'];
} }
$link = new Link();
$cover = Db::getInstance()->getValue('
SELECT `id_image`
FROM `'._DB_PREFIX_.'image`
WHERE id_product = ' . (int) $product['id_product'] . '
AND `cover` = 1');
$ids = (int) $product['id_product'] . '-' . (int) $cover;
$img_link = 'http://'.$link->getImageLink($product['link_rewrite'], $ids, 'thickbox');
$data .= str_pad('ART01', 10, ' ', STR_PAD_RIGHT); $data .= str_pad('ART01', 10, ' ', STR_PAD_RIGHT);
$data .= str_pad($code_societe, 20, ' ', STR_PAD_RIGHT); $data .= str_pad($code_societe, 20, ' ', STR_PAD_RIGHT);
$data .= str_pad(str_replace(array("\r", "\n"), '', $product['id_product']), 50, ' ', STR_PAD_RIGHT); $data .= str_pad(str_replace(array("\r", "\n"), '', $product['id_product']), 50, ' ', STR_PAD_RIGHT);

View File

@ -145,7 +145,7 @@ if($magistorModule->active) {
$data .= str_pad( $code_societe, 20, ' ', STR_PAD_RIGHT ); $data .= str_pad( $code_societe, 20, ' ', STR_PAD_RIGHT );
$data .= str_pad( 'OP'.(int) $id_sale, 20, ' ', STR_PAD_RIGHT ); $data .= str_pad( 'OP'.(int) $id_sale, 20, ' ', STR_PAD_RIGHT );
$data .= date('Ymd'); $data .= date('Ymd');
$data .= str_pad( substr(utf8_decode(str_replace(array("\r", "\n"), "", $product['product_id'])),0,50), 50, ' ', STR_PAD_RIGHT ); $data .= str_pad( substr(utf8_decode(str_replace(array("\r", "\n"), "", $id_product)),0,50), 50, ' ', STR_PAD_RIGHT );
$data .= str_pad( $row['quantity'], 10, '0', STR_PAD_LEFT ); $data .= str_pad( $row['quantity'], 10, '0', STR_PAD_LEFT );
$data .= str_pad( '', 10, '0', STR_PAD_LEFT ); $data .= str_pad( '', 10, '0', STR_PAD_LEFT );
$data .= str_pad( '', 250, ' ', STR_PAD_LEFT ); $data .= str_pad( '', 250, ' ', STR_PAD_LEFT );
@ -153,8 +153,8 @@ if($magistorModule->active) {
$data .= str_pad( str_replace(array("\r", "\n"), "", $product['ean13']), 14, ' ', STR_PAD_LEFT ); $data .= str_pad( str_replace(array("\r", "\n"), "", $product['ean13']), 14, ' ', STR_PAD_LEFT );
$data .= PHP_EOL; $data .= PHP_EOL;
$product_quantities[$product['product_id']] = (int)$row['quantity']; $product_quantities[$id_product] = (int)$row['quantity'];
$product_quantities2[$product['product_id']] = 0; $product_quantities2[$id_product] = 0;
} }
} }
@ -182,7 +182,6 @@ if($magistorModule->active) {
chmod($fileName . '.BAL', 0755); chmod($fileName . '.BAL', 0755);
unset($data); unset($data);
require_once('connection_ftp.php'); require_once('connection_ftp.php');
} }
echo 'fin'."\n"; echo 'fin'."\n";

View File

@ -2198,7 +2198,7 @@ class Sale {
// Noel sale can be combined only with Noel sale of same shipping // Noel sale can be combined only with Noel sale of same shipping
if( if(
(int)$adding_sale['delivery_delay'] == 5 ((int)$adding_sale['delivery_delay'] == 5 || (int)$current_sale['delivery_delay'] == 5)
&& ( && (
(int)$current_sale['delivery_delay'] != (int)$adding_sale['delivery_delay'] (int)$current_sale['delivery_delay'] != (int)$adding_sale['delivery_delay']
|| ( || (

View File

@ -366,8 +366,6 @@ class AdminGuideCategories extends AdminTab
echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>'; echo '<tr><td class="center" colspan="'.(sizeof($this->fieldsDisplay) + 2).'">'.$this->l('No items found').'</td></tr>';
} }
$this->_orderBy = 'position';
// Show the content of the table // Show the content of the table
$this->displayListContent(); $this->displayListContent();
@ -379,7 +377,7 @@ class AdminGuideCategories extends AdminTab
public function viewguide_category() public function viewguide_category()
{ {
global $cookie; global $cookie;
$this->getList((int)($cookie->id_lang)); $this->getList((int)($cookie->id_lang), 'position');
$this->displayList(); $this->displayList();
$this->displayOptionsList(); $this->displayOptionsList();
$this->displayRequiredFields(); $this->displayRequiredFields();

View File

@ -107,7 +107,9 @@ class AdminGuidePosts extends AdminTab
public function displayList() public function displayList()
{ {
if (Tools::getIsset('id_guide_category')) {
$this->_orderBy = 'position'; $this->_orderBy = 'position';
}
parent::displayList(); parent::displayList();
} }
@ -128,7 +130,7 @@ class AdminGuidePosts extends AdminTab
'id_guide_category' => array( 'id_guide_category' => array(
'title' => $this->l('Catégorie du guide'), 'title' => $this->l('Catégorie du guide'),
'type' => 'select', 'type' => 'select',
'options_raw' => GuideCategory::findCategoriesTree($cookie->id_lang), 'options_raw' => GuideCategory::findCategoriesTree($cookie->id_lang, 2),
'options_map' => ['id_guide_category', 'name', 'level'], 'options_map' => ['id_guide_category', 'name', 'level'],
'initial_value' => $obj->id_guide_category 'initial_value' => $obj->id_guide_category
), ),

View File

@ -97,7 +97,7 @@ class GuideCategory extends ObjectModel
return ''; return '';
} }
public static function findCategoriesTree($id_lang, $exclude_id=0) public static function findCategoriesTree($id_lang, $levelMax = null, $exclude_id=0)
{ {
$sql = "SELECT DISTINCT a.`id_guide_category` as id_guide_category, `name` $sql = "SELECT DISTINCT a.`id_guide_category` as id_guide_category, `name`
FROM `"._DB_PREFIX_."guide_category` a FROM `"._DB_PREFIX_."guide_category` a
@ -110,7 +110,7 @@ class GuideCategory extends ObjectModel
$sql .= " AND a.`id_guide_category` <> '".intval($exclude_id)."'"; $sql .= " AND a.`id_guide_category` <> '".intval($exclude_id)."'";
} }
$rows = array(); $rows = array();
self::findRecursiveData($rows, $sql, array( self::findRecursiveData($rows, $sql, $levelMax, array(
'id_parent' => 0, 'id_parent' => 0,
'identifier' => 'id_guide_category', 'identifier' => 'id_guide_category',
'level' => -1 'level' => -1
@ -119,7 +119,7 @@ class GuideCategory extends ObjectModel
return $rows; return $rows;
} }
public static function findFamiliesTree($id_lang, $exclude_id=0) public static function findFamiliesTree($id_lang, $levelMax = null, $exclude_id=0)
{ {
$sql = "SELECT DISTINCT a.`id_category_family` as id_category_family, `name` $sql = "SELECT DISTINCT a.`id_category_family` as id_category_family, `name`
FROM `"._DB_PREFIX_."category_family` a FROM `"._DB_PREFIX_."category_family` a
@ -132,26 +132,28 @@ class GuideCategory extends ObjectModel
$sql .= " AND a.`id_category_family` <> '".intval($exclude_id)."'"; $sql .= " AND a.`id_category_family` <> '".intval($exclude_id)."'";
} }
$rows = array(); $rows = array();
self::findRecursiveData($rows, $sql, array( self::findRecursiveData($rows, $sql, $levelMax, array(
'id_parent' => 0, 'id_parent' => 0,
'identifier' => 'id_category_family', 'identifier' => 'id_category_family',
'level' => -1 'level' => 0
)); ));
return $rows; return $rows;
} }
private static function findRecursiveData(&$rows, $sql, $levelMax = null, array $params)
private static function findRecursiveData(&$rows, $sql, array $params)
{ {
$level = $params['level']; $level = $params['level'];
$level++; $level++;
if ($levelMax !== null && $level >= $levelMax) {
return;
}
$resuts = Db::getInstance()->ExecuteS(sprintf($sql, intval($params['id_parent']))); $results = Db::getInstance()->ExecuteS(sprintf($sql, intval($params['id_parent'])));
foreach($resuts as &$row) { foreach($results as &$row) {
$row['level'] = $level; $row['level'] = $level;
$rows[] = $row; $rows[] = $row;
self::findRecursiveData($rows, $sql, array( self::findRecursiveData($rows, $sql, $levelMax, array(
'id_parent' => $row[$params['identifier']], 'id_parent' => $row[$params['identifier']],
'identifier' => $params['identifier'], 'identifier' => $params['identifier'],
'level' => $level 'level' => $level
@ -180,10 +182,8 @@ class GuideCategory extends ObjectModel
public function update($autodate = true, $nullValues = false) public function update($autodate = true, $nullValues = false)
{ {
$this->position = self::getLastPosition((int)$this->id_parent); self::cleanupPositions((int)$this->id_parent);
$ret = parent::update($autodate, $nullValues); return parent::update($autodate, $nullValues);
$this->cleanupPositions((int)$this->id_parent);
return $ret;
} }
public function delete() public function delete()
@ -309,9 +309,6 @@ class GuideCategory extends ObjectModel
return Db::getInstance()->getValue($sql); return Db::getInstance()->getValue($sql);
} }
public function findByCategoryFamily($id, $id_lang) public function findByCategoryFamily($id, $id_lang)
{ {
$sql = "SELECT gc.*, gcl.name FROM `"._DB_PREFIX_."guide_category` gc, `"._DB_PREFIX_."guide_category_lang` gcl $sql = "SELECT gc.*, gcl.name FROM `"._DB_PREFIX_."guide_category` gc, `"._DB_PREFIX_."guide_category_lang` gcl
@ -348,10 +345,10 @@ class GuideCategory extends ObjectModel
return $result; return $result;
} }
public function getAutoCategoryLang($id_category, $id_lang) public function getAutoCategoryLang($id_category, $id_lang, $all = false)
{ {
$sql = "SELECT * FROM ps_guide_category gc, ps_guide_category_lang gcl $sql = "SELECT * FROM ps_guide_category gc, ps_guide_category_lang gcl
WHERE gc.active=1 AND gc.id_guide_category=gcl.id_guide_category WHERE ".($all===false?' gc.active=1 ':' 1 ')." AND gc.id_guide_category=gcl.id_guide_category
AND gc.id_parent=".$id_category." AND gcl.id_lang=".$id_lang. AND gc.id_parent=".$id_category." AND gcl.id_lang=".$id_lang.
" ORDER BY position ASC"; " ORDER BY position ASC";
$result = Db::getInstance()->getRow($sql); $result = Db::getInstance()->getRow($sql);
@ -362,14 +359,15 @@ class GuideCategory extends ObjectModel
/** /**
* Gest All main categories * Gest All main categories
* @param int $id_lang * @param int $id_lang
* @param boolean $all
* @return array * @return array
*/ */
public static function getRoot($id_lang, $active = 1) public static function getRoot($id_lang, $all = false)
{ {
$sql = "SELECT gc.id_guide_category, gcl.name, gcl.link_rewrite, gcl.meta_title, $sql = "SELECT gc.id_guide_category, gcl.name, gcl.link_rewrite, gcl.meta_title,
gcl.meta_description, gcl.meta_keywords gcl.meta_description, gcl.meta_keywords
FROM ps_guide_category gc, ps_guide_category_lang gcl FROM ps_guide_category gc, ps_guide_category_lang gcl
WHERE ".($active==1?' gc.active=1 ':' 1 ')." AND gc.id_guide_category=gcl.id_guide_category WHERE ".($all===false?' gc.active=1 ':' 1 ')." AND gc.id_guide_category=gcl.id_guide_category
AND gc.id_parent=0 AND gcl.id_lang=".$id_lang; AND gc.id_parent=0 AND gcl.id_lang=".$id_lang;
$result = Db::getInstance()->ExecuteS($sql); $result = Db::getInstance()->ExecuteS($sql);
@ -382,25 +380,25 @@ class GuideCategory extends ObjectModel
* @param int $active * @param int $active
* @return array * @return array
*/ */
public function getTree($id_lang, $active = 1) public function getTree($id_lang, $all = false)
{ {
return $this->recurseData(0, $id_lang, $active); return $this->recurseData(0, $id_lang, $all);
} }
/** /**
* Recurse data * Recurse data
* @param int $id_category * @param int $id_category
* @param int $id_lang * @param int $id_lang
* @param int $active * @param boolean $all
* @return array * @return array
*/ */
protected function recurseData($id_category, $id_lang, $active = 1) protected function recurseData($id_category, $id_lang, $all = false)
{ {
$data = array(); $data = array();
$sql = "SELECT gc.*, gcl.name, gcl.link_rewrite $sql = "SELECT gc.*, gcl.name, gcl.link_rewrite
FROM `"._DB_PREFIX_."guide_category` gc, `"._DB_PREFIX_."guide_category_lang` gcl FROM `"._DB_PREFIX_."guide_category` gc, `"._DB_PREFIX_."guide_category_lang` gcl
WHERE gc.id_guide_category=gcl.id_guide_category AND gcl.id_lang=".$id_lang. WHERE gc.id_guide_category=gcl.id_guide_category AND gcl.id_lang=".$id_lang.
($active==1?' AND gc.active=1 ':'')." AND gc.id_parent=".$id_category. ($all===false?' AND gc.active=1':'')." AND gc.id_parent=".$id_category.
" ORDER BY position ASC"; " ORDER BY position ASC";
$result = Db::getInstance()->ExecuteS($sql); $result = Db::getInstance()->ExecuteS($sql);
if (count($result) > 0) { if (count($result) > 0) {

View File

@ -127,7 +127,7 @@ class GuidePost extends ObjectModel
public function update($autodate = true, $nullValues = false) public function update($autodate = true, $nullValues = false)
{ {
$this->position = self::cleanupPositions((int)$this->id_guide_category); self::cleanupPositions((int)$this->id_guide_category);
return parent::update($autodate, $nullValues); return parent::update($autodate, $nullValues);
} }
@ -180,15 +180,16 @@ class GuidePost extends ObjectModel
public function getUrlRewriteFull(){} public function getUrlRewriteFull(){}
/** /**
* Get Post With one language * Get Post with one language
* @param int $id_category * @param int $id_category
* @param int $id_lang * @param int $id_lang
* @param boolean $all
* @return array * @return array
*/ */
public function getPostLang($id_post, $id_lang, $id_category = null) public function getPostLang($id_post, $id_lang, $id_category = null, $all = false)
{ {
$sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl $sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl
WHERE gp.active=1 AND gp.id_guide_post=gpl.id_guide_post WHERE ".($all===false?' gp.active=1 ':' 1 ')." AND gp.id_guide_post=gpl.id_guide_post
".($id_category===null?"":" AND gp.id_guide_category=".$id_category). ".($id_category===null?"":" AND gp.id_guide_category=".$id_category).
" AND gp.id_guide_post=".$id_post." AND gpl.id_lang=".$id_lang; " AND gp.id_guide_post=".$id_post." AND gpl.id_lang=".$id_lang;
$result = Db::getInstance()->getRow($sql); $result = Db::getInstance()->getRow($sql);
@ -196,11 +197,17 @@ class GuidePost extends ObjectModel
return $result; return $result;
} }
/**
public function getAutoPostLang($id_category, $id_lang) * Auto select post
* @param int $id_category
* @param int $id_lang
* @param boolean $all
* @return array
*/
public function getAutoPostLang($id_category, $id_lang, $all = false)
{ {
$sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl $sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl
WHERE gp.active=1 AND gp.id_guide_post=gpl.id_guide_post WHERE ".($all===false?' gp.active=1 ':' 1 ')." AND gp.id_guide_post=gpl.id_guide_post
AND gp.id_guide_category=".$id_category. AND gp.id_guide_category=".$id_category.
" AND gpl.id_lang=".$id_lang." ORDER BY position ASC"; " AND gpl.id_lang=".$id_lang." ORDER BY position ASC";
$result = Db::getInstance()->getRow($sql); $result = Db::getInstance()->getRow($sql);
@ -208,10 +215,17 @@ class GuidePost extends ObjectModel
return $result; return $result;
} }
public function findByCategory($id_category, $id_lang) /**
* Find posts filter by category
* @param int $id_category
* @param int $id_lang
* @param boolean $active
* @return array
*/
public function findByCategory($id_category, $id_lang, $all = false)
{ {
$sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl $sql = "SELECT * FROM ps_guide_post gp, ps_guide_post_lang gpl
WHERE gp.active=1 AND gp.id_guide_post=gpl.id_guide_post WHERE ".($all===false?' gp.active=1 ':' 1 ')." AND gp.id_guide_post=gpl.id_guide_post
AND gp.id_guide_category=".$id_category. AND gp.id_guide_category=".$id_category.
" AND gpl.id_lang=".$id_lang." ORDER BY position ASC"; " AND gpl.id_lang=".$id_lang." ORDER BY position ASC";
$result = Db::getInstance()->ExecuteS($sql); $result = Db::getInstance()->ExecuteS($sql);

View File

@ -8,6 +8,7 @@ class CategoryController extends FrontController
parent::preProcess(); parent::preProcess();
$id_lang = self::$cookie->id_lang; $id_lang = self::$cookie->id_lang;
$isEmployee = self::$cookie->isLoggedBack();
$categories = array(); $categories = array();
// Get main categories // Get main categories

View File

@ -16,12 +16,13 @@ class PostController extends FrontController
$id_post = Tools::getValue('pid', 0); $id_post = Tools::getValue('pid', 0);
$content = null; $content = null;
// @todo, si on vient de l'admin, voir les post ??? global $cookie;
$isEmployee = $cookie->isLoggedBack();
// Start form post // Start form post
$postModel = new GuidePost(); $postModel = new GuidePost();
if ($id_post != 0) { if ($id_post != 0) {
$content = $postModel->getPostLang($id_post, $id_lang); $content = $postModel->getPostLang($id_post, $id_lang, null, $isEmployee);
$id_category = $content['id_guide_category']; $id_category = $content['id_guide_category'];
} }
@ -47,23 +48,23 @@ class PostController extends FrontController
else { else {
$parentCategory = $category; $parentCategory = $category;
// Auto Select category // Auto Select category
$category = $categoryModel->getAutoCategoryLang($id_category, $id_lang); $category = $categoryModel->getAutoCategoryLang($id_category, $id_lang, $isEmployee);
} }
} }
// Post // Post
if ($content === null) { if ($content === null) {
if ($id_post != 0) { if ($id_post != 0) {
$content = $postModel->getPostLang($id_post, $id_lang, $category['id_guide_category']); $content = $postModel->getPostLang($id_post, $id_lang, $category['id_guide_category'], $isEmployee);
} }
// Auto Select Post // Auto Select Post
else { else {
$content = $postModel->getAutoPostLang($category['id_guide_category'], $id_lang); $content = $postModel->getAutoPostLang($category['id_guide_category'], $id_lang, $isEmployee);
} }
} }
// Liste des Posts // Liste des Posts
$postList = $postModel->findByCategory($category['id_guide_category'], $id_lang); $postList = $postModel->findByCategory($category['id_guide_category'], $id_lang, $isEmployee);
$parentCategoryModel = new GuideCategory($parentCategory['id_guide_category']); $parentCategoryModel = new GuideCategory($parentCategory['id_guide_category']);
$parentCategoryLink = $parentCategoryModel->getLinkRewrite($id_lang); $parentCategoryLink = $parentCategoryModel->getLinkRewrite($id_lang);
@ -92,7 +93,7 @@ class PostController extends FrontController
self::$smarty->assign(array( self::$smarty->assign(array(
'path' => $path, 'path' => $path,
'id_category' => $id_category, 'id_category' => $parentCategory['id'],
'categoryTitle' => $parentCategory['name'], 'categoryTitle' => $parentCategory['name'],
'categoryLink' => $parentCategoryLink, 'categoryLink' => $parentCategoryLink,
'categoryRewrite' => $parentCategory['link_rewrite'], 'categoryRewrite' => $parentCategory['link_rewrite'],

View File

@ -268,15 +268,29 @@ class PurchaseGuide extends Module
{ {
global $cookie, $smarty, $site_version, $page_name; global $cookie, $smarty, $site_version, $page_name;
if (!in_array($page_name, array('rubrique', 'post'))) { if (!in_array($page_name, array('module-purchaseguide-rubrique', 'rubrique',
'module-purchaseguide-post', 'post'))) {
return false; return false;
} }
$isEmployee = $cookie->isLoggedBack();
$id_category = Tools::getValue('cid', 0); $id_category = Tools::getValue('cid', 0);
$id_post = Tools::getValue('pid', 0);
$content = null;
// Récup de l'arbre en fonction des catégories // Get from post
if ($id_post != 0) {
$postModel = new GuidePost($id_post);
$id_category = $postModel->id_guide_category;
}
if($id_category == 0) {
$model = new GuideCategory();
$id_main_category = $id_child_category = 0;
}
else {
// Get selected categories
$model = new GuideCategory($id_category); $model = new GuideCategory($id_category);
if ($model->id_parent == 0) { if ($model->id_parent == 0) {
$id_main_category = $id_category; $id_main_category = $id_category;
$id_child_category = 0; $id_child_category = 0;
@ -285,7 +299,8 @@ class PurchaseGuide extends Module
$id_main_category = $mainCategory['id_guide_category']; $id_main_category = $mainCategory['id_guide_category'];
$id_child_category = $id_category; $id_child_category = $id_category;
} }
$tree = $model->getTree($cookie->id_lang); }
$tree = $model->getTree($cookie->id_lang, $isEmployee);
$smarty->assign(array( $smarty->assign(array(
'id_guide_category_select_main' => $id_main_category, 'id_guide_category_select_main' => $id_main_category,

View File

@ -76,10 +76,12 @@ class SenseFuelFluxExport
$this->hydrateProducts($type, $language); $this->hydrateProducts($type, $language);
echo 'Getting categories' . "\n"; echo 'Getting categories' . "\n";
$this->hydrateProductCategories($language); $this->hydrateProductCategories($language);
echo 'Getting brands' . "\n"; //echo 'Getting brands' . "\n";
$this->hydrateProductBrands(); //$this->hydrateProductBrands();
echo 'Getting menu tags' . "\n"; //echo 'Getting menu tags' . "\n";
$this->hydrateTagCategories($language); //$this->hydrateTagCategories($language);
echo "Getting family\n";
$this->hydrateProductFamily($language);
echo 'Getting availability' . "\n"; echo 'Getting availability' . "\n";
$this->hydrateProductStock(); $this->hydrateProductStock();
try { try {
@ -239,10 +241,12 @@ class SenseFuelFluxExport
$categories = Db::getInstance()->ExecuteQ($sql); $categories = Db::getInstance()->ExecuteQ($sql);
$tmpArray = array(); $tmpArray = array();
$this->products[$i]['classic_categories'] = array(); $this->products[$i]['classic_categories'] = array();
$this->products[$i]['categories_id'] = array();
foreach ($categories as $currentEnrichingCategory) { foreach ($categories as $currentEnrichingCategory) {
$id = (int)$currentEnrichingCategory['id_category']; $id = (int)$currentEnrichingCategory['id_category'];
$tmpArray[$id] = $currentEnrichingCategory; $tmpArray[$id] = $currentEnrichingCategory;
$this->products[$i]['classic_categories'][(int)$currentEnrichingCategory['level_depth']] = $currentEnrichingCategory['name']; $this->products[$i]['classic_categories'][(int)$currentEnrichingCategory['level_depth']] = $currentEnrichingCategory['name'];
$this->products[$i]['categories_id'][(int)$currentEnrichingCategory['level_depth']] = $currentEnrichingCategory['id_category'];
} }
$categoryTree = $this->parseTree($tmpArray, 1); $categoryTree = $this->parseTree($tmpArray, 1);
if (is_array($categoryTree)) { if (is_array($categoryTree)) {
@ -296,10 +300,8 @@ class SenseFuelFluxExport
} }
$iMax = count($this->products); $iMax = count($this->products);
for ($i = 0; $i < $iMax; $i++) { for ($i = 0; $i < $iMax; $i++) {
if ( if (isset($this->products[$i]['id_manufacturer'])
isset($this->products[$i]['id_manufacturer']) && && (int)$this->products[$i]['id_manufacturer'] !== 0) {
(int)$this->products[$i]['id_manufacturer'] !== 0
) {
if(array_key_exists((int)$this->products[$i]['id_manufacturer'],$tmpArray)){ if(array_key_exists((int)$this->products[$i]['id_manufacturer'],$tmpArray)){
$this->products[$i]['brand'] = $tmpArray[(int)$this->products[$i]['id_manufacturer']]; $this->products[$i]['brand'] = $tmpArray[(int)$this->products[$i]['id_manufacturer']];
} else { } else {
@ -310,6 +312,98 @@ class SenseFuelFluxExport
unset($tmpArray); unset($tmpArray);
} }
private function hydrateProductFamily($language)
{
//$familyTree = $this->getFamilyTree($language->id);
$familyFlat = $this->getFamilyAll($language->id);
// Get all family tree
$iMax = count($this->products);
for ($i = 0; $i < $iMax; $i++) {
$this->products[$i]['family'] = 'Not found';
if (count($this->products[$i]['categories_id']) > 0) {
// Family
$id_category = end($this->products[$i]['categories_id']);
$sql = "SELECT id_category_family FROM `"._DB_PREFIX_."category_family_association`
WHERE id_category = ".$id_category;
$id_category_family = Db::getInstance()->getValue($sql);
if (!empty($id_category_family) && array_key_exists($id_category_family, $familyFlat)) {
$get = $this->parseForParent($id_category_family, $familyFlat);
if ($get !== false) {
$familyPath = $get;
}
$this->products[$i]['family'] = $familyPath;
}
}
}
}
private function parseForParent($id_category_family, $family)
{
$name = '';
if (!array_key_exists($id_category_family, $family)) {
return false;
}
$name = $family[$id_category_family]['name'];
$id_category_family = $family[$id_category_family]['id_parent'];
if ($id_category_family == 0) {
return $name;
}
$get = $this->parseForParent($id_category_family, $family);
if ($get !== false) {
$name = $get.' > '.$name;
}
return $name;
}
private function getFamilyAll($id_lang)
{
$sql = "SELECT *
FROM `"._DB_PREFIX_."category_family` cf, `"._DB_PREFIX_."category_family_lang` cfl
WHERE cf.id_category_family=cfl.id_category_family AND cfl.id_lang=".$id_lang;
$result = Db::getInstance()->ExecuteS($sql);
$family = array();
if (count($result)) {
foreach ($result as $r) {
$family[$r['id_category_family']] = $r;
}
}
return $family;
}
private function getFamilyTree($id_lang)
{
return $this->recurseFamily(0, $id_lang);
}
private function recurseFamily($id_family, $id_lang)
{
$data = array();
$sql = "SELECT *
FROM `"._DB_PREFIX_."category_family` cf, `"._DB_PREFIX_."category_family_lang` cfl
WHERE cf.id_category_family=cfl.id_category_family AND cfl.id_lang=".$id_lang.
" AND cf.id_parent=".$id_family." ORDER BY cf.position ASC";
$result = Db::getInstance()->ExecuteS($sql);
if (count($result) > 0) {
foreach ($result as $c) {
$item = array(
'id_category_family' => $c['id_category_family'],
'name' => $c['name'],
'children' => $this->recurseFamily($c['id_category_family'], $id_lang),
);
$data[] = $item;
}
}
return $data;
}
private function buildXML($language) private function buildXML($language)
{ {
$this->buildXMLHeader($language); $this->buildXMLHeader($language);
@ -382,21 +476,32 @@ class SenseFuelFluxExport
} else { } else {
//classic products in sales //classic products in sales
if (isset($currentProduct['classic_categories'])) { if (isset($currentProduct['classic_categories'])) {
// Bebeboutik : brand
$firstKey = key($currentProduct['classic_categories']);
if ($firstKey !== null) {
$this->addContentLine($currentProduct['classic_categories'][$firstKey], 'g:brand');
}
foreach ($currentProduct['classic_categories'] as $depth => $name) { foreach ($currentProduct['classic_categories'] as $depth => $name) {
if ($depth > 1) { if ($depth > 1) {
$this->addContentLine($name, 'c:category' . ($depth - 2)); $this->addContentLine($name, 'c:category' . ($depth - 2));
} }
} }
} }
if (isset($currentProduct['tags'])) { /*if (isset($currentProduct['tags'])) {
foreach ($currentProduct['tags'] as $product_type) { foreach ($currentProduct['tags'] as $product_type) {
$this->addContentLine($product_type . ' > ' . $currentProduct['catname'], $this->addContentLine($product_type . ' > ' . $currentProduct['catname'],
'g:product_type'); 'g:product_type');
} }
} }*/
// Bebeboutik : force categories
// Bebeboutik : Add Family as product_type
$this->addContentLine($currentProduct['family'], 'g:product_type');
// Bebeboutik : Force categories
if (isset($currentProduct['conso_categories'])) {
foreach ($currentProduct['conso_categories'] as $currentCategory) { foreach ($currentProduct['conso_categories'] as $currentCategory) {
$this->addContentLine($currentCategory, 'g:product_type'); //$this->addContentLine($currentCategory, 'g:product_type');
}
} }
$this->addContentLine('Ventes privées', 'c:sale_type'); $this->addContentLine('Ventes privées', 'c:sale_type');

View File

@ -46,17 +46,17 @@ class SenseFuel extends Module
if (null !== $site_version && if (null !== $site_version &&
null !== $page_name && null !== $page_name &&
in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true) && in_array($site_version, self::$ACTIVE_VERSION_ARRAY, true) /*&&
in_array($page_name, array('index', 'category', 'product'), true) in_array($page_name, array('index', 'category', 'product'), true)*/
) { ) {
return self::display(__FILE__, 'views/top-sensefuel.tpl'); return self::display(__FILE__, 'views/top-sensefuel.tpl');
} }
if (null !== $site_version && if (null !== $site_version &&
null !== $page_name && null !== $page_name &&
in_array($site_version, self::$SETUP_VERSION_ARRAY, true) && in_array($site_version, self::$SETUP_VERSION_ARRAY, true) /*&&
in_array($page_name, array('index', 'category', 'product'), true) && in_array($page_name, array('index', 'category', 'product'), true) &&
Tools::isConnectedToBackOffice() Tools::isConnectedToBackOffice()*/
) { ) {
return self::display(__FILE__, 'views/top-sensefuel.tpl'); return self::display(__FILE__, 'views/top-sensefuel.tpl');
} }
@ -72,17 +72,17 @@ class SenseFuel extends Module
global $site_version, $page_name; global $site_version, $page_name;
if (null !== $site_version && if (null !== $site_version &&
null !== $page_name && null !== $page_name &&
in_array($site_version, self::$ACTIVE_VERSION_ARRAY , true) && in_array($site_version, self::$ACTIVE_VERSION_ARRAY , true) /*&&
in_array($page_name, array('index', 'category', 'product'), true) in_array($page_name, array('index', 'category', 'product'), true)*/
) { ) {
return self::display(__FILE__, 'views/top-sensefuel.tpl'); return self::display(__FILE__, 'views/top-sensefuel.tpl');
} }
if (null !== $site_version && if (null !== $site_version &&
null !== $page_name && null !== $page_name &&
in_array($site_version, self::$SETUP_VERSION_ARRAY , true) && in_array($site_version, self::$SETUP_VERSION_ARRAY , true) /*&&
in_array($page_name, array('index', 'category', 'product'), true) && in_array($page_name, array('index', 'category', 'product'), true) &&
Tools::isConnectedToBackOffice() Tools::isConnectedToBackOffice()*/
) { ) {
return self::display(__FILE__, 'views/top-sensefuel.tpl'); return self::display(__FILE__, 'views/top-sensefuel.tpl');
} }

View File

@ -3,7 +3,7 @@
<form action="{$base_dir_ssl}search.php" id="search" role="search"> <form action="{$base_dir_ssl}search.php" id="search" role="search">
<div class="search"> <div class="search">
<div class="search_form"> <div class="search_form">
<input id="global_search" class="search_input" type="text" placeholder="{l s='Rechercher une marque, un produit' mod='sensefuel'}"> <input id="global_search" class="search_input" type="text" placeholder="{l s='Rechercher un produit...' mod='sensefuel'}">
<a title="{l s='Rechercher' mod='sensefuel'}" class="search_submit" href="#"><span class="picto"></span></a> <a title="{l s='Rechercher' mod='sensefuel'}" class="search_submit" href="#"><span class="picto"></span></a>
</div> </div>
</div> </div>

View File

@ -1091,7 +1091,7 @@ class Cart extends CartCore {
SELECT MAX(c.`id_cart`) SELECT MAX(c.`id_cart`)
FROM '._DB_PREFIX_.'cart c FROM '._DB_PREFIX_.'cart c
LEFT JOIN '._DB_PREFIX_.'orders o ON (c.`id_cart` = o.`id_cart`) LEFT JOIN '._DB_PREFIX_.'orders o ON (c.`id_cart` = o.`id_cart`)
WHERE o.`valid` = 1 WHERE o.`id_order` IS NOT NULL
AND c.`id_customer` = '.(int)$id_customer.' AND c.`id_customer` = '.(int)$id_customer.'
'); ');
} }
@ -1103,7 +1103,7 @@ class Cart extends CartCore {
SELECT MIN(c.id_cart) SELECT MIN(c.id_cart)
FROM '._DB_PREFIX_.'cart c FROM '._DB_PREFIX_.'cart c
LEFT JOIN '._DB_PREFIX_.'orders o ON (c.`id_cart` = o.`id_cart`) LEFT JOIN '._DB_PREFIX_.'orders o ON (c.`id_cart` = o.`id_cart`)
WHERE (o.`valid` = 0 OR o.`valid` IS NULL) WHERE o.`id_order` IS NULL
AND c.`id_customer` = '.(int)$id_customer.' AND c.`id_customer` = '.(int)$id_customer.'
AND c.`id_cart` > '.(int)$max_id_cart.' AND c.`id_cart` > '.(int)$max_id_cart.'
'); ');

View File

@ -0,0 +1,78 @@
<?php
/*
* 2007-2011 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-2011 PrestaShop SA
* @version Release: $Revision: 9535 $
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
abstract class ObjectModel extends ObjectModelCore
{
/**
* Override Antadis.
*
* Replacing self::displayFieldName by static::displayFieldName
* to be able to override ObjectModel::displayFieldName
*
* {@inheritdoc}
*/
public function validateController($htmlentities = true)
{
$errors = array();
/* Checking for required fields */
$fieldsRequired = array_merge($this->fieldsRequired, (isset(self::$fieldsRequiredDatabase[get_class($this)]) ? self::$fieldsRequiredDatabase[get_class($this)] : array()));
foreach ($fieldsRequired AS $field)
if (($value = Tools::getValue($field, $this->{$field})) == false AND (string)$value != '0')
if (!$this->id OR $field != 'passwd')
$errors[] = '<b>'.static::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is required.');
/* Checking for maximum fields sizes */
foreach ($this->fieldsSize AS $field => $maxLength)
if (($value = Tools::getValue($field, $this->{$field})) AND Tools::strlen($value) > $maxLength)
$errors[] = '<b>'.static::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is too long.').' ('.Tools::displayError('Maximum length:').' '.$maxLength.')';
/* Checking for fields validity */
foreach ($this->fieldsValidate AS $field => $function)
{
// Hack for postcode required for country which does not have postcodes
if ($value = Tools::getValue($field, $this->{$field}) OR ($field == 'postcode' AND $value == '0'))
{
if (!Validate::$function($value))
$errors[] = '<b>'.static::displayFieldName($field, get_class($this), $htmlentities).'</b> '.Tools::displayError('is invalid.');
else
{
if ($field == 'passwd')
{
if ($value = Tools::getValue($field))
$this->{$field} = Tools::encrypt($value);
}
else
$this->{$field} = $value;
}
}
}
return $errors;
}
}

View File

@ -246,8 +246,37 @@ class Order extends OrderCore {
$data[$info['id_order_detail']] = $info['total_send']; $data[$info['id_order_detail']] = $info['total_send'];
} }
} }
foreach (Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
SELECT
d.`id_order_detail`,
IF(
(SELECT COUNT(p.`id_order_detail`)
FROM `'._DB_PREFIX_.'philea_parcel` p
WHERE d.`id_order_detail` = p.`id_order_detail`),
(SELECT SUM(p.`quantity`)
FROM `'._DB_PREFIX_.'philea_parcel` p
WHERE d.`id_order_detail` = p.`id_order_detail`),
0
) as `total_send`
FROM `'._DB_PREFIX_.'order_detail` d
WHERE d.`id_order_detail` IN ('.implode(',', $ids).')
') as $key => $info) {
if($data[$info['id_order_detail']]==0){
$data[$info['id_order_detail']] = $info['total_send'];
}
}
return $data; return $data;
} }
public static function getCurrentIdState($id_order)
{
$id_order_state = Db::getInstance()->getValue('
SELECT `id_order_state`
FROM `'._DB_PREFIX_.'order_state_current`
WHERE `id_order`='.(int)$id_order
);
return $id_order_state?$id_order_state:false;
}
} }

View File

@ -1714,7 +1714,7 @@ body#page-404 .footer_links {
} }
#header > .content > .top .block { #header > .content > .top .block {
display: none; display: none;
margin: 0 0 0 20px; /*margin: 0 0 0 20px;*/
float: right; float: right;
position: relative; position: relative;
} }
@ -1758,6 +1758,10 @@ body#page-404 .footer_links {
-o-box-shadow: 0px 4px 4px #bfbcb4; -o-box-shadow: 0px 4px 4px #bfbcb4;
box-shadow: 0px 4px 4px #bfbcb4; box-shadow: 0px 4px 4px #bfbcb4;
} }
#header > .content > .top {
/*clear: both;*/
background: #fff;
}
#header > .content > .top .block ul li { #header > .content > .top .block ul li {
margin: 5px 0 0 0; margin: 5px 0 0 0;
} }
@ -1775,10 +1779,16 @@ body#page-404 .footer_links {
#header > .content > .top > .content { #header > .content > .top > .content {
width: 980px; width: 980px;
margin: 0px auto; margin: 0px auto;
padding-top: 6px; /*padding-top: 6px;*/
height: 84px; height: 84px;
position: relative; position: relative;
} }
#header > .content > .top-upper > .content-upper {
width: 980px;
margin: 0px auto;
padding-top: 6px;
position: relative;
}
#header > .content > .top > .content .logo_block { #header > .content > .top > .content .logo_block {
float: left; float: left;
height: 70px; height: 70px;
@ -1901,23 +1911,6 @@ li.active .container_submenu .content_submenu {
animation-name: slideInDown; animation-name: slideInDown;
padding: 0 15px; padding: 0 15px;
} }
.container_submenu .content_footer {
display: block;
width: 100%;
margin: 0 auto;
position: absolute;
bottom: 0;
background-color: #fff;
padding:15px 0;
color: #666666;
font-size: 14px;
font-weight: bold;
}
.container_submenu .content_footer a,
.container_submenu .content_footer a:hover,
.container_submenu .content_footer a:visited {
color: #ec15ac;
}
.submenu { .submenu {
width: 965px; width: 965px;
margin: 0 auto; margin: 0 auto;
@ -2089,20 +2082,20 @@ li.active .container_submenu .content_submenu {
height: 39px; height: 39px;
border-top: 0px; border-top: 0px;
position: absolute; position: absolute;
top: 131px; top: 140px;
z-index: 4; z-index: -1;
width: 100%; width: 100%;
left: 0px; left: 0px;
background: url("../img/subheader.png") repeat top; background: url("../img/subheader.png") repeat top;
} }
.breadcrumb { .breadcrumb {
top: 131px; top: 141px;
position: absolute; position: absolute;
z-index: 4; z-index: 4;
width: 980px; width: 980px;
padding-top: 11px;
height: 27px; height: 27px;
color: #1e1633; color: #1e1633;
padding-top: 11px;
} }
.breadcrumb a, .breadcrumb span { .breadcrumb a, .breadcrumb span {
margin-right: 5px; margin-right: 5px;
@ -5544,16 +5537,19 @@ body .top #header_user {
body.logged #header_user { body.logged #header_user {
clear: none; clear: none;
display: block; display: block;
float: left; float: right;
margin-left: 165px; margin-right: 10px;
margin-top: 35px; /*margin-left: 165px;*/
min-width: 270px; /*margin-top: 35px;*/
/*min-width: 270px;*/
} }
.help_contact { .help_contact {
background: url('../img/aide-contact.png') no-repeat left center; background: url('../img/aide-contact.png') no-repeat left center;
font-family: tahoma,arial,sans-serif; font-family: tahoma,arial,sans-serif;
float: right; float: right;
padding-left: 25px; padding-left: 25px;
position: relative;
z-index: 10000;
} }
.help_contact a { color: #6e6e6e;} .help_contact a { color: #6e6e6e;}
#login_form_top { #login_form_top {
@ -5612,7 +5608,7 @@ body.logged #header_user {
color: #4f4f4f; color: #4f4f4f;
float: left; float: left;
margin-left: 10px; margin-left: 10px;
padding-top: 15px; /*padding-top: 15px;*/
} }
#header_nav .inner > ul { margin: 0; padding: 0; } #header_nav .inner > ul { margin: 0; padding: 0; }
#header_nav .inner > ul li { #header_nav .inner > ul li {
@ -5639,6 +5635,7 @@ body.nav_active #header_nav .inner a.submenu_top_btn { z-index: 2;}
#header_nav ul li.account_hover:hover a.submenu_top_btn{ border-color: #ccc } #header_nav ul li.account_hover:hover a.submenu_top_btn{ border-color: #ccc }
#header_nav .inner ul.submenu_top { #header_nav .inner ul.submenu_top {
background: #fff; background: #fff;
border-top: 0;
border: 1px solid #ccc; border: 1px solid #ccc;
display: none; display: none;
position: absolute; position: absolute;
@ -5667,6 +5664,12 @@ body.nav_active #header_nav .inner a.submenu_top_btn { z-index: 2;}
} }
#header_nav .inner ul.submenu_top li.logout a { color: #fff;} #header_nav .inner ul.submenu_top li.logout a { color: #fff;}
.top #cart_block {
width: 100px;
}
.top #cart_block .block_content {
float: right;
}
.top #cart_block_summary { .top #cart_block_summary {
background: url('../img/panier.png') no-repeat 4px 3px #fff; background: url('../img/panier.png') no-repeat 4px 3px #fff;
border: 1px solid #fff; border: 1px solid #fff;
@ -5675,13 +5678,13 @@ body.nav_active #header_nav .inner a.submenu_top_btn { z-index: 2;}
cursor: pointer; cursor: pointer;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
margin-top: 11px; margin-top: 10px;
padding-top: 6px; padding-top: 6px;
padding-bottom: 5px; padding-bottom: 5px;
padding-left: 45px; padding-left: 45px;
padding-right: 10px; padding-right: 10px;
position: relative; position: relative;
z-index: 100001; z-index: 99998;
} }
body.nav_active .top #cart_block_summary { z-index: 6;} body.nav_active .top #cart_block_summary { z-index: 6;}
.top #cart_block_summary.active { border-color:#ccc;} .top #cart_block_summary.active { border-color:#ccc;}
@ -7573,6 +7576,69 @@ div.addresses ul.address.item {
.ant_support { .ant_support {
padding:0px!important; padding:0px!important;
} }
#sensefuel {
display: inline-block;
vertical-align: top;
width: 480px;
float: left;
padding-left: 40px;
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}
#sensefuel .search .search_form {
padding-top: 18px;
}
#sensefuel .search .search_form .search_input {
display: block;
float: left;
background: #fff;
color: #000;
padding: 5px 0 5px 10px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
/*font-size: 15px;*/
line-height: 32px;
height: 18px;
width: 400px;
}
#sensefuel .search .search_form a.search_submit {
display: block;
float: left;
background: #70bc2c;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
height: 30px;
width: 40px;
}
#sensefuel .search .search_form a.search_submit:hover {
-moz-transition: background 0.5s ease;
-o-transition: background 0.5s ease;
-webkit-transition: background 0.5s ease;
transition: background 0.5s ease;
background: #70bc2c;
}
#sensefuel .search .search_form a.search_submit span.picto {
display: block;
background: url(../img/white_magnifier.png) no-repeat scroll center center transparent;
height: 30px;
width: 100%;
}
.container_submenu .content_footer {
display: block;
width: 100%;
margin: 0 auto;
position: absolute;
bottom: 0;
background-color: #fff;
padding:15px 0;
color: #666666;
font-size: 14px;
font-weight: bold;
}
.container_submenu .content_footer a,
.container_submenu .content_footer a:hover,
.container_submenu .content_footer a:visited {
color: #ec15ac;
}
.block-guide { .block-guide {
margin-bottom: 20px; margin-bottom: 20px;
background: #f6f6f6; background: #f6f6f6;
@ -7609,7 +7675,6 @@ div.addresses ul.address.item {
} }
.block-guide ul li a { .block-guide ul li a {
margin: 0 0 0 10px;
color: #000; color: #000;
} }
.block-guide ul li.selected a { .block-guide ul li.selected a {
@ -7673,7 +7738,8 @@ div.addresses ul.address.item {
margin: 0px; margin: 0px;
list-style: none outside; list-style: none outside;
} }
.guide-content ul li a { .guide-content ul li a,
.guide-content ul li a:visited {
color: #000; color: #000;
} }
.guide-content ul li.selected a { .guide-content ul li.selected a {
@ -7685,50 +7751,3 @@ div.addresses ul.address.item {
float: right; float: right;
padding: 0 5px; padding: 0 5px;
} }
#sensefuel {
display: inline-block;
vertical-align: top;
width: 50%;
float: left;
padding-left: 20px;
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}
#sensefuel .search .search_form {
padding-top: 20px;
}
#sensefuel .search .search_form .search_input {
display: block;
float: left;
background: #fff;
color: #000;
padding: 5px 0 5px 10px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
/*font-size: 15px;*/
line-height: 28px;
width: 80%;
}
#sensefuel .search .search_form a.search_submit {
display: block;
float: left;
background: #70bc2c;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
height: 32px;
width: 15%;
}
#sensefuel .search .search_form a.search_submit:hover {
-moz-transition: background 0.5s ease;
-o-transition: background 0.5s ease;
-webkit-transition: background 0.5s ease;
transition: background 0.5s ease;
background: #70bc2c;
}
#sensefuel .search .search_form a.search_submit span.picto {
display: block;
background: url(../img/white_magnifier.png) no-repeat scroll center center transparent;
height: 32px;
width: 100%;
}

View File

@ -439,7 +439,6 @@
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PT7ZGQF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PT7ZGQF" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) --> <!-- End Google Tag Manager (noscript) -->
{if !$content_only} {if !$content_only}
{if isset($restricted_country_mode) && $restricted_country_mode} {if isset($restricted_country_mode) && $restricted_country_mode}
<div id="restricted-country"> <div id="restricted-country">
@ -450,22 +449,20 @@
<!-- Header --> <!-- Header -->
<div id="header"> <div id="header">
<div class="content"> <div class="content">
<div class="top-upper"> <div class="top-upper">
<div class="content-upper"> <div class="content-upper">
<span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span> <span class='help_contact'><a href="{$base_dir_ssl}modules/ant_support/help.php">{l s='Aide et contact'}</a></span>
{$HOOK_TOP_UPPER} {$HOOK_TOP_UPPER}
</div>
</div>
</div>
</div>
<div class="top"> <div class="top">
<div class="content"> <div class="content">
{$HOOK_TOP} {$HOOK_TOP}
</div> </div>
</div> </div>
</div> </div>
{$HOOK_TOP_MENU} {$HOOK_TOP_MENU}
</div> </div>

View File

@ -25,9 +25,9 @@
*} *}
{if $page_name != 'authentication'} {if $page_name != 'authentication'}
<!-- Block user information module HEADER -->
{if $cookie->isLogged()} {if $cookie->isLogged()}
{if $onlyForm == false} {if $onlyForm == false}
<!-- Block user information module HEADER -->
<div id="header_user"> <div id="header_user">
<div id="header_nav"> <div id="header_nav">
<div class="inner">{l s='Bonjour' mod='blockuserinfo'} <div class="inner">{l s='Bonjour' mod='blockuserinfo'}
@ -78,13 +78,15 @@
</ul> </ul>
</li> </li>
</ul> </ul>
{/if}
</div>
{* {/if} *} {* {/if} *}
</div> </div>
{/if}
</div> </div>
</div>
<!-- /Block user information module HEADER -->
{/if} {/if}
{else} {else}
<!-- Block user information module HEADER -->
<div id="header_user"> <div id="header_user">
<form id="login_form_top" method="post" action="{$link->getPageLink('authentication.php')}"> <form id="login_form_top" method="post" action="{$link->getPageLink('authentication.php')}">
<fieldset> <fieldset>
@ -103,6 +105,6 @@
</fieldset> </fieldset>
</form> </form>
</div> </div>
{/if}
<!-- /Block user information module HEADER --> <!-- /Block user information module HEADER -->
{/if} {/if}
{/if}

View File

@ -8,6 +8,15 @@
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@font-face {
font-family: 'Montserrat-Regular';
src: url('../fonts/Montserrat-Regular.eot?#iefix') format('embedded-opentype'),
url('../fonts/Montserrat-Regular.woff') format('woff'),
url('../fonts/Montserrat-Regular.ttf') format('truetype'),
url('../fonts/Montserrat-Regular.svg#Montserrat-Regular') format('svg');
font-weight: normal;
font-style: normal;
}
#soFr{ #soFr{
overflow: auto; overflow: auto;
@ -1725,7 +1734,7 @@ body#category ul#product_list li{
margin:0px; margin:0px;
display:block; display:block;
position:relative; position:relative;
border-bottom:4px solid #cccccc; border-bottom: 3px solid #efefef;
margin-bottom: 15px; margin-bottom: 15px;
} }
body#category ul#product_list li.out{ body#category ul#product_list li.out{
@ -1734,17 +1743,18 @@ body#category ul#product_list li.out{
body#category ul#product_list li div.left_block, body#category ul#product_list li div.left_block,
body#category ul#product_list li div.right_block{ body#category ul#product_list li div.right_block{
display:inline-block; display:inline-block;
width:50%; width:75%;
margin:0px; margin:0px;
padding:0px; padding:0px;
height:180px; height:90px;
float:left; float:left;
min-height:150px; min-height:90px;
max-height:150px; max-height:90px;
} }
body#category ul#product_list li div.left_block{ body#category ul#product_list li div.left_block{
text-align:center; text-align:center;
border-right: 1px solid #e4e4e4; /*border-right: 1px solid #e4e4e4;*/
width:25%;
} }
body#category ul#product_list li div.left_block img{ body#category ul#product_list li div.left_block img{
position:relative; position:relative;
@ -1781,6 +1791,11 @@ body#category ul#product_list li div.list-product-name h3 {
body#category ul#product_list li div.list-product-name h3 { body#category ul#product_list li div.list-product-name h3 {
padding-right: 0; padding-right: 0;
max-height: 65px; max-height: 65px;
font-family: 'Montserrat-Regular';
padding: 0px 2% 0px 4%;
font-size:12px;
color:#333;
font-style: normal;
} }
body#order table#cart_summary tbody tr.cart_item .cart_description h5{ body#order table#cart_summary tbody tr.cart_item .cart_description h5{
padding:0px 1% 0px 0%; padding:0px 1% 0px 0%;
@ -1793,6 +1808,8 @@ body#order table#cart_summary tbody tr.cart_item .cart_description h5 a{
body#category ul#product_list li div.list-product-price{ body#category ul#product_list li div.list-product-price{
font-size:12px; font-size:12px;
padding:0px 2% 0px 4%; padding:0px 2% 0px 4%;
position: absolute;
bottom: 10px;
} }
body#category ul#product_list li div.list-product-price span.old_price{ body#category ul#product_list li div.list-product-price span.old_price{
display:block; display:block;
@ -1833,17 +1850,29 @@ body#category ul#product_list li div.list-product-price span.price{
margin-bottom: 3px; margin-bottom: 3px;
display: block; display: block;
} }
body#category ul#product_list li div.list-product-price span.price{
color:#7DC668;
font-family: 'Montserrat-Regular';
font-size: 14px;
}
body#category ul#product_list li div.list-product-price span.reduction{ body#category ul#product_list li div.list-product-price span.reduction{
font-family:georgia; font-family:georgia;
color:#565485; /*color:#565485;*/
color:#F45BB7;
font-size:14px; font-size:14px;
top: 4px; /*top: 4px;*/
position: relative; position: relative;
display: inline-block;
vertical-align: middle;
} }
body#category ul#product_list li div.list-product-price span.old_price{ body#category ul#product_list li div.list-product-price span.old_price{
/*font-family:georgia;*/ /*font-family:georgia;*/
color:#9c9c9c; color:#9c9c9c;
font-size:11px; font-size:11px;
display: inline-block;
vertical-align: middle;
margin-right: 5px;
text-decoration: line-through;
} }
/* PRODUCT */ /* PRODUCT */
@ -4685,39 +4714,6 @@ body#index .jqibuttons span.gradient{
background: #504d8b; background: #504d8b;
} }
#cookiescontent { padding: 10px; font-size: 12px; }
#product #more_info_tabs {
background: #FFF;
}
#product .idTabs {
margin: 0px;
list-style: none outside;
overflow: auto;
}
.block_hidden_only_for_screen {
display: none;
}
#product #more_info_block .idTabs li {
position: relative;
margin-left: 1px;
line-height: 12px;
}
#product #more_info_block .idTabs li a {
background: #fb66a9;
color: #fff;
display: block;
text-decoration: none;
padding: 20px 15px;
font-size: 17px;
text-align: center;
}
#product #more_info_block .idTabs li a.selected {
font-weight: bold;
background: #F3F3F3;
color: #fb66a9;
}
body#order #form { body#order #form {
overflow-y: initial; overflow-y: initial;
} }
@ -4842,20 +4838,6 @@ body#addresses #center_column p.footer_links a.button.back_account {
padding: 0px 1px; padding: 0px 1px;
} }
body#product #primary_block #more_info_block .sheets ul li,
body#product #primary_block #more_info_block .sheets p {
margin-bottom: 5px;
text-align: justify;
line-height: 16px;
}
body#product .flex-control-nav.flex-control-paging{
display: none;
}
body#product #best-sellers_block_product{
display: none;
}
#cookiescontent { padding: 10px; font-size: 12px; } #cookiescontent { padding: 10px; font-size: 12px; }
h4.subtitle { h4.subtitle {
@ -5107,26 +5089,6 @@ body#product #best-sellers_block_product{
text-align: center; text-align: center;
font-size: 13px; font-size: 13px;
} }
/******* ticket-9890 *******/
#product_list li div.productQuantityAlert{
text-align: center;
width: 250px;
margin: 0 !important;
padding: 5px 0 !important;
/* background-color: #f49cc3;
box-shadow: 0px 5px 8px -3px #b5b1b1; */
background-color: #fff;
position: absolute;
bottom: 0px;
left: 0;
}
.productQuantityAlert p{
color: #e36ea2;
font-size: 12px;
font-weight: 600;
}
.box_info_size .content .innerbox_info .show_info_size { .box_info_size .content .innerbox_info .show_info_size {
padding-top : 25px; padding-top : 25px;
} }
@ -5162,20 +5124,21 @@ body#product #best-sellers_block_product{
*/ */
#product_list li div.productQuantityAlert{ #product_list li div.productQuantityAlert{
text-align: center; text-align: center;
width: 250px; /*width: 250px;*/
margin: 0 !important; margin: 0 !important;
padding: 5px 0 !important; padding: 5px 0 !important;
/* background-color: #f49cc3; /* background-color: #f49cc3;
box-shadow: 0px 5px 8px -3px #b5b1b1; */ box-shadow: 0px 5px 8px -3px #b5b1b1; */
background-color: #fff; background-color: #fff;
position: absolute; /*position: absolute;*/
bottom: 0px; bottom: 0px;
left: 0; left: 0;
} }
.productQuantityAlert p{ .productQuantityAlert p{
color: #e36ea2; color: #F45BB7;
font-family: 'Montserrat-Regular';
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 400;
} }
/** Payment info module */ /** Payment info module */
@ -5266,6 +5229,22 @@ body#product #best-sellers_block_product{
body#product div.sale_img img{ body#product div.sale_img img{
background: none; background: none;
} }
body#product .product_title span {
font-family: 'Montserrat-Regular';
color: #333;
font-style: normal;
font-size: 14px;
}
body#product #primary_block div.show_price .price{
font-size: 20px;
font-family: 'Montserrat-Regular';
font-style: normal;
color: #7dc668;
}
body#product #primary_block div.show_price #reduction_percent{
color: #F45BB7;
font-size: 16px;
}
#product .product_info { #product .product_info {
/* border-bottom: 1px solid #cac7be; */ /* border-bottom: 1px solid #cac7be; */
padding: 0px 0px 15px; padding: 0px 0px 15px;
@ -5290,7 +5269,7 @@ body#product div.sale_img img{
#product .product_info .info_3 .picto{ background-position: 0 -82px} #product .product_info .info_3 .picto{ background-position: 0 -82px}
#product .product_info .info .pink{ #product .product_info .info .pink{
color: #e36ea2; color: #F45BB7;
} }
h3.gift_title { h3.gift_title {
font-size: 13px; font-size: 13px;
@ -5328,7 +5307,7 @@ body#order-detail table#order-product tbody tr.item tr{
border-bottom: 0px; border-bottom: 0px;
} }
body#order-detail table#order-product tbody tr.item tr.title span.price{ body#order-detail table#order-product tbody tr.item tr.title span.price{
color:#e26ea2; color:#F45BB7;
font-family: Georgia; font-family: Georgia;
} }
body#order-detail table#order-product tbody tr.item tr.title span.quantity{ body#order-detail table#order-product tbody tr.item tr.title span.quantity{
@ -5336,156 +5315,6 @@ body#order-detail table#order-product tbody tr.item tr.title span.quantity{
font-family: Georgia; font-family: Georgia;
} }
.block-guide {
margin-bottom: 20px;
background: #f6f6f6;
background: #fff;
padding: 10px 20px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
-moz-box-shadow: 2px 2px 5px #cccccc;
-webkit-box-shadow: 2px 2px 5px #CCC;
-ms-box-shadow: 2px 2px 5px #cccccc;
-o-box-shadow: 2px 2px 5px #cccccc;
box-shadow: 2px 2px 5px #ccc;
color: #1e1633;
}
.block-guide ul {
margin: 0px;
list-style: none outside;
margin-left: 5px;
}
.block-guide h5 {
margin-top: 10px;
}
.block-guide h5 a {
font-style: normal;
font-weight: bold;
font-size: 14px;
line-height: 1.5em;
color: #000;
}
.block-guide h5 a.selected {
color: #796dc7;
}
.block-guide ul li a {
margin: 0 0 0 10px;
color: #000;
}
.block-guide ul li.selected a {
color: #796dc7;
}
.guide-intro {}
.guide-intro-left {
color: #1e1633;
background: #fff;
text-transform: none;
line-height: 1.5em;
font-weight: normal;
margin: 0 0 5px 0;
/*adding: 10px 0px 0px 20px;*/
-moz-box-shadow: 2px 2px 5px #cccccc;
-webkit-box-shadow: 2px 2px 5px #cccccc;
-ms-box-shadow: 2px 2px 5px #cccccc;
-o-box-shadow: 2px 2px 5px #cccccc;
box-shadow: 2px 2px 5px #cccccc;
}
.guide-intro-left div {
margin: 5px;
font-size: 13px;
}
.guide-intro-left h2 {
text-align: left;
}
.guide-content h3 {
font-size: 13px;
}
.guide-content-menu {
background: #fff;
font-size: 13px;
text-transform: none;
line-height: 1.5em;
font-weight: normal;
text-align: left;
padding: 10px 0px 10px 0px;
-moz-box-shadow: 2px 2px 5px #cccccc;
-webkit-box-shadow: 2px 2px 5px #cccccc;
-ms-box-shadow: 2px 2px 5px #cccccc;
-o-box-shadow: 2px 2px 5px #cccccc;
box-shadow: 2px 2px 5px #cccccc;
}
.guide-content-category {
text-align:center;
}
.guide-content ul {
display: block;
list-style: none outside;
margin: 5px;
}
.guide-content ul li a {
color: #000;
}
.guide-content ul li.selected a {
font-weight: bold;
color: #796dc7;
}
.guide-content-txt {
margin: 5px 0;
padding: 0 5px;
}
.guide-content-txt div{
font-size: 13px;
}
.container_submenu .content_footer {
display: block;
width: 100%;
margin: 0 auto;
position: absolute;
bottom: 0;
background-color: #fff;
padding:15px 0;
color: #666666;
font-size: 14px;
font-weight: bold;
}
.container_submenu .content_footer a,
.container_submenu .content_footer a:hover,
.container_submenu .content_footer a:visited {
color: #ec15ac;
}
#sensefuel {
display: block;
margin-bottom: 5px;
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}
#sensefuel .search .search_form .search_input {
display: block;
float: left;
background: #fff;
color: #000;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
/*font-size: 15px;*/
line-height: 16px;
width: 84%;
}
#sensefuel .search .search_form a.search_submit {
display: block;
float: left;
background: #70bc2c;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
height: 30px;
width: 15%;
margin-bottom: 5px;
}
#sensefuel { #sensefuel {
display: block; display: block;
margin-bottom: 5px; margin-bottom: 5px;

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Binary file not shown.

View File

@ -21,13 +21,13 @@
{convertPrice price=$product.price_tax_exc} {convertPrice price=$product.price_tax_exc}
{/if} {/if}
</span> </span>
{/if} {if $product.reduction>0 && $product.price_without_reduction!=$product.price}
{if $product.price_without_reduction!=$product.price} <span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
<span class="old_price">{l s='instead of'} {convertPrice price=$product.price_without_reduction}</span>
{/if} {/if}
{assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)} {assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)}
{if $product_reduction>0} {if $product_reduction>0}
<span class="reduction">(-{$product_reduction|round|string_format:'%d'}%)</span> <span class="reduction">(-{$product_reduction|round|string_format:'%d'}%)</span>
{/if}
{if isset($product.quantity_all_versions) && $product.quantity_all_versions <= $last_qties && $product.quantity_all_versions > 0} {if isset($product.quantity_all_versions) && $product.quantity_all_versions <= $last_qties && $product.quantity_all_versions > 0}
<div class="productQuantityAlert"> <div class="productQuantityAlert">
{if $product.quantity_all_versions == 1} {if $product.quantity_all_versions == 1}

View File

@ -0,0 +1,5 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{landingpages}site_mobile>authentication_bottom_925cc1fa40ed38377bcb2b77b5315d9c'] = 'Déjà membre';

View File

@ -49,8 +49,8 @@
{convertPrice price=$product.price_tax_exc} {convertPrice price=$product.price_tax_exc}
{/if} {/if}
</span> </span>
{if $product.price_without_reduction!=$product.price} {if $product.reduction>0 && $product.price_without_reduction!=$product.price}
<span class="old_price">{l s='instead of'} {convertPrice price=$product.price_without_reduction}</span> <span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
{/if} {/if}
{assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)} {assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)}
{if $product_reduction>0} {if $product_reduction>0}

View File

@ -66,6 +66,7 @@ class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements P
const FORMAT_CURRENCY_USD_SIMPLE = '"$"#,##0.00_-'; const FORMAT_CURRENCY_USD_SIMPLE = '"$"#,##0.00_-';
const FORMAT_CURRENCY_USD = '$#,##0_-'; const FORMAT_CURRENCY_USD = '$#,##0_-';
const FORMAT_CURRENCY_EUR_SIMPLE = '[$EUR ]#,##0.00_-'; const FORMAT_CURRENCY_EUR_SIMPLE = '[$EUR ]#,##0.00_-';
const FORMAT_CURRENCY_EUR = '#.00 [$€];-#.00 [$€]';
/** /**
* Excel built-in number formats * Excel built-in number formats