PrestaShop Forums: [Module] Module News très simple - PrestaShop Forums

Jump to content


Welcome to the PrestaShop Forum! We hope you'll share your comments and suggestions with us. We ask that you please post in English to the main sections of the PrestaShop Forum. If you want to write in another language, please post in the corresponding PrestaShop Community section below.

Please note that PrestaShop Community sections are largely self-moderated. PrestaShop team members may or may not participate in non-English sections. To improve the chances of receiving feedback to your question or comment, please post it in English to the main sections of our Forum.

NYC

Vous parlez français ? par ici !


[Module] Module News très simple


[Module] Module News très simple

#1 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 19 February 2010 - 11:03 PM

Bonjour à tous,

Je vous propose un module qui affiche des news (en nombre souhaité) sur la page d'accueil, bien sûr le texte affiché est tronqué afin de limiter une ligne par news.
En BO on peu ajouter, modifier ou supprimer une news ainsi qu'inscrire le nombre de news a affiché dans la page d'accueil.
Ce module n'a rien avoir avec le module PrestaNews ou ModernNews, bien plus complet que celui-ci.

Pour l'installation il y a un Readme à l'intérieur du zip

Mise à jour V.05:
Meilleur gestion des XML.
L'ordre des news/notes sont trier (la plus récente en haut).
Détails d'affichage (decode_utf8) => à confirmer.
Affichage liste de toutes les news si pas de paramètre (lien externe vers notes.php).
Résumé des news/note en dessous de chaque news/note afin de s'y retrouver plus facilement => sera améliorer

Mise à jour V.06:
Remplacement de notes par news (plus intuitif).
UTF8 des XML mieux gérer.
Dernier point de la V.05 améliorer.
Possibilité de changer le texte en BO si le paramètre n'existe pas.



Voir exemple sur le site : http://www.coway-filtres.eu/

Dites-moi ce que vous en pensez :)

Attached File(s)


Webdeveloper

#2 marijon

    PrestaShop Newbie

  • 20 Dec 2009
  • Members
  • Pip
  • 14 posts

Posted 19 February 2010 - 11:23 PM

BONSOIR ? COMMENT FAIRE POUR AJOUTER UN MODULE
MERCI DE M'AIDER CORDIALEMENT

#3 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 19 February 2010 - 11:27 PM

Bonsoir un readme se trouve a l'interieur du zip afin d'expliquer toute la marche a suivre, mais étant donné mon âme charitable d'aujourd'hui j'explique également ici :)

Pour installer ce module:
- uploader le fichier notes.php sur votre serveur a la racine de votre site
- uploader ensuite le fichier notes.tpl à la racine de votre thème
- Uploader le dossier blochomenews dans le dossier de vos modules et installer-le via le BO de votre site en allant a la rubrique Tools et en cliquant sur installer.

Voila. Tenez-moi au courant :coolsmirk:
Webdeveloper

#4 marijon

    PrestaShop Newbie

  • 20 Dec 2009
  • Members
  • Pip
  • 14 posts

Posted 19 February 2010 - 11:27 PM

j'ai regarde ton site ,il est super j'en suis loin
J 'adorais mettre le logo de paypal avec les C B , car mes clients sont un peu perdus avec paypal
comment faire merci bonne soirée www.nospetitszazous.com

Attached File(s)

  • Attached File  paypal.jpg (69bytes)
    Number of downloads: 4128


#5 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 19 February 2010 - 11:36 PM

Merci beaucoup pour le site,

pour installer des images avec des liens il existe plusieurs possibilité. Soit recopier un module tel que blocpaymentlogo en prenant bien soin de modifier tous les noms (liens vers fichiers du module interne), mais que je déconseil pour les personnes ni connaissant pas grand chose en php. L'autre méthode que j'appelle méthode bûcheron consiste à ouvrir le fichier tpl du module au-dessus ou en-dessous duquel l'on a envie d'insérer une image et d'y mettre le lien vers son image tel que p.ex.: nom_img en sachant que la variable {$img_dir} pointe vers le dossier img de ton thème par défaut.

Voilou
Webdeveloper

#6 jolvil

    PrestaShop Fanatic

  • 22 Dec 2007
  • Members
  • PipPipPipPip
  • 2672 posts
  • Location:Paris

Posted 20 February 2010 - 09:29 AM

Sympa :-)
Par contre les url des articles ne sont pas réecrites: http://www.coway-fil...u/notes.php?n=1

Il y a un module qui utilise l'outil CMS de prestashop qui pourrait peut etre permettre de faire la même chose:
http://www.prestasho...iewthread/42908 avec les avantages: install auto, utilisation cms, url réécrites.

#7 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 20 February 2010 - 09:34 PM

Merci pour votre réaction,

