From ae6f334e86bd2b207bcc5af619bd58c640177c63 Mon Sep 17 00:00:00 2001 From: Laurent LE CORRE Date: Fri, 8 May 2020 19:00:11 +0200 Subject: [PATCH] Module ColissimoWs : il manquait des choses pour la bonne gestion de la langue, dans les templates PDf et email --- .../I18n/email/default2020/fr_FR.php | 15 + .../I18n/pdf/default2020/fr_FR.php | 17 + .../email/default2020/order_shipped.html | 34 ++ .../email/default2020/order_shipped.txt | 1 + .../pdf/default2020/customs-invoice.html | 381 ++++++++++++++++++ 5 files changed, 448 insertions(+) create mode 100644 local/modules/ColissimoWs/I18n/email/default2020/fr_FR.php create mode 100644 local/modules/ColissimoWs/I18n/pdf/default2020/fr_FR.php create mode 100644 local/modules/ColissimoWs/templates/email/default2020/order_shipped.html create mode 100644 local/modules/ColissimoWs/templates/email/default2020/order_shipped.txt create mode 100644 local/modules/ColissimoWs/templates/pdf/default2020/customs-invoice.html diff --git a/local/modules/ColissimoWs/I18n/email/default2020/fr_FR.php b/local/modules/ColissimoWs/I18n/email/default2020/fr_FR.php new file mode 100644 index 00000000..51739960 --- /dev/null +++ b/local/modules/ColissimoWs/I18n/email/default2020/fr_FR.php @@ -0,0 +1,15 @@ +Click here to track your shipment. You can also enter the tracking number on https://www.laposte.fr/outils/suivre-vos-envois' => 'Cliquez ici pour suivre l\'acheminement. Vous pouvez aussi entrer le numéro de suivi sur https://www.laposte.fr/outils/suivre-vos-envois', + 'Dear Mr. ' => 'Cher Mr', + 'Dear Ms. ' => 'Cher Mme', + 'Please display this message in HTML' => 'Afficher ce message en HTML', + 'Thank you for your shopping with us and hope to see you soon on www.yourshop.com' => 'Nous vous remercions pour votre achat et espérons vous revoir très vite sur www.votreboutique.com', + 'We are pleased to inform you that your order number' => 'Nous sommes heureux de vous informer que votre commande N°', + 'Your on-line store Manager' => 'Nom de personne chargé de la communication', + 'Your order confirmation Nº %ref' => 'Votre commande N° %ref', + 'Your shop' => 'Votre boutique', + 'has been shipped on' => 'a été envoyé le', + 'with the tracking number' => 'avec le numéro de suivi', +); diff --git a/local/modules/ColissimoWs/I18n/pdf/default2020/fr_FR.php b/local/modules/ColissimoWs/I18n/pdf/default2020/fr_FR.php new file mode 100644 index 00000000..a96d4c25 --- /dev/null +++ b/local/modules/ColissimoWs/I18n/pdf/default2020/fr_FR.php @@ -0,0 +1,17 @@ + 'Pays', + 'Engraving ' => 'Gravure', + 'Font ' => 'Police de caractère', + 'Free samples ' => 'Échantillons gratuits ', + 'Full Description of Goods' => 'Description complète des biens', + 'Position ' => 'Position', + 'Quantity' => 'Quantité', + 'Style ' => 'Style', + 'Subtotal value' => 'Sous-total', + 'Unit net weight' => 'Poids net unitaire', + 'Unit value' => 'Valeur unitaire', + 'Your gift ' => 'Votre cadeau', + 'Your text ' => 'Votre texte', +); diff --git a/local/modules/ColissimoWs/templates/email/default2020/order_shipped.html b/local/modules/ColissimoWs/templates/email/default2020/order_shipped.html new file mode 100644 index 00000000..56848c7b --- /dev/null +++ b/local/modules/ColissimoWs/templates/email/default2020/order_shipped.html @@ -0,0 +1,34 @@ +{extends file="email-layout.tpl"} + +{* Do not provide a "Open in browser" link *} +{block name="browser"}{/block} +{* No pre-header *} +{block name="pre-header"}{/block} + +{* Subject *} +{block name="email-subject"}{intl l="Your order confirmation Nº %ref" d="colissimows.email.default2020" ref={$order_ref}}{/block} + +{* Title *} +{block name="email-title"}{/block} + +{* Content *} +{block name="email-content"} + + {loop type="customer" name="customer.politesse" id={$customer_id} current="0"} + {assign var="customerRef" value=$REF} + +

