Wednesday, June 18, 2014

joomla back office Failed to parse time string (jerror) at position ....

hello moto;
Pre conditions: Joomla 3.0
i've encountred this error when migrating website from a server to another...
front office worked correctly
back office  no
Try to change $log_path et $tmp_path in configuration.php file
To know the correct directory
create a php file simple.php
<?php
echo getcwd (  );
?>
copy it at the root of the site
invoke it from web browser
get your directory
copy it an d and add /logs for logs and tmp for tmp dir





Monday, May 19, 2014

Prestashop déclaration de variable globale de configuration (Module FB/Twitter pour prestashop)

Lors de la création d'un module spécifique sous presta, nous avons souvent besoin de stocker quelques variables dans la base de données du système.
Dans le cas ou la variable est simple et que l'utilisation d'un CRUD  n'est pas aussi nécessaire, l'utilisation d'une variable système peut suffire, on parle d'une variable de configuration.
Comment la créer ?
c'est simple le fait de mettre à jour une variable de configuration qui n'existe pas la crée et lui affecte la valeur indiquée.

Configuration::updateValue('MA_VARIABLE',"");
On met ça dans la fonction installe de notre module si vous voulez.

Comment la lire?
c'est simple aussi
Configuration::get("MA_VARIABLE") retourne la variable

Dans ce qui suit, j'ai crée un petit exemple qui illustre ce comportement:
Un module qui affiche' 2 icones (fb+twitter) dont les adresses sont configurables depuis le back-office



block-fbtwitter (lien de téléchargement)


screen shot

Sunday, March 23, 2014

Module JCounter, visits counter for joomla

Here is JCounter module, a visits counter for joomla 2.5/3.x.
You must unzip file first and install the two components (plugin then module) in order to use it.
Current version is 1.3


Why plugin ?
When webmaster decide to disable this module on some web pages for design reasons or other, plugin continue to increase visits number, everwhen  module is disabled on that page.


 Download link for joola 2.5 and joomla 3.x


Thanks for your suggestions

Module Evolution
April 2011 version 1.0 for joomla 1.5
March 2014  version 1.1 joomla 2.5/ 3.x + introduction of the plugin ( binaries of this version were removed from repository due to wrong binaries upload)
July 2014 version 1.2
September 2014 version 1.3 added parameters text before and after / display font digits

Tuesday, March 11, 2014

Merge Two prestashop web sites into one multi shop website (ps 1.5.x)

Let's start by pre-conditions
www1 and www2  are two websites using ps 1.5.x
=> then we have two domains (or domain and subdomain ), 2 databases and 2 prestashop working folders.

how merge ?

1- login on BO of www1
2- Activate multishop support (preferences-> generales) (may be translated) and register
3- Now may see a new menu item "multi-shop" in advanced parameters menu.

now ps is ready to work on multishop  mode

4- copy the theme of www2 in the themes directory of www1
    => if the theme of www2 (the second web site) has the same name as the first one, you must change its name then (let say 'theme2')

5- Now enter the menu item multi-shop (step 3)

you will see at the left a tree but with only one item (the name of www1)

6- Click add a shop
  i- enter the name of your site (www2)
  ii- let the two combos as they are
  iii- choose the theme (step 4 normally)
   you may then choose a least one category (default) from the tree of categories
 iv- import data ? no
Register.

Now we have to link our shop to its  url
7- Click add link
 enter web site surl of site www2 (exp: www.mysite2.com) in both http and ssl modes
Register

8- Don't forget to activate url rewriting !
(preferences -> SEO and URLs )

Great now it will not work surely :)



9- What's the problem ?
We are searching to merge data and files => one BO (back office) and one global folder containing the two sites.
Solution:
In Cpanel /plesk/etc ....
www1 -> xxx/public_html/www1
www2-> xxx/public_html/www1










Saturday, February 15, 2014

Prestashop The database selection cannot be made.

when migrating prestahsop from one web site to other 'The database selection cannot be made.' error happened... although my user had ALL PRIVILEGES 
privs ...
granting explicit privilerges to my user (select , insert, duplicate etc ...) solved the problem.

grant select on ON db_ps.* TO 'your_user'@'host';
grant insert on ON db_ps.* TO 'your_user'@'host';
grant delete on ON db_ps.* TO 'your_user'@host';
grant update on ON db_ps.* TO 'your_user'@'host';

or simply

grant SELECT,INSERT,UPDATE,DELETE ON `db_ps`.* TO 'your_user'@'host';

MySQL doc here