Jump to content
electriz

[Free module] Custom popup notification

Recommended Posts

1 hour ago, Artunj said:

hi, is it possible to make it one time per session?

 

 

 

Good idea, however it's not possible in current version, sorry.

 

Share this post


Link to post
Share on other sites
On 10/25/2019 at 10:56 AM, electriz said:

 

Good idea, however it's not possible in current version, sorry.

 

do you plan to make for new version?

Share this post


Link to post
Share on other sites
2 hours ago, goldies said:

It is a great module and working fine, BUT slows down the page too much and loads very long when the module is enabled (it is on every page same problem).

https://gtmetrix.com/compare/bvi0PFOp/awNS3F36

 

If you could fix this it would be great and of course i would donate 15 euro...

 

Best Regards

Igor

1. Compare Reports  www seeds-gallery shop  www seeds-gallery shop   GTmetrix.jpg

 

Well, it's adding new content and image - and it will be slower. Remember this popup is based on external source (tingle js), so it could also be a reason. I will try to make a deeper look at it.

For now I think you should try use smaller image (and compressed to make its weight (in kb) lower)?

Also, did you try disabling "delay" option and checking website performance?

Edited by electriz (see edit history)

Share this post


Link to post
Share on other sites

Hello @electriz

First let me congratulate you by this great module.

I´m having an issue on a demo page i´m testing the module on, it works great opening with a nice transition effect, but has no effect on close, it just closes, is it a problem with new browsers!!?

The strange thing is, when i inspect the element and make any change to the tingle.min.css, it can be just removing a ; an putting it back on, on some styles the close effect works when i press out of the popup (not when i close it using a button or the cross). If i change the tingle.min.css and upload it it does not do the close effect. (Tested on firefox, chrome and edge)

The demo url is https://demo.pcquatro.pt

Edit: you could also implement a onclick or hover event trigger!

Edit 1: Ok, i solved it using the tingle.min.css and tingle.min.js provided here -> https://github.com/dr0bz/tingle/tree/50-close-fix

tingle.min.css

tingle.min.js

Best regards

Edited by PCQUATRO (see edit history)

Share this post


Link to post
Share on other sites
On 10/25/2019 at 6:26 AM, Artunj said:

hi, is it possible to make it one time per session?

Yes, as a workarround, just edit /modules/custompopup/views/js/cookie.js and change the line...

document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";

to

document.cookie = cname + "=" + cvalue;

And if you want to get fancy, comment out this line in /modules/custompopup/views/templates/hook/custompopup.tpl

/*{/literal}{if !$popup_cookie && $popup_cookie == 0}{literal}
     prestacraftDeleteCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}');
  {/literal}{/if}{literal}*/

Than change this...

{/literal}{if $popup_cookie && $popup_cookie > 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}

to this...