{if {$TITLE} == 9}{intl l="Dear Mr. " d="colissimows.email.default2020"} + {else}{intl l="Dear Ms. " d="colissimows.email.default2020"} + {/if} + {$FIRSTNAME} {$LASTNAME}, +

+ + {/loop} + +

{intl l="We are pleased to inform you that your order number" d="colissimows.email.default2020"} {$order_ref} {intl l="has been shipped on" d="colissimows.email.default2020"} {format_date date=$update_date output="date"} {intl l="with the tracking number" d="colissimows.email.default2020"} {$package}.

+ +

{intl l='Click here to track your shipment. You can also enter the tracking number on https://www.laposte.fr/outils/suivre-vos-envois' d="colissimows.email.default2020" package=$package}

+

{intl l='Thank you for your shopping with us and hope to see you soon on www.yourshop.com' d="colissimows.email.default2020"}

+

{intl l="Your on-line store Manager" d="colissimows.email.default2020"}
+ {intl l="Your shop" d="colissimows.email.default2020"}

+{/block} diff --git a/local/modules/ColissimoWs/templates/email/default2020/order_shipped.txt b/local/modules/ColissimoWs/templates/email/default2020/order_shipped.txt new file mode 100644 index 00000000..7222a484 --- /dev/null +++ b/local/modules/ColissimoWs/templates/email/default2020/order_shipped.txt @@ -0,0 +1 @@ +{intl l="Please display this message in HTML"} diff --git a/local/modules/ColissimoWs/templates/pdf/default2020/customs-invoice.html b/local/modules/ColissimoWs/templates/pdf/default2020/customs-invoice.html new file mode 100644 index 00000000..c18fcb2a --- /dev/null +++ b/local/modules/ColissimoWs/templates/pdf/default2020/customs-invoice.html @@ -0,0 +1,381 @@ +{*************************************************************************************/ +/* This file is part of the Thelia package. */ +/* */ +/* Copyright (c) OpenStudio */ +/* email : dev@thelia.net */ +/* web : http://www.thelia.net */ +/* */ +/* For the full copyright and license information, please view the LICENSE.txt */ +/* file that was distributed with this source code. */ +/*************************************************************************************} + +{* -- Define some stuff for Smarty ------------------------------------------ *} +{assign var="store_name" value={config key="store_name"}} +{assign var="store_description" value={config key="store_description"}} +{assign var="store_phone" value={config key="store_phone"}} +{assign var="store_email" value={config key="store_email"}} +{assign var="store_description" value={config key="store_description"}} + +{assign var="store_address1" value={config key="store_address1"}} +{assign var="store_address2" value={config key="store_address2"}} +{assign var="store_address3" value={config key="store_address3"}} +{assign var="store_zipcode" value={config key="store_zipcode"}} +{assign var="store_city" value={config key="store_city"}} +{assign var="store_country_code" value={config key="store_country_code"}} + +{loop type="country" name="store_country_name_loop" id="$store_country_code"} +{assign var="store_country_name" value=$TITLE} +{/loop} + +{assign var="lang_code" value={lang attr="code"}} +{assign var="lang_locale" value={lang attr="locale"}} +{if not $store_name}{assign var="store_name" value={intl l='Thelia V2'}}{/if} +{if not $store_description}{assign var="store_description" value={$store_name}}{/if} + +{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *} +{default_translation_domain domain='colissimows.bo.default'} + +{* Declare assets directory, relative to template base directory *} +{declare_assets directory='assets'} +{literal} + + +{/literal} + + + + + + + + + + {$taxes = []} + + {loop name="order.invoice" type="order" id=$order_id customer="*"} + + {loop name="currency.order" type="currency" id=$CURRENCY} + {assign "orderCurrency" $ISOCODE} + {assign "orderCurrencySymbol" $SYMBOL} + {/loop} + + + + + + + + + + +
+ + + + + + + + + +
Sender
+

+ {$store_name} + {$store_address1}
+ {if $store_address2!=null} {$store_address2}
{/if} + {if $store_address3!=null} {$store_address3}
{/if} + {$store_zipcode} {$store_city}
+ {$store_country}
+

+
+
+ +
+
Commercial Invoice
+ Date: {format_date date=$INVOICE_DATE output="date"}
+ Invoice number: {$REF} +
+
+ + + + + + + + +
+ + + + + + + + +
Delivery address
+

+ {loop type="order_address" name="delivery_address" id=$DELIVERY_ADDRESS} + {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG} {/loop} {$FIRSTNAME} {$LASTNAME} +
+ {if ! empty($COMPANY)} + {$COMPANY} +
+ {/if} + {$ADDRESS1} {$ADDRESS2} {$ADDRESS3} +
+ {$ZIPCODE} {$CITY} +
+ {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop} +
+ {$PHONE} + {/loop} +

+
+
+ + + + + + + + +
Invoice address
+

+ {loop type="order_address" name="delivery_address" id=$INVOICE_ADDRESS} + {loop type="title" name="order-invoice-address-title" id=$TITLE}{$LONG} {/loop}{$FIRSTNAME} {$LASTNAME} +
+ {if ! empty($COMPANY)} + {$COMPANY} +
+ {/if} + {$ADDRESS1} {$ADDRESS2} {$ADDRESS3} +
+ {$ZIPCODE} {$CITY} +
+ {loop type="country" name="country_delivery" id=$COUNTRY}{$TITLE}{/loop} +
+ {$PHONE} {$MOBILE} + {/loop} +
+ {loop type="customer" name="customer_email" id=$CUSTOMER current="0"} + {$EMAIL} + {/loop} +

+
+
+
+ + {$totalValue = $TOTAL_TAXED_AMOUNT - $POSTAGE_UNTAXED} + {$itemCount = 0} + + + + + + + + + + + + + + + + + + + + + + {loop type="order_product" name="order-products" order=$ID} + {if $WAS_IN_PROMO == 1} + {assign "realPrice" $PROMO_PRICE} + {assign "realTax" $PROMO_PRICE_TAX} + {assign "realTaxedPrice" $TAXED_PROMO_PRICE} + {else} + {assign "realPrice" $PRICE} + {assign "realTax" $PRICE_TAX} + {assign "realTaxedPrice" $TAXED_PRICE} + {/if} + + {if $realTax==null} + {assign "realTax" 0} + {/if} + + {$taxes[{$TAX_RULE_TITLE}][] = $realTax * $QUANTITY} + + + + + + + + + + + {/loop} + +
{intl l="Full Description of Goods"}{intl l="Quantity"}{intl l="Unit value"}{intl l="Subtotal value"}{intl l="Unit net weight"}{intl l="Country"}{intl l="Comm. code"}
+ + {$itemCount = $itemCount + $QUANTITY} + + {$TITLE} + {ifloop rel="combinations"} +
+ {loop type="order_product_attribute_combination" name="combinations" order_product=$ID} + - {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE} +
+ {/loop} + {/ifloop} + + {loop type="marquage.orderproduct" name="gravures" order_product_id=$ID} + {loop type="marquage.police" name="police" id=$POLICE} + {$nomPolice = $NOM} + {/loop} +
+ {intl l='Engraving '}: +
+ - {intl l='Font '}: {$nomPolice} +
+ - {intl l='Position '}: {$POSITION} +
+ - {intl l='Style '}: {$TYPE} +
+ - {intl l='Your text '}: {$TEXTE} + {/loop} + +
{$QUANTITY}{format_money number=$realTaxedPrice symbol=$orderCurrencySymbol}{format_money number={$realTaxedPrice * $QUANTITY} symbol=$orderCurrencySymbol}{$WEIGHT}France 
+ + {if $POSTAGE_TAX_RULE_TITLE} + {$taxes[$POSTAGE_TAX_RULE_TITLE][] = $POSTAGE_TAX} + {/if} + + + + + + + + + + +
  +

Total declared value : {format_money number={$totalValue} symbol=$orderCurrency}

+

Total units: {$itemCount}

+
+

Total Net Weight: {$WEIGHT} kg(s)

+ {* Mettre une estimation du poids brut *} +

Total Gross Weight: {$WEIGHT + 0} kg(s)

+
+ + + + + + + + +
+

Type of Export: permanent

+

Reason for Export:

+
+

Currency Code: {$orderCurrency}

+

Terms of Trade: DAP

+

City Name of liability:

+
+ + + + + + + + + +
+

Signature: {intl l=""}

+

Airwaybill Number:

+
+

Company Stamp: {$store_name}

+

{$store_zipcode} {$store_city}

+
+ + {/loop} +
\ No newline at end of file