How to embed JotForm to Prestashop 1.6.1.1?

  • vascocst
    Asked on February 17, 2016 at 7:54 AM

    Hello dear friends,

     

    I need a little help from you, my plataform it's prestashop version 1.6.1.1.

    I don't know why but I cannot add any jotform to my CMS page althought I allow the iframes in the preferences.

     

    I had checked the following link:

    http://www.jotform.com/answers/258296-How-to-embed-form-to-PrestaShop

     

    It help me to understand that the problem can be solved because I can see the form the header (top, left and right 

    columns, footer and home) if I use the module suggested.

     

    Can I add a module on a CMS page or can you help me with some other solution?

     

    Thanks a lot!

  • Kiran Support Team Lead
    Replied on February 17, 2016 at 11:12 AM

    It seems that there is a limitation over Prestashop to use free modules to embed HTML blocks. Since the thread was pretty old, not sure if there are some free modules have been released for Prestashop. Let me give a try and get back to you once I found any relevant information in this regard.

    Thank you for your patience. 

  • madscientist
    Replied on February 23, 2016 at 9:33 PM

    Kiran & Vascocst,

     

    I'm in the same boat. Would appreciate any support on this one. Allowed Iframe and checked other solutions from JotForm to no avail. Mission critical.

  • Kiran Support Team Lead
    Replied on February 25, 2016 at 5:25 PM

    Sorry for the delay in response. As I check the prestashop modules, it seems that there are no free modules to add an iframe. I notice that Prestashop is not allowing to add iframe/script tags from the text editor. However, I found a workaround that allows adding an iframe in the default text editor and the form can be embedded anywhere including CMS pages. It requires to comment few lines in one of the Prestashop classes file (prestashop\classes\Validate.php). Please refer to the thread from Prestashop forum.

    https://www.prestashop.com/forums/topic/273632-solved-cant-add-an-iframe-in-cms-page-155/?p=1372223

    Since it involves editing core files of Prestashop, please be noted that it requires access to your hosting server and you may need to take assistance from an experienced person to make sure that the correct file being edited. Any incorrect change could put your Prestashop website down.

    Hope this information helps! 

     

  • madscientist
    Replied on February 25, 2016 at 10:55 PM

    Thanks for trying to help me Kiran. I tried the post and my code for prestashop 1.6.1.1 looks a little different (below). When i try to "Comment Out" the field I receive a server error unfortunately.. 

    if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) {

                return false;

            }

          

            if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) {

                return false;

            }

     

            return true;

        }

     

    Do you know what im doing wrong? Thanks so much

  • Charlie
    Replied on February 26, 2016 at 4:15 AM

    @madscientist

    I have opened a separate thread for your concern. Please refer to this link instead: http://www.jotform.com/answers/782029. We will address your concern there accordingly. Thank you for your understanding.