Jump to content

(Résolu) Modifier order.php pour afficher le logo paypal (Merci au très sympa franckm1000)


Recommended Posts

Bonjour,

 

Je galère depuis quelques jours pour afficher le logo paypal dans ma page "choix du paiement"

 

J'ai d'abord uploadé le logo qui n'y étais pas et créer le dossier "Logos" qui n'existait pas non plus, mais ça ne fonctionne toujours pas.

 

Ci dessous l'url de l'image

 

modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif

 

 

Par contre sur la source de la page order.php, Il manque l'indication de largeur pour le logo, je pense que c'est ça le bug,

 

 

Ci dessous les lignes de codes concernant le logo paypal

 

 

<img src="/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif" alt="Payez par carte ou par compte PayPal" height="48px" />

 

Comment faire pour modifier la page order.php ? merci par avance pour votre aide

Edited by cortogen (see edit history)
Link to comment
Share on other sites

Tu confonds avec le logo de la première page, moi je parle du logo au moment du choix du paiement

 

Paypal, Chéque, virement, etc...

 

C'est bien dans order.php qu'il y le pb par contre j'ai uniquement ça quanf j'ouvre la page en code source

 

 

<?php

/*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Open Software License (OSL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/osl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2012 PrestaShop SA

* @version Release: $Revision: 14007 $

* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*/

 

require(dirname(__FILE__).'/config/config.inc.php');

ControllerFactory::getController('OrderController')->run();

 

A l'aide !! qq que c'est ch... juste pour un pov logo !

 

Personne de Prestashop ne peut intervenir ?

Link to comment
Share on other sites

Non le fichier à changer se trouve bien dans un fichier TPL et dans le module Paypal.

 

Les fichiers PHP ne sont là que pour le traitement. L'affichage HTML ne provient que des fichiers TPL.

 

La page de paiement affiche les modules de paiement grâce au hook payment.

 

Chaque module de paiement greffe un fichier TPL sur ce hook.

 

Pour paypal le problème est que ça dépend de ta version.

 

Sur la dernière que j'ai regardé, la fichier était:

modules/paypal/views/templates/front/payment/payment.tpl

 

Après ça peut changer d'emplacement suivant ta version de paypal mais ça doit s'appeler certainement payment.tpl.

  • Like 1
Link to comment
Share on other sites

Pb, voila ca qu'il s'affiche avec dreamweaver ou bloc notes

 

 

{*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.org/licenses/afl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2012 PrestaShop SA

* @version Release: $Revision: 14011 $

* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*}

 

<p class="payment_module" height="">

<a href="{$base_dir_ssl}modules/paypal/payment/submit.php" title="{l s='Pay with PayPal' mod='paypal'}">

<img src="{$logo}" alt="{l s='Pay with PayPal' mod='paypal'}" style="float:left;" />

<br />

{if $integral}

{l s='Pay with your PayPal account, credit card (CB, Visa, Mastercard...), or private credit card' mod='paypal'}

{else}

{l s='Pay with your PayPal account' mod='paypal'}

{/if}

<br style="clear:both" />

</a>

</p>

Link to comment
Share on other sites

Là:

<img src="{$logo}"

 

Tu remplaces $logo par ton logo en utilisant la synthaxe suivante:

{$base_dir}le chemin vers l'image

 

Mais je doute que ce soit ça {$logo} je suis pas sûr.

Quelle version de prestashop utilises tu ?

 

PS: paypal n'a rien à voir là dedans, TOUS les modules de paiement fonctionnent de la sorte. Vous ne savez utiliser la solution prestashop et le moteur de template smarty c'est tout.

  • Like 1
Link to comment
Share on other sites

Effectivement, tu as raison, je ne sais pas uiliser la la solution prestashop et smarty, je débute et je suis plus bidouilleur que pro.

 

Paypal n'est pas responsable, un peu qd même, il pourrait donner un coup de main à ses clients.

 

Je vais essayer ta manip, j'ai pas tout compris mais ce n'est pas grave, au moins je ne suis pas planté, merci en tout cas pour ton aide

Link to comment
Share on other sites

Le logo ne s'affiche toujours pas, ma config

 

Version de Prestashop: 1.4.8.3

Informations sur votre serveur: Linux #1 SMP Tue Jun 19 17:52:27 CEST 2012 x86_64

Version du logiciel serveur: Apache/2.2.14 (Unix)

Version de PHP: 5.3.3-7+squeeze3

Version de MySQL: 5.1.44-enterprise-gpl-advanced-log

Edited by cortogen (see edit history)
Link to comment
Share on other sites

