modif error message
This commit is contained in:
parent
d63a2d7d5a
commit
96ca86fe85
@ -30,7 +30,7 @@ class OrderController extends OrderControllerCore {
|
||||
|
||||
if(Module::isInstalled('privatesales')) {
|
||||
$removed = FALSE;
|
||||
|
||||
$products_only_fr = array();
|
||||
foreach(self::$cart->getProducts() as $product) {
|
||||
if(($sale = Sale::getSaleFromCategory($product['id_category_default'])) !== NULL) {
|
||||
if($sale->isFinished() || !$sale->enabled) {
|
||||
@ -39,12 +39,17 @@ class OrderController extends OrderControllerCore {
|
||||
}
|
||||
}
|
||||
// shipping only in france
|
||||
if ($this->step > 1){
|
||||
$delivery = new Address(self::$cart->id_address_delivery);
|
||||
if($sale->shipping_fr == 1 && $delivery->id_country != 8 && !Tools::getValue('ajax')) {
|
||||
$this->step = 1;
|
||||
Tools::redirect('order.php?step=1&onlyfr=1');
|
||||
}
|
||||
if($sale->shipping_fr == 1) {
|
||||
$products_only_fr[] = $product['name'];
|
||||
self::$smarty->assign('products_fr',$products_only_fr);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($products_only_fr) && $this->step == 2) {
|
||||
$delivery = new Address(self::$cart->id_address_delivery);
|
||||
if ($delivery->id_country != 8 && !Tools::getValue('ajax')) {
|
||||
$this->step = 1;
|
||||
Tools::redirect('order.php?step=1&onlyfr=1');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,9 +168,9 @@ class ParentOrderController extends ParentOrderControllerCore {
|
||||
// distinction "at home" et "out of home"
|
||||
$carriers_ah = array();
|
||||
$carriers_ooh = array();
|
||||
$config_carrier_ooh = array(88,89); // prod
|
||||
// $config_carrier_ooh = array(88,89); // prod
|
||||
$config_carrier_ooh = array(47,48); // dev
|
||||
// $config_carrier_ooh = array(40,45); // local
|
||||
// $config_carrier_ooh = array(40,45); // local
|
||||
foreach ($carriers as $carrier) {
|
||||
// if($shipping_only_athome && $carrier['id_carrier'] != 87) { // prod
|
||||
if($shipping_only_athome && $carrier['id_carrier'] != 45) { // dev
|
||||
|
@ -166,9 +166,11 @@
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
{if $smarty.get.onlyfr}
|
||||
<div class="error">
|
||||
<p>{l s='There is an error'} :</p>
|
||||
<p>{l s='Nous sommes désolé, un ou plusieurs produits de votre panier ne peuvent être livrés en dehors de la France. Nous nous excusons pour le désagrément causé'} :</p>
|
||||
<ol>
|
||||
<li>{l s='Nous sommes désolé, un ou plusieurs produits de votre panier ne peuvent être livrés en dehors de la France. Nous nous excusons pour le désagrément causé'}</li>
|
||||
{foreach from=$products_fr item=product key=key}
|
||||
<li>{$product}</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -162,6 +162,16 @@
|
||||
{include file="$tpl_dir./order-steps.tpl"}
|
||||
|
||||
{include file="$tpl_dir./errors.tpl"}
|
||||
{if $smarty.get.onlyfr}
|
||||
<div class="error">
|
||||
<p>{l s='Nous sommes désolé, un ou plusieurs produits de votre panier ne peuvent être livrés en dehors de la France. Nous nous excusons pour le désagrément causé'} :</p>
|
||||
<ol>
|
||||
{foreach from=$products_fr item=product key=key}
|
||||
<li>{$product}</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
</div>
|
||||
{/if}
|
||||
{if $smarty.get.domtom || $smarty.get.canaries}
|
||||
<div class="error">
|
||||
<p>{l s='There is'} {l s='error'} :</p>
|
||||
|
Loading…
Reference in New Issue
Block a user