Coupons4U - Version 1.0.0.2

Version Notes

User Coupons

Download this release

Release Info

Developer e-Infochips
Extension Coupons4U
Version 1.0.0.2
Comparing to
See all releases


Code changes from version 1.0.0.1 to 1.0.0.2

app/design/frontend/base/default/layout/einfochips_coupons4u.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * eInfochips_Coupons4U extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category eInfochips
14
+ * @package eInfochips_Coupons4U
15
+ * @copyright Copyright (c) 2014
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <layout>
20
+ <customer_account>
21
+ <reference name="customer_account_navigation">
22
+ <action method="addLink" translate="label" module="coupons4u">
23
+ <name>Einfochips_Coupons4U</name>
24
+ <path>coupons4u/index/index</path>
25
+ <label>Coupons</label>
26
+ </action>
27
+ </reference>
28
+ </customer_account>
29
+ <coupons4u_index_index>
30
+ <update handle="customer_account" />
31
+ <reference name="my.account.wrapper">
32
+ <block type="core/template" name="einfochips_coupons4u_content" template="einfochips_coupons4u/coupons.phtml"/>
33
+ </reference>
34
+ </coupons4u_index_index>
35
+ </layout>
app/design/frontend/base/default/template/einfochips_coupons4u/coupon4u/list.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * eInfochips_Coupons4U extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category eInfochips
13
+ * @package eInfochips_Coupons4U
14
+ * @copyright Copyright (c) 2014
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Coupon4U list template
19
+ *
20
+ * @category eInfochips
21
+ * @package eInfochips_Coupons4U
22
+ * @author Ultimate Module Creator
23
+ */
24
+ ?>
25
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
26
+ <?php $_coupons4u = $this->getCoupons4u(); ?>
27
+ <div class="page-title coupon4u-title">
28
+ <h1><?php echo Mage::helper('coupons4u')->__('Coupons4U') ?></h1>
29
+ </div>
30
+ <?php if ($_coupons4u->getSize() > 0) :?>
31
+ <?php echo $this->getPagerHtml(); ?>
32
+ <div class="coupon4u-list-container">
33
+ <?php foreach ($_coupons4u as $_coupon4u) : ?>
34
+ <div class="coupon4u-list-item">
35
+ <a href="<?php echo $_coupon4u->getCoupon4uUrl();?>" title="<?php echo $this->htmlEscape($_coupon4u->getCouponid()) ?>">
36
+ <?php echo $_coupon4u->getCouponid(); ?>
37
+ </a>
38
+
39
+ </div>
40
+ <?php endforeach;?>
41
+ </div>
42
+ <?php echo $this->getPagerHtml(); ?>
43
+ <?php else : ?>
44
+ <?php echo Mage::helper('coupons4u')->__('There are no coupons4u at this moment');?>
45
+ <?php endif;?>
app/design/frontend/base/default/template/einfochips_coupons4u/coupon4u/view.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * eInfochips_Coupons4U extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category eInfochips
13
+ * @package eInfochips_Coupons4U
14
+ * @copyright Copyright (c) 2014
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Coupon4U view template
19
+ *
20
+ * @category eInfochips
21
+ * @package eInfochips_Coupons4U
22
+ * @author Ultimate Module Creator
23
+ */
24
+ ?>
25
+ <?php $_coupon4u = $this->getCurrentCoupon4u();?>
26
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
27
+ <div class="page-title coupon4u-title">
28
+ <h1><?php echo $_coupon4u->getCouponid(); ?></h1>
29
+ </div>
30
+ <div class="coupon4u-view">
31
+ <div class="coupon4u-couponid">
32
+ <?php echo Mage::helper('coupons4u')->__('CouponID');?>:<?php echo $_coupon4u->getCouponid();?>
33
+ </div>
34
+
35
+ </div>
app/design/frontend/base/default/template/einfochips_coupons4u/coupons.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $session = Mage::getSingleton('customer/session');
3
+ //$customerId = $session->getCustomer()->getId();
4
+ $usercouponsModel = Mage::getModel('coupons4u/einfochipscoupons4u')
5
+ ->getCollection()
6
+ ->addFieldToFilter('customer_id',array('eq'=>$session->getCustomer()->getId()));
7
+
8
+ /*
9
+ $promoModel = Mage::getModel('salesrule/rule');
10
+ $rulesCollection = $promoModel->getCollection()->getData();
11
+ foreach($rulesCollection as $rule){
12
+ $rule_id = $rule['rule_id'];
13
+ //print_r($rule_id);
14
+ }
15
+ $promo = $promoModel->load($rule_id);
16
+ $coupons = $promo->getCoupons();
17
+ */
18
+ ?>
19
+ <div class="dashboard">
20
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
21
+ <div class="box-account box-info">
22
+ <div class="box-head">
23
+ <h2><?php echo $this->__('My Coupons') ?></h2>
24
+ </div>
25
+ <div class="col2-set">
26
+ <div class="box-content">
27
+ <table style="width:100%">
28
+ <tr style="height:30px;">
29
+ <th>Coupon Code</th>
30
+ <th style="width:30%"></th>
31
+ <th>Description</th>
32
+ </tr>
33
+ <?php
34
+ if(!empty($usercouponsModel)):
35
+ foreach($usercouponsModel as $couponcode):
36
+
37
+ echo '<tr style="border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;"><td style="width:30%;height:70px;backgroung:none repeat scroll 0 0 #D4D4D4;overflow:hidden;font-family:Trebuchet MS,Trebuchet,Tahoma,Arial,sans-serif;text-align:center;letter-spacing:2px;font-weight:bold;">';
38
+ echo '<div style="width:200px;border-radius:8px;border: dashed 2px #c00000; padding: 5px; margin: 0; text-align:center ; line-height:15px; color: #000000; font-size: 12px;background:none repeat scroll 0 0 #D7EFF5">';
39
+ echo $couponcode->getCode();
40
+ echo '</div></td>';
41
+ $salesruleModel = Mage::getModel('salesrule/rule')
42
+ ->getCollection()
43
+ ->addFieldToFilter('rule_id',array('eq'=>$couponcode->getRuleId()));
44
+ echo "<td><span style='font-weight:700;'></span></td>";
45
+ echo "<td><span style='font-weight:700;'>".$salesruleModel->getData('rule_id')[0]['description']."</span></td>";
46
+ //echo "</div>";
47
+ echo "</tr>";
48
+ endforeach;
49
+
50
+ else:
51
+ echo "Currently no coupon(s) assigned";
52
+ endif;
53
+ ?>
54
+ </table>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Coupons4U</name>
4
- <version>1.0.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,9 +10,9 @@
10
  <description>Coupons</description>