Dans ton module paypal tu vas chercher le fichier:

répertoire_racine/modules/paypal/views/templates/front/payment/payment.tpl

 

Tu vois la ligne:

<img src="{$logos.LocalPayPalLogoMedium}" alt="{l s='Pay with PayPal' mod='paypal'}" style="float:left;" />

C'est là qu'est ton image.

 

L'image que tu veux mettre, tu la stockes dans le dossier image principal de ta boutique, ici:

répertoire_racine/img

Tu appelles ce fichier paypal.jpg

 

Et tu remplaces le code par le suivant:

<img src="{$base_dir}img/paypal.jpg" alt="{l s='Pay with PayPal' mod='paypal'}" style="float:left;" />

 

Tu n'oublies pas d'enlever le cache et de forcer la compilation (menu préférences => performances)

 

Normalement ton logo apparaîtra dans les moyens de paiement.

Edited by franckm1000 (see edit history)
  • Like 1
Link to comment
Share on other sites

Mais non je veux simplement les fichiers, les codes API ne sont pas dedans et puis je m'en fiche de tes codes API j'essaie de t'aider c'est tout ! Pfff sérieux tu l'as ouvert au moins le fichier payment.tpl ? Il y a quoi dedans ? le même code img que j'avais affiché ?

  • Like 1
Link to comment
Share on other sites

Je sais que tu m'aides et c'est très sympa de ta part, je ne suis pas une bète en informatique mais l'URL de l'image qui ne s'affiche pas est

 

maboutique.fr/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif

 

Je viens de faire pas à pas ta manip

 

 

voici le code de ma page payment.tpl d'origine

 

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

 

 

{*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.or...ses/afl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2012 PrestaShop SA

* @version Release: $Revision: 14011 $

* @license http://opensource.or...ses/afl-3.0.php Academic Free License (AFL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*}

 

<p class="payment_module" height="">

<a href="{$base_dir_ssl}modules/paypal/payment/submit.php" title="{l s='Pay with PayPal' mod='paypal'}">

<img src="{$logo}" alt="{l s='Pay with PayPal' mod='paypal'}" style="float:left;" />

<br />

{if $integral}

{l s='Pay with your PayPal account, credit card (CB, Visa, Mastercard...), or private credit card' mod='paypal'}

{else}

{l s='Pay with your PayPal account' mod='paypal'}

{/if}

<br style="clear:both" />

</a>

</p>

 

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

 

La modifiée

 

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

 

 

 

{*

* 2007-2012 PrestaShop

*

* NOTICE OF LICENSE

*

* This source file is subject to the Academic Free License (AFL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:

* http://opensource.or...ses/afl-3.0.php

* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

* @author PrestaShop SA <[email protected]>

* @copyright 2007-2012 PrestaShop SA

* @version Release: $Revision: 14011 $

* @license http://opensource.or...ses/afl-3.0.php Academic Free License (AFL 3.0)

* International Registered Trademark & Property of PrestaShop SA

*}

 

<p class="payment_module" height="">

<a href="{$base_dir_ssl}modules/paypal/payment/submit.php" title="{l s='Pay with PayPal' mod='paypal'}">

<img src="{$base_dir}img/paypal.jpg" alt="{l s='Pay with PayPal' mod='paypal'}" style="float:left;" />

<br />

{if $integral}

{l s='Pay with your PayPal account, credit card (CB, Visa, Mastercard...), or private credit card' mod='paypal'}

{else}

{l s='Pay with your PayPal account' mod='paypal'}

{/if}

<br style="clear:both" />

</a>

</p>

 

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

 

J'ai créé un dossier img précisement à cet endroit, dans cet endroit figure également le dossier Prestashop

 

dans www.maboutique.fr/public/www/img

 

Je suis retourné sur mon front panel

 

J'ai coché forcer la compilation

 

j'ai décoché le cache

 

et je vérifie sur ma boutique, toujours pas de logo

Edited by cortogen (see edit history)
Link to comment
Share on other sites

Je suis tes conseils, ne le prend pas mal mais pourquoi ça ne fonctionne pas !

 

 

Voici un copier coller du chemin chez Amen mon hébergeur

 

maboutique.fr / public / www / prestashop / modules / paypal / img / logos / (1 fichiers & dossiers)

 

copier coller du nom du fichier

 

FR_bnr_horizontal_solution_PP_327wx80h.gif

 

et l'url de la photo

 

maboutique.fr/modules/paypal/img/logos/FR_bnr_horizontal_solution_PP_327wx80h.gif

Edited by cortogen (see edit history)
Link to comment
Share on other sites

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...