Version Notes
Using this module you can show product thumbnails on sales emails. You can set image size from backend. Just enable it and it will started to sending images in sales emails.
Download this release
Release Info
Developer | Emizen Tech Private Limited |
Extension | Emizen_EmailImages |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/design/frontend/base/default/layout/emizen/emailimages.xml +10 -0
- app/design/frontend/base/default/template/emizen/emailimages/order/items.phtml +55 -0
- app/design/frontend/base/default/template/emizen/emailimages/order/items/order/default.phtml +119 -0
- app/etc/modules/Emizen_EmailImages.xml +0 -10
- package.xml +4 -4
app/design/frontend/base/default/layout/emizen/emailimages.xml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<layout version="0.1.0">
|
3 |
+
<sales_email_order_items>
|
4 |
+
<block type="sales/order_email_items" name="items" template="emizen/emailimages/order/items.phtml">
|
5 |
+
<action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>emizen/emailimages/order/items/order/default.phtml</template></action>
|
6 |
+
<action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>emizen/emailimages/order/items/order/default.phtml</template></action>
|
7 |
+
</block>
|
8 |
+
</sales_email_order_items>
|
9 |
+
</layout>
|
10 |
+
|
app/design/frontend/base/default/template/emizen/emailimages/order/items.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $_order = $this->getOrder() ?>
|
2 |
+
<?php if ($_order): ?>
|
3 |
+
<table cellspacing="0" cellpadding="0" border="0" width="650" style="border:1px solid #EAEAEA;">
|
4 |
+
<thead>
|
5 |
+
<tr>
|
6 |
+
<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Item') ?></th>
|
7 |
+
<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Sku') ?></th>
|
8 |
+
|
9 |
+
<!------------------- Emizen_EmailImages Module Working Here----------------------------------------------- -->
|
10 |
+
<?php if(Mage::getStoreConfig('email_images/general/enable')): ?>
|
11 |
+
<th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Image') ?></th>
|
12 |
+
<?php endif; ?>
|
13 |
+
<!-------------------------------------------------------------------------------------------------------- -->
|
14 |
+
|
15 |
+
<th align="center" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Qty') ?></th>
|
16 |
+
<th align="right" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><?php echo $this->__('Subtotal') ?></th>
|
17 |
+
</tr>
|
18 |
+
</thead>
|
19 |
+
|
20 |
+
<?php $i=0; foreach ($_order->getAllItems() as $_item): ?>
|
21 |
+
<?php if($_item->getParentItem()) continue; else $i++; ?>
|
22 |
+
<tbody<?php echo $i%2 ? ' bgcolor="#F6F6F6"' : '' ?>>
|
23 |
+
<?php echo $this->getItemHtml($_item) ?>
|
24 |
+
</tbody>
|
25 |
+
<?php endforeach; ?>
|
26 |
+
|
27 |
+
<tbody>
|
28 |
+
<?php echo $this->getChildHtml('order_totals') ?>
|
29 |
+
</tbody>
|
30 |
+
</table>
|
31 |
+
<?php if ($this->helper('giftmessage/message')->isMessagesAvailable('order', $_order, $_order->getStore()) && $_order->getGiftMessageId()): ?>
|
32 |
+
<?php $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId()); ?>
|
33 |
+
<?php if ($_giftMessage): ?>
|
34 |
+
<br />
|
35 |
+
<table cellspacing="0" cellpadding="0" border="0" width="100%" style="border:1px solid #EAEAEA;">
|
36 |
+
<thead>
|
37 |
+
<tr>
|
38 |
+
<th align="left" bgcolor="#EAEAEA" style="font-size:13px; padding:3px 9px"><strong><?php echo $this->__('Gift Message for this Order') ?></strong></th>
|
39 |
+
</tr>
|
40 |
+
</thead>
|
41 |
+
|
42 |
+
<tbody>
|
43 |
+
|
44 |
+
<tr>
|
45 |
+
<td colspan="4" align="left" style="padding:3px 9px">
|
46 |
+
<strong><?php echo $this->__('From:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?>
|
47 |
+
<br /><strong><?php echo $this->__('To:'); ?></strong> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?>
|
48 |
+
<br /><strong><?php echo $this->__('Message:'); ?></strong><br /> <?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</tbody>
|
52 |
+
</table>
|
53 |
+
<?php endif; ?>
|
54 |
+
<?php endif; ?>
|
55 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/emizen/emailimages/order/items/order/default.phtml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $_item = $this->getItem() ?>
|
2 |
+
<?php $_order = $this->getItem()->getOrder() ?>
|
3 |
+
|
4 |
+
<tr>
|
5 |
+
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
6 |
+
<strong style="font-size:11px;"><?php echo $this->escapeHtml($_item->getName()) ?></strong>
|
7 |
+
<?php if ($this->getItemOptions()): ?>
|
8 |
+
<dl style="margin:0; padding:0;">
|
9 |
+
<?php foreach ($this->getItemOptions() as $option): ?>
|
10 |
+
<dt><strong><em><?php echo $option['label'] ?></em></strong></dt>
|
11 |
+
<dd style="margin:0; padding:0 0 0 9px;">
|
12 |
+
<?php echo nl2br($option['value']) ?>
|
13 |
+
</dd>
|
14 |
+
<?php endforeach; ?>
|
15 |
+
</dl>
|
16 |
+
<?php endif; ?>
|
17 |
+
<?php $addInfoBlock = $this->getProductAdditionalInformationBlock(); ?>
|
18 |
+
<?php if ($addInfoBlock) :?>
|
19 |
+
<?php echo $addInfoBlock->setItem($_item)->toHtml(); ?>
|
20 |
+
<?php endif; ?>
|
21 |
+
<?php echo $this->escapeHtml($_item->getDescription()) ?>
|
22 |
+
</td>
|
23 |
+
<td align="left" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $this->escapeHtml($this->getSku($_item)) ?></td>
|
24 |
+
|
25 |
+
<!--- Emizen_EmailImages Module Working Here --------------------------------------- -->
|
26 |
+
<?php if(Mage::getStoreConfig('email_images/general/enable')): ?>
|
27 |
+
<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><img src="<?php echo $this->productimage($_item->getProductId()); ?>" width="<?php echo Mage::getStoreConfig('email_images/general/image_resize'); ?>" height="<?php echo Mage::getStoreConfig('email_images/general/image_resize'); ?>" alt="<?php echo $this->htmlEscape($_item->getName()) ?>" />
|
28 |
+
</td>
|
29 |
+
<?php endif; ?>
|
30 |
+
<!-- ------------------------------------------------------------------------------------ -->
|
31 |
+
|
32 |
+
<td align="center" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;"><?php echo $_item->getQtyOrdered()*1 ?></td>
|
33 |
+
<td align="right" valign="top" style="font-size:11px; padding:3px 9px; border-bottom:1px dotted #CCCCCC;">
|
34 |
+
<?php if ($this->helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
35 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
36 |
+
<span class="label"><?php echo Mage::helper('tax')->__('Excl. Tax'); ?>:</span>
|
37 |
+
<?php endif; ?>
|
38 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
39 |
+
<?php echo $_order->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
|
40 |
+
<?php else: ?>
|
41 |
+
<?php echo $_order->formatPrice($_item->getRowTotal()) ?>
|
42 |
+
<?php endif; ?>
|
43 |
+
|
44 |
+
|
45 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
46 |
+
<br />
|
47 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
48 |
+
<small>
|
49 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
50 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
51 |
+
<?php endforeach; ?>
|
52 |
+
</small>
|
53 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
54 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
55 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></small></span><br />
|
56 |
+
<?php endforeach; ?>
|
57 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
58 |
+
<small>
|
59 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
60 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount'],true,true); ?></span><br />
|
61 |
+
<?php endforeach; ?>
|
62 |
+
</small>
|
63 |
+
<?php endif; ?>
|
64 |
+
|
65 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
66 |
+
<br />
|
67 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total'); ?>:<br /> <?php echo $_order->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?></span>
|
68 |
+
<?php endif; ?>
|
69 |
+
<?php endif; ?>
|
70 |
+
<?php endif; ?>
|
71 |
+
|
72 |
+
|
73 |
+
<?php if ($this->helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
74 |
+
<?php if ($this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
|
75 |
+
<br /><span class="label"><?php echo Mage::helper('tax')->__('Incl. Tax'); ?>:</span>
|
76 |
+
<?php endif; ?>
|
77 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($_item); ?>
|
78 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?>
|
79 |
+
<?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?>
|
80 |
+
<?php else: ?>
|
81 |
+
<?php echo $_order->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php if (Mage::helper('weee')->getApplied($_item)): ?>
|
84 |
+
<br />
|
85 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?>
|
86 |
+
<small>
|
87 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
88 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
89 |
+
<?php endforeach; ?>
|
90 |
+
</small>
|
91 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
92 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
93 |
+
<span class="nobr"><small><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></small></span><br />
|
94 |
+
<?php endforeach; ?>
|
95 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?>
|
96 |
+
<small>
|
97 |
+
<?php foreach (Mage::helper('weee')->getApplied($_item) as $tax): ?>
|
98 |
+
<span class="nobr"><?php echo $tax['title']; ?>: <?php echo $_order->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span><br />
|
99 |
+
<?php endforeach; ?>
|
100 |
+
</small>
|
101 |
+
<?php endif; ?>
|
102 |
+
|
103 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
|
104 |
+
<span class="nobr"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>:<br /> <?php echo $_order->formatPrice($_incl + Mage::helper('weee')->getRowWeeeTaxInclTax($_item)); ?></span>
|
105 |
+
<?php endif; ?>
|
106 |
+
<?php endif; ?>
|
107 |
+
<?php endif; ?>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
<?php if ($_item->getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
|
111 |
+
<tr>
|
112 |
+
<td colspan="4" style=" border-bottom:2px solid #CCCCCC; padding:3px 9px;">
|
113 |
+
<strong style="color:#444444; font-size:11px;"><?php echo $this->__('Gift Message') ?></strong>
|
114 |
+
<?php echo $this->__('From:'); ?> <?php echo $this->escapeHtml($_giftMessage->getSender()) ?><br />
|
115 |
+
<?php echo $this->__('To:'); ?> <?php echo $this->escapeHtml($_giftMessage->getRecipient()) ?><br />
|
116 |
+
<strong><?php echo $this->__('Message:'); ?></strong><br /><?php echo $this->escapeHtml($_giftMessage->getMessage()) ?>
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
<?php endif; ?>
|
app/etc/modules/Emizen_EmailImages.xml
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<Emizen_EmailImages>
|
5 |
-
<active>true</active>
|
6 |
-
<codePool>local</codePool>
|
7 |
-
<version>0.1.0</version>
|
8 |
-
</Emizen_EmailImages>
|
9 |
-
</modules>
|
10 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Emizen_EmailImages</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Using this module you can show product thumbnails on sales emails. You can set image size from backend. Just enable it and it will started to sending images in sales emails.</description>
|
11 |
<notes>Using this module you can show product thumbnails on sales emails. You can set image size from backend. Just enable it and it will started to sending images in sales emails.</notes>
|
12 |
<authors><author><name>Emizen Tech Private Limited</name><user>emizen</user><email>info@emizentech.com</email></author></authors>
|
13 |
-
<date>2015-
|
14 |
-
<time>11:
|
15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Emizen_EmailImages.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Emizen_EmailImages</name>
|
4 |
+
<version>1.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Using this module you can show product thumbnails on sales emails. You can set image size from backend. Just enable it and it will started to sending images in sales emails.</description>
|
11 |
<notes>Using this module you can show product thumbnails on sales emails. You can set image size from backend. Just enable it and it will started to sending images in sales emails.</notes>
|
12 |
<authors><author><name>Emizen Tech Private Limited</name><user>emizen</user><email>info@emizentech.com</email></author></authors>
|
13 |
+
<date>2015-06-17</date>
|
14 |
+
<time>11:58:08</time>
|
15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Emizen_EmailImages.xml" hash=""/></dir></target><target name="magelocal"><dir name="Emizen"><dir name="EmailImages"><dir><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="Email"><dir name="Items"><dir name="Order"><file name="Default.php" hash="e980f7e1938b8fc75df87f0084c090c4"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="3990c53f4796f415d1207e1e044ee9e4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dd4287dc2bf3625378b2fdabf8e9762c"/><file name="config.xml" hash="f97e525601e28a940812ddd46c8aa5f8"/><file name="system.xml" hash="dcef1cad310692f4f144c87720ee919a"/></dir></dir></dir></dir></target><target name="magedesign"><dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="emizen"><dir><dir name="emailimages"><dir name="order"><dir name="items"><dir name="order"><file name="default.phtml" hash="9bc2d37b958f2f536077cd214b59e57c"/></dir></dir><file name="items.phtml" hash="0533373bc486c7c5355f5540e81d6975"/></dir></dir></dir></dir></dir><dir name="layout"><dir name="emizen"><file name="emailimages.xml" hash="927bc10641eb6a8c3fc4dca1c7bf8d45"/></dir></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|