C'est vrai que les deux modules peuvent paraître semblables, néanmoins je souhaitai réellement avoir un module indépendant, donc aucun rattachement au cms etc, je compte développer ce module bien plus loin (surement grâce à l'aide de tout le monde ici %-P) en y ajoutant la possibilité d'ajouter des images p.ex. et rendre le tout bien plus automatique, (les fichiers notes.php et notes.tpl copier automatiquement à l'installation du module).

Merci pour vos feedback :-)
Webdeveloper

#8 yaya

    PrestaShop Apprentice

  • 30 Sep 2009
  • Members
  • PipPip
  • 294 posts

Posted 22 February 2010 - 12:57 PM

Actuellement ce module s'installe sur la page d'accueil, y aurait-il moyen de l'installer sur la fiche produit car cela pourrait etre utile pour inscrire certaines conditions telles que vente taille....

#9 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 22 February 2010 - 01:33 PM

Oui il y a moyen, il faut juste changer le hook dans le fichier blockhomenews.php.

Je vous donne le fichier déjà changer, afin que vous puissiez travailler dessus. Bien-sûr il faut encore modifier un peu les feuilles de style. Mais voila, en espérant avoir pu vous aider. ;-)

Attached File(s)


Webdeveloper

#10 Radu

    PrestaShop Addict

  • 07 Mar 2009
  • Moderators
  • 571 posts
  • Location:Bucharest

Posted 22 February 2010 - 06:42 PM

Thank you very much for the module!!! it was exactly what I was looking for
www.cureducere.ro -> cumperi online de la partenerii nostrii si iti dam din bani inapoi garantat

(in plus fata de orice promotie / reducere / cupon care iti sunt oferite de magazinele in cauza)

#11 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 22 February 2010 - 07:12 PM

I'm glad to make someone happy ;-)
Webdeveloper

#12 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 23 February 2010 - 02:23 AM

From 1266862347:

I'm glad to make someone happy ;-)


Hello,

many thank for this great module!!!
Really a good work!

I have now installed the version 1.2.5 because before i have had the 1.2.2 but unfortunately on the hope page the module.

I have followed these instruction and i have update the new php file to the folder:
Pour installer ce module:
- uploader le fichier notes.php sur votre serveur a la racine de votre site
- uploader ensuite le fichier notes.tpl à la racine de votre thème
- Uploader le dossier blochomenews dans le dossier de vos modules et installer-le via le BO de votre site

i have created a demo new but nothing on the first page :-((

You can look the module position in the attachment..

please can you have a look to my situation?

Attached File(s)

  • Attached File  fdgds.jpg (48bytes)
    Number of downloads: 4051


#13 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 23 February 2010 - 06:33 AM

Did you tried to uninstall it and reinstall at the BO? I have the version 1.2.5 also (it should normally work).
Do you have anything at the home page, an error, a warning or something else?
Did you try to add a news and see what happens?
Webdeveloper

#14 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 23 February 2010 - 08:55 PM

hello, its not on the first page but just under each product description.

look here to have a better idea.......






thx very much

Attached File(s)



#15 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 23 February 2010 - 09:26 PM

Yes, this is because you download the file blochomenews.php. Don't download it if you want it in the first page. Just download the zip file at my first post to have it on the first page.

Now that the module is installed in your shop, you can replace the blochomenews.php file with the one on the zip.

Did it work?
Webdeveloper

#16 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 23 February 2010 - 11:01 PM

Dear Mr. Blackpanther,

it works!i love it!

Best regards,
many thanks!!!!

#17 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 23 February 2010 - 11:45 PM

Hello,

im sorry but the module have a little problem, i have given a title and a short text, i got an error and on the first side the module display not the title but the text in the note.

look the attachment.

regards,
good job!

Attached File(s)

  • Attached File  probd.jpg (53bytes)
    Number of downloads: 922


#18 Blacktiger85

    PrestaShop Newbie

  • 17 Feb 2010
  • Members
  • Pip
  • 23 posts

Posted 24 February 2010 - 10:06 PM

From 1266965157:

Hello,

im sorry but the module have a little problem, i have given a title and a short text, i got an error and on the first side the module display not the title but the text in the note.

look the attachment.

regards,
good job!


Try to change at line 244 from functions.php this
    if ($modify){
$dom->load('../modules/blockhomenews/XML/news'.$id.'.xml');
}

against this
    if ($modify){
unlink('../modules/blockhomenews/XML/news'.$id.'.xml');
}


You should behave the error.

At homepage the text appear and not the title. To make the title visible replace at line 11 from blockhomenews.tpl file this
{$nws[$i]}

against this
{$tit[$i]}


Tell me if it works.

Thank you
Webdeveloper

#19 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 25 February 2010 - 01:52 AM

it works really good!

Thx much!

Great job!!!

;-)))))

#20 Stefanoz

    PrestaShop Newbie

  • 01 Jan 2010
  • Members
  • Pip
  • 11 posts

Posted 25 February 2010 - 01:55 AM

a question, how to invert the order of the news?

i mean, the recent on the high of the banner and the latest down...

regards





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users