11
  <notes>User Coupons</notes>
12
  <authors><author><name>e-Infochips</name><user>Kishor</user><email>kishor.koshti@einfochips.com</email></author></authors>
13
- <date>2014-07-23</date>
14
- <time>09:02:53</time>
15
- <contents><target name="magecommunity"><dir name="Einfochips"><dir name="Coupons4U"><dir name="Block"><dir name="Adminhtml"><dir name="Einfochipscoupons4u"><dir name="Edit"><file name="Form.php" hash="d6f0b09035174e0bbce05713061fea56"/><dir name="Tab"><file name="Form.php" hash="ad2fa91925457c82be183ef93124c20b"/><file name="Meta.php" hash="7812933378b2446bebf81372e41eee5b"/><file name="Stores.php" hash="ba556282a094b0a6207e8259e10e2b76"/><file name="Viewassigncoupons.php" hash="6f8f042d56518b3035e93e6649014d53"/></dir><file name="Tabs.php" hash="9dfa46caa0851b8313d4040698d3581a"/></dir><file name="Edit.php" hash="f46560de3fe9ec6ab1bfabec68b9caa1"/><file name="Grid.php" hash="50d442488d7225e717991c1e55331603"/><file name="Hello.php" hash="b039a300f7ff520fbffe953d84a33ea4"/><dir name="View"><file name="Form.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Tabs.php" hash="c68f6315a9fe7eebe545d00955ca18c8"/></dir><file name="View.php" hash="d09acb353e15870ef459e65c0659c855"/><dir name="Widget"><file name="Chooser.php" hash="11ff838d1952f65347f5ab626258e92b"/></dir></dir><file name="Einfochipscoupons4u.php" hash="ee436d3ccab94b3e65786ce7fe6ab791"/></dir><dir name="Einfochipscoupons4u"><file name="List.php" hash="a5a691902d7fdec49374b7c609d0b6b2"/><file name="View.php" hash="ed370a8483e5c760198280ccbca89437"/><dir name="Widget"><file name="Link.php" hash="57cd3a6979a8c5071960f96727e993e4"/><file name="View.php" hash="7005aa118f539052850dc09c1b7bd52e"/></dir></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Coupons4U.php" hash="1ee3188bfb91863024239cbae46da76c"/></dir><file name="Router.php" hash="521e73c2bd0888760a341aa8114a9096"/></dir><dir name="Helper"><file name="Data.php" hash="8b3b3cf8c9076d489a17d98b59845bf1"/><file name="Einfochipscoupons4u.php" hash="bf4268644b89e2297f64708b509329dd"/></dir><dir name="Model"><file name="Einfochipscoupons4u.php" hash="06203bfeb8d9071081d39f6c69d87836"/><dir name="Email"><file name="Template.php" hash="0f6aa76ecf18ced9b0e904950f2de0dc"/></dir><dir name="Resource"><dir name="Einfochipscoupons4u"><file name="Collection.php" hash="9d2117b69fcb845fce1e3b78ff9482d1"/></dir><file name="Einfochipscoupons4u.php" hash="2eeb48c8ff223fa9b1ce321f4d950deb"/><file name="Setup.php" hash="ea449a2308a7095e3660f52b32ab244b"/></dir><file name="email.php" hash="b83ac6e6462cc81c6e62894cf13dfb68"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Coupons4U"><file name="Einfochipscoupons4uController.php" hash="d304813b1cb07cb84a47bcedebde8408"/></dir></dir><file name="Einfochipscoupons4uController.php" hash="3ae0770082bd4c07d066cf7beb2f70c0"/><file name="IndexController.php" hash="1b18617141b5df486513c40a7d0b976c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="95c04b290525bef98cdf5e95132e9e4f"/><file name="config.xml" hash="65dd07ec31f0123fa49e1ef1601ad884"/><file name="system.xml" hash="c411d5a4c74590ddfd3af67e6a0e0949"/><file name="widget.xml" hash="7b2f29f8fa3667ac550c5e2832da9b2f"/></dir><dir name="sql"><dir name="einfochips_coupons4u_setup"><file name="install-0.0.1.php" hash="61c95c69474fcb673abfcd6e78c2e723"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Einfochips_Coupons4U.xml" hash="1afc74331dded241724c6f4f3a34c241"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="einfochips_coupons4u.xml" hash="26837f4d9027a18a6492a4c05287f05e"/></dir></dir></dir></dir></target><target name="magelocal"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="einfochips_coupons4u.xml" hash=""/></dir></dir></dir></dir><dir/></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.5.12</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Coupons4U</name>
4
+ <version>1.0.0.2</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>Coupons</description>
11
  <notes>User Coupons</notes>
