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

#   Include fichier dans les emails

##

- **[Minie](/forum/user/43321-minie "View Minie's Profile")**
- [![Minie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar43321.jpg)](/forum/user/43321-minie "View Minie's Profile") Topic Author
- [ Offline](/forum/user/43321-minie)

Less More

- Posts: 511
- Thank you received: 37
-
-
-

4 years 4 months ago [\#343244](#343244) by [Minie](/forum/user/43321-minie "View Minie's Profile")  *[Include fichier dans les emails](/forum/5-support-en-francais-french-support-/904732-include-fichier-dans-les-emails#343244 "-- HikaShop version -- : 4.6.0  Bonjour,  J'essai d'include un fichier php contenant des variables pour gagner du temps sur la personnalisation des emails dans Hikashop mais le fichier n'est pas appelé et les variables ne sont donc pas prises en compte.  Avez-vous une solution ?  En vous remerciant par avance  Bien cordialement")* was created by *[Minie](/forum/user/43321-minie "View Minie's Profile")*

-- HikaShop version -- : 4.6.0

Bonjour,

J'essai d'include un fichier php contenant des variables pour gagner du temps sur la personnalisation des emails dans Hikashop mais le fichier n'est pas appelé et les variables ne sont donc pas prises en compte.

Avez-vous une solution ?

En vous remerciant par avance

Bien cordialement

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

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

4 years 4 months ago -  4 years 4 months ago [\#343246](#343246) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Include fichier dans les emails](/forum/5-support-en-francais-french-support-/904732-include-fichier-dans-les-emails#343246 "-- HikaShop version -- : 4.6.0  Bonjour,  J'essai d'include un fichier php contenant des variables pour gagner du temps sur la personnalisation des emails dans Hikashop mais le fichier n'est pas appelé et les variables ne sont donc pas prises en compte.  Avez-vous une solution ?  En vous remerciant par avance  Bien cordialement")*

Bonjour,

Afin de mieux vous répondre pouvez préciser un peu votre idée et votre besoin ?
Et plus spécifiquement ce que vous entendez par "**variables**" et le **fichier php**, soyez le plus détaillé possible afin de nous permettre des conseils qui vous soit spécifique et surtout éfficace pour votre besoin.

Cordialement

Last edit: 4 years 4 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

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

- **[Minie](/forum/user/43321-minie "View Minie's Profile")**
- [![Minie's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar43321.jpg)](/forum/user/43321-minie "View Minie's Profile") Topic Author
- [ Offline](/forum/user/43321-minie)

Less More

- Posts: 511
- Thank you received: 37
-
-
-

4 years 4 months ago [\#343260](#343260) by [Minie](/forum/user/43321-minie "View Minie's Profile")  Replied by *[Minie](/forum/user/43321-minie "View Minie's Profile")* on topic *[Include fichier dans les emails](/forum/5-support-en-francais-french-support-/904732-include-fichier-dans-les-emails#343260 "-- HikaShop version -- : 4.6.0  Bonjour,  J'essai d'include un fichier php contenant des variables pour gagner du temps sur la personnalisation des emails dans Hikashop mais le fichier n'est pas appelé et les variables ne sont donc pas prises en compte.  Avez-vous une solution ?  En vous remerciant par avance  Bien cordialement")*

Au temps pour moi Philip, peut être un problème de cache ou autre, tout fonctionne correctement maintenant.

Je souhaitai simplement chargé un fichier "var_email.php" contenant des variables pour modifier le style des balises sans devoir copier/coller les variables dans chaque fichier, ci-dessous le code en question
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 4.5.1 * @author hikashop.com * @copyright (C) 2010-2022 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); include('var_email.php'); ?&gt; &lt;table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="&lt;?= $size_normal . $font_family . $line_height . $color; ?&gt;"&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td class="w560 pict" width="560"&gt; &lt;div id="title"&gt; &lt;h1 style="&lt;?= $size_h1 . $center . $padding_section . $color . $border_none; ?&gt;"&gt; {TXT:ORDER_TITLE} &lt;/h1&gt; &lt;h2 style="&lt;?= $size_normal . $center . $padding_section . $color . $line_height . $border_top . $border_bottom; ?&gt;"&gt; {TXT:ORDER_CHANGED} &lt;/h2&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;td style="&lt;?= $bg_light; ?&gt;"&gt; &lt;div class="w550" width="550" id="content" style="&lt;?= $size_normal . $font_family . $line_height . $left; ?&gt;"&gt; &lt;!-- &lt;p&gt; &lt;h3 style="&lt;?= $size_h3 . $center . $padding_section . $color; ?&gt;"&gt;{TXT:HI_CUSTOMER}&lt;/h3&gt; {TXT:ORDER_BEGIN_MESSAGE} &lt;/p&gt; --&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="550"&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt; &lt;td style="&lt;?= $size_h3 . $color_client . $padding_section; ?&gt;"&gt;{TXT:BILLING_ADDRESS}&lt;/td&gt; &lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;!--{IF:SHIPPING_ADDRESS}--&gt; &lt;td style="&lt;?= $size_h3 . $color_client . $padding_section; ?&gt;"&gt;{TXT:SHIPPING_ADDRESS}&lt;/td&gt; &lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;tr&gt; &lt;!--{IF:BILLING_ADDRESS}--&gt; &lt;td style="&lt;?= $size_normal . $font_family . $line_height; ?&gt;"&gt;{VAR:BILLING_ADDRESS}&lt;/td&gt; &lt;!--{ENDIF:BILLING_ADDRESS}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;!--{IF:SHIPPING_ADDRESS}--&gt; &lt;td style="&lt;?= $size_normal . $font_family . $line_height; ?&gt;"&gt;{VAR:SHIPPING_ADDRESS}&lt;/td&gt; &lt;!--{ENDIF:SHIPPING_ADDRESS}--&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;/tr&gt; &lt;/table&gt; &lt;h1 style="&lt;?= $size_h3 . $padding_section. $color_client . $border_none; ?&gt;"&gt; {TXT:SUMMARY_OF_YOUR_ORDER} &lt;/h1&gt; &lt;!--{START:VENDOR_LINE}--&gt; &lt;!--{IF:VENDOR_CONTENT}--&gt;{VAR:VENDOR_CONTENT} &lt;!--{ENDIF:VENDOR_CONTENT}--&gt; &lt;table class="w550" border="0" cellspacing="0" cellpadding="0" width="100%"&gt; &lt;tr&gt; &lt;td style="&lt;?= $size_normal . $weight_bold . $color_client . $padding_section . $border_bottom; ?&gt;"&gt;{TXT:PRODUCT_NAME}&lt;/td&gt; {TXT:CUSTOMFIELD_NAME} &lt;!--&lt;td style="&lt;?= $size_normal . $weight_bold . $color_client . $padding_section . $border_bottom; ?&gt;"&gt;{TXT:PRODUCT_PRICE}&lt;/td&gt;--&gt; &lt;td style="&lt;?= $size_normal . $weight_bold . $color_client . $center . $padding_section . $border_bottom; ?&gt;"&gt;{TXT:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="&lt;?= $size_normal . $weight_bold . $color_client . $right . $padding_section . $border_bottom; ?&gt;"&gt;{TXT:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{START:PRODUCT_LINE}--&gt; &lt;tr&gt; &lt;td style="&lt;?= $padding_product . $border_product; ?&gt;"&gt; {LINEVAR:PRODUCT_IMG} {LINEVAR:PRODUCT_NAME} &lt;!--{IF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_CODE} &lt;!--{ENDIF:ORDER_PRODUCT_CODE}--&gt; {LINEVAR:PRODUCT_DOWNLOAD} {LINEVAR:PRODUCT_DETAILS} &lt;/td&gt; {LINEVAR:CUSTOMFIELD_VALUE} &lt;!--&lt;td style=""&gt;{LINEVAR:PRODUCT_PRICE}&lt;/td&gt;--&gt; &lt;td style="&lt;?= $center . $padding_product . $border_product; ?&gt;"&gt;{LINEVAR:PRODUCT_QUANTITY}&lt;/td&gt; &lt;td style="&lt;?= $right . $padding_product . $border_product; ?&gt;"&gt;{LINEVAR:PRODUCT_TOTAL}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:PRODUCT_LINE}--&gt; &lt;!--{START:ORDER_FOOTER}--&gt; &lt;tr&gt; &lt;td class="{LINEVAR:CLASS}_label" colspan="2" style="&lt;?= $right . $weight_bold . $padding_section; ?&gt;"&gt;{LINEVAR:NAME}&lt;/td&gt; &lt;td class="{LINEVAR:CLASS}_value" style="&lt;?= $right . $padding_section.$weight_bold; ?&gt;"&gt;{LINEVAR:VALUE}&lt;/td&gt; &lt;/tr&gt; &lt;!--{END:ORDER_FOOTER}--&gt; &lt;/table&gt; &lt;!--{END:VENDOR_LINE}--&gt; &lt;!--{IF:PAYMENT}--&gt; &lt;p&gt; &lt;span style="&lt;?= $size_h3 . $color_client . $padding_section; ?&gt;"&gt;{TXT:PAYMENT_METHOD} :&lt;/span&gt; {VAR:PAYMENT} &lt;/p&gt; &lt;!--{ENDIF:PAYMENT}--&gt; &lt;!--{IF:SHIPPING}--&gt; &lt;p&gt; &lt;span style="&lt;?= $size_h3 . $color_client . $padding_section; ?&gt;"&gt;{TXT:HIKASHOP_SHIPPING_METHOD} :&lt;/span&gt; {VAR:SHIPPING} &lt;/p&gt; &lt;!--{ENDIF:SHIPPING}--&gt; &lt;!--{IF:ORDER_SUMMARY}--&gt; &lt;h1 style="&lt;?= $size_h3 . $color_client . $padding_section . $border_none; ?&gt;"&gt; {TXT:ADDITIONAL_INFORMATION} &lt;/h1&gt; &lt;p style=""&gt; {VAR:ORDER_SUMMARY} &lt;/p&gt; &lt;!--{ENDIF:ORDER_SUMMARY}--&gt; &lt;!-- &lt;p&gt; {TXT:ORDER_END_MESSAGE} &lt;/p&gt; --&gt; &lt;/div&gt; &lt;/td&gt; &lt;td class="w20" width="20"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;

Code:

&lt;?php $bg_light = 'background-color:#ffffff;'; $bg_gray_1 = 'background-color:#f9f9f9;'; $bg_gray_2 = 'background-color:#f5f5f5;'; $bg_gray_3 = 'background-color:#f1f1f1;'; $color = 'color:#38305b !important;'; $color_client = 'color:#c769bd;'; $font_family = 'font-family:Arial, Helvetica,sans-serif;'; $size_normal = 'font-size:17px;'; $size_h1 = 'font-size:30px;'; $size_h2 = 'font-size:26px;'; $size_h3 = 'font-size:22px;'; $size_h4 = 'font-size:18px;'; $weight_bold = 'font-weight:bold;'; $line_height = 'line-height:1.5;'; $padding_section = 'padding:20px 0;'; $padding_bottom = 'padding-bottom:10px;'; $center = 'text-align:center;'; $right = 'text-align:right;'; $left = 'text-align:left;'; $pointer = 'cursor:pointer;'; $border_none = 'border:none;'; $border_top = 'border-top:3px solid #c769bd;'; $border_bottom = 'border-bottom:3px solid #c769bd;'; $decoration = 'text-decoration:none;'; $padding_product = 'padding:5px;'; $border_product = 'border-bottom:1px solid #f5f5f5';

Désolé pour le dérangement.

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vOTA0NzMyLWluY2x1ZGUtZmljaGllci1kYW5zLWxlcy1lbWFpbHM/dG1wbD1tYXJrZG93bg==) 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.054 seconds

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