Version Notes
Change filter by product method
Download this release
Release Info
Developer | Magento Core Team |
Extension | MailUp |
Version | 0.1.6 |
Comparing to | |
See all releases |
Code changes from version 0.1.5 to 0.1.6
- app/code/local/SevenLike/MailUp/Model/Ws.php +4 -2
- app/code/local/SevenLike/MailUp/etc/config.xml +1 -1
- app/design/adminhtml/default/default/template/sevenlike/mailup/confirm.phtml +1 -1
- app/design/adminhtml/default/default/template/sevenlike/mailup/filter.phtml +11 -30
- app/locale/en_US/SevenLike_MailUp.csv +2 -1
- app/locale/it_IT/SevenLike_MailUp.csv +2 -1
- package.xml +5 -5
app/code/local/SevenLike/MailUp/Model/Ws.php
CHANGED
@@ -191,7 +191,7 @@ class MailUpWsImport {
|
|
191 |
$result = array();
|
192 |
$tempProduct = array();
|
193 |
|
194 |
-
if ($request->getRequest()->getParam('
|
195 |
foreach ($customersFiltered as $customer) {
|
196 |
$result[] = $customer;
|
197 |
|
@@ -199,6 +199,8 @@ class MailUpWsImport {
|
|
199 |
$orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_id', $result[$count]['entity_id']);
|
200 |
$purchasedProduct = 0;
|
201 |
|
|
|
|
|
202 |
foreach($orders->getData() as $order){
|
203 |
$orderIncrementId = $order['increment_id'];
|
204 |
|
@@ -210,7 +212,7 @@ class MailUpWsImport {
|
|
210 |
$ids[]=$item->getProductId();
|
211 |
}
|
212 |
|
213 |
-
if (in_array($
|
214 |
$purchasedProduct = 1;
|
215 |
}
|
216 |
|
191 |
$result = array();
|
192 |
$tempProduct = array();
|
193 |
|
194 |
+
if ($request->getRequest()->getParam('mailupProductSku')) {
|
195 |
foreach ($customersFiltered as $customer) {
|
196 |
$result[] = $customer;
|
197 |
|
199 |
$orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_id', $result[$count]['entity_id']);
|
200 |
$purchasedProduct = 0;
|
201 |
|
202 |
+
$mailupProductId = Mage::getModel('catalog/product') ->getIdBySku($request->getRequest()->getParam('mailupProductSku'));
|
203 |
+
|
204 |
foreach($orders->getData() as $order){
|
205 |
$orderIncrementId = $order['increment_id'];
|
206 |
|
212 |
$ids[]=$item->getProductId();
|
213 |
}
|
214 |
|
215 |
+
if (in_array($mailupProductId, $ids)) {
|
216 |
$purchasedProduct = 1;
|
217 |
}
|
218 |
|
app/code/local/SevenLike/MailUp/etc/config.xml
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
|
26 |
<modules>
|
27 |
<SevenLike_MailUp>
|
28 |
-
<version>0.1.
|
29 |
</SevenLike_MailUp>
|
30 |
</modules>
|
31 |
|
25 |
|
26 |
<modules>
|
27 |
<SevenLike_MailUp>
|
28 |
+
<version>0.1.6</version>
|
29 |
</SevenLike_MailUp>
|
30 |
</modules>
|
31 |
|
app/design/adminhtml/default/default/template/sevenlike/mailup/confirm.phtml
CHANGED
@@ -28,7 +28,7 @@ $xml = simplexml_load_string($xmlLists);
|
|
28 |
<form id="back_form" name="back_form" method="post" action="<?php echo $this->getUrl('*/*/'); ?>">
|
29 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
30 |
<input type="hidden" name="mailupCustomers" value="<?php echo $this->getRequest()->getParam('mailupCustomers'); ?>" />
|
31 |
-
<input type="hidden" name="
|
32 |
<input type="hidden" name="mailupCategoryId" value="<?php echo $this->getRequest()->getParam('mailupCategoryId'); ?>" />
|
33 |
<input type="hidden" name="mailupCustomerGroupId" value="<?php echo $this->getRequest()->getParam('mailupCustomerGroupId'); ?>" />
|
34 |
<input type="hidden" name="mailupCountry" value="<?php echo $this->getRequest()->getParam('mailupCountry'); ?>" />
|
28 |
<form id="back_form" name="back_form" method="post" action="<?php echo $this->getUrl('*/*/'); ?>">
|
29 |
<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
|
30 |
<input type="hidden" name="mailupCustomers" value="<?php echo $this->getRequest()->getParam('mailupCustomers'); ?>" />
|
31 |
+
<input type="hidden" name="mailupProductSku" value="<?php echo $this->getRequest()->getParam('mailupProductSku'); ?>" />
|
32 |
<input type="hidden" name="mailupCategoryId" value="<?php echo $this->getRequest()->getParam('mailupCategoryId'); ?>" />
|
33 |
<input type="hidden" name="mailupCustomerGroupId" value="<?php echo $this->getRequest()->getParam('mailupCustomerGroupId'); ?>" />
|
34 |
<input type="hidden" name="mailupCountry" value="<?php echo $this->getRequest()->getParam('mailupCountry'); ?>" />
|
app/design/adminhtml/default/default/template/sevenlike/mailup/filter.phtml
CHANGED
@@ -9,6 +9,9 @@
|
|
9 |
$MailUpWsSend = Mage::getModel('mailup/wssend');
|
10 |
$wsSend = new MailUpWsSend();
|
11 |
$login = $wsSend->login();
|
|
|
|
|
|
|
12 |
$loginTest = $wsSend->loginTest();
|
13 |
$soap = $wsSend->testSoap();
|
14 |
|
@@ -20,6 +23,8 @@ if ($loginTest > 0){
|
|
20 |
echo $this->__('WARNING: your server may not support MailUp SOAP communications').'<br /><br />';
|
21 |
}
|
22 |
|
|
|
|
|
23 |
if ($login > 0 || strlen(Mage::getStoreConfig('newsletter/mailup/list')) < 2) {
|
24 |
echo $this->__('WARNING: before proceeding you must correctly configure the settings of MailUp access in System->Configuration->Newsletter->MailUp');
|
25 |
} else {
|
@@ -34,7 +39,7 @@ if ($login > 0 || strlen(Mage::getStoreConfig('newsletter/mailup/list')) < 2) {
|
|
34 |
|
35 |
//salvo i parametri in variabili
|
36 |
$mailupCustomers = $this->getRequest()->getParam('mailupCustomers');
|
37 |
-
$
|
38 |
$mailupCategoryId = $this->getRequest()->getParam('mailupCategoryId');
|
39 |
$mailupCustomerGroupId = $this->getRequest()->getParam('mailupCustomerGroupId');
|
40 |
$mailupCountry = $this->getRequest()->getParam('mailupCountry');
|
@@ -100,35 +105,9 @@ if ($login > 0 || strlen(Mage::getStoreConfig('newsletter/mailup/list')) < 2) {
|
|
100 |
|
101 |
<?php //select con tutti i prodotti ?>
|
102 |
<tr>
|
103 |
-
<td class="labelpg1"><?=$this->__('
|
104 |
<td class="input-ele">
|
105 |
-
<?php
|
106 |
-
$productsCollection = Mage::getModel('catalog/product')->getCollection();
|
107 |
-
$productsCollection->addAttributeToSelect('name');
|
108 |
-
$productsCollection->addAttributeToSelect('entity_id');
|
109 |
-
/*
|
110 |
-
foreach ($collection as $product) {
|
111 |
-
var_dump($product);
|
112 |
-
}
|
113 |
-
*/
|
114 |
-
?>
|
115 |
-
<select id="mailupProductId" name="mailupProductId" class="slctpg1">
|
116 |
-
|
117 |
-
<?php
|
118 |
-
if($mailupProductId) {
|
119 |
-
$product = Mage::getModel('catalog/product')->load($mailupProductId);
|
120 |
-
?>
|
121 |
-
<option value="<?php echo $mailupProductId; ?>"><?php echo $product->getData('name'); ?></option>
|
122 |
-
<?php } ?>
|
123 |
-
|
124 |
-
<option value="0">-- <?php echo $this->__('Any'); ?> --</option>
|
125 |
-
|
126 |
-
<?php
|
127 |
-
foreach ($productsCollection as $product) {
|
128 |
-
echo '<option value="'.$product->getData('entity_id').'">'.($product->getData('name')).'</option>';
|
129 |
-
}
|
130 |
-
?>
|
131 |
-
</select>
|
132 |
</td>
|
133 |
</tr>
|
134 |
<?php //select con tutte le categorie ?>
|
@@ -160,7 +139,9 @@ if ($login > 0 || strlen(Mage::getStoreConfig('newsletter/mailup/list')) < 2) {
|
|
160 |
<?php
|
161 |
foreach ($categoriesCollection as $category) {
|
162 |
//var_dump($product);
|
163 |
-
|
|
|
|
|
164 |
}
|
165 |
?>
|
166 |
</select>
|
9 |
$MailUpWsSend = Mage::getModel('mailup/wssend');
|
10 |
$wsSend = new MailUpWsSend();
|
11 |
$login = $wsSend->login();
|
12 |
+
|
13 |
+
/* TEST SOAP AL MOMENTO DISABILITATO
|
14 |
+
|
15 |
$loginTest = $wsSend->loginTest();
|
16 |
$soap = $wsSend->testSoap();
|
17 |
|
23 |
echo $this->__('WARNING: your server may not support MailUp SOAP communications').'<br /><br />';
|
24 |
}
|
25 |
|
26 |
+
*/
|
27 |
+
|
28 |
if ($login > 0 || strlen(Mage::getStoreConfig('newsletter/mailup/list')) < 2) {
|
29 |
echo $this->__('WARNING: before proceeding you must correctly configure the settings of MailUp access in System->Configuration->Newsletter->MailUp');
|
30 |
} else {
|
39 |
|
40 |
//salvo i parametri in variabili
|
41 |
$mailupCustomers = $this->getRequest()->getParam('mailupCustomers');
|
42 |
+
$mailupProductSku = $this->getRequest()->getParam('mailupProductSku');
|
43 |
$mailupCategoryId = $this->getRequest()->getParam('mailupCategoryId');
|
44 |
$mailupCustomerGroupId = $this->getRequest()->getParam('mailupCustomerGroupId');
|
45 |
$mailupCountry = $this->getRequest()->getParam('mailupCountry');
|
105 |
|
106 |
<?php //select con tutti i prodotti ?>
|
107 |
<tr>
|
108 |
+
<td class="labelpg1"><?=$this->__('Insert product SKU')?></td>
|
109 |
<td class="input-ele">
|
110 |
+
<input type="text" class="inptptx1" name="mailupProductSku" size="30" value="<?php echo $mailupProductSku; ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
</td>
|
112 |
</tr>
|
113 |
<?php //select con tutte le categorie ?>
|
139 |
<?php
|
140 |
foreach ($categoriesCollection as $category) {
|
141 |
//var_dump($product);
|
142 |
+
if ($category->getLevel() == 2):
|
143 |
+
echo '<option value="'.$category->getData('entity_id').'">'.($category->getData('name')).'</option>';
|
144 |
+
endif;
|
145 |
}
|
146 |
?>
|
147 |
</select>
|
app/locale/en_US/SevenLike_MailUp.csv
CHANGED
@@ -55,4 +55,5 @@
|
|
55 |
"Set and customize one of the following filters:","Set and customize one of the following filters:"
|
56 |
"Filter customers","Filter customers"
|
57 |
"You can find it on your browser url bar (e.g. g4a0.s03.it)","You can find it on your browser url bar (e.g. g4a0.s03.it)"
|
58 |
-
"If you haven't yet, we suggest you to create a DEM list directly from your mailup console","If you haven't yet, we suggest you to create a DEM list directly from your mailup console"
|
|
55 |
"Set and customize one of the following filters:","Set and customize one of the following filters:"
|
56 |
"Filter customers","Filter customers"
|
57 |
"You can find it on your browser url bar (e.g. g4a0.s03.it)","You can find it on your browser url bar (e.g. g4a0.s03.it)"
|
58 |
+
"If you haven't yet, we suggest you to create a DEM list directly from your mailup console","If you haven't yet, we suggest you to create a DEM list directly from your mailup console"
|
59 |
+
"Insert product SKU","Insert product SKU"
|
app/locale/it_IT/SevenLike_MailUp.csv
CHANGED
@@ -55,4 +55,5 @@
|
|
55 |
"Set and customize one of the following filters:","Imposta e personalizza uno dei seguenti filtri:"
|
56 |
"Filter customers","Filtra i clienti"
|
57 |
"You can find it on your browser url bar (e.g. g4a0.s03.it)","Si trova nella barra degli indirizzi del tuo browser (es. g4a0.s03.it)"
|
58 |
-
"If you haven't yet, we suggest you to create a DEM list directly from your mailup console","Se non è stato ancora fatto è consigliabile creare una lista dedicata alle DEM direttamente dalla console di MailUp"
|
|
55 |
"Set and customize one of the following filters:","Imposta e personalizza uno dei seguenti filtri:"
|
56 |
"Filter customers","Filtra i clienti"
|
57 |
"You can find it on your browser url bar (e.g. g4a0.s03.it)","Si trova nella barra degli indirizzi del tuo browser (es. g4a0.s03.it)"
|
58 |
+
"If you haven't yet, we suggest you to create a DEM list directly from your mailup console","Se non è stato ancora fatto è consigliabile creare una lista dedicata alle DEM direttamente dalla console di MailUp"
|
59 |
+
"Insert product SKU","Inserisci lo SKU del prodotto"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MailUp</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license>AFL</license>
|
7 |
<channel>community</channel>
|
@@ -38,11 +38,11 @@ By installing this Magento plugin you can import contacts registered in your eCo
|
|
38 |
|
39 |
|
40 |
Professionally manage newsletters and e-mail marketing campaigns with MailUp, a robust, hosted service that's been fully integrated with Magento. MailUp is a subscription service, and the price is per month. You can cancel at any time, and there is an initial, 30-day free trial</description></description>
|
41 |
-
<notes>
|
42 |
<authors><author><name>Sevenlike</name><user>auto-converted</user><email>moduli-magento@sevenlike.com</email></author></authors>
|
43 |
-
<date>2011-
|
44 |
-
<time>
|
45 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mailup.xml" hash="eda776bc6cd233c52ef06f2046969665"/></dir><dir name="template"><dir name="sevenlike"><dir name="mailup"><file name="confirm.phtml" hash="
|
46 |
<compatible/>
|
47 |
<dependencies/>
|
48 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>MailUp</name>
|
4 |
+
<version>0.1.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>AFL</license>
|
7 |
<channel>community</channel>
|
38 |
|
39 |
|
40 |
Professionally manage newsletters and e-mail marketing campaigns with MailUp, a robust, hosted service that's been fully integrated with Magento. MailUp is a subscription service, and the price is per month. You can cancel at any time, and there is an initial, 30-day free trial</description></description>
|
41 |
+
<notes>Change filter by product method</notes>
|
42 |
<authors><author><name>Sevenlike</name><user>auto-converted</user><email>moduli-magento@sevenlike.com</email></author></authors>
|
43 |
+
<date>2011-05-19</date>
|
44 |
+
<time>09:26:08</time>
|
45 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mailup.xml" hash="eda776bc6cd233c52ef06f2046969665"/></dir><dir name="template"><dir name="sevenlike"><dir name="mailup"><file name="confirm.phtml" hash="a73407d37214938f11278498d4dccc5d"/><file name="filter.phtml" hash="223fbcb991307916f3fbd9f6f779307e"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="sevenlike"><dir name="mailup"><dir name="images"><file name="titoli.png" hash="95a7996cd77d3413fd048018095aec6e"/></dir><file name="mailup.css" hash="4f935afe2e7b1c9de7c47795bca1f206"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="SevenLike_MailUp.csv" hash="24c7141627abd8a289ea0a732ba60b40"/></dir><dir name="it_IT"><file name="SevenLike_MailUp.csv" hash="aab106b604762c002684351779e563e9"/></dir></target><target name="mageetc"><dir name="modules"><file name="SevenLike_MailUp.xml" hash="8377b55193e7524ca9572ed4dc2dca62"/></dir></target><target name="magelocal"><dir name="SevenLike"><dir name="MailUp"><dir name="controllers"><dir name="Adminhtml"><file name="FilterController.php" hash="fc75d411d37752139ad111e7595c35c9"/></dir></dir><dir name="etc"><file name="config.xml" hash="b1d3dfd980957c3d55e56b3abfa74f5f"/><file name="system.xml" hash="1fd448099039da9cedf307f8769df45e"/></dir><dir name="Helper"><file name="Data.php" hash="15b30e8e02a50054be62bb6ee2458ac5"/></dir><dir name="Model"><dir name="Mysql14"><dir name="MailUp"><file name="Collection.php" hash="1435c91e677f7b668079373599aae3eb"/></dir><file name="MailUp.php" hash="4e6e23f0eccdfe35776d1e8eab68692a"/></dir><file name="Lists.php" hash="1a4c1bf8ca0135bfe48e8243b7c57070"/><file name="MailUp.php" hash="2829fb8a8ad6317ce5b2a28a2fe0149d"/><file name="Ws.php" hash="25697f6f93b30ea4b00eafd7f66b3313"/><file name="Wssend.php" hash="2d9d936bd9dad015e4ce143c1e7653de"/></dir><dir name="sql"><dir name="mailup_setup"><file name="mysql4-install-0.1.0.php" hash="022c3ba8a7d802aba927353096c826fc"/></dir></dir></dir></dir></target></contents>
|
46 |
<compatible/>
|
47 |
<dependencies/>
|
48 |
</package>
|