Jump to content

External html files opened in prestashop modal popup


Recommended Posts

Hi All!

I want to ask another thing. It is possible to open (view) external html files in Prestashop modal popup box?

So i want to open help files to customer. "How to buy", "Whats new in new shop" etc.

I have make a bootstrap alert box with that informations and these two buttons. When customer want to view these tutorials click on and modal box open with external content.

 

Sorry for my english! ;/

Link to comment
Share on other sites

It's pretty simple but you must do some modification in .php files,

 

1. You must include fancybox .js, .css files on all pages not only in product.tpl etc. You can do this by modify class/controller/FrontController.php, method: setMedia();

2. Create jQuery script to bind fancybox to .class or #id, whatever you want. You can place it in for eg. footer.tpl, how to use fancybox you can see in themes/yourtheme/js/product.js (just search for fancybox).

3. Create link like: <a class="my-modal" href="{$base_dir}some_file.html" title="Some file title">Some file popup</a>

 

and that's it.

  • Like 1
Link to comment
Share on other sites

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...