Version Notes
Update config for emails
Download this release
Release Info
Developer | Jonathan Martin |
Extension | yuzu |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- app/code/community/Yuzu/Tags/Block/Abstract.php +14 -0
- app/code/community/Yuzu/Tags/Model/Observer.php +0 -11
- app/code/community/Yuzu/Tags/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/yuzu_tags.xml +6 -6
- app/design/frontend/base/default/template/yuzu_tags/email/offers.phtml +2 -1
- package.xml +5 -5
app/code/community/Yuzu/Tags/Block/Abstract.php
CHANGED
@@ -25,8 +25,22 @@ abstract class Yuzu_Tags_Block_Abstract extends Mage_Core_Block_Template
|
|
25 |
return Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/monetize');
|
26 |
}
|
27 |
|
|
|
|
|
|
|
|
|
|
|
28 |
public function getApiUrl()
|
29 |
{
|
30 |
return Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/tag_url_collect');
|
31 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
25 |
return Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/monetize');
|
26 |
}
|
27 |
|
28 |
+
public function isInEmail()
|
29 |
+
{
|
30 |
+
return Mage::helper('yuzu_tags')->getConfig('yuzu_tags/advanced/in_email');
|
31 |
+
}
|
32 |
+
|
33 |
public function getApiUrl()
|
34 |
{
|
35 |
return Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/tag_url_collect');
|
36 |
}
|
37 |
+
|
38 |
+
public function readyInEmail()
|
39 |
+
{
|
40 |
+
if ($this->isEnabled() && $this->getMerchantKey() && $this->isMonetize() && $this->isInEmail()) {
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
|
44 |
+
return false;
|
45 |
+
}
|
46 |
}
|
app/code/community/Yuzu/Tags/Model/Observer.php
CHANGED
@@ -22,17 +22,6 @@ class Yuzu_Tags_Model_Observer
|
|
22 |
$this->getOrCreateUser($roleId, $secretKey);
|
23 |
}
|
24 |
|
25 |
-
$enable = Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/enable');
|
26 |
-
$apiKey = Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/merchant_key');
|
27 |
-
$monetize = Mage::helper('yuzu_tags')->getConfig('yuzu_tags/general/monetize');
|
28 |
-
$inEmail = Mage::helper('yuzu_tags')->getConfig('yuzu_tags/advanced/in_email');
|
29 |
-
|
30 |
-
if ($enable && $apiKey && $monetize && $inEmail) {
|
31 |
-
Mage::helper('yuzu_tags')->setConfig('yuzu_tags/advanced/ready_in_email', true);
|
32 |
-
} else {
|
33 |
-
Mage::helper('yuzu_tags')->setConfig('yuzu_tags/advanced/ready_in_email', false);
|
34 |
-
}
|
35 |
-
|
36 |
$this->sendPing();
|
37 |
}
|
38 |
|
22 |
$this->getOrCreateUser($roleId, $secretKey);
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$this->sendPing();
|
26 |
}
|
27 |
|
app/code/community/Yuzu/Tags/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Yuzu_Tags>
|
5 |
-
<version>1.1.
|
6 |
</Yuzu_Tags>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Yuzu_Tags>
|
5 |
+
<version>1.1.1</version>
|
6 |
</Yuzu_Tags>
|
7 |
</modules>
|
8 |
|
app/design/frontend/base/default/layout/yuzu_tags.xml
CHANGED
@@ -27,24 +27,24 @@
|
|
27 |
<sales_email_order_items>
|
28 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
29 |
<reference name="items">
|
30 |
-
<action method="setTemplate" ifconfig="yuzu_tags/advanced/
|
31 |
-
<action method="append" ifconfig="yuzu_tags/advanced/
|
32 |
</reference>
|
33 |
</sales_email_order_items>
|
34 |
|
35 |
<sales_email_order_invoice_items>
|
36 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
37 |
<reference name="items">
|
38 |
-
<action method="setTemplate" ifconfig="yuzu_tags/advanced/
|
39 |
-
<action method="append" ifconfig="yuzu_tags/advanced/
|
40 |
</reference>
|
41 |
</sales_email_order_invoice_items>
|
42 |
|
43 |
<sales_email_order_shipment_items>
|
44 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
45 |
<reference name="items">
|
46 |
-
<action method="setTemplate" ifconfig="yuzu_tags/advanced/
|
47 |
-
<action method="append" ifconfig="yuzu_tags/advanced/
|
48 |
</reference>
|
49 |
</sales_email_order_shipment_items>
|
50 |
|
27 |
<sales_email_order_items>
|
28 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
29 |
<reference name="items">
|
30 |
+
<action method="setTemplate" ifconfig="yuzu_tags/advanced/in_email"><template>yuzu_tags/email/order/items.phtml</template></action>
|
31 |
+
<action method="append" ifconfig="yuzu_tags/advanced/in_email"><block>yuzu_offers</block></action>
|
32 |
</reference>
|
33 |
</sales_email_order_items>
|
34 |
|
35 |
<sales_email_order_invoice_items>
|
36 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
37 |
<reference name="items">
|
38 |
+
<action method="setTemplate" ifconfig="yuzu_tags/advanced/in_email"><template>yuzu_tags/email/invoice/items.phtml</template></action>
|
39 |
+
<action method="append" ifconfig="yuzu_tags/advanced/in_email"><block>yuzu_offers</block></action>
|
40 |
</reference>
|
41 |
</sales_email_order_invoice_items>
|
42 |
|
43 |
<sales_email_order_shipment_items>
|
44 |
<block type="yuzu_tags/email" name="yuzu_offers" template="yuzu_tags/email/offers.phtml"/>
|
45 |
<reference name="items">
|
46 |
+
<action method="setTemplate" ifconfig="yuzu_tags/advanced/in_email"><template>yuzu_tags/email/shipment/items.phtml</template></action>
|
47 |
+
<action method="append" ifconfig="yuzu_tags/advanced/in_email"><block>yuzu_offers</block></action>
|
48 |
</reference>
|
49 |
</sales_email_order_shipment_items>
|
50 |
|
app/design/frontend/base/default/template/yuzu_tags/email/offers.phtml
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
<?php $customerId = ($_order->getCustomerId()) ? $_order->getCustomerId() : 0; ?>
|
4 |
<?php $urlLink = $this->getBaseUrl().DS."click".DS.$this->getMerchantKey().DS.$customerId.DS.$_order->getIncrementId();?>
|
5 |
<?php $imgLink = $this->getBaseUrl().DS."ban".DS.$this->getMerchantKey().DS.$customerId.DS.$_order->getIncrementId();?>
|
6 |
-
|
|
|
7 |
<tr>
|
8 |
<td colspan="8" align="center" style="padding: 10px;">
|
9 |
<a href="<?php echo $urlLink.DS."0";?>">
|
3 |
<?php $customerId = ($_order->getCustomerId()) ? $_order->getCustomerId() : 0; ?>
|
4 |
<?php $urlLink = $this->getBaseUrl().DS."click".DS.$this->getMerchantKey().DS.$customerId.DS.$_order->getIncrementId();?>
|
5 |
<?php $imgLink = $this->getBaseUrl().DS."ban".DS.$this->getMerchantKey().DS.$customerId.DS.$_order->getIncrementId();?>
|
6 |
+
|
7 |
+
<?php if ($_order && $this->readyInEmail()): ?>
|
8 |
<tr>
|
9 |
<td colspan="8" align="center" style="padding: 10px;">
|
10 |
<a href="<?php echo $urlLink.DS."0";?>">
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>yuzu</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.yuzu.co">Custom licence</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Yuzu</summary>
|
10 |
<description>Yuzu</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>Jonathan Martin</name><user>jmartin</user><email>jonathan@yuzu.co</email></author></authors>
|
13 |
-
<date>2016-06-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Yuzu"><dir name="Tags"><dir name="Block"><file name="Abstract.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>yuzu</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.yuzu.co">Custom licence</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Yuzu</summary>
|
10 |
<description>Yuzu</description>
|
11 |
+
<notes>Update config for emails</notes>
|
12 |
<authors><author><name>Jonathan Martin</name><user>jmartin</user><email>jonathan@yuzu.co</email></author></authors>
|
13 |
+
<date>2016-06-08</date>
|
14 |
+
<time>16:34:05</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Yuzu"><dir name="Tags"><dir name="Block"><file name="Abstract.php" hash="3b9bc56d1ff755eaf819a2e760595bf5"/><file name="Checkout.php" hash="7027a87b8282f517cf2cfe4939e6aad0"/><file name="Email.php" hash="2972f781ff145ac1a9419a58f84d023e"/><file name="Tags.php" hash="2cdaa0836f4c0a834e7d2fef9904f4c4"/></dir><dir name="Helper"><file name="Api.php" hash="2238fdc90084ee0f7644e5c935fad850"/><file name="Data.php" hash="2e4f4453c348f04862c80efd45c6881b"/></dir><dir name="Model"><file name="Data.php" hash="e3985f42b22422a0d75ee56f68272d44"/><file name="Event.php" hash="87423a3e8a3d696cbf758c01e9501a3a"/><file name="Feed.php" hash="704c1b798925ed46d7e754170fcd172c"/><file name="Notifier.php" hash="e8fd5f3b758f5f761d849e808f9ecc0d"/><file name="Observer.php" hash="dc0bd69978107c11d89ff91d7ddd3ec2"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Nb.php" hash="fc539e10886ba8a5c9af56c991cd63d0"/></dir></dir></dir></dir><dir name="controllers"><file name="ApiController.php" hash="10303b60cbee77d3beb56f7346d12623"/><file name="CheckController.php" hash="f3a6d2a65e29079096cc1ebca50efaac"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1402ebcefa884063791db10144f314a3"/><file name="config.xml" hash="76af74d57f52f6f83aa1b6ad3b6b6355"/><file name="system.xml" hash="c2fbd8fb0967cb9d873a91a1987ea617"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="yuzu_tags.xml" hash="9ccc80d779697216d6ffe5bd14d1950b"/></dir><dir name="template"><dir name="yuzu_tags"><file name="async_tag.phtml" hash="6d64dc98d0886411a7833de6e9a76ccf"/><dir><dir name="email"><dir name="invoice"><file name="items.phtml" hash="a69e17038115272fc4b1f2f7318f7c35"/></dir><file name="offers.phtml" hash="f78240445e03b6293f59bfbf43bab632"/><dir name="order"><file name="items.phtml" hash="7e604a8b4b29183499f2673d28daba55"/></dir><dir name="shipment"><file name="items.phtml" hash="997065e2d6a6fec7704c99a743521731"/></dir></dir></dir><file name="event.phtml" hash="04de9167cd5165aff94d86e1df0c33af"/><file name="iframewrap.phtml" hash="82f92521e77a0401b76c97329316290c"/><file name="init.phtml" hash="12362eeb227843b6af0d9837decc87ff"/><file name="post_purchase.phtml" hash="6e95f079b990cde565931a02cfe5e98b"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Yuzu_Tags.xml" hash="966c25c3c7f93c697b07295201bb460c"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
|
18 |
</package>
|