12
  <authors><author><name>e-Infochips</name><user>Kishor</user><email>kishor.koshti@einfochips.com</email></author></authors>
13
+ <date>2014-07-25</date>
14
+ <time>07:12:22</time>
15
+ <contents><target name="magecommunity"><dir name="Einfochips"><dir name="Coupons4U"><dir name="Block"><dir name="Adminhtml"><dir name="Einfochipscoupons4u"><dir name="Edit"><file name="Form.php" hash="d6f0b09035174e0bbce05713061fea56"/><dir name="Tab"><file name="Form.php" hash="ad2fa91925457c82be183ef93124c20b"/><file name="Meta.php" hash="7812933378b2446bebf81372e41eee5b"/><file name="Stores.php" hash="ba556282a094b0a6207e8259e10e2b76"/><file name="Viewassigncoupons.php" hash="6f8f042d56518b3035e93e6649014d53"/></dir><file name="Tabs.php" hash="9dfa46caa0851b8313d4040698d3581a"/></dir><file name="Edit.php" hash="f46560de3fe9ec6ab1bfabec68b9caa1"/><file name="Grid.php" hash="50d442488d7225e717991c1e55331603"/><file name="Hello.php" hash="b039a300f7ff520fbffe953d84a33ea4"/><dir name="View"><file name="Form.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Tabs.php" hash="c68f6315a9fe7eebe545d00955ca18c8"/></dir><file name="View.php" hash="d09acb353e15870ef459e65c0659c855"/><dir name="Widget"><file name="Chooser.php" hash="11ff838d1952f65347f5ab626258e92b"/></dir></dir><file name="Einfochipscoupons4u.php" hash="ee436d3ccab94b3e65786ce7fe6ab791"/></dir><dir name="Einfochipscoupons4u"><file name="List.php" hash="a5a691902d7fdec49374b7c609d0b6b2"/><file name="View.php" hash="ed370a8483e5c760198280ccbca89437"/><dir name="Widget"><file name="Link.php" hash="57cd3a6979a8c5071960f96727e993e4"/><file name="View.php" hash="7005aa118f539052850dc09c1b7bd52e"/></dir></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Coupons4U.php" hash="1ee3188bfb91863024239cbae46da76c"/></dir><file name="Router.php" hash="521e73c2bd0888760a341aa8114a9096"/></dir><dir name="Helper"><file name="Data.php" hash="8b3b3cf8c9076d489a17d98b59845bf1"/><file name="Einfochipscoupons4u.php" hash="bf4268644b89e2297f64708b509329dd"/></dir><dir name="Model"><file name="Einfochipscoupons4u.php" hash="06203bfeb8d9071081d39f6c69d87836"/><dir name="Email"><file name="Template.php" hash="0f6aa76ecf18ced9b0e904950f2de0dc"/></dir><dir name="Resource"><dir name="Einfochipscoupons4u"><file name="Collection.php" hash="9d2117b69fcb845fce1e3b78ff9482d1"/></dir><file name="Einfochipscoupons4u.php" hash="2eeb48c8ff223fa9b1ce321f4d950deb"/><file name="Setup.php" hash="ea449a2308a7095e3660f52b32ab244b"/></dir><file name="email.php" hash="b83ac6e6462cc81c6e62894cf13dfb68"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Coupons4U"><file name="Einfochipscoupons4uController.php" hash="d304813b1cb07cb84a47bcedebde8408"/></dir></dir><file name="Einfochipscoupons4uController.php" hash="3ae0770082bd4c07d066cf7beb2f70c0"/><file name="IndexController.php" hash="1b18617141b5df486513c40a7d0b976c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="95c04b290525bef98cdf5e95132e9e4f"/><file name="config.xml" hash="65dd07ec31f0123fa49e1ef1601ad884"/><file name="system.xml" hash="c411d5a4c74590ddfd3af67e6a0e0949"/><file name="widget.xml" hash="7b2f29f8fa3667ac550c5e2832da9b2f"/></dir><dir name="sql"><dir name="einfochips_coupons4u_setup"><file name="install-0.0.1.php" hash="61c95c69474fcb673abfcd6e78c2e723"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Einfochips_Coupons4U.xml" hash="1afc74331dded241724c6f4f3a34c241"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="einfochips_coupons4u.xml" hash="26837f4d9027a18a6492a4c05287f05e"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="einfochips_coupons4u.xml" hash="6753de1362ebb6ccda9ceeb7e4c9c33f"/></dir><dir name="template"><dir name="einfochips_coupons4u"><dir name="coupon4u"><file name="list.phtml" hash="2b80b80cd9729f212fe6e2ebd2e686a7"/><file name="view.phtml" hash="55b2e2765e885ff3d8ea14f9d541db9e"/></dir><file name="coupons.phtml" hash="71d26817c02fd4df61e77c1eb1139c3d"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.5.12</max></php></required></dependencies>
18
  </package>