Skip to content

Commit 46bf3ba

Browse files
empiricompanyfballianokiatng
authored
New feature: Added "Newsletter Subscription Form" widget (#4095)
* add newsletter subscribe form widget * add translation * fix php cs * update copyright * newline at the end * Update app/code/core/Mage/Newsletter/Block/Widget/Subscribe.php Co-authored-by: Fabrizio Balliano <[email protected]> * update labels * update translation * add translation default template --------- Co-authored-by: Fabrizio Balliano <[email protected]> Co-authored-by: Ng Kiat Siong <[email protected]>
1 parent 87a08d2 commit 46bf3ba

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* OpenMage
4+
*
5+
* This source file is subject to the Open Software License (OSL 3.0)
6+
* that is bundled with this package in the file LICENSE.txt.
7+
* It is also available at https://opensource.org/license/osl-3-0-php
8+
*
9+
* @category Mage
10+
* @package Mage_Newsletter
11+
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
12+
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org)
13+
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
14+
*/
15+
16+
/**
17+
* Newsletter subscribe form Widget
18+
*
19+
* @category Mage
20+
* @package Mage_Newsletter
21+
* @method string getSuccessMessage()
22+
* @method string getErrorMessage()
23+
* @method string getFormActionUrl()
24+
*/
25+
class Mage_Newsletter_Block_Widget_Subscribe extends Mage_Newsletter_Block_Subscribe implements Mage_Widget_Block_Interface
26+
{
27+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* OpenMage
5+
*
6+
* This source file is subject to the Academic Free License (AFL 3.0)
7+
* that is bundled with this package in the file LICENSE_AFL.txt.
8+
* It is also available at https://opensource.org/license/afl-3-0-php
9+
*
10+
* @category Mage
11+
* @package Mage_Newsletter
12+
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com)
13+
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org)
14+
* @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
15+
*/
16+
-->
17+
<widgets>
18+
<newsletter_subscribe type="newsletter/widget_subscribe" translate="name description" module="newsletter">
19+
<name>Newsletter Subscription Form</name>
20+
<description>Newsletter Subscribe Form</description>
21+
<is_email_compatible>0</is_email_compatible>
22+
<parameters>
23+
<template translate="label">
24+
<label>Template</label>
25+
<visible>1</visible>
26+
<type>select</type>
27+
<value>newsletter/subscribe.phtml</value>
28+
<values>
29+
<default translate="label">
30+
<value>newsletter/subscribe.phtml</value>
31+
<label>Default Template</label>
32+
</default>
33+
</values>
34+
<sort_order>10</sort_order>
35+
</template>
36+
</parameters>
37+
</newsletter_subscribe>
38+
</widgets>

app/locale/en_US/Mage_Newsletter.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,5 @@
140140
"You have been unsubscribed.","You have been unsubscribed."
141141
"Your subscription has been confirmed.","Your subscription has been confirmed."
142142
"This email address is already confirmed.","This email address is already confirmed."
143+
"Newsletter Subscription Form","Newsletter Subscription Form"
144+
"Default Template","Default Template"

0 commit comments

Comments
 (0)