[Skip to main content](#vessel-content)

#   joindre un fichier dans le mail de confirmation

##

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#197095](#197095) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197095 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")* was created by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.3.6

Bonjour,

Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement.
Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.

J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...

Y a t il un moyen pour répondre à mon besoin.

Merci.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 6 months ago [\#197100](#197100) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197100 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

La solution actuelle est d'ajouter ce fichier dans la page d'édition produit sous la partie "fichiers" et le mettre en "non gratuit".
De cette manière le fichier n'est pas accessible tant que le produit n'a pas été acheté, et dans le mail un lien vers le téléchargement du fichier est disponible.

Pour vraiment ajouter le fichier en pièce jointe à l'email cela va nécessité du code.
Notamment l'édition du mail "order_status_notification" dans la partie preload et parcourir les produits pour récupérer les fichier associés et les attacher au mail grâce au code: Code:

$mail-&gt;addAttachment(JPATH_COMPONENT.'/upload/safe/document.pdf');

Attention si les fichiers font plus de 1Mo, attacher des produits aux mails n'est pas forcément une bonne solution.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#197220](#197220) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197220 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Merci pour votre réponse.
Pour la première partie c'est déjà ce que je fais. J'aimerais en plus avoir la pièce jointe pour faciliter la démarche.

Pour le code à rajouter, je colle juste cette ligne où je dois l'adapter ?

Merci.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86282
- Thank you received: 14262
-
-

11 years 6 months ago [\#197223](#197223) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197223 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Il va falloir l'adapter.
Cette ligne permet uniquement d'ajouter un fichier PDF qui serait localisé ici: JPATH_COMPONENT.'/upload/safe/document.pdf'

Par exemple, vous pouvez essayer avec cette ligne:
$mail-&gt;addAttachment(HIKASHOP_ROOT.'media/com_hikashop/upload/safe/'.$file-&gt;file_path);
arpès la ligne:
$t .= '&lt;a href="'.hikashop_frontendLink('index.php?option=com_hikashop&amp;ctrl=order&amp;task=download&amp;file_id='.$file-&gt;file_id.'&amp;order_id='.$oid.$file_pos.$url_itemid).'"&gt;'.$fileName.'&lt;/a&gt;&lt;br/&gt;';
dans la section preload de l'email order status notification que vous pouvez éditer via le menu Système&gt;Emails.
Cela suppose que vos fichiers sont uploadés dans le dossier media/com_hikashop/upload/safe de votre site.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#197307](#197307) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197307 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Merci pour votre réponse rapide.

Seulement quand j'ajoute la ligne, dans mon panneau d'admin, lorsque je veux passer une commande en payé pour faire un test j'obtiens
cela :
[ ![pbl-hikashop.jpg](/forum/attachment/23550) ](/forum/attachment/23550 "pbl-hikashop.jpg")

- [ ![pbl-hikashop.jpg](/forum/attachment/23550) ](/forum/attachment/23550 "pbl-hikashop.jpg") [ ](/forum/attachment/23550?download=1 "pbl-hikashop.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86282
- Thank you received: 14262
-
-

11 years 6 months ago [\#197314](#197314) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197314 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Hi,

try that code instead then:
$this-&gt;addAttachment(HIKASHOP_ROOT.'media/com_hikashop/upload/safe/'.$file-&gt;file_path);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#197409](#197409) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197409 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Merci pour la réponse mais le message d'erreur existe toujours...

je dois coller la commande juste après
$t .= '&lt;a href="'.hikashop_frontendLink('index.php?option=com_hikashop&amp;ctrl=order&amp;task=download&amp;file_id='.$file-&gt;file_id.'&amp;order_id='.$oid.$file_pos.$url_itemid).'"&gt;'.$fileName.'&lt;/a&gt;&lt;br/&gt;';
ou après le " } " qui suit ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86282
- Thank you received: 14262
-
-

11 years 6 months ago [\#197472](#197472) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197472 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Essayez avec:
$this-&gt;mailer-&gt;addAttachment(HIKASHOP_ROOT.'media/com_hikashop/upload/safe/'.$file-&gt;file_path);

Juste après
$t .= '&lt;a href="'.hikashop_frontendLink('index.php?option=com_hikashop&amp;ctrl=order&amp;task=download&amp;file_id='.$file-&gt;file_id.'&amp;order_id='.$oid.$file_pos.$url_itemid).'"&gt;'.$fileName.'&lt;/a&gt;&lt;br/&gt;';
comme expliqué précédemment.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#197688](#197688) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#197688 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

ce nouveau code ne renvoie plus d'erreur, merci.

par contre pas de pièce jointe dans mon mail....
il ne peut pas y avoir de conflit avec le plugin pdf ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#198090](#198090) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198090 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Il ne devrait pas y avoir de soucis avec le plugin PDF ; les deux ne font que demander l'ajout d'une pièce jointe dans l'email.
Après il faudrait voir combien de fichier sont ajoutés et la taille totale de l'ajout ; cela pourrait être la source.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#198121](#198121) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198121 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Il n'y a au maximum que 2 fichiers pour un total de 500 Ko maxi je pense pas que ça soit trop ...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#198123](#198123) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198123 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Je sais qu'un niveau d'HikaSerial, lorsque le plugin "attach serial" ajoute des images, il n'y a pas de soucis avec le plugin PDF.
Alors je vous recommenderais de re-tester sans le patch et avec le plugin PDF afin de vérifier que l'ajout fonctionne bien.
Ensuite vous pouvez faire un nouvel essai avec le patch mais ou le plugin PDF est désactivé.

Je ne sais pas ce que vous avez configuré pour le répertoire "upload safe" mais dans le code de Nicolas ce répertoire est donné en dur. Il serait intéressant de vérifier que le chemin pointe bien sur le fichier que l'on veut ajouter. (Je ne sais pas trop comment le système va réagir si on ajoute un fichier invalide...)

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#198258](#198258) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198258 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Le plugin PDF fonctionne correctement avec ou sans le patch.
Je n'ai rien configuré de particulier pour le répertoire "upload safe" les options de configuration sont celles d'origines.

Comment peut-on tester que le chemin pointe bien vers le fichier ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#198283](#198283) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198283 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Vous essayer d'ajouter le fichier Code:

HIKASHOP_ROOT.'media/com_hikashop/upload/safe/'.$file-&gt;file_path

Il faut donc vérifier que le fichier en question existe bien.
Le plus simple serait d'afficher cette variable et ensuite vérifier sur votre serveur que le chemin est correct et pointe bien sur le fichier en question.
Vous pouvez écrire le code suivant (à l'endroit ou vous avez posé le code pour ajouter le fichier à l'email) Code:

$t .= HIKASHOP_ROOT.'media/com_hikashop/upload/safe/'.$file-&gt;file_path;

afin d'afficher le chemin dans votre email ; cela va vous permettre de faire un test et voir le résultat.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")**
- [![benji.bui's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34148-benji-bui "View benji.bui's Profile") Topic Author
- [ Offline](/forum/user/34148-benji-bui)

Less More

- Posts: 18
- Thank you received: 0
-
-

11 years 6 months ago [\#198334](#198334) by [benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")  Replied by *[benji.bui](/forum/user/34148-benji-bui "View benji.bui's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198334 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Après vérification avec votre code, le chemin est correct.

Que puis je faire d'autre ?

Merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 6 months ago [\#198425](#198425) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[joindre un fichier dans le mail de confirmation](/forum/5-support-en-francais-french-support-/876127-joindre-un-fichier-dans-le-mail-de-confirmation#198425 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.3.6  Bonjour,  Je vends des stages (produits dématérialisés) avec un fichier pdf à télécharger après payement. Je souhaiterias que ce fichier soit lié en pièce jointe dans le mail de confirmation de payement.  J'ai acheté le plugin PDF en pensant qu'il faisait le travail mais non, il ne lie que la facture ...  Y a t il un moyen pour répondre à mon besoin.  Merci.")*

Bonjour,

Si vous êtes sur et certain que le chemin est correct alors, je l'ignore.
Passer via "$mail-&gt;attachments" ne va pas spécialement changer les choses et le addAttachment est la meilleur solution.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODc2MTI3LWpvaW5kcmUtdW4tZmljaGllci1kYW5zLWxlLW1haWwtZGUtY29uZmlybWF0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.410 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
