diff --git a/modules/ant_promobanner/AdminAntPromobanner.php b/modules/ant_promobanner/AdminAntPromobanner.php index 653b2079..af2673e8 100644 --- a/modules/ant_promobanner/AdminAntPromobanner.php +++ b/modules/ant_promobanner/AdminAntPromobanner.php @@ -23,6 +23,8 @@ class AdminAntPromobanner extends AdminTab foreach(Language::getLanguages(false) as $language) { Configuration::updateValue('ANT_PROMO_BANNER_2',Tools::getValue('enabled_fr', 0)); Configuration::updateValue('ANT_PROMO_BANNER_3',Tools::getValue('enabled_es', 0)); + Configuration::updateValue('ANT_PROMO_BANNERURL_2',Tools::getValue('url_2', '')); + Configuration::updateValue('ANT_PROMO_BANNERURL_3',Tools::getValue('url_3', '')); foreach(array_keys($this->imagelist) as $img) { if(isset($_FILES['img_'.$img.'_'.$language['id_lang']]) && $_FILES['img_'.$img.'_'.$language['id_lang']]['name'] != '') { if(!copy($_FILES['img_'.$img.'_'.$language['id_lang']]['tmp_name'], _PS_ROOT_DIR_.'/modules/ant_promobanner/img/img_'.$img.'_'.$language['id_lang'].'.jpg')) { @@ -43,7 +45,7 @@ class AdminAntPromobanner extends AdminTab foreach(array_keys($this->imagelist) as $img) { $images[] = 'img_'.$img; } - $divLangImgName = 'img_bmobile'; + $divLangName = 'img_bmobile¤url'; $helper = new HelperFormBootstrap(); $helper->_select2 = true; @@ -87,6 +89,26 @@ class AdminAntPromobanner extends AdminTab $html.= $helper->generateInput($input); $html.= '
'; + $urldefaults = array( + 2 => Configuration::get('ANT_PROMO_BANNERURL_2'), + 3 => Configuration::get('ANT_PROMO_BANNERURL_3') + ); + $input = array( + 'type' => 'text', + 'label' => $this->l('Url :'), + 'lang' => true, + 'name' => 'url', + 'id' => 'url', + 'required' => true, + 'help' => "Renseignez l'url sans le http ou https, ex : //www.bebeboutik.com/8737618-boumy", + 'languages' => $languages, + 'id_langs' => $divLangName, + 'link_flag_img' => '../img/l/', + 'default' => $urldefaults + ); + $html.= $helper->generateInput($input); + $html.= ''; + foreach($this->imagelist as $k => $v) { $input = array( 'type' => 'uploadImage', @@ -99,7 +121,7 @@ class AdminAntPromobanner extends AdminTab 'languages' => $languages, 'default_language' => 2, 'input-class' => '', - 'id_langs' => $divLangImgName, + 'id_langs' => $divLangName, 'link_flag_img' => '../img/l/', 'url_imgs' => __PS_BASE_URI__.'modules/ant_promobanner/img/', 'url_to_show' => _PS_ROOT_DIR_.'/modules/ant_promobanner/img/', diff --git a/modules/privatesales/privatesales.php b/modules/privatesales/privatesales.php index 65f418e1..2ac5ecca 100755 --- a/modules/privatesales/privatesales.php +++ b/modules/privatesales/privatesales.php @@ -416,6 +416,7 @@ class PrivateSales extends Module { $smarty->assign(array( 'path' => __PS_BASE_URI__.'modules/privatesales/', 'is_banner_enable' => (int)Configuration::get('ANT_PROMO_BANNER_'.$cookie->id_lang), + 'is_banner_link' => (!empty(Configuration::get('ANT_PROMO_BANNERURL_'.$cookie->id_lang))?Configuration::get('ANT_PROMO_BANNERURL_'.$cookie->id_lang):false), 'banner_url' => __PS_BASE_URI__.'modules/ant_promobanner/img/', 'sales' => $sales, 'HOOK_PRIVATESALES_LISTING' => Module::hookExec('privatesales_listing', array('sales' => $sales, 'futuresales' => $futuresales)), diff --git a/themes/site/modules/privatesales/home.tpl b/themes/site/modules/privatesales/home.tpl index 14d606a3..d60be209 100755 --- a/themes/site/modules/privatesales/home.tpl +++ b/themes/site/modules/privatesales/home.tpl @@ -192,9 +192,9 @@ onclick="window.location.href='{$link->getCategoryLink($sale->id_category, $sale->alias[$cookie->id_lang])|escape:'htmlall':'UTF-8'}';" {/if}> {**} - + {if $sale->id!=7639} {include file="./themes/site/delay.tpl" delivery_delay=$sale->delivery_delay} - + {/if}