-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configurable email template for new password
- Loading branch information
Showing
5 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php declare(strict_types=1); | ||
/** | ||
* @copyright Copyright (c) Vendic B.V https://vendic.nl/ | ||
*/ | ||
|
||
namespace Vendic\HyvaCheckoutCreateAccount\Model; | ||
|
||
use Magento\Framework\App\Config\ScopeConfigInterface; | ||
use Magento\Store\Model\ScopeInterface; | ||
|
||
class Config | ||
{ | ||
private const NEW_PASSWORD_TEMPLATE = 'hyva_themes_checkout/new_customer/create_password_template'; | ||
|
||
public function __construct(private ScopeConfigInterface $scopeConfig) | ||
{ | ||
} | ||
|
||
public function getNewPasswordTemplate(): string | ||
{ | ||
return $this->scopeConfig->getValue( | ||
self::NEW_PASSWORD_TEMPLATE, | ||
ScopeInterface::SCOPE_STORE | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd"> | ||
<system> | ||
<section id="hyva_themes_checkout"> | ||
<include path="Vendic_HyvaCheckout::system/new_customer.xml"/> | ||
</section> | ||
</system> | ||
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" ?> | ||
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd"> | ||
<group id="new_customer" | ||
showInDefault="1" | ||
showInWebsite="1" | ||
showInStore="1" | ||
sortOrder="55" | ||
translate="label"> | ||
<label>New Customer</label> | ||
|
||
<field id="create_password_template" | ||
type="select" | ||
translate="label" | ||
showInDefault="1" | ||
showInWebsite="1" | ||
showInStore="1" | ||
canRestore="1"> | ||
<label>Create Password Template</label> | ||
<source_model>Magento\Config\Model\Config\Source\Email\Template</source_model> | ||
</field> | ||
|
||
</group> | ||
</include> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd"> | ||
<template id="hyva_themes_checkout_new_customer_create_password_template" label="Create Password" file="password_reset.html" type="html" module="Magento_Customer" area="frontend"/> | ||
</config> |