diff --git a/Config/config.xml b/Config/config.xml index 8338dea..b952cf3 100644 --- a/Config/config.xml +++ b/Config/config.xml @@ -12,19 +12,20 @@
- - - - - - + - - - - - - - + diff --git a/Config/module.xml b/Config/module.xml index f985f8b..070f78e 100644 --- a/Config/module.xml +++ b/Config/module.xml @@ -7,7 +7,7 @@ Wire transfer payment - 2.1.3 + 2.3.0 Thelia info@thelia.net diff --git a/Config/routing.xml b/Config/routing.xml index 892a99c..7259629 100644 --- a/Config/routing.xml +++ b/Config/routing.xml @@ -1,4 +1,9 @@ + diff --git a/Constraints/BIC.php b/Constraints/BIC.php index b961d5e..e3dfce6 100644 --- a/Constraints/BIC.php +++ b/Constraints/BIC.php @@ -22,6 +22,8 @@ /*************************************************************************************/ +declare(strict_types=1); + namespace WireTransfer\Constraints; use Symfony\Component\Validator\Constraint; diff --git a/Constraints/BICValidator.php b/Constraints/BICValidator.php index 24a4187..a9a7c51 100644 --- a/Constraints/BICValidator.php +++ b/Constraints/BICValidator.php @@ -22,9 +22,12 @@ /*************************************************************************************/ +declare(strict_types=1); + namespace WireTransfer\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; use Thelia\Core\Translation\Translator; /** @@ -43,13 +46,19 @@ class BICValidator extends ConstraintValidator { */ public function validate($value, Constraint $constraint) { + if (!$constraint instanceof BIC) { + throw new UnexpectedTypeException($constraint, BIC::class); + } + if (null === $value || '' === $value) { return; } $teststring = preg_replace('/\s+/', '', $value); - if(!preg_match("([a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?)", $teststring)) { + // A BIC is 8 or 11 characters: 6 letters + 2 alphanumerics, then an optional 3-char branch code. + // The pattern is anchored (^...$) so partial matches embedded in a longer string are rejected. + if(!preg_match('/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/', $teststring)) { $this->context->addViolation( Translator::getInstance()->trans( $constraint->message diff --git a/Controller/ConfigureController.php b/Controller/ConfigureController.php index 788ffb6..76a813e 100644 --- a/Controller/ConfigureController.php +++ b/Controller/ConfigureController.php @@ -26,14 +26,16 @@ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see . */ +declare(strict_types=1); + namespace WireTransfer\Controller; use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Session\FlashBagAwareSessionInterface; use Thelia\Controller\Admin\BaseAdminController; use Thelia\Core\HttpFoundation\Request; use Thelia\Core\Security\AccessManager; use Thelia\Core\Security\Resource\AdminResources; -use Thelia\Core\Translation\Translator; use Thelia\Form\Exception\FormValidationException; use Thelia\Tools\URL; use WireTransfer\Form\ConfigurationForm; @@ -46,7 +48,7 @@ */ class ConfigureController extends BaseAdminController { - public function configure(Request $request, Translator $translator) + public function configure(Request $request) { if (null !== $response = $this->checkAuth(AdminResources::MODULE, 'WireTransfer', AccessManager::UPDATE)) { return $response; @@ -87,18 +89,22 @@ public function configure(Request $request, Translator $translator) $error_msg = $ex->getMessage(); } - // At this point, the form has errors, and should be redisplayed. We don not redirect, - // just redisplay the same template. // Setup the Form error context, to make error information available in the template. $this->setupFormErrorContext( - $translator->trans('Wire transfer configuration', [], WireTransfer::MESSAGE_DOMAIN), + $this->translator->trans('Wire transfer configuration', [], WireTransfer::MESSAGE_DOMAIN), $error_msg, $configurationForm, $ex ); - // Do not redirect at this point, or the error context will be lost. - // Just redisplay the current template. - return $this->render('module-configure', ['module_code' => 'WireTransfer']); + // The configuration screen is rendered through a hook, so redirect back to the module + // configuration page. That redirect drops the ParserContext form error, hence the flash + // bag (rendered by the default-twig base template as app.flashes). + $session = $request->getSession(); + if ($session instanceof FlashBagAwareSessionInterface) { + $session->getFlashBag()->add('danger', $error_msg); + } + + return new RedirectResponse(URL::getInstance()->absoluteUrl('/admin/module/WireTransfer')); } } diff --git a/Form/ConfigurationForm.php b/Form/ConfigurationForm.php index 70e34a5..3fc69bc 100644 --- a/Form/ConfigurationForm.php +++ b/Form/ConfigurationForm.php @@ -26,6 +26,8 @@ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see . */ +declare(strict_types=1); + namespace WireTransfer\Form; use Symfony\Component\Form\Extension\Core\Type\TextareaType; @@ -44,7 +46,10 @@ */ class ConfigurationForm extends BaseForm { - protected function trans($str, $params = []) + /** + * @param array $params + */ + protected function trans(string $str, array $params = []): string { return Translator::getInstance()->trans($str, $params, WireTransfer::MESSAGE_DOMAIN); } @@ -58,7 +63,7 @@ protected function buildForm(): void [ 'constraints' => [new NotBlank()], 'required' => true, - 'label' => Translator::getInstance()->trans('Account holder name', [], WireTransfer::MESSAGE_DOMAIN), + 'label' => $this->trans('Account holder name'), 'data' => WireTransfer::getConfigValue('name', ''), 'label_attr' => [ 'for' => 'namefield', @@ -71,7 +76,7 @@ protected function buildForm(): void [ 'constraints' => [new NotBlank(), new Iban()], 'required' => true, - 'label' => Translator::getInstance()->trans('IBAN (International Bank Account Number)', [], WireTransfer::MESSAGE_DOMAIN), + 'label' => $this->trans('IBAN (International Bank Account Number)'), 'data' => WireTransfer::getConfigValue('iban', ''), 'label_attr' => [ 'for' => 'ibanfield', @@ -84,7 +89,7 @@ protected function buildForm(): void [ 'constraints' => [new NotBlank(), new BIC()], 'required' => true, - 'label' => Translator::getInstance()->trans('BIC (Bank Identifier Code)', [], WireTransfer::MESSAGE_DOMAIN), + 'label' => $this->trans('BIC (Bank Identifier Code)'), 'data' => WireTransfer::getConfigValue('bic', ''), 'label_attr' => [ 'for' => 'bicfield', @@ -96,7 +101,7 @@ protected function buildForm(): void TextareaType::class, [ 'required' => false, - 'label' => Translator::getInstance()->trans('Message displayed to your customer when order is placed', [], WireTransfer::MESSAGE_DOMAIN), + 'label' => $this->trans('Message displayed to your customer when order is placed'), 'data' => WireTransfer::getConfigValue('message', ''), 'label_attr' => [ 'for' => 'messagefield', @@ -109,7 +114,7 @@ protected function buildForm(): void /** * @return string the name of you form. This name must be unique */ - public static function getName() + public static function getName(): string { return 'configurewiretransfer'; } diff --git a/Hook/Back/ConfigurationHook.php b/Hook/Back/ConfigurationHook.php new file mode 100644 index 0000000..6f45fda --- /dev/null +++ b/Hook/Back/ConfigurationHook.php @@ -0,0 +1,62 @@ + [ + ['type' => 'back', 'method' => 'onModuleConfiguration'], + ], + ]; + } + + public function onModuleConfiguration(HookRenderEvent $event): void + { + if ('WireTransfer' !== $event->getArgument('modulecode')) { + return; + } + + $event->add( + $this->render('WireTransfer/module-configuration.html.twig', [ + 'config_form' => $this->formFactory + ->createForm(ConfigurationForm::getName(), FormType::class) + ->createView() + ->getView(), + ]) + ); + } +} diff --git a/Hook/HookManager.php b/Hook/HookManager.php deleted file mode 100644 index 610dc89..0000000 --- a/Hook/HookManager.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class HookManager extends BaseHook { - - public function onAdditionalPaymentInfo(HookRenderEvent $event) - { - $content = $this->render("order-placed.additional-payment-info.html", [ - 'placed_order_id' => $event->getArgument('placed_order_id') - ]); - - $event->add($content); - } -} \ No newline at end of file diff --git a/I18n/en_US.php b/I18n/en_US.php index 74b9519..bd1017b 100644 --- a/I18n/en_US.php +++ b/I18n/en_US.php @@ -3,8 +3,11 @@ return array( 'Account holder name' => 'Account holder name', 'BIC (Bank Identifier Code)' => 'BIC (Bank Identifier Code)', + 'BIC code' => 'BIC code', 'Bank information parameters have not been defined.' => 'Bank information parameters have not been defined.', + 'IBAN' => 'IBAN', 'IBAN (International Bank Account Number)' => 'IBAN (International Bank Account Number)', 'Message displayed to your customer when order is placed' => 'Message displayed to your customer when order is placed', 'Wire transfer configuration' => 'Wire transfer configuration', + 'You may now do a transfer to this bank account: ' => 'You may now do a transfer to this bank account: ', ); diff --git a/I18n/fr_FR.php b/I18n/fr_FR.php index eae24e8..d1179aa 100644 --- a/I18n/fr_FR.php +++ b/I18n/fr_FR.php @@ -3,8 +3,11 @@ return array( 'Account holder name' => 'Titulaire du compte', 'BIC (Bank Identifier Code)' => 'BIC (Bank Identifier Code)', + 'BIC code' => 'Code BIC', 'Bank information parameters have not been defined.' => 'Les paramètres bancaires n\'ont pas été définis', + 'IBAN' => 'IBAN', 'IBAN (International Bank Account Number)' => 'IBAN (International Bank Account Number)', 'Message displayed to your customer when order is placed' => 'Message affiché à vos clients une fois leur commande payée', 'Wire transfer configuration' => 'Informations de virement', + 'You may now do a transfer to this bank account: ' => 'Merci de virer le montant de votre commande sur le compte suivant :', ); diff --git a/I18n/frontOffice/default/en_US.php b/I18n/frontOffice/default/en_US.php deleted file mode 100644 index 14f7de6..0000000 --- a/I18n/frontOffice/default/en_US.php +++ /dev/null @@ -1,9 +0,0 @@ - 'Account holder name', - 'BIC code' => 'BIC code', - 'IBAN' => 'IBAN', - 'This order has not been paid using a bank transfert' => 'This order has not been paid using a bank transfert', - 'You may now do a transfer to this bank account: ' => 'You may now do a transfer to this bank account: ', -); diff --git a/I18n/frontOffice/default/fr_FR.php b/I18n/frontOffice/default/fr_FR.php deleted file mode 100644 index 3979f60..0000000 --- a/I18n/frontOffice/default/fr_FR.php +++ /dev/null @@ -1,9 +0,0 @@ - 'Titulaire du compte', - 'BIC code' => 'Code BIC', - 'IBAN' => 'IBAN', - 'This order has not been paid using a bank transfert' => 'Cette commande n\'a pas été payée par virement bancaire.', - 'You may now do a transfer to this bank account: ' => 'Merci de virer le montant de votre commande sur le compte suivant :', -); diff --git a/Listener/SendPaymentConfirmationEmail.php b/Listener/SendPaymentConfirmationEmail.php index f1f1788..0678ae9 100644 --- a/Listener/SendPaymentConfirmationEmail.php +++ b/Listener/SendPaymentConfirmationEmail.php @@ -21,85 +21,67 @@ /* */ /*************************************************************************************/ +declare(strict_types=1); + namespace WireTransfer\Listener; -use WireTransfer\WireTransfer; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Thelia\Action\BaseAction; use Thelia\Core\Event\Order\OrderEvent; use Thelia\Core\Event\TheliaEvents; use Thelia\Mailer\MailerFactory; -use Thelia\Core\Template\ParserInterface; use Thelia\Model\ConfigQuery; -use Thelia\Model\MessageQuery; +use WireTransfer\WireTransfer; + /** - * Class SendEMail - * @package IciRelais\Listener - * @author Thelia + * Sends the wire-transfer confirmation email once the order is marked as paid. + * + * Registered by auto-discovery only (`WireTransfer::configureServices()`). It must NOT also be + * declared in Config/config.xml: two service ids for one subscriber class means two listeners, + * and the customer gets the email twice. */ class SendPaymentConfirmationEmail extends BaseAction implements EventSubscriberInterface { - - /** - * @var MailerFactory - */ - protected $mailer; - /** - * @var ParserInterface - */ - protected $parser; - - public function __construct(ParserInterface $parser,MailerFactory $mailer) - { - $this->parser = $parser; - $this->mailer = $mailer; + public function __construct( + private readonly MailerFactory $mailer, + ) { } - /** - * @return \Thelia\Mailer\MailerFactory - */ - public function getMailer() + public function getMailer(): MailerFactory { return $this->mailer; } - /* - * @params OrderEvent $order - * - * Checks if order delivery module is icirelais and if order new status is sent, send an email to the customer. + /** + * Notifies the customer once an order paid by wire transfer reaches the paid status. */ - public function sendConfirmationEmail(OrderEvent $event) + public function sendConfirmationEmail(OrderEvent $event): void { - if ($event->getOrder()->getPaymentModuleId() === WireTransfer::getModuleId()) { - if ($event->getOrder()->isPaid()) { - $contact_email = ConfigQuery::getStoreEmail(); + $order = $event->getOrder(); - if ($contact_email) { - $order = $event->getOrder(); - $customer = $order->getCustomer(); + if ($order->getPaymentModuleId() !== WireTransfer::getModuleId() || !$order->isPaid()) { + return; + } - $this->getMailer()->sendEmailToCustomer( - 'order_confirmation_wiretransfer', - $customer, - [ - 'order_id' => $order->getId(), - 'order_ref'=> $order->getRef() - ] - ); - } - } + // No store email configured means the mailer has no sender to work with. + if (!ConfigQuery::getStoreEmail()) { + return; } + $this->getMailer()->sendEmailToCustomer( + 'order_confirmation_wiretransfer', + $order->getCustomer(), + [ + 'order_id' => $order->getId(), + 'order_ref' => $order->getRef(), + ] + ); } - /** - * @inheritdoc - */ - public static function getSubscribedEvents() + public static function getSubscribedEvents(): array { - return array( - TheliaEvents::ORDER_UPDATE_STATUS => array("sendConfirmationEmail", 128) - ); + return [ + TheliaEvents::ORDER_UPDATE_STATUS => ['sendConfirmationEmail', 128], + ]; } - } diff --git a/Loop/GetBankInformation.php b/Loop/GetBankInformation.php index 42ff5a4..400ee69 100644 --- a/Loop/GetBankInformation.php +++ b/Loop/GetBankInformation.php @@ -26,6 +26,8 @@ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see . */ +declare(strict_types=1); + namespace WireTransfer\Loop; use Thelia\Core\Template\Element\ArraySearchLoopInterface; @@ -47,11 +49,11 @@ class GetBankInformation extends BaseLoop implements ArraySearchLoopInterface /** * @return LoopResult */ - public function parseResults(LoopResult $loopResult) + public function parseResults(LoopResult $loopResult): LoopResult { $order = OrderQuery::create()->findPk($this->getOrderId()); - if ($order !== null || $order->getPaymentModuleId() === WireTransfer::getModuleId()) { + if ($order !== null && $order->getPaymentModuleId() === WireTransfer::getModuleId()) { $loopResultRow = new LoopResultRow(); $loopResultRow @@ -67,7 +69,7 @@ public function parseResults(LoopResult $loopResult) return $loopResult; } - protected function getArgDefinitions() + protected function getArgDefinitions(): ArgumentCollection { return new ArgumentCollection( Argument::createIntTypeArgument('order_id', null, true, false) @@ -79,7 +81,7 @@ protected function getArgDefinitions() * * @return array */ - public function buildArray() + public function buildArray(): array { // Return an array containing one element, so that parseResults() will be called one time. return ['one-element']; diff --git a/README.md b/README.md index 832c4bf..456d4d7 100644 --- a/README.md +++ b/README.md @@ -129,4 +129,44 @@ The content of this e-mail could be configured in the back-office -> Le contenu ### Integration The bank account information are displayed in `order-placed.html` file of the default front office template, -using the `order-placed.additional-payment-info` hook. \ No newline at end of file +using the `order-placed.additional-payment-info` hook. + + +Thelia 3 (version 2.3.0+) +------------------------- + +À partir de la 2.3.0, le module est **Thelia 3 uniquement** (branche twig, Symfony 7.4, PHP 8.3, Flexy). +Le support Thelia 2 a été retiré : pour Thelia 2.5, utilisez la ligne 2.1. As of 2.3.0 the module is +**Thelia 3 only**; use the 2.1 line for Thelia 2.5. + +### Rendu des surfaces / Where each surface lives + +- **Back-office** : la page de configuration est rendue via le hook + `WireTransfer\Hook\Back\ConfigurationHook` (`module.configuration`, déclaré par + `getSubscribedHooks()`, donc auto-découvert — `Config/config.xml` n'a plus de section ``), + template `templates/backOffice/default-twig/WireTransfer/module-configuration.html.twig`. +- **Front-office** : Thelia 3 a supprimé les hooks Smarty du front **sans remplacement + fonctionnel** — `ThemeHookInterface` et le tag `thelia.theme_hook` existent, mais rien ne + consomme le tag et aucune fonction Twig `theme_hook()` n'est enregistrée. Les coordonnées + bancaires sont donc exposées par une **fonction Twig** : + + ```twig + {{ wiretransfer_bank_info(order_id) }} + ``` + + Elle ne rend rien si la commande n'a pas été payée par virement. Le markup est construit par + `WireTransfer\Service\WireTransferBankInfoRenderer`, qui est la **seule barrière + d'échappement** — le message configuré par le marchand est volontairement rendu brut. +- **Routes** : déclarées dans `Config/routing.xml` **uniquement**, sans attribut `#[Route]` — + Thelia 3 charge les deux mécanismes et enregistrerait la route en double (chemin inchangé + `/admin/wiretransfer/configure`). +- **Traductions** : les libellés front vivent désormais dans le domaine racine du module + (`wiretransfer`, `I18n/en_US.php` et `I18n/fr_FR.php`) et non plus dans `wiretransfer.fo.default`. + Ce domaine-là n'existait que parce que Thelia le construit en scannant `templates/frontOffice/*` : + supprimer le dossier Smarty aurait désenregistré le catalogue. + +### Boucle `wiretransfer.get.info` + +Toujours disponible et inchangée : elle retourne `ACCOUNT_HOLDER_NAME`, `IBAN`, `BIC`, `MESSAGE` +pour un `order_id`. Sous Flexy, préférez la fonction Twig `wiretransfer_bank_info()` ci-dessus, qui +encapsule cette logique — la boucle n'a plus de consommateur dans le module. \ No newline at end of file diff --git a/Service/WireTransferBankInfoRenderer.php b/Service/WireTransferBankInfoRenderer.php new file mode 100644 index 0000000..79911da --- /dev/null +++ b/Service/WireTransferBankInfoRenderer.php @@ -0,0 +1,66 @@ +findPk((int) $orderId); + if (null === $order || $order->getPaymentModuleId() !== WireTransfer::getModuleId()) { + return ''; + } + + $name = htmlspecialchars((string) WireTransfer::getConfigValue('name'), ENT_QUOTES); + $iban = htmlspecialchars((string) WireTransfer::getConfigValue('iban'), ENT_QUOTES); + $bic = htmlspecialchars((string) WireTransfer::getConfigValue('bic'), ENT_QUOTES); + $message = (string) WireTransfer::getConfigValue('message'); + + $translator = Translator::getInstance(); + $intro = htmlspecialchars($translator->trans('You may now do a transfer to this bank account: ', [], WireTransfer::MESSAGE_DOMAIN), ENT_QUOTES); + $holderLabel = htmlspecialchars($translator->trans('Account holder name', [], WireTransfer::MESSAGE_DOMAIN), ENT_QUOTES); + $ibanLabel = htmlspecialchars($translator->trans('IBAN', [], WireTransfer::MESSAGE_DOMAIN), ENT_QUOTES); + $bicLabel = htmlspecialchars($translator->trans('BIC code', [], WireTransfer::MESSAGE_DOMAIN), ENT_QUOTES); + + // The merchant-configured message is trusted admin content, so it is rendered raw. + $messageBlock = '' !== $message ? '
'.$message.'
' : ''; + + return << +

{$intro}

+
+
{$holderLabel} :
{$name}
+
{$ibanLabel} :
{$iban}
+
{$bicLabel} :
{$bic}
+
+ {$messageBlock} + +HTML; + } +} diff --git a/Twig/WireTransferExtension.php b/Twig/WireTransferExtension.php new file mode 100644 index 0000000..de0c94f --- /dev/null +++ b/Twig/WireTransferExtension.php @@ -0,0 +1,42 @@ +renderer->bankInfo(...), ['is_safe' => ['html']]), + ]; + } +} diff --git a/WireTransfer.php b/WireTransfer.php index 19ce2aa..8d56d4a 100644 --- a/WireTransfer.php +++ b/WireTransfer.php @@ -26,12 +26,15 @@ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see . */ +declare(strict_types=1); + namespace WireTransfer; use Propel\Runtime\Connection\ConnectionInterface; use Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator; +use Symfony\Component\HttpFoundation\Response; +use Thelia\Core\Install\Database; use Thelia\Core\Translation\Translator; -use Thelia\Install\Database; use Thelia\Log\Tlog; use Thelia\Model\MessageQuery; use Thelia\Model\Order; @@ -44,9 +47,10 @@ class WireTransfer extends AbstractPaymentModule { public const MESSAGE_DOMAIN = 'wiretransfer'; - public function pay(Order $order): void + public function pay(Order $order): ?Response { - // Nothing special to do. + // Nothing special to do (offline payment). + return null; } /** @@ -74,9 +78,13 @@ public function isValidPayment(): bool return $valid && $this->getCurrentOrderTotalAmount() > 0; } - public function install(ConnectionInterface $con = null): void + public function install(?ConnectionInterface $con = null): void { - $database = new Database($con->getWrappedConnection()); + // $con is passed straight through: Database's constructor accepts + // ConnectionInterface|PDO|null, unwraps a ConnectionWrapper itself and falls back to a + // Propel write connection when given null. Calling getWrappedConnection() here would + // duplicate that and blow up on the null the signature explicitly allows. + $database = new Database($con); // Insert email message $database->insertSql(null, [__DIR__.'/Config/setup.sql']); @@ -84,12 +92,12 @@ public function install(ConnectionInterface $con = null): void /* insert the images from image folder if not already done */ $moduleModel = $this->getModuleModel(); - if (!$moduleModel->isModuleImageDeployed($con)) { + if (!$moduleModel->isModuleImageDeployed()) { $this->deployImageFolder($moduleModel, sprintf('%s/images', __DIR__), $con); } } - public function destroy(ConnectionInterface $con = null, $deleteModuleData = false): void + public function destroy(?ConnectionInterface $con = null, $deleteModuleData = false): void { // Delete our message if (null !== $message = MessageQuery::create()->findOneByName('order_confirmation_wiretransfer')) { @@ -111,7 +119,7 @@ public function manageStockOnCreation(): bool public static function configureServices(ServicesConfigurator $servicesConfigurator): void { $servicesConfigurator->load(self::getModuleCode().'\\', __DIR__) - ->exclude([THELIA_MODULE_DIR.ucfirst(self::getModuleCode()).'/I18n/*']) + ->exclude([__DIR__.'/I18n/*']) ->autowire(true) ->autoconfigure(true); } diff --git a/templates/backOffice/default-twig/WireTransfer/module-configuration.html.twig b/templates/backOffice/default-twig/WireTransfer/module-configuration.html.twig new file mode 100644 index 0000000..687e40f --- /dev/null +++ b/templates/backOffice/default-twig/WireTransfer/module-configuration.html.twig @@ -0,0 +1,39 @@ +{# WireTransfer configuration screen, rendered into the module.configuration back-office hook. #} +{% set d = 'wiretransfer.ai' %} +{% set f = config_form %} + + + + + + +
+
+ {{ 'Bank account configuration'|trans({}, d) }} +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ +
+ diff --git a/templates/backOffice/default/module_configuration.html b/templates/backOffice/default/module_configuration.html deleted file mode 100644 index f48fe0c..0000000 --- a/templates/backOffice/default/module_configuration.html +++ /dev/null @@ -1,61 +0,0 @@ -{if isset($smarty.get.errmes) && !empty($smarty.get.errmes)} -
- {$smarty.get.errmes} -
-{/if} - -
-
- -
-
- {intl d='wiretransfer.ai' l="Bank account configuration"} -
-
- -
-
-
- - {form name="transfer.configure.bic"} - -
- {include - file = "includes/inner-form-toolbar.html" - hide_flags = true - - page_url = {url path="/admin/module/WireTransfer"} - close_url = {url path="/admin/modules"} - } - - {form_hidden_fields form=$form} - - {if $form_error} -
-
-
{$form_error_message}
-
-
- {/if} - - {render_form_field field="name"} - {render_form_field field="iban"} - {render_form_field field="bic"} - {render_form_field field="message" extra_class="wysiwyg"} - - {include - file = "includes/inner-form-toolbar.html" - hide_flags = true - page_bottom = true - - page_url = {url path="/admin/module/WireTransfer"} - close_url = {url path="/admin/modules"} - } - -
- {/form} -
-
-
-
-
diff --git a/templates/frontOffice/default/order-placed.additional-payment-info.html b/templates/frontOffice/default/order-placed.additional-payment-info.html deleted file mode 100644 index cfce800..0000000 --- a/templates/frontOffice/default/order-placed.additional-payment-info.html +++ /dev/null @@ -1,23 +0,0 @@ -{ifloop rel="wiretransfer.infos"} -

{intl d='wiretransfer.fo.default' l="You may now do a transfer to this bank account: "}

- {loop name="wiretransfer.infos" type="wiretransfer.get.info" order_id=$placed_order_id} -
-
{intl d='wiretransfer.fo.default' l="Account holder name"} :
-
{$ACCOUNT_HOLDER_NAME}
- -
{intl d='wiretransfer.fo.default' l="IBAN"} :
-
{$IBAN}
- -
{intl d='wiretransfer.fo.default' l="BIC code"} :
-
{$BIC}
-
- {if $MESSAGE} -
{$MESSAGE nofilter}
- {/if} - {/loop} -{/ifloop} -{elseloop rel="wiretransfer.infos"} -
- {intl d='wiretransfer.fo.default' l="This order has not been paid using a bank transfert"} -
-{/elseloop}