Jump to content

[Free module] display multilingual HTML texts everywhere


Recommended Posts

Hi,

 

Here is a little module that could be useful, I hope, to schedule in time the display of multilingual HTML texts almost everywhere in your shop : home page, columns, user account page or block, product pages, payment page, cart, …

 

What is it for ? We can say, for example :

- announce special operations (time bounded or not) to your visitors,

- schedule in advance the display of some general informations,

- customize your screen without having to change your theme,

- and even tell your visitors when your are on vacations (so, no delivery) !!

 

A complete documentation is available with the module (that why the zip size is so big) as well as a tutorial to help the most courageous of you to use their HTML / CSS knowledge to create more complex elements (column blocks, product pages new tabs, …). No limit to your creativity :-) Some demos could be seen almost everywhere on my website.

 

This module is compatible with Prestashop 1.2.x, 1.3.x, 1.4.x and 1.5.x (don't support multishop feature).

 

So, try it if you are interested and please, tell me about any issue you could find !

 

----------------------------------------------------------------------

Important : please, don't install the module with Prestashop 1.5.2 because of some issues could occured and I'm currently debugging them !

----------------------------------------------------------------------

 

Version history :

v1.5 (2012-11-10) :

Compatible with Prestashop 1.5

Custom class must now return a boolean to let the template display or not

v1.4 (2012-10-04) :

Minor debugs

v1.3 (2012-06-05) - downloaded 342 times :

1st version

pss_timemsg_V1.5.zip

Edited by mnementh64 (see edit history)
  • Like 10

Share this post


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

Thank you all for your feedbacks.

 

@sickz : Yes, it's possible but :

- all blocks must be located together (one following the other)

- you can't change the order between them (it must be the creation order)

Share this post


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

Hi,

 

this module work fine .. but I have a problem: the dimension of log file (in the log directory)

 

Infact the size increases each day .. in seven days the first file is over 5 mb ... and the second log file is growing

 

.. why?

Share this post


Link to post
Share on other sites

Don't worry there is a log management in the module, but unfortunatly, it's not customizable by user interface. The default behaviour is : rotating logs with 4 files, each of 5mb max. If you want to change these parameters, please, have a look to the PssTimeMsgProUtils.php file located in the classes/ subdir of the module.

You could change :

- the _PSS_LOG_LIMIT_ constant that is 5mb by default (in octets)

- the manageLogSize() function to reduce the number of log files

HTH

Share this post


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

Hi,

great module!!!

 

I tried to install it on prestashop 1.5.0.15 and unfortunaly it doesn't work. Is it compatible with 1.5? Do you plan to develop it in order to make it works with the 1.5?

It is a pity, because the module is very good.

 

Thank you in advance,

Regards

Miriam

Share this post


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

No, I don't know why ! I'm currently checking the 1.5.2 version changes because another people had trouble (not exactly the same you had but quite close) with the module under the same Prestashop version.

Share this post


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

@vontanix : thank you very much !

@spem77 : the version works well with most of 1.5.2 Prestashop install. May be with yours ? If it's not the case, remember I am aware of anybody who have the issue and could help me to debug or to reproduce !

Share this post


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

Unfortunatly, I prefer debug it (some issues could occur on some Prestashop 1.5.2 or 1.5.3 installs) before adding new features. So if anybody could help me by giving access to wome not well working installation, it would be kind of you.

Share this post


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

Must be a very cool module, but unfortunally it doesnt work

 

got the following error

 

Language 1 / check field msg that is html 1

Language 3 / check field msg that is html 1

Language 7 / check field msg that is html 1

 

 

 

 

PrestaShop™ 1.5.3.1

Load tid:0.211s

 

 

Best regards

Henrik

Share this post


Link to post
Share on other sites

Ok rothestar. In order to reproduce the issue, please, could you tell me how you have managed your languages on your shop :

- what languages were activated when you installed the module ?

- have you then actived other languages ?

- have the module worked well even once ?

 

thank you for your help.

  • Like 1

Share this post


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

Hi,

 

Is it possible to use this great module in order to add some html text only one one specific category page ?

 

Thank you in advance for any reply.

 

Patrick

Share this post


Link to post
Share on other sites

Ok, i find solution:

 

If some one have his own hook (1.4):

 

In file pss_timemsgpro.php add this line after 356 line, where u see same lines...

 

function hookmyhook($params){return $this->pssHookGeneric('myhook', $params);}

 

in file adminpss_timemsgpro.php after 766 line add, where same lines:

 

'myhook'=>$this->l('All pages : myhook'),

 

After via phpmyadmin check ps_hook table and look last id_hook number u have it, like examle, it will be:

97 cmsCategory CMS category page footer NULL 0 0

 

So you need add new hook with number 98 via this sql code:

 

 

INSERT INTO `ps_hook` (`id_hook`, `name`, `title`, `description`, `position`, `live_edit`) VALUES
(98, 'myhook', 'Some hook description', 'Some full hook description', 1, 0);

 

After in classes/FrontController.php find line with this code:

 

'HOOK_TOP' => Module::hookExec('top'),

 

And add after:

 

'HOOK_NEW_HOOK' => Module::hookExec('newhook'),

 

After add in your template:

 

{$HOOK_NEW_HOOK}

 

Thats all...

 

Dont forget clean you smarty compile and cache folders by hends (dont delete index.php file)

 

In BO find "PSS/Time messages" tab, add new message and find your new hook...

 

 

------

PS: If you dont understand some thing, do not destrub me! dont pm me

Edited by Kerm (see edit history)

Share this post


Link to post
Share on other sites

Btw i dunno why author add his self TinyMCE for this module, prestashop alrdy have it in /js/ folder and image/file upload work fine with prestashop original TinyMCE script.

 

For turn on image/file upload and use original TinyMCE script in this module, need in file adminpss_timemsgpro.php change this:

 

 // TinyMCE include
 $pathCss = __PS_BASE_URI__.'modules/pss_newsletter/css/pss_styles_mce.css';
 echo '
  <!-- TinyMCE -->
  <script type="text/javascript" src="'.__PS_BASE_URI__.'modules/pss_timemsgpro/js/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript">
   tinyMCE.init({
 mode : "textareas",
 theme : "advanced",
 plugins : "safari,pagebreak,style,layer,table,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,directionality,fullscreen",
 // Theme options
 theme_advanced_buttons1 : "newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
 theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,,|,forecolor,backcolor",
 theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,media,|,ltr,rtl,|,fullscreen",
 theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,pagebreak",
 theme_advanced_toolbar_location : "top",
 theme_advanced_toolbar_align : "left",
 theme_advanced_statusbar_location : "bottom",
 theme_advanced_resizing : false,
 content_css : "'.__PS_BASE_URI__.'themes/'._THEME_NAME_.'/css/global.css",
 document_base_url : "'.__PS_BASE_URI__.'",
 width: "600",
 height: "auto",
 font_size_style_values : "8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt",
 // Drop lists for link/image/media/template dialogs
 template_external_list_url : "lists/template_list.js",
 external_link_list_url : "lists/link_list.js",
 external_image_list_url : "lists/image_list.js",
 media_external_list_url : "lists/media_list.js",
 elements : "nourlconvert",
 entity_encoding: "raw",
 convert_urls : false,
 language : "'.(file_exists(__PS_BASE_URI__.'modules/pss_timemsgpro/js/tinymce/jscripts/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en').'"
   });
  </script>
  <!-- /TinyMCE -->';

 

On this:

 

 // TinyMCE
 global $cookie;
 $iso = Language::getIsoById((int)($cookie->id_lang));
 $isoTinyMCE = (file_exists(_PS_ROOT_DIR_.'/js/tiny_mce/langs/'.$iso.'.js') ? $iso : 'en');
 $ad = dirname($_SERVER["PHP_SELF"]);
 echo '
  <!-- TinyMCE -->
  <script type="text/javascript">
  var iso = \''.$isoTinyMCE.'\' ;
  var pathCSS = \''._THEME_CSS_DIR_.'\' ;
  var ad = \''.$ad.'\' ;
  </script>
  <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tiny_mce/tiny_mce.js"></script>
  <script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce.inc.js"></script>
  <!-- /TinyMCE -->';

Share this post


Link to post
Share on other sites

Ok rothestar. In order to reproduce the issue, please, could you tell me how you have managed your languages on your shop :

- what languages were activated when you installed the module ?

- have you then actived other languages ?

- have the module worked well even once ?

 

thank you for your help.

 

Lang1 English was and is still disabled

Lang3 German was and is still disabled

Lang7 danish was and is still enabled

 

Also during install, the module works and displays the text at the designated position and on the right time, but the error is seen when you press save.

 

Love the module

 

Best regards

Henrik

Edited by rothestar (see edit history)

Share this post


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

ERROR message 1.5

 

Language 1 / check field msg that is html 1

Language 2 / check field msg that is html 1

Language 3 / check field msg that is html 1

Language 4 / check field msg that is html 1

Language 5 / check field msg that is html 1

Language 6 / check field msg that is html 1

 

my shop is in English..

Edited by ThomasHiggins (see edit history)

Share this post


Link to post
Share on other sites
  • 6 months later...
  • 3 months later...
  • 3 months later...

white pages = errors

please turn on error reporting

then instead of white page you will see detailed information about problem (what and where doesnt work)

Share this post


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

Not working in 1.5.6.2 - Just receiving a blank page when cliking in preferences.

 

Hi same thing for me on PS 1.5.4.1 I have this error :

 

Fatal error: Cannot redeclare class AdminTabCore in classes/AdminTab.php on line 31

 

Can you help Vekia ?

Share this post


Link to post
Share on other sites

This module is compatible with Prestashop 1.2.x, 1.3.x, 1.4.x and 1.5.x (don't support multishop feature).

 

----------------------------------------------------------------------

 

Version history :

v1.5 (2012-11-10) :

Compatible with Prestashop 1.5

 

 

Oh so maybe only earlier PS 1.5 version ?

 

Too bad that module looks great :)

Edited by KevinNash (see edit history)

Share this post


Link to post
Share on other sites
  • 4 months later...
  • 9 months later...
  • 1 month later...
  • 1 year 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