Skip to content

Commit

Permalink
Merge pull request magento#4157 from magento-obsessive-owls/MC-13900
Browse files Browse the repository at this point in the history
[Owls] Email to Friend Updates
  • Loading branch information
danmooney2 authored May 3, 2019
2 parents c5c1586 + 7403213 commit 4550e9f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion app/code/Magento/SendFriend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
<resource>Magento_Config::sendfriend</resource>
<group id="email" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Email Templates</label>
<field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="enabled" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enabled</label>
<comment>
<![CDATA[We strongly recommend to enable a <a href="https://devdocs.magento.com/guides/v2.3/security/google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]>
</comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="template" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/SendFriend/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<default>
<sendfriend>
<email>
<enabled>1</enabled>
<enabled>0</enabled>
<template>sendfriend_email_template</template>
<allow_guest>0</allow_guest>
<max_recipients>5</max_recipients>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/SendFriend/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Enabled,Enabled
"Max Recipients","Max Recipients"
"Max Products Sent in 1 Hour","Max Products Sent in 1 Hour"
"Limit Sending By","Limit Sending By"
"We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.3/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to enable a <a href=""https://devdocs.magento.com/guides/v2.3/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur."
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Magento\Framework\Message\MessageInterface;
use Magento\Captcha\Helper\Data as CaptchaHelper;

/**
* Class CustomerSendmailTest
*/
class CustomerSendmailTest extends AbstractController
{
/**
Expand Down Expand Up @@ -58,6 +61,7 @@ protected function setUp()
}

/**
* @magentoConfigFixture default_store sendfriend/email/enabled 1
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
*/
Expand Down Expand Up @@ -95,6 +99,7 @@ public function testExecute()
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
* @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form
* @magentoConfigFixture default_store sendfriend/email/enabled 1
*/
public function testWithCaptchaFailed()
{
Expand Down Expand Up @@ -133,7 +138,7 @@ public function testWithCaptchaFailed()
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
* @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form
*
* @magentoConfigFixture default_store sendfriend/email/enabled 1
*/
public function testWithCaptchaSuccess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SendmailTest extends AbstractController
*
* @magentoDbIsolation enabled
* @magentoAppIsolation enabled
* @magentoConfigFixture default_store sendfriend/email/enabled 1
* @magentoDataFixture Magento/SendFriend/_files/disable_allow_guest_config.php
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/products.php
Expand Down

0 comments on commit 4550e9f

Please sign in to comment.