{/literal}{if $popup_cookie > 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', 'false', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}
{/literal}{if $popup_cookie == 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', 'true', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}

And change this code...

if (prestacraftGetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}') != 'yes') {

to this...

var pcgetcookie = prestacraftGetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}', {/literal}{$popup_cookie*0.000694}{literal})
if (pcgetcookie != 'yes=true' && pcgetcookie != 'yes=false') {

And lastly change the code on /modules/custompopup/views/js/cookie.js

function prestacraftSetCookie(cname, cvalue, session, exdays) {

and...

if(exdays > 0 && session == 'false'){
	document.cookie = cname + "=" + cvalue + "=" + session + ";" + expires + ";path=/";
} else if (exdays == 0){
	document.cookie = cname + "=" + cvalue + "=" + session + ";path=/";
}

and...

if (c.indexOf(name) == 0) {
        if(exdays > 0){
		return c.substring(name.length, c.length);
	} else {
		if (getCookie(cname) == 'false') {
			document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
		} else if (exdays == 0){
			return c.substring(name.length, c.length);
		}
	}
}

Add this function...

function getCookie(name) {
    var cookieArr = document.cookie.split(";");
    for(var i = 0; i < cookieArr.length; i++) {
        var cookiePair = cookieArr[i].split("=");
        if(name == cookiePair[0].trim()) {
            return decodeURIComponent(cookiePair[2]);
        }
    }
    return null;
}

Result: When you set Cookie length to 0 in the backoffice the popup will only show 1 time per session, you have to close the browser and open it again to see the popup again...

Edit: Some refinements that do not break the modules normal operation.

But if you want the easy road, here are the changed files...

cookie.jscustompopup.tpl

Best Regards

Edited by PCQUATRO (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

@PCQUATRO

Thank you for nice words and also a lot of work and sharing a solution.

------------------

I would also like to share with you new 2.2.0 version of module which includes following changes:

  • Renamed smarty variables in order to avoid conflicts. See this GitHub issue: https://github.com/PrestaCraft/custompopup/issues/4
  • Improved BackOffice look: added animated border in menu, module links under menu, etc.
  • Fixed bug when popup could appear in BackOffice pages
  • New module logo

Link to new version as always in the first post. Enjoy.

Edited by electriz (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites

@electriz

Thanks for sharing :)

The new version throws a console error and does not work...

consoleerror.JPG.5a9986c299b8506f08709104969ca2d7.JPG

consoleerror1.JPG.fc1d2046a1770d626e15df578b9fcef6.JPG

Commenting it out works just fine...

10 hours ago, electriz said:

Improved BackOffice look: added animated border in menu, module links under menu, etc.

I don´t see any difference!

Suggestion:

You could implement an option to change the size of the popup!

You could also include the new tingle files with the close fix in the modules package!

EDIT: Loading the jquery just before the script runs, clears the error from the console, questions is, if doing that (loading jquery at the middle of the page rendering), will cause other problems!!

Best Regards

Edited by PCQUATRO (see edit history)

Share this post


Link to post
Share on other sites
1 hour ago, astronnx said:

But @PCQUATRO is right...the new version throws a console error and does not work...

Comment the line, and don´t forget to also comment the closing bracket at the end of the script (That is only to check if you are in backoffice or not and don´t run the script if you are, it´s for correcting "Fixed bug when popup could appear in BackOffice pages"), or load jquery before the script runs...

Best Regards

Share this post


Link to post
Share on other sites

Hi all,

Thanks @electriz for this great module, I have a little problem with it. It seems to not work on my client website which is here : https://www.boutique.aero/
This website use a custom theme (PS version: 1.7.4.4). When I activate the plugin, there is no error message and it doesn't show up.
On a fresh install of Prestashop it works perfectly.

The only error message I can see is when I try to add/insert an image, I get this "There is an error! The upload folder there isn't. Check your config.php file." 

Someone can help me, kind of new about Prestashop

Edited by Albert Ozouaki
version of PS added (see edit history)

Share this post


Link to post
Share on other sites
5 hours ago, Albert Ozouaki said:

This website use a custom theme (PS version: 1.7.4.4). When I activate the plugin, there is no error message and it doesn't show up.

Check the browser console for errors!

Best regards

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, PCQUATRO said:

Check the browser console for errors!

Best regards

I have a ReferenceError : $ is not defined
I read that I need to comment but I don't see where in the plugin folder
Can you show me please ?

Share this post


Link to post
Share on other sites
8 hours ago, Albert Ozouaki said:

I have a ReferenceError : $ is not defined
I read that I need to comment but I don't see where in the plugin folder
Can you show me please ?

modules/custompopup/views/templates/hook/custompopup.tpl

comment.JPG.5077efbec34449f561ad5dee2d76589f.JPG

comment1.JPG.d9a55699705ec43828fa4eab90a0720d.JPG

Best regards

  • Like 1

Share this post


Link to post
Share on other sites

Sorry for that issue you may got.
I've released 2.3.0 version which now is checking that in PHP hook function instead.
Please try with new version (in the first post).

@PCQUATRO Again many thanks for helping users, I was unable to help in last few days.

Share this post


Link to post
Share on other sites
On 12/3/2019 at 3:43 PM, PCQUATRO said:

I don´t see any difference!

 

I have not completely changed BackOffice look, just slightly modified it to make it more clear.

Have a look at this image where you'll see the difference.

 

diff.png

Edited by electriz (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites
15 minutes ago, electriz said:

Sorry for that issue you may got.
I've released 2.3.0 version which now is checking that in PHP hook function instead.
Please try with new version (in the first post).

@PCQUATRO Again many thanks for helping users, I was unable to help in last few days.

Now run fine!

Thanks!!! :)

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, electriz said:

@PCQUATRO Again many thanks for helping users, I was unable to help in last few days.

That´s what this forums are for, to help eatch other :) thank you for sharing it for the comunity...

Note: i had a better look at the BackOffice and noticed the diferences :)

Best Regards

Edited by PCQUATRO (see edit history)

Share this post


Link to post
Share on other sites

Hi electriz,

first of all, thank you very much for providing that plug-in!

Second: I recognized that the plugin does not work with the "debug"-mode turned on. In that case I'll get an error:

ContextErrorException

Notice: Trying to get property 'id' of non-object

Nothing bad, but good to know ;)

BR

Alex

Share this post


Link to post
Share on other sites
24 minutes ago, AlexElbracht said:

Hi electriz,

first of all, thank you very much for providing that plug-in!

Second: I recognized that the plugin does not work with the "debug"-mode turned on. In that case I'll get an error:


ContextErrorException

Notice: Trying to get property 'id' of non-object

Nothing bad, but good to know ;)

