fix conflict
This commit is contained in:
commit
e7f0c678de
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
include(dirname(__FILE__).'/../../config/config.inc.php');
|
||||
require_once(dirname(__FILE__).'../../../init.php');
|
||||
include_once(dirname(__FILE__).'/../../modules/privatesales/Sale.php');
|
||||
|
||||
global $cookie;
|
||||
global $smarty;
|
||||
@ -20,7 +21,12 @@ if($id_product){
|
||||
}else{
|
||||
$price = $product->getPrice(true, NULL, 2) * $quantity;
|
||||
}
|
||||
|
||||
|
||||
$sale = Sale::getSaleFromCategory($product->id_category_default, false);
|
||||
if (isset($sale)) {
|
||||
$delivery_delay = (int)$sale->delivery_delay;
|
||||
}
|
||||
|
||||
$bestSaleCart = Module::hookExec('bestSaleCart');
|
||||
|
||||
$link = new Link();
|
||||
@ -33,7 +39,8 @@ if($id_product){
|
||||
'img_dir' => '/themes/site/img/',
|
||||
'quantity' => $quantity,
|
||||
'bestSaleCart' => $bestSaleCart,
|
||||
'price' => $price
|
||||
'price' => $price,
|
||||
'delivery_delay' => (isset($delivery_delay) ? $delivery_delay : null)
|
||||
));
|
||||
|
||||
echo $rendu = $tpl->fetch();
|
||||
|
@ -23,14 +23,20 @@
|
||||
<div class="others_links">
|
||||
<a class="show_sales" href="{$link->getPageLink('index.php')}">{l s='Toutes les ventes' mod='blockcartex'}</a>
|
||||
<a class="show_cart" href="{$link->getPageLink('order.php')}">{l s='Voir mon panier' mod='blockcartex'}</a>
|
||||
{if $delivery_delay == 1}
|
||||
<p class="show_fdp_info">{l s='Commandez dans plusieurs ventes au sein du même panier et profitez de frais de port uniques !' mod='blockcartex'}</p>
|
||||
{else}
|
||||
<p class="show_fdp_info">{l s='Les articles de cette vente seront expédiés selon le délai spécifique indiqué sur la fiche produit. Vous n’avez donc pas la possibilité d’ajouter des produits d’autres ventes. Pour continuer, veuillez valider votre commande ou vider votre panier.' mod='blockcartex'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{if $delivery_delay == 1}
|
||||
<div class="content_best_sales">
|
||||
<h3>{l s='Nos meilleures ventes' mod='blockcartex'}</h3>
|
||||
{$bestSaleCart}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div id="box_error_cart">
|
||||
|
@ -75,9 +75,6 @@ class CartController extends CartControllerCore
|
||||
// Only one delivery id per cart, so we can break now
|
||||
break;
|
||||
}
|
||||
/*if (Tools::getValue('ajax') == 'true') {
|
||||
die('{"hasError" : true, "id_current_sale": '.$sale->id.',"id_delivery": '.$sale->delivery_delay.', "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within 3 weeks. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
}*/
|
||||
/*$adding_sale = Db::getInstance()->getRow('
|
||||
SELECT ps.`delivery_delay`, ps.`id_sale`
|
||||
FROM `'._DB_PREFIX_.'product_ps_cache` psc
|
||||
@ -91,21 +88,20 @@ class CartController extends CartControllerCore
|
||||
'delivery_delay'=> (int) $sale2->delivery_delay
|
||||
);
|
||||
|
||||
|
||||
if (!empty($current_sale)) {
|
||||
global $smarty;
|
||||
// Only classic delivery sales can be added together or product of the same sale
|
||||
if ($current_sale['delivery_delay'] != 1 && $adding_sale['id_sale'] != $current_sale['id_sale']) {
|
||||
if ((int)$current_sale['delivery_delay'] != 1 && (int)$adding_sale['id_sale'] != (int)$current_sale['id_sale']) {
|
||||
// Product in cart comes from special delivery sale - only products from the same sale can be added
|
||||
if (Tools::getValue('ajax') == 'true') {
|
||||
die('{"hasError" : true, "popup_error_cart": true, "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within a special period. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
die('{"hasError" : true,"popup_error_cart": true, "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within a special period. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Sorry your cart already contains products from a sale shipped within a special period. To continue, please confirm your order or empty your cart.', false);
|
||||
}
|
||||
} elseif ($current_sale['delivery_delay'] == 1 && $adding_sale['delivery_delay'] != 1) {
|
||||
} elseif ((int)$current_sale['delivery_delay'] == 1 && (int)$adding_sale['delivery_delay'] != 1) {
|
||||
// Product in cart comes from classic delivery sale - only products from classic delivery sale can be added
|
||||
if (Tools::getValue('ajax') == 'true') {
|
||||
die('{"hasError" : true, "popup_error_cart": true, "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within 3 weeks. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
die('{"hasError" : true,"popup_error_cart": true, "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within 3 weeks. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Sorry your cart already contains products from a sale shipped within 3 weeks. To continue, please confirm your order or empty your cart.', false);
|
||||
}
|
||||
|
@ -6652,6 +6652,10 @@ table#carrierTable tbody td {
|
||||
background: url("../img/achat_express.jpg") no-repeat scroll left center #f45bb7;
|
||||
}
|
||||
|
||||
.box_add_to_cart .content .others_links .show_fdp_info{
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
@keyframes slideInDown {
|
||||
0% {
|
||||
-webkit-transform: translateY(-500px);
|
||||
|
@ -23,14 +23,20 @@
|
||||
<div class="others_links">
|
||||
<a class="show_sales" href="{$link->getPageLink('index.php')}">{l s='Toutes les ventes' mod='blockcartex'}</a>
|
||||
<a class="show_cart" href="{$link->getPageLink('order.php')}">{l s='Voir mon panier' mod='blockcartex'}</a>
|
||||
<p class="show_fdp_info">{l s='Commandez dans plusieurs ventes au sein du même panier et profitez de frais de port uniques !' mod='blockcartex'}</p>
|
||||
{if $delivery_delay == 1}
|
||||
<p class="show_fdp_info" style="text-align:center;">{l s='Commandez dans plusieurs ventes au sein du même panier et profitez de frais de port uniques !' mod='blockcartex'}</p>
|
||||
{else}
|
||||
<p class="show_fdp_info" style="text-align:center;">{l s='Les articles de cette vente seront expédiés selon le délai spécifique indiqué sur la fiche produit. Vous n’avez donc pas la possibilité d’ajouter des produits d’autres ventes. Pour continuer, veuillez valider votre commande ou vider votre panier.' mod='blockcartex'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{if $delivery_delay == 1}
|
||||
<div class="content_best_sales">
|
||||
<h3>{l s='Nos meilleures ventes' mod='blockcartex'}</h3>
|
||||
{$bestSaleCart}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div id="box_error_cart">
|
||||
|
@ -23,15 +23,20 @@
|
||||
</div>
|
||||
<div class="others_links">
|
||||
<a class="show_sales" href="{$link->getPageLink('index.php')}">{l s='Toutes les ventes'}</a>
|
||||
<a class="show_cart" href="{$link->getPageLink('order.php')}">{l s='Voir mon panier'}</a>
|
||||
<a class="show_cart" href="{$link->getPageLink('order.php')}">{l s='Voir mon panier'}</a>
|
||||
{if isset($sale) && $sale->delivery_delay == 1}
|
||||
<p class="show_fdp_info">{l s='Commandez dans plusieurs ventes au sein du même panier et profitez de frais de port uniques !'}</p>
|
||||
{else}
|
||||
<p class="show_fdp_info">{l s='Les articles de cette vente seront expédiés selon le délai spécifique indiqué sur la fiche produit. Vous n’avez donc pas la possibilité d’ajouter des produits d’autres ventes. Pour continuer, veuillez valider votre commande ou vider votre panier.'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($sale) && $sale->delivery_delay == 1}
|
||||
<div class="content_best_sales">
|
||||
<h3>{l s='Nos meilleures ventes'}</h3>
|
||||
{$bestSaleCart}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div id="box_error_cart">
|
||||
|
@ -24,10 +24,15 @@
|
||||
<div class="others_links">
|
||||
<a class="show_sales" href="{$link->getPageLink('index.php')}">{l s='Toutes les ventes'}</a>
|
||||
<a class="show_cart" href="{$link->getPageLink('order.php')}">{l s='Voir mon panier'}</a>
|
||||
{if isset($sale) && $sale->delivery_delay == 1}
|
||||
<p class="show_fdp_info">{l s='Commandez dans plusieurs ventes au sein du même panier et profitez de frais de port uniques !'}</p>
|
||||
{else}
|
||||
<p class="show_fdp_info">{l s='Les articles de cette vente seront expédiés selon le délai spécifique indiqué sur la fiche produit. Vous n’avez donc pas la possibilité d’ajouter des produits d’autres ventes. Pour continuer, veuillez valider votre commande ou vider votre panier.'}</p>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if isset($sale) && $sale->delivery_delay == 1}
|
||||
<div class="content_best_sales">
|
||||
<h3>{l s='Nos meilleures ventes'}</h3>
|
||||
{$bestSaleCart}
|
||||
|
Loading…
Reference in New Issue
Block a user