PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

[Module] Pop up message when leaving shop

19 replies to this topic
#1
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 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

Attached Files



#2
Sarahd

    PrestaShop Apprentice

  • Members
  • PipPip
  • 474 posts
Merci beaucoup presta-dyr, I added your module to prestatools.com
Sarah ;-D
Comptabilité, Informatique, Infographie

#3
gribouille

    PrestaShop Apprentice

  • Members
  • PipPip
  • 67 posts
Bonjour Presta-dyr,

Je trouve ton module sympa. Je l'ai donc uploadé, mais comment le paramètre t-on ? ( message final ? code promo, etc .. )

Merci. :)
Tout est possible ... il suffit juste d'y croire ...

#4
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 posts
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

#5
gribouille

    PrestaShop Apprentice

  • Members
  • PipPip
  • 67 posts
ok sorry for the language ...

I tried
Tout est possible ... il suffit juste d'y croire ...

#6
paillot

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
Hello,

I tried to install your module but nothing appears... I can see the module in the module page. But the popup doesn't appear....
Need some help

Thanks
Damien

#7
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 posts
Do you have a link?

/Kjeld

#8
paillot

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
www.solidariterre.net/catalog
It's very long to access to my catalog now... I try to deactivate the module....


Damien

#9
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 posts
The module sets the cookie "count" as expected. But you're right, it seems it doesn't work. I'll look closer into it.

/Kjeld

#10
paillot

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
thanks a lot

Damien

#11
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 posts
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

#12
paillot

    PrestaShop Newbie

  • Members
  • Pip
  • 7 posts
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

#13
Love Prestashop

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
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!
Love the Shop:

Love Station Lingerie

#14
Love Prestashop

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
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
Love the Shop:

Love Station Lingerie

#15
Love Prestashop

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
could anyone help please?
Love the Shop:

Love Station Lingerie

#16
Love Prestashop

    PrestaShop Apprentice

  • Members
  • PipPip
  • 154 posts
i am disappointing... on one can help?
Love the Shop:

Love Station Lingerie

#17
presta-dyr

    PrestaShop Fanatic

  • Moderators
  • 1045 posts
Well, it's a free module...

Anyway, I have updated the module and put it in the first message of this thread.

/Kjeld

#18
ipcomp1

    PrestaShop Apprentice

  • Members
  • PipPip
  • 82 posts
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.laptopexp...pup/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 ?

#19
citrix34

    PrestaShop Apprentice

  • Members
  • PipPip
  • 224 posts
Good Job
Thanks for your popup !
Mephivio, créateur de sites internet et plateformes e-commerce à base de technologies Open Source et travaux d'infographie pour la communication visuelle des entreprises.

Boutique en ligne (Software) : Mephishop
Blog IT : Veille Techno IT

#20
Archangel

    PrestaShop Apprentice

  • Members
  • PipPip
  • 25 posts
Doesn't work.