BR

Alex

This error is a php-related problem. Which php-version are you using, and which Prestashop version ?

Share this post


Link to post
Share on other sites
8 minutes ago, selectshop.at said:

This error is a php-related problem. Which php-version are you using, and which Prestashop version ?

We have PHP: 7.2.25 and Prestahop: 1.7.2.5

Share this post


Link to post
Share on other sites
7 minutes ago, AlexElbracht said:

We have PHP: 7.2.25 and Prestahop: 1.7.2.5

Module developer should debug the problem.

Share this post


Link to post
Share on other sites
6 hours ago, AlexElbracht said:

Second: I recognized that the plugin does not work with the "debug"-mode turned on. In that case I'll get an error:


ContextErrorException

Notice: Trying to get property 'id' of non-object

Try commenting line 386 of custompopup.php like this...

custompopupdebug1.JPG.dbf8bbf27466783e2a0c97849eaf5032.JPG

Or! if you don´t want to break the code you can use this...

if(_PS_MODE_DEV_ != true){	
	if (!Context::getContext()->employee->id) {
           return $this->display(__FILE__, 'custompopup.tpl');
       }
}

Best Regards

Edited by PCQUATRO (see edit history)
  • Thanks 1

Share this post


Link to post
Share on other sites
16 hours ago, PCQUATRO said:

Try commenting line 386 of custompopup.php like this...

custompopupdebug1.JPG.dbf8bbf27466783e2a0c97849eaf5032.JPG

Or! if you don´t want to break the code you can use this...


if(_PS_MODE_DEV_ != true){	
	if (!Context::getContext()->employee->id) {
           return $this->display(__FILE__, 'custompopup.tpl');
       }
}

Best Regards

Perfect mate!

Share this post


Link to post
Share on other sites

Hi Electriz,
I'm having an issue after updating your module to the latest version 2.3.0.

My site is on PS 1.7.5.2

Previously, I only set the pop-up view on the product page. So I just ticked the "products" box and it worked regularly.

Now, checking the same box, the popup does not appear on the products page.
I tried to disable, uninstall, delete the folder and reinstall everything again but it doesn't work.

Which box should I tick to see the popup only on the products page? And is there a way to show the popup only one time for session?


Kind regards.
Mario

Edited by emmebarbagallo (see edit history)

Share this post


Link to post
Share on other sites
8 hours ago, emmebarbagallo said:

Which box should I tick to see the popup only on the products page? And is there a way to show the popup only one time for session?

You might have set a high Cookie length, you should remove the cookies or try it in another browser! on in a private session! (You can always revert back to the version that worked as expected)

As for the second question you just have to read above and you will find a solution!

Best Regards

Share this post


Link to post
Share on other sites
33 minutes ago, PCQUATRO said:

You might have set a high Cookie length, you should remove the cookies or try it in another browser! on in a private session! (You can always revert back to the version that worked as expected)

As for the second question you just have to read above and you will find a solution!

Best Regards

Hi PCQUATRO,
thanks for your answer.

Anyway I've the same cookie lenght I had before with the previous version (5 minutes). Is it high?
About the other question, yes, i read that solution but i asked coz i thinked could be nice this setting for a future version. Isn't it?

I've another question, please. Would it be possible to set the popup so that the site behind it appears regularly? I've seen that is possible to set transparency or a background color for the background. But what if I just want the popup overlay in the middle of the page?

Kind regards.

Mario

Edited by emmebarbagallo (see edit history)

Share this post


Link to post
Share on other sites
3 minutes ago, emmebarbagallo said:

Anyway I've the same cookie lenght I had before with the previous version (5 minutes). Is it high?

I don´t see any problem with that, you could have set for example 99999999 that´s high :)

4 minutes ago, emmebarbagallo said:

About the other question, yes, i read that solution but i asked coz i thinked could be nice this setting for a future version. Isn't it?

yes it would be great.

4 minutes ago, emmebarbagallo said:

I've another question, please. Would it be possible to set the popup so that the site behind it appears regularly? I've seen that is possible to set transparency or a background color for the background. But what if I just want the popup overlay in the middle of the page?

just comment the background property from tingle.min.css or put a background in /themes/classic/assets/css/custom.css, like the following...

.tingle-modal {
	background: rgba(0, 0, 0,0);
}

backgroundpopup.thumb.JPG.9a981367d60336a4cee68771dd11a4e0.JPG

Best Regards

  • Like 1

Share this post


Link to post
Share on other sites
On 11/30/2019 at 9:48 PM, PCQUATRO said:

Yes, as a workarround, just edit /modules/custompopup/views/js/cookie.js and change the line...


document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";

to


document.cookie = cname + "=" + cvalue;

And if you want to get fancy, comment out this line in /modules/custompopup/views/templates/hook/custompopup.tpl


/*{/literal}{if !$popup_cookie && $popup_cookie == 0}{literal}
     prestacraftDeleteCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}');
  {/literal}{/if}{literal}*/

Than change this...


{/literal}{if $popup_cookie && $popup_cookie > 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}

to this...


{/literal}{if $popup_cookie > 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', 'false', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}
{/literal}{if $popup_cookie == 0}{literal}
prestacraftSetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}',
    'yes', 'true', {/literal}{$popup_cookie*0.000694}{literal});
{/literal}{/if}{literal}

And change this code...


if (prestacraftGetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}') != 'yes') {

to this...


var pcgetcookie = prestacraftGetCookie('responsive_popup_{/literal}{Context::getContext()->shop->id}{literal}', {/literal}{$popup_cookie*0.000694}{literal})
if (pcgetcookie != 'yes=true' && pcgetcookie != 'yes=false') {

And lastly change the code on /modules/custompopup/views/js/cookie.js


function prestacraftSetCookie(cname, cvalue, session, exdays) {

and...

if(exdays > 0 && session == 'false'){
	document.cookie = cname + "=" + cvalue + "=" + session + ";" + expires + ";path=/";
} else if (exdays == 0){
	document.cookie = cname + "=" + cvalue + "=" + session + ";path=/";
}

and...

if (c.indexOf(name) == 0) {
        if(exdays > 0){
		return c.substring(name.length, c.length);
	} else {
		if (getCookie(cname) == 'false') {
			document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
		} else if (exdays == 0){
			return c.substring(name.length, c.length);
		}
	}
}

Add this function...

function getCookie(name) {
    var cookieArr = document.cookie.split(";");
    for(var i = 0; i < cookieArr.length; i++) {
        var cookiePair = cookieArr[i].split("=");
        if(name == cookiePair[0].trim()) {
            return decodeURIComponent(cookiePair[2]);
        }
    }
    return null;
}

Result: When you set Cookie length to 0 in the backoffice the popup will only show 1 time per session, you have to close the browser and open it again to see the popup again...

Edit: Some refinements that do not break the modules normal operation.

But if you want the easy road, here are the changed files...

cookie.js 2.02 kB · 1 download custompopup.tpl 8.64 kB · 3 downloads

Best Regards

Sorry PCQUATRO if I continue to ask... but is this solution good for the last version too? (2.3.0)
Is it necessary just the first step changing the code you wrote on cookie.js or I've to change every line (of the *.tpl too) to have the popup only for time for session?

Kind regards.
Mario

Share this post


Link to post
Share on other sites
39 minutes ago, emmebarbagallo said:

Sorry PCQUATRO if I continue to ask... but is this solution good for the last version too? (2.3.0)
Is it necessary just the first step changing the code you wrote on cookie.js or I've to change every line (of the *.tpl too) to have the popup only for time for session?

Yes, it´s good for the latest version.

You have to do all the steps.

Best Regards

Share this post


Link to post
Share on other sites

Hi, Like your module but this one crash when i choose a hook.

1326840455_Capturedcran2020-02-1116_49_14.png.ed704abb70fe1a47bb3d9e99f1665503.png

Share this post


Link to post
Share on other sites
35 minutes ago, Tiri said:

Hi, Like your module but this one crash when i choose a hook.

I´ve choosen several hooks and none gave me any kind of problem!! what is your versions of the shop and php?

Best Regards

Share this post


Link to post
Share on other sites
il y a 4 minutes, PCQUATRO a dit :

I´ve choosen several hooks and none gave me any kind of problem!! what is your versions of the shop and php?

Best Regards

🙂 Prestashop 1.7.6.3 with Mamp local for testing.

Version de PHP : 7.2.21

Theme Classic... I use a new version each time for testing new module... Do you i try online ?

Share this post


Link to post
Share on other sites
14 minutes ago, Tiri said:

🙂 Prestashop 1.7.6.3 with Mamp local for testing.

Version de PHP : 7.2.21

Theme Classic... I use a new version each time for testing new module... Do you i try online ?

I´ve tested it 1.7.6.1 and 1.7.6.2 and have no problem at all, yes online...

Best Regards

Share this post


Link to post
Share on other sites

Ok i try online and ... Crashhhh 😉

do you want access?460466585_Capturedcran2020-02-1117_51_38.thumb.png.f8a1061a0f319d817d46a52db4942cf6.png

Share this post


Link to post
Share on other sites
On 2/11/2020 at 4:52 PM, Tiri said:

Ok i try online and ... Crashhhh 😉

do you want access?

Witch hooks are you selecting? Do you have any extra modules or overrides? Try disabling them! Have you cleared the Cache!!!

I´m using a modified custom pop up but that should not interfere with it working or not.

Best Regards

Share this post


Link to post
Share on other sites

I disable all modules and no overrides

Witch hooks are you selecting? 

I try with all...

I try with a new prestashop with mamp in local... Doesn't work

I try with a new prestashop online... Doesn't work...

I speak about in debug mode...Ok 

Because in normal mode it's work... But there is many errors in debug mode. Do you try yourself ?

 

Share this post


Link to post
Share on other sites

(1/1) ContextErrorException

Notice: Trying to get property 'id' of non-object

in custompopup.php line 386

at CustomPopup->functionHook(array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in custompopup.php line 83

at CustomPopup->__call('hookdisplayFooter', array(array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1)))in Hook.php line 970

at HookCore::coreCallHook(object(CustomPopup), 'hookdisplayFooter', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 355

at HookCore::callHookOn(object(CustomPopup), 'displayFooter', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1))in Hook.php line 907

at HookCore::exec('displayFooter', array('smarty' => object(SmartyDevTemplate), 'cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 1), null)in smarty.config.inc.php line 167

at smartyHook(array('h' => 'displayFooter'), object(SmartyDevTemplate))in SmartyLazyRegister.php line 83

at SmartyLazyRegister->__call('smartyHook', array(array('h' => 'displayFooter'), object(SmartyDevTemplate)))in 384c238121db933c05f2df1101ddfc0cca332942_2.file.footer.tpl.php line 92

at Block_21013916275e44693432ab83_56475040->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_21013916275e44693432ab83_56475040), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_21013916275e44693432ab83_56475040))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_21013916275e44693432ab83_56475040', 'hook_footer')in 384c238121db933c05f2df1101ddfc0cca332942_2.file.footer.tpl.php line 39

at content_5e44693432f5e1_56018464(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('file:_partials/footer.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 0, false)in 960e93ba00810224de7891ba6cee67d83c9dfe72_2.file.layout-both-columns.tpl.php line 333

at Block_9924691515e4469340eea65_86888889->callBlock(object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 248

at Smarty_Internal_Runtime_Inheritance->callBlock(object(Block_9924691515e4469340eea65_86888889), object(SmartyDevTemplate))in smarty_internal_runtime_inheritance.php line 184

at Smarty_Internal_Runtime_Inheritance->process(object(SmartyDevTemplate), object(Block_9924691515e4469340eea65_86888889))in smarty_internal_runtime_inheritance.php line 156

at Smarty_Internal_Runtime_Inheritance->instanceBlock(object(SmartyDevTemplate), 'Block_9924691515e4469340eea65_86888889', 'footer')in 960e93ba00810224de7891ba6cee67d83c9dfe72_2.file.layout-both-columns.tpl.php line 102

at content_5e4469340f2791_43010984(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-both-columns.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-both-columns.tpl')in 7e510ea3c6db9467ffa7ec3bbca2cd27b9f7ec91_2.file.layout-full-width.tpl.php line 42

at content_5e4469340c8328_48966627(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('layouts/layout-full-width.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'layouts/layout-full-width.tpl')in 43d2cb1f080b26630ad79015df881554468c91ad_2.file.page.tpl.php line 33

at content_5e4469340b44e7_72773414(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render()in smarty_internal_template.php line 385

at Smarty_Internal_Template->_subTemplateRender('page.tpl', null, 'layouts/layout-full-width.tpl', 0, 3600, array(), 2, false, null, null)in smarty_internal_runtime_inheritance.php line 125

at Smarty_Internal_Runtime_Inheritance->endChild(object(SmartyDevTemplate), 'page.tpl')in 570d4f1767d2baab79def580579c05b153ab5d1c_2.file.index.tpl.php line 33

at content_5e4469340989a6_80387581(object(SmartyDevTemplate))in smarty_template_resource_base.php line 123

at Smarty_Template_Resource_Base->getRenderedTemplateCode(object(SmartyDevTemplate))in smarty_template_compiled.php line 114

at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216

at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232

at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, 'layouts/layout-full-width.tpl', null, 0)in smarty_internal_templatebase.php line 116

at Smarty_Internal_TemplateBase->fetch('index.tpl', null, 'layouts/layout-full-width.tpl', null, false, true, false)in SmartyDev.php line 40

at SmartyDev->fetch('index.tpl', null, 'layouts/layout-full-width.tpl')in FrontController.php line 683

at FrontControllerCore->smartyOutputContent('index.tpl')in FrontController.php line 667

at FrontControllerCore->display()in Controller.php line 312

at ControllerCore->run()in Dispatcher.php line 515

at DispatcherCore->dispatch()in index.php line 28

Share this post


Link to post
Share on other sites
1 hour ago, Tiri said:

I disable all modules and no overrides

Witch hooks are you selecting? 

I try with all...

I try with a new prestashop with mamp in local... Doesn't work

I try with a new prestashop online... Doesn't work...

I speak about in debug mode...Ok 

Because in normal mode it's work... But there is many errors in debug mode. Do you try yourself ?

Hoooooo in debug mode it gives errors (the shop is not supposed to be in debug mode for production)...

Try reading above -> 

Best Regards

Share this post


Link to post
Share on other sites

if (_PS_MODE_DEV_! = true) { if (! Context :: getContext () -> employee-> id) { return $ this-> display (__ FILE__, 'custompopup.tpl'); } }

it doesn't work for me. I check again...

Try commenting line 386 of custompopup.php

Working, so for now it's ok...

Why it's do like thist ?
Well it doesn't matter if it works ... It takes a very long time to read all the comments and often we pass some of them ... Maybe putting this at the top of the list would be good because this problem seems to recur.

Thank a lot for your module.... Have a nice day 🙂

 

Share this post


Link to post
Share on other sites

And for the background in custom.cs

"just comment the background property from tingle.min.css or put a background in /themes/classic/assets/css/custom.css, like the following..."

.tingle-modal { background: rgba(0,0,0,0); }

Doesn't work !

Share this post


Link to post
Share on other sites
2 hours ago, Tiri said:

if (_PS_MODE_DEV_! = true) { if (! Context :: getContext () -> employee-> id) { return $ this-> display (__ FILE__, 'custompopup.tpl'); } }

You are missing a space between _PS_MODE_DEV_ and the ! = true

2 hours ago, Tiri said:

Why it's do like thist ?

It disables the popup in debug mode...

2 hours ago, Tiri said:

Thank a lot for your module.... Have a nice day

Not my module, It´s @electriz module...

 

1 hour ago, Tiri said:

And for the background in custom.cs

"just comment the background property from tingle.min.css or put a background in /themes/classic/assets/css/custom.css, like the following..."

.tingle-modal { background: rgba(0,0,0,0); }

Doesn't work !

For me it worked just fine...

Best Regards

Share this post


Link to post
Share on other sites

- You are missing a space between _PS_MODE_DEV_ and the ! = true

It's true 🙂 ... Now it's working fine... 

- Not my module, It´s @electriz module...

Thank you very much @electriz module for this nice module and free 😉

- For me it worked just fine...

BUT

.tingle-modal {background: rgba (0, 0, 0, 0);}    I do somthing wrong ? Maybe, sure because dosen't work forme... Space no space !? 

Have a nice night... And thank a lot for your support

Share this post


Link to post
Share on other sites
49 minutes ago, Tiri said:

.tingle-modal {background: rgba (0, 0, 0, 0);}    I do somthing wrong ? Maybe, sure because dosen't work forme... Space no space !? 

You have to make it !important

Best Regards

Share this post


Link to post
Share on other sites
Il y a 7 heures, cdkey a dit :

hello if you want buy popup module please check module here store.kora26.com if you want buy it with $20 

Vous êtes hors sujet. Si j’avais eu besoin d'acheter un module j’irais sur le store

Share this post


Link to post
Share on other sites
Il y a 8 heures, PCQUATRO a dit :

You have to make it !important

Best Regards


.tingle-modal {
    background: rgba(0, 0, 0, 0)!important ;
    }

 

It is ?

Edited by Tiri (see edit history)

Share this post


Link to post
Share on other sites
45 minutes ago, Tiri said:

.tingle-modal {
    background: rgba(0, 0, 0, 0)!important ;
    }

 

It is ?

.tingle-modal {
	background: rgba(0, 0, 0, 0) !important;
}

Don´t forget the space!

Best Regards

Share this post


Link to post
Share on other sites

I did exactly that, it doesn't work.
I then made a copied paste in case or it does not work either ... Weird!

The only difference is that the transparent background changes from dark to light ... See capture.

But I wish I had no background, just transparency ... Rooo I'm sorry

1080398041_Capturedcran2020-02-1410_29_17.thumb.png.1fe2a54d20c19ed0cf0e62f60c9d5d0e.png

Share this post


Link to post
Share on other sites
1 hour ago, Tiri said:

I did exactly that, it doesn't work.
I then made a copied paste in case or it does not work either ... Weird!

The only difference is that the transparent background changes from dark to light ... See capture.

But I wish I had no background, just transparency ... Rooo I'm sorry

That depends on the browser, you should add the following code to your custom.css...

.tingle-modal {
	background: rgba(0, 0, 0, 0) !important;
	-webkit-backdrop-filter: blur(0px) !important;
	backdrop-filter: blur(0px) !important;
}

Best Regards

Share this post


Link to post
Share on other sites

🙂  hooouuuuu and well here!
how it puts me in my place 😉 here is the right order and the background is finally transparent ... YouHHOUUU
Thank you for your time, thank you for not being annoyed
Thanks again to the dev of this module ...
thanks thanks thanks:-) 😉  Best best everything 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More