Merge remote-tracking branch 'origin/ticket/r13721-mobile-inscription' into dev
This commit is contained in:
commit
d933061f6a
@ -35,20 +35,18 @@ class FrontController extends FrontControllerCore
|
|||||||
parent::setMedia();
|
parent::setMedia();
|
||||||
$this->addCSS(_THEME_CSS_DIR_.'global2.css', 'all');
|
$this->addCSS(_THEME_CSS_DIR_.'global2.css', 'all');
|
||||||
}
|
}
|
||||||
/*public function init(){
|
|
||||||
if (class_exists('Mobile_Detect')) {
|
|
||||||
$mobile = new Mobile_Detect();
|
|
||||||
if($mobile->isMobile() && !$mobile->isTablet() && $_SERVER['REMOTE_ADDR'] != "88.120.248.124" && $_SERVER['REMOTE_ADDR'] != "88.120.249.228"){
|
|
||||||
Tools::redirect('http://m.privilegedemarque.com');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::init();
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public function init(){
|
public function init()
|
||||||
|
{
|
||||||
|
// Detection provenance campagne email depuis mobile et non connecté
|
||||||
|
if ($this->context->mobile_detect->isMobile() && !Customer::isLogged()){
|
||||||
|
$popup = Tools::getValue('popup');
|
||||||
|
$source = Tools::getValue('source');
|
||||||
|
if ($popup == 1 && !empty($source)) {
|
||||||
|
Tools::redirect($this->context->link->getPageLink('authentication', true).'?create_account=1');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($this->context->cookie->account_created))
|
if (isset($this->context->cookie->account_created))
|
||||||
$this->context->smarty->assign('customer', $this->context->customer);
|
$this->context->smarty->assign('customer', $this->context->customer);
|
||||||
if (isset($this->context->cookie->just_logged_in)) {
|
if (isset($this->context->cookie->just_logged_in)) {
|
||||||
@ -88,10 +86,9 @@ class FrontController extends FrontControllerCore
|
|||||||
);
|
);
|
||||||
$this->context->smarty->assign('popup_free_shipping', false);
|
$this->context->smarty->assign('popup_free_shipping', false);
|
||||||
$this->context->smarty->assign('homebg_active', Configuration::get('PRIVATESALES_HOME_BG'));
|
$this->context->smarty->assign('homebg_active', Configuration::get('PRIVATESALES_HOME_BG'));
|
||||||
if(in_array($page_name, $array_page_name_popup_shipping)
|
if(in_array($page_name, $array_page_name_popup_shipping) && false) //DESACTIVE
|
||||||
&& false) //DESACTIVE
|
{
|
||||||
{
|
$cookie_name_popup_shipping = 'p-fsh';
|
||||||
$cookie_name_popup_shipping = 'p-fsh';
|
|
||||||
if(!isset($_COOKIE[$cookie_name_popup_shipping])
|
if(!isset($_COOKIE[$cookie_name_popup_shipping])
|
||||||
&& !Validate::isLoadedObject($this->context->customer))
|
&& !Validate::isLoadedObject($this->context->customer))
|
||||||
{
|
{
|
||||||
@ -124,8 +121,8 @@ class FrontController extends FrontControllerCore
|
|||||||
|
|
||||||
if(count($errors) == 0)
|
if(count($errors) == 0)
|
||||||
{
|
{
|
||||||
$res = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer
|
$res = Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'customer
|
||||||
SET
|
SET
|
||||||
passwd = "'.pSQL(Tools::encrypt($password)).'",
|
passwd = "'.pSQL(Tools::encrypt($password)).'",
|
||||||
pro_update = 1
|
pro_update = 1
|
||||||
WHERE id_customer = '.$this->context->customer->id);
|
WHERE id_customer = '.$this->context->customer->id);
|
||||||
@ -148,7 +145,7 @@ class FrontController extends FrontControllerCore
|
|||||||
$error_popup = false;
|
$error_popup = false;
|
||||||
if( $this->context->customer->firstname == 'Membre' && $this->context->customer->lastname == 'Privilégié' && $page_name == "order"){
|
if( $this->context->customer->firstname == 'Membre' && $this->context->customer->lastname == 'Privilégié' && $page_name == "order"){
|
||||||
$launch_popup = true;
|
$launch_popup = true;
|
||||||
}
|
}
|
||||||
if(Tools::isSubmit('SubmitChangeName')){
|
if(Tools::isSubmit('SubmitChangeName')){
|
||||||
$launch_popup = true;
|
$launch_popup = true;
|
||||||
$error_popup = true;
|
$error_popup = true;
|
||||||
|
@ -319,14 +319,10 @@
|
|||||||
}
|
}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if(mobilecheck()==false){
|
if(mobilecheck()==false){
|
||||||
$(function(){
|
$('a.loggin_button').on('touchstart', function(e){
|
||||||
$('a.loggin_button').on('touchstart', function(e){
|
e.stopPropagation();
|
||||||
e.stopPropagation();
|
e.preventDefault();
|
||||||
e.preventDefault();
|
|
||||||
alert("Clicked");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("div.product-container").attr('onclick', '');
|
$("div.product-container").attr('onclick', '');
|
||||||
$("div.sale_desc").attr('onclick', '');
|
$("div.sale_desc").attr('onclick', '');
|
||||||
$("div.sale_container").attr('onclick', '');
|
$("div.sale_container").attr('onclick', '');
|
||||||
@ -341,7 +337,6 @@
|
|||||||
href = $(this).find('a.button-grey').attr('href');
|
href = $(this).find('a.button-grey').attr('href');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.privatesales_popup_connection').find('input[name=back]').val(href);
|
$('.privatesales_popup_connection').find('input[name=back]').val(href);
|
||||||
$('.popup_overlay').fadeIn(100);
|
$('.popup_overlay').fadeIn(100);
|
||||||
$('.privatesales_popup_connection').fadeIn(250);
|
$('.privatesales_popup_connection').fadeIn(250);
|
||||||
@ -372,9 +367,9 @@
|
|||||||
{/literal}{/if}{literal}
|
{/literal}{/if}{literal}
|
||||||
{/literal}{/if}{literal}
|
{/literal}{/if}{literal}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$(".sale a.button-grey, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale, #category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
|
$(".sale a.button-grey, div.product-container a, div.product-container a.button-grey, .breadcrumb a, a.back_, a.back_sale, #category #header_logo a,#category #block_top_menu ul li:first-child,#product #header_logo a,#product #block_top_menu ul li:first-child, a.loggin_button, .slide-home a").on('click touchstart', function(e) {
|
||||||
e.preventDefault();
|
e.stopPropagation();
|
||||||
$(location).attr('href',"{/literal}{$base_dir}ventes-privees?create_account=1{literal}");
|
$(location).attr('href',"{/literal}{$base_dir}ventes-privees?create_account=1{literal}");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user