nenes25/prestashop_eicmslinks

PrestaShop Ei Cms Links

dev-master 2017-04-19 09:50 UTC

This package is auto-updated.

Last update: 2024-11-21 20:33:16 UTC


README

The module does not work on version 1.7 of prestashop.
All informations for installation are here : http://www.h-hennes.fr/blog/prestashop-liens-dynamiques-dans-lediteur-tinymce/

prestashop_eicmslinks

Add Cms Links tools in tinyMce Editor ( on CmsPage / Products and Products Categories ) It allows you to insert dynamics links to the cms pages / products categories / products.

In order to make it work after installation you need to configure the admin path

Ei cms links configuration

Screenshots :

New editor button :
Eicmslinks Button

Insert link to cms Page :
Insert link to cms Page

Insert link to product category :
Insert link to product category

Insert link to product :
Insert link to product

Insert widget content :
Insert widget content

Make working with your own Module : --------

Open this file : prestashop\admin\themes\default\template\helpers\form\form.tpl

Go to line 895 or search "{if isset($tinymce) && $tinymce}" bloc and replace with :

{if isset($tinymce) && $tinymce}
    <script type="text/javascript">
        var iso = '{$iso|addslashes}';
        var pathCSS = '{$smarty.const._THEME_CSS_DIR_|addslashes}';
        var ad = '{$ad|addslashes}';

        $(document).ready(function(){
        {block name="autoload_tinyMCE"}
              tinySetup({
                 plugins : "colorpicker link image paste pagebreak table contextmenu filemanager table code media autoresize textcolor eicmslinks",
                toolbar2: "eicmslinks"                                
               });
        {/block}
        });
    </script>
{/if}

And put the following in your module before class definition:

include_once(dirname(__FILE__) . '/../eicmslinks/eicmslinks.php');

Troubleshooting :

If you try to insert a link to widget, you can have the following error:

"The description_short field (English (English)) is invalid."

To solve it :
In the class prestashop \classes\product.php line 249, replace "isCleanhtml" with "IsString" for description and description_short field.