Merge branch 'develop' of git@gitlab.antadis.net:dev-antadis/bebeboutik.git into develop
This commit is contained in:
commit
c9a8928a81
@ -96,6 +96,13 @@ if (Tools::isSubmit('submitMessage')) {
|
||||
$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))) {
|
||||
$id_contact = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$contact = new Contact($id_contact, $cookie->id_lang);
|
||||
|
||||
if (!((
|
||||
|
@ -100,7 +100,7 @@ if($magistorModule->active) {
|
||||
p.`id_product` = pl.`id_product`
|
||||
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.'
|
||||
ORDER BY p.`id_product` ASC
|
||||
') as $row){
|
||||
@ -178,6 +178,24 @@ if($magistorModule->active) {
|
||||
foreach ($result_quantities as $od) {
|
||||
$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(isset($product['ean13']) && !empty($product['ean13'])) {
|
||||
$ean = $product['ean13'];
|
||||
@ -185,6 +203,15 @@ if($magistorModule->active) {
|
||||
$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($code_societe, 20, ' ', STR_PAD_RIGHT);
|
||||
$data .= str_pad(str_replace(array("\r", "\n"), '', $product['id_product']), 50, ' ', STR_PAD_RIGHT);
|
||||
|
@ -145,7 +145,7 @@ if($magistorModule->active) {
|
||||
$data .= str_pad( $code_societe, 20, ' ', STR_PAD_RIGHT );
|
||||
$data .= str_pad( 'OP'.(int) $id_sale, 20, ' ', STR_PAD_RIGHT );
|
||||
$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( '', 10, '0', 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 .= PHP_EOL;
|
||||
|
||||
$product_quantities[$product['product_id']] = (int)$row['quantity'];
|
||||
$product_quantities2[$product['product_id']] = 0;
|
||||
$product_quantities[$id_product] = (int)$row['quantity'];
|
||||
$product_quantities2[$id_product] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,7 +182,6 @@ if($magistorModule->active) {
|
||||
chmod($fileName . '.BAL', 0755);
|
||||
|
||||
unset($data);
|
||||
|
||||
require_once('connection_ftp.php');
|
||||
}
|
||||
echo 'fin'."\n";
|
||||
|
@ -2198,7 +2198,7 @@ class Sale {
|
||||
|
||||
// Noel sale can be combined only with Noel sale of same shipping
|
||||
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']
|
||||
|| (
|
||||
|
@ -1091,7 +1091,7 @@ class Cart extends CartCore {
|
||||
SELECT MAX(c.`id_cart`)
|
||||
FROM '._DB_PREFIX_.'cart c
|
||||
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.'
|
||||
');
|
||||
}
|
||||
@ -1103,7 +1103,7 @@ class Cart extends CartCore {
|
||||
SELECT MIN(c.id_cart)
|
||||
FROM '._DB_PREFIX_.'cart c
|
||||
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_cart` > '.(int)$max_id_cart.'
|
||||
');
|
||||
|
@ -246,8 +246,37 @@ class Order extends OrderCore {
|
||||
$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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,6 +8,15 @@
|
||||
font-weight: 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{
|
||||
overflow: auto;
|
||||
@ -1725,7 +1734,7 @@ body#category ul#product_list li{
|
||||
margin:0px;
|
||||
display:block;
|
||||
position:relative;
|
||||
border-bottom:4px solid #cccccc;
|
||||
border-bottom: 3px solid #efefef;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
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.right_block{
|
||||
display:inline-block;
|
||||
width:50%;
|
||||
width:75%;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
height:180px;
|
||||
height:90px;
|
||||
float:left;
|
||||
min-height:150px;
|
||||
max-height:150px;
|
||||
min-height:90px;
|
||||
max-height:90px;
|
||||
}
|
||||
body#category ul#product_list li div.left_block{
|
||||
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{
|
||||
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 {
|
||||
padding-right: 0;
|
||||
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{
|
||||
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{
|
||||
font-size:12px;
|
||||
padding:0px 2% 0px 4%;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
}
|
||||
body#category ul#product_list li div.list-product-price span.old_price{
|
||||
display:block;
|
||||
@ -1833,17 +1850,29 @@ body#category ul#product_list li div.list-product-price span.price{
|
||||
margin-bottom: 3px;
|
||||
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{
|
||||
font-family:georgia;
|
||||
color:#565485;
|
||||
/*color:#565485;*/
|
||||
color:#F45BB7;
|
||||
font-size:14px;
|
||||
top: 4px;
|
||||
/*top: 4px;*/
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
body#category ul#product_list li div.list-product-price span.old_price{
|
||||
/*font-family:georgia;*/
|
||||
color:#9c9c9c;
|
||||
font-size:11px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 5px;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
/* PRODUCT */
|
||||
|
||||
|
BIN
themes/site_mobile/fonts/Montserrat-Regular.eot
Normal file
BIN
themes/site_mobile/fonts/Montserrat-Regular.eot
Normal file
Binary file not shown.
1743
themes/site_mobile/fonts/Montserrat-Regular.svg
Normal file
1743
themes/site_mobile/fonts/Montserrat-Regular.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 104 KiB |
BIN
themes/site_mobile/fonts/Montserrat-Regular.ttf
Normal file
BIN
themes/site_mobile/fonts/Montserrat-Regular.ttf
Normal file
Binary file not shown.
BIN
themes/site_mobile/fonts/Montserrat-Regular.woff
Normal file
BIN
themes/site_mobile/fonts/Montserrat-Regular.woff
Normal file
Binary file not shown.
@ -21,30 +21,30 @@
|
||||
{convertPrice price=$product.price_tax_exc}
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{if $product.price_without_reduction!=$product.price}
|
||||
<span class="old_price">{l s='instead of'} {convertPrice price=$product.price_without_reduction}</span>
|
||||
{if $product.reduction>0 && $product.price_without_reduction!=$product.price}
|
||||
<span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
|
||||
{/if}
|
||||
{assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)}
|
||||
{if $product_reduction>0}
|
||||
<span class="reduction">(-{$product_reduction|round|string_format:'%d'}%)</span>
|
||||
{if isset($product.quantity_all_versions) && $product.quantity_all_versions <= $last_qties && $product.quantity_all_versions > 0}
|
||||
<div class="productQuantityAlert">
|
||||
{if $product.quantity_all_versions == 1}
|
||||
<p>{l s='Warning: 1 item in stock!' mod='categoryscroll'}</p>
|
||||
{else}
|
||||
<p>{l s='Warning :' mod='categoryscroll'} {$product.quantity_all_versions} {l s='items in stock' mod='categoryscroll'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{elseif !isset($product.quantity_all_versions) && $product.quantity <= $last_qties && $product.quantity > 0}
|
||||
<div class="productQuantityAlert">
|
||||
{if $product.quantity == 1}
|
||||
<p>{l s='Warning: 1 item in stock!' mod='categoryscroll'}</p>
|
||||
{else}
|
||||
<p>{l s='Warning :' mod='categoryscroll'} {$product.quantity} {l s='items in stock' mod='categoryscroll'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if isset($product.quantity_all_versions) && $product.quantity_all_versions <= $last_qties && $product.quantity_all_versions > 0}
|
||||
<div class="productQuantityAlert">
|
||||
{if $product.quantity_all_versions == 1}
|
||||
<p>{l s='Warning: 1 item in stock!' mod='categoryscroll'}</p>
|
||||
{else}
|
||||
<p>{l s='Warning :' mod='categoryscroll'} {$product.quantity_all_versions} {l s='items in stock' mod='categoryscroll'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{elseif !isset($product.quantity_all_versions) && $product.quantity <= $last_qties && $product.quantity > 0}
|
||||
<div class="productQuantityAlert">
|
||||
{if $product.quantity == 1}
|
||||
<p>{l s='Warning: 1 item in stock!' mod='categoryscroll'}</p>
|
||||
{else}
|
||||
<p>{l s='Warning :' mod='categoryscroll'} {$product.quantity} {l s='items in stock' mod='categoryscroll'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{* <span class="gradient">
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{landingpages}site_mobile>authentication_bottom_925cc1fa40ed38377bcb2b77b5315d9c'] = 'Déjà membre';
|
@ -49,8 +49,8 @@
|
||||
{convertPrice price=$product.price_tax_exc}
|
||||
{/if}
|
||||
</span>
|
||||
{if $product.price_without_reduction!=$product.price}
|
||||
<span class="old_price">{l s='instead of'} {convertPrice price=$product.price_without_reduction}</span>
|
||||
{if $product.reduction>0 && $product.price_without_reduction!=$product.price}
|
||||
<span class="old_price">{convertPrice price=$product.price_without_reduction}</span>
|
||||
{/if}
|
||||
{assign var=product_reduction value=($product.reduction * (1 + $product.rate / 100) * 100 / $product.price_without_reduction)}
|
||||
{if $product_reduction>0}
|
||||
|
Loading…
Reference in New Issue
Block a user