Jump to content

[Module] Pop up message when leaving shop


Recommended Posts

You know these sites where annoying messages keep popping up all the time? Well, this module was meant to be only slightly annoying.

  • At most displayed once a day.
  • Uses a cookie to count number of pages loaded. Only active if more than 3 pages were loaded.
  • When the shop is left, a message pops up (begging the potential customer to stay).
  • If the user has logged in, nothing happens.

If the user presses F5 or clicks the reload icon the popup message will also appear. I haven't found a good solution for this.

 

With some browsers (like Opera) this won't work at all.

 

Edit 2011-10-03: Added a new version that is supposed to work with PrestaShop 1.4.

 

 

/Kjeld

popup.zip

popup_0.2.zip

  • Like 3

Share this post


Link to post
Share on other sites

Please write in English in this part of the forum.

You can change the text directly in the .tpl file or in the modules translation page. An improvement could be if the module could extract (or perhaps create) the relevant voucher code from the system.

/Kjeld

Share this post


Link to post
Share on other sites
  • 2 weeks later...

Hi Damien.

I tried looking deeper into it, but without luck. It could be you have another module that overwrites the onunload method. Perhaps you could try with a fresh install of PrestaShop in another directory and see if you can get the module to work.

/Kjeld

Share this post


Link to post
Share on other sites

ok thanks don't worry.
I have more trouble to exploit my DDB... for example extract information of how many products are still not sold. And as I'm selling food, I'd like to have a field to know the date of the end of the limit date.

Damien

Share this post


Link to post
Share on other sites
  • 1 year later...

Thank you very much for sharing the module. I have just intalled and it works. However, I have a problme with the module. If the user leave at hoem page, it is ok, but if the user leave at a product page under a category, it pop up the black page and says the page can't be find.

 

I checked the js file and found out this code:

 

var page = "modules/popup/voucher.php";

 

and also: window.open(page, "", windowprops);

 

I understand that the windown open the base url + page So that if the user is at "stocking" category, the base url will be: http://www.lovestation.com.au/stocking and the window will try to open this url: http://www.lovestation.com.au/stocking/modules/popup/voucher.php which doen't exist!

 

So, please help me how can I fixed this issue? this is my shop and you can try: http://www.lovestation.com.au

 

Thank you!

Share this post


Link to post
Share on other sites

Could someone kindly help me with this? I have hard coded this:

 

window.open("http://www.lovestation.com.au/modules/popup/voucher.php", "", windowprops);

 

But it still add the base URL at front. That is http://www.lovestation.com.au/stocking/http://www.lovestati...pup/voucher.php

 

How can I remove the base rul or change the base url to http://www.lovestation.com.au only?

 

Thanks

Share this post


Link to post
Share on other sites
  • 2 months later...

Hello

 

I have install the moudle and it work very good when some enter the website and leave from the main website page

but if a customer press on a product and than wants to leave the website - the popup windows appear - but said it cannot find the page - see sample link "http://www.laptopexpert.co.il/ibm-laptop-keyboard/modules/popup/voucher.php"

it's add category name is the link in this case category name that added is "ibm-laptop-keyboard" - so it can not been found

any idea ?

Share this post


Link to post
Share on other sites
  • 3 weeks later...
  • 4 months later...
  • 1 year later...
  • 9 months later...

i version for 1.5x would be great :)

 

i had a function like this on a old dandomain webshop. it was pretty good.

 

and offering them a 5% discount is a pretty smart way "close the deal" 

 

but any news about that 1.5 ver ? :)

 

Thanks !

Share this post


Link to post
Share on other sites
  • 4 weeks later...
  • 5